06 July, 2013

CONFIGURE BGP EBGP MULTIHOP



BGP EBGP MULTIHOP

SCENARIO:

You are the junior network engineer for the biggest company in the world selling Arcade Games. You need to establish aBGP link with the service provider, in the future they will add another physical link for redundancy and so the provider wants you to setup the EBGP link between the loopback adapters for logical redundancy...time for some practice!

GOAL:

  • All IP addresses have been preconfigured for you as specified in the topology picture.
  • Both routers have a loopback interface:
    Router GEORGIA: L0: 1.1.1.1 /32
    Router SPAIN: 2.2.2.2 /32
  • Configure static routes on both sides pointing to each others loopback.
  • Ensure you have full reachability and can ping both loopbacks.
  • Router Ping: configure BGP AS 100
  • Router Pong: configure BGP AS 200
  • Establish a BGP neighbor relationship between the 2 routers. You need to source the BGP updates from the loopback interfaces.
  • Ensure you have a BGP neighbor relationship, use the "show ip bgp summary" command to confirm this.

Basic Configuration And Static Route.

SPAIN#configure terminal
SPAIN(config)#interface fastEthernet 0/0
SPAIN(config-if)#ip address 192.168.12.1 255.255.255.252
SPAIN(config-if)#no shutdown
SPAIN(config-if)#interface lo 0
SPAIN(config-if)#ip address 1.1.1.1 255.255.255.255
SPAIN(config-if)#ip route 2.2.2.2 255.255.255.255 192.168.12.2

GEORGIA#configure terminal
GEORGIA(config)#interface fastEthernet 0/0
GEORGIA(config-if)#ip address 192.168.12.2 255.255.255.252
GEORGIA(config-if)#no shutdown
GEORGIA(config-if)#interface lo 0
GEORGIA(config-if)#ip address 2.2.2.2 255.255.255.255
GEORGIA(config-if)#ip route 1.1.1.1 255.255.255.255 192.168.12.1
GEORGIA(config)#do ping 1.1.1.1 source lo 0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 2.2.2.2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/31/48 ms

Configure BGP.

SPAIN#configure terminal
SPAIN(config)#router bgp 100
SPAIN(config-router)#neighbor 2.2.2.2 remote-as 200
SPAIN(config-router)#neighbor 2.2.2.2 update-source loopback 0

GEORGIA#configure terminal
GEORGIA(config)#router bgp 200
GEORGIA(config-router)#neighbor 1.1.1.1 remote-as 100
GEORGIA(config-router)#neighbor 1.1.1.1 update-source loopback 0

GEORGIA(config-router)#do show ip bgp sum
BGP router identifier 2.2.2.2, local AS number 200
BGP table version is 1, main routing table version 1
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
1.1.1.1         4   100       0       0        0    0    0 never    Idle

To Fix We Need To Configure eBGP-Multihop On Both.

GEORGIA(config-router)#neighbor 1.1.1.1 ebgp-multihop 2 (By Default Is 1)

SPAIN(config-router)#do debug ip bgp
BGP debugging is on for address family: IPv4 Unicast

SPAIN(config-router)#neighbor 2.2.2.2 ebgp-multihop 2
*Mar  1 00:15:45.295: BGP: 2.2.2.2 went from Idle to Active
*Mar  1 00:15:45.299: BGP: 2.2.2.2 open active delayed 28112ms (35000ms max, 28% jitter)
*Mar  1 00:15:46.999: BGP: 2.2.2.2 passive open to 1.1.1.1
*Mar  1 00:15:47.003: BGP: 2.2.2.2 went from Active to Idle
*Mar  1 00:15:47.003: BGP: 2.2.2.2 went from Idle to Connect
*Mar  1 00:15:47.011: BGP: 2.2.2.2 rcv message type 1, length (excl. header) 26
*Mar  1 00:15:47.011: BGP: 2.2.2.2 rcv OPEN, version 4, holdtime 180 seconds
*Mar  1 00:15:47.015: BGP: 2.2.2.2 went from Connect to OpenSent
*Mar  1 00:15:47.015: BGP: 2.2.2.2 sending OPEN, version 4, my as: 100, holdtime 180 seconds
*Mar  1 00:15:47.015: BGP: 2.2.2.2 rcv OPEN w/ OPTION parameter len: 16
*Mar  1 00:15:47.015: BGP: 2.2.2.2 rcvd OPEN w/ optional parameter type 2 (Capability) len 6
*Mar  1 00:15:47.015: BGP: 2.2.2.2 OPEN has CAPABILITY code: 1, length 4
*Mar  1 00:15:47.015: BGP: 2.2.2.2 OPEN has MP_EXT CAP for afi/safi: 1/1
*Mar  1 00:15:47.019: BGP: 2.2.2.2 rcvd OPEN w/ optional parameter type 2 (Capability) len 2
*Mar  1 00:15:47.019: BGP: 2.2.2.2 OPEN has CAPABILITY code: 128, length 0
*Mar  1 00:15:47.019: BGP: 2.2.2.2 OPEN has ROUTE-REFRESH capability(old) for all address-families
*Mar  1 00:15:47.019: BGP: 2.2.2.2 rcvd OPEN w/ optional parameter type 2 (Capability) len 2
*Mar  1 00:15:47.019: BGP: 2.2.2.2 OPEN has CAPABILITY code: 2, length 0
*Mar  1 00:15:47.019: BGP: 2.2.2.2 OPEN has ROUTE-REFRESH capability(new) for all address-families
BGP: 2.2.2.2 rcvd OPEN w/ remote AS 200
*Mar  1 00:15:47.023: BGP: 2.2.2.2 went from OpenSent to OpenConfirm
*Mar  1 00:15:47.023: BGP: 2.2.2.2 send message type 1, length (incl. header) 45
*Mar  1 00:15:47.055: BGP: 2.2.2.2 went from OpenConfirm to Established
*Mar  1 00:15:47.059: %BGP-5-ADJCHANGE: neighbor 2.2.2.2 Up

SPAIN(config-router)#do show ip bgp summary
BGP router identifier 1.1.1.1, local AS number 100
BGP table version is 1, main routing table version 1
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
2.2.2.2         4   200       6       6        1    0    0 00:02:04        0

SPAIN(config-router)#do show ip bgp neighbors 2.2.2.2 | include hop
  External BGP neighbor may be up to 2 hops away.

##########################################################################################################