!!Verifying Current Interface Configuration on R1 & R2
R1#sh int desInterface Status Protocol Description
Lo0 up up
Se0 up up WAN CONNECTION 1
Se1 up up WAN CONNECTION 2
R1#sh ip int brief
Interface IP-Address OK? Method Status Protocol
Loopback0 1.1.1.1 YES manual up up
Serial0 12.1.1.1 YES NVRAM up up
Serial1 21.1.1.1 YES manual up up
===========================================================
R2#sh int des
Interface Status Protocol Description
Lo0 up up
Se0 up up WAN CONNECTION 1
Se1 up up WAN CONNECTION 2
R2#sh ip int brief
Interface IP-Address OK? Method Status Protocol
Loopback0 2.2.2.2 YES manual up up
Serial0 12.1.1.2 YES manual up up
Serial1 21.1.1.2 YES manual up up
===========================================================
Currently no BGP configuration on both the Routers
R1#sh ip bgp sum
% BGP not active
R2#sh ip bgp
% BGP not active
===========================================================
Here there are two links between R1 and R2.
Establishing two BGP Neighborship using both paths is not a solution.
We need to establish only one BGP Neighborship between R1 and R2.
and this can be achieved using loopback interfaces
So by using loopback interfaces for BGP neighborship.
=>we have both the path available.
=> BGP Neighborship wont go down even when the physical interfaces go down since loopback interfaces never goes down
BGP Neighborship “ LOOPBACK “ interfaces are always preferred .
======================================================================
By default BGP packets source is the outgoing interface but BGP gives us an option to change the source of the BGP packet sent.
Here we can use loopback interface as source of BGP packets sent between R1 and R2.
Hence we need to change source of BGP packet which can be achieved using "update source" command .
======================================================================
eBGP Neighborship should be directly connected i.e. same subnet .
By default TTL value in BGP packet is 1 when it enters from one AS to another AS.
But here we are using loopback interfaces which are in different subnet and they are not directly connected to each other .
Hence need to specify the same using eBGP multihop command
======================================================================
!! Configuration of the loopback interfaces
R1(config)#int loopback 1
Dec 13 01:54:28.959: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up
R1(config-if)#ip address 11.11.11.11 255.255.255.255
R1(config-if)#^Z
R2(config)#int loopback 1
Dec 13 01:55:33.523: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up
R2(config-if)#ip address 22.22.22.22 255.255.255.255
R2(config-if)#^Z
=======================================================================
R1(config)#router bgp 100
R1(config-router)#neighbor 22.22.22.22 remote-as 200
R1(config-router)#neighbor 22.22.22.22 update-source loopback 1
R1(config-router)#neighbor 22.22.22.22 ebgp-multihop 2
R2(config)#router bgp 200
R2(config-router)#neighbor 11.11.11.11 remote-as 100
R2(config-router)#neighbor 11.11.11.11 update-source loopback 1
R2(config-router)#neighbor 11.11.11.11 ebgp-multihop 2
R1#sh ip bgp sum
BGP router identifier 1.1.1.1, local AS number 100
BGP table version is 8, main routing table version 8
1 network entries using 117 bytes of memory
1 path entries using 52 bytes of memory
2/1 BGP path/bestpath attribute entries using 248 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 417 total bytes of memory
BGP activity 2/1 prefixes, 4/3 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
22.22.22.22 4 200 0 0 0 0 0 never Active
R2#sh ip bgp sum
BGP router identifier 2.2.2.2, local AS number 200
BGP table version is 8, main routing table version 8
1 network entries using 117 bytes of memory
1 path entries using 52 bytes of memory
2/1 BGP path/bestpath attribute entries using 248 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 417 total bytes of memory
BGP activity 2/1 prefixes, 4/3 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
11.11.11.11 4 100 0 0 0 0 0 never Active
R1#ping 22.22.22.22 source loopback 1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 22.22.22.22, timeout is 2 seconds:
Packet sent with a source address of 11.11.11.11
.....
Success rate is 0 percent (0/5)
BGP Neighborship is unsuccessful.
SINCE THERE IS NO L3 Reachability between the loopback interfaces .
No TCP session is established between them.
!!debug output on R2
Dec 13 02:28:40.475: BGP: 11.11.11.11 active open failed - no route to peer, open active delayed 34828ms (35000ms max, 28% jitter)
There should Reachability Between 11.11.11.11 & 22.22.22.22
Lets configure static routes for same .
R1(config)#ip route 22.22.22.22 255.255.255.255 s0
R1(config)#ip route 22.22.22.22 255.255.255.255 s1
R2(config)#ip route 11.11.11.11 255.255.255.255 S0
R2(config)#ip route 11.11.11.11 255.255.255.255 S1
!!debug output on R2
Dec 13 02:28:51.843: BGP: 11.11.11.11 passive open to 22.22.22.22
Dec 13 02:28:51.843: BGP: 11.11.11.11 went from Active to Idle
Dec 13 02:28:51.843: BGP: 11.11.11.11 went from Idle to Connect
Dec 13 02:28:51.847: BGP: 11.11.11.11 rcv message type 1, length (excl. header) 26
Dec 13 02:28:51.847: BGP: 11.11.11.11 rcv OPEN, version 4, holdtime 180 seconds
Dec 13 02:28:51.847: BGP: 11.11.11.11 went from Connect to OpenSent
Dec 13 02:28:51.847: BGP: 11.11.11.11 sending OPEN, version 4, my as: 200, holdtime 180 seconds
Dec 13 02:28:51.847: BGP: 11.11.11.11 rcv OPEN w/ OPTION parameter len: 16
Dec 13 02:28:51.847: BGP: 11.11.11.11 rcvd OPEN w/ optional parameter type 2 (Capability) len 6
Dec 13 02:28:51.847: BGP: 11.11.11.11 OPEN has CAPABILITY code: 1, length 4
Dec 13 02:28:51.847: BGP: 11.11.11.11 OPEN has MP_EXT CAP for afi/safi: 1/1
Dec 13 02:28:51.847: BGP: 11.11.11.11 rcvd OPEN w/ optional parameter type 2 (Capability) len 2
Dec 13 02:28:51.847: BGP: 11.11.11.11 OPEN has CAPABILITY code: 128, length 0
Dec 13 02:28:51.847: BGP: 11.11.11.11 OPEN has ROUTE-REFRESH capability(old) for all address-families
Dec 13 02:28:51.847: BGP: 11.11.11.11 rcvd OPEN w/ optional parameter type 2 (Capability) len 2
Dec 13 02:28:51.847: BGP: 11.11.11.11 OPEN has CAPABILITY code: 2, length 0
Dec 13 02:28:51.847: BGP: 11.11.11.11 OPEN has ROUTE-REFRESH capability(new) for all address-families
BGP: 11.11.11.11 rcvd OPEN w/ remote AS 100
Dec 13 02:28:51.847: BGP: 11.11.11.11 went from OpenSent to OpenConfirm
Dec 13 02:28:51.847: BGP: 11.11.11.11 send message type 1, length (incl. header) 45
Dec 13 02:28:51.851: BGP: 11.11.11.11 went from OpenConfirm to Established
Dec 13 02:28:51.851: %BGP-5-ADJCHANGE: neighbor 11.11.11.11 Up
R1#sh ip bgp summary
BGP router identifier 1.1.1.1, local AS number 100
BGP table version is 9, main routing table version 9
2 network entries using 234 bytes of memory
2 path entries using 104 bytes of memory
3/2 BGP path/bestpath attribute entries using 372 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 734 total bytes of memory
BGP activity 3/1 prefixes, 5/3 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
22.22.22.22 4 200 13 13 9 0 0 00:08:21 1
R2#sh ip bgp summary
BGP router identifier 2.2.2.2, local AS number 200
BGP table version is 9, main routing table version 9
2 network entries using 234 bytes of memory
2 path entries using 104 bytes of memory
3/2 BGP path/bestpath attribute entries using 372 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 734 total bytes of memory
BGP activity 3/1 prefixes, 5/3 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
11.11.11.11 4 100 14 14 9 0 0 00:09:59 1
R1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
B 2.2.2.2 [20/0] via 22.22.22.22, 00:12:15
21.0.0.0/24 is subnetted, 1 subnets
C 21.1.1.0 is directly connected, Serial1
22.0.0.0/32 is subnetted, 1 subnets
S 22.22.22.22 is directly connected, Serial1
11.0.0.0/32 is subnetted, 1 subnets
C 11.11.11.11 is directly connected, Loopback1
R1#sh ip bgp
BGP table version is 9, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 0.0.0.0 0 32768 i
*> 2.2.2.2/32 22.22.22.22 0 0 200 i
R2(config)#int s0
R2(config-if)#sh
R2(config-if)#^Z
Dec 13 02:44:47.415: %SYS-5-CONFIG_I: Configured from console by console
R2#sh ip bgp sum
BGP router identifier 2.2.2.2, local AS number 200
BGP table version is 9, main routing table version 9
2 network entries using 234 bytes of memory
2 path entries using 104 bytes of memory
3/2 BGP path/bestpath attribute entries using 372 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 734 total bytes of memory
BGP activity 3/1 prefixes, 5/3 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
11.11.11.11 4 100 20 20 9 0 0 00:15:59 1
POINTS TO REMEMBER
==========================
While using loopback address of eBGP configuration -
1)We need to change source of BGP packet which can be achieved using "update source" command .
2)Need to use eBGP multihop command.
3)THERE SHOULD BE Reachability BETWEEN loopback interfaces.
Thanks for the reading the blog !!!
Very Nice Sir.
ReplyDeletePlease share your contact details sir , i want to learn more from you .
ReplyDeleteThank you.
Excellent sir
ReplyDelete