Wednesday, May 23, 2018

Challenge: BGP

I was hanging out in theLANtamer's Discord server and a friend showed me this challenge.

I later found out after I had completed the challenge, it was a BGP challenge from the Great Vinit Jain (https://twitter.com/vinugenie) from his Cisco Live presentation, at around 12 minutes in: ( https://www.ciscolive.com/global/on-demand-library/?search=BRKRST%203320#/video/1519328378542002IVEW )


The Challenge:


The Solution:


The Configs:


R1:



hostname R1

interface Loopback100
 ip address 100.1.1.1 255.255.255.255

interface FastEthernet0/0
 description "To R2"
 ip address 10.1.12.1 255.255.255.0


router bgp 100
 bgp log-neighbor-changes
 network 100.1.1.1 mask 255.255.255.255
 neighbor 10.1.12.2 remote-as 200


R2:



hostname R2

ip vrf 200
 rd 200:200


interface FastEthernet0/0
 description "To R1"
 ip vrf forwarding 200
 ip address 10.1.12.2 255.255.255.0

interface FastEthernet1/0
 description "To R3"
 ip vrf forwarding 200
 ip address 10.1.23.2 255.255.255.0


router bgp 200
 bgp log-neighbor-changes
 !
 address-family ipv4 vrf 200
  neighbor 10.1.12.1 remote-as 100
  neighbor 10.1.12.1 activate
  neighbor 10.1.23.3 remote-as 100
  neighbor 10.1.23.3 activate
  neighbor 10.1.23.3 as-override
 exit-address-family


R3:


hostname R3

interface FastEthernet0/0
 description "To R4"
 ip address 10.1.34.3 255.255.255.0

interface FastEthernet1/0
 description "To R2"
 ip address 10.1.23.3 255.255.255.0

router bgp 250
 bgp log-neighbor-changes
 neighbor 10.1.23.2 remote-as 200
 neighbor 10.1.23.2 local-as 100 no-prepend replace-as
 neighbor 10.1.34.4 remote-as 200
 neighbor 10.1.34.4 local-as 200 no-prepend replace-as


R4:


hostname R4

interface FastEthernet0/0
 description "To R3"
 ip address 10.1.34.4 255.255.255.0

interface FastEthernet1/0
 description "To R5"
 ip address 10.1.45.4 255.255.255.0

router bgp 200
 bgp log-neighbor-changes
 neighbor 10.1.34.3 remote-as 200
 neighbor 10.1.45.5 remote-as 300


R5:


hostname R5

interface FastEthernet1/0
 description "To R4"
 ip address 10.1.45.5 255.255.255.0

router bgp 300
 bgp log-neighbor-changes
 neighbor 10.1.45.4 remote-as 200


R5 - Verify:


R5#sho ip bgp
BGP table version is 13, local router ID is 10.1.45.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  100.1.1.1/32     10.1.45.4                              0 200 200 200 i
R5#

No comments:

Post a Comment