EBGP Multihop IN BGP

While configuring BGP neighbours, Loopback interface is the preferred source for forming BGP neighborship. The reason being the Loopback source does not ever go down even if the physical interface is down.

More so, Loopback becomes more important when we have 2 or more interfaces connecting BGP neighbours and in fact, Load balancing of traffic can also be achieved. One key consideration while configuring eBGP neighborship on Loopback interfaces is to set the TTL to 2 for directly connected routers to be able to peer between their loopbacks because the TTL gets decremented on the way to the loopback. The multihop BGP is only for eBGP and not for iBGP.

Advertisements

Related Articles – EBGP VS IBGP

A sample scenario will help give more clarity on the concept of “eBGP Multihop”.

In the given scenario, we have 3 Routers R1, R2 and R3 connected in series. While R1 and R2 are directly connected and in BGP AS 1 , Router R3 belongs to AS 3.

Related Article – BGP Local Preference Attribute

R1 and R2 will form iBGP neighborship while R2 and R3 should form eBGP neighborship. All the BGP neighborship (iBGP and eBGP) should be formed via Loopback 0 of each Router.

R1, R2 and R3 configuration is given below –

R1#
interface Loopback0 ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.12.1 255.255.255.0
!
router bgp 1
no synchronization
bgp log-neighbor-changes
network 192.168.12.0
neighbor 2.2.2.2 remote-as 1
neighbor 2.2.2.2 update-source Loopback0  ——–>R1 to use Loopback 0 as source for BGP neighborship and updates   
no auto-summary
!
ip route 2.2.2.0 255.255.255.0 192.168.12.2 ——->Static Route to reach Loopback0 of R2

R2#sh run
!
interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.12.2 255.255.255.0
!
interface FastEthernet0/1
ip address 192.168.23.2 255.255.255.0
!
router bgp 1
no synchronization
network 192.168.12.0
network 192.168.23.0
neighbour 1.1.1.1 remote-as 1
neighbour 1.1.1.1 update-source Loopback0 ——–>R2 to use Loopback 0 as a source for BGP neighborship and updates with R1
neighbor 1.1.1.1 next-hop-self
neighbour 3.3.3.3 remote-as 3
neighbor 3.3.3.3 update-source Loopback0——–>R2 to use Loopback 0 as a source for BGP neighborship and updates with R3
no auto-summary
!
ip route 1.1.1.0 255.255.255.0 192.168.12.1 ——->Static Route to reach Loopback0 of R1
ip route 3.3.3.0 255.255.255.0 192.168.23.3 ——->Static Route to reach Loopback0 of R3
R3#sh run
!
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface FastEthernet0/1
ip address 192.168.23.3 255.255.255.0
!
router bgp 3
no synchronization
network 192.168.23.0
neighbor 2.2.2.2 remote-as 1
neighbor 2.2.2.2 update-source Loopback0——–>R3 to use Loopback 0 as a source for BGP neighborship and updates with R2
no auto-summary
!
ip route 2.2.2.0 255.255.255.0 192.168.23.2——->Static Route to reach Loopback0 of R2

Now , lets see the BGP neighborship across 3 Routers
R1#sh ip bgp summary
BGP router identifier 1.1.1.1, local AS number 1
BGP table version is 12, main routing table version 12
2 network entries using 234 bytes of memory
3 path entries using 156 bytes of memory
3/2 BGP path/bestpath attribute entries using 372 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 762 total bytes of memory
BGP activity 5/3 prefixes, 7/4 paths, scan interval 60 secsNeighbor    V    AS    MsgRcvd      MsgSent   TblVer  InQ OutQ        Up/Down  State/PfxRcd
2.2.2.2         4     1     100                    99                12          0           0             01:33:00        2
R1 and R2 are forming iBGP neighborship and receiving routes via BGP.
R2#sh ip bgp summary
BGP router identifier 2.2.2.2, local AS number 1
BGP table version is 16, main routing table version 16
2 network entries using 234 bytes of memory
3 path entries using 156 bytes of memory
3/1 BGP path/bestpath attribute entries using 372 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 762 total bytes of memory
BGP activity 5/3 prefixes, 8/5 paths, scan interval 60 secs
Neighbor    V    AS  MsgRcvd        MsgSent              TblVer  InQ         OutQ     Up/Down  State/PfxRcd
1.1.1.1         4       1     100                  101                         16           0              0              01:33:55               1
3.3.3.3         4     3      70                     70                        0             0              0              00:13:16               Idle
R2 is forming iBGP neighborship with R1 while R2 eBGP neighborship with R3 is still down ie in “init” state

Also, lets see the “show ip bgp summary” output on R3 –

R3#sh ip bgp summary
BGP router identifier 3.3.3.3, local AS number 3
BGP table version is 2, main routing table version 2
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 3/2 prefixes, 4/3 paths, scan interval 60 secs
Neighbor    V    AS    MsgRcvd      MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
2.2.2.2         4     1      70                     70               0              0          0      00:15:12       Idle
From the output , we see that R1 and R2 form iBGP neighborship while R2 and R3 don’t form eBGP neighborship. The configuration on 3 Routers has followed the same approach , however iBGP neighbors have formed peering while eBGP multihop Routers haven’t. Now , lets introduce “ebgp-multihop 2”  command between R2 and R3 and find out what happens –
R2(config)#router bgp 1
R2(config-router)#neighb 3.3.3.3 ebgp-multihop 2
R3(config)#router bgp 3
R3(config-router)#neighbor 2.2.2.2 ebgp-multihop 2

After issuing “ebgp-multihop 2” on both R2 and R3 Routers , BGP neighborship is viewed on both as below –
R2(config-router)#do sh ip bgp summ
BGP router identifier 2.2.2.2, local AS number 1
BGP table version is 16, main routing table version 16
2 network entries using 234 bytes of memory
4 path entries using 208 bytes of memory
4/1 BGP path/bestpath attribute entries using 496 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 962 total bytes of memory
BGP activity 5/3 prefixes, 9/5 paths, scan interval 60 secs
Neighbor        V    AS MsgRcvd     MsgSent   TblVer  InQ OutQ        Up/Down  State/PfxRcd
1.1.1.1         4     1     108                    109             16           0       0                01:41:31        1
3.3.3.3         4     3      76                      76               16          0       0                00:01:19        1
R3#sh ip bgp summary
BGP router identifier 3.3.3.3, local AS number 3
BGP table version is 3, main routing table version 3
2 network entries using 234 bytes of memory
3 path entries using 156 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 786 total bytes of memory
BGP activity 4/2 prefixes, 6/3 paths, scan interval 60 secsNeighbor   V    AS    MsgRcvd       MsgSent   TblVer  InQ OutQ        Up/Down  State/PfxRcd
2.2.2.2        4     1                 75           75               3              0          0              00:00:03         2
Hence, we deduce that after issuing “ebgp-multihop” command between ebgp neighbors , neighborship is formed over Loopback interfaces. This is required since eBGP uses a default value of 1 ie only directly connected interfaces to form neighborship. In order to reach Loopback of directly connected Routers, TTL value needs to be incremented to 2 in eBGP using “ebgp-multihop 2” command.

Share this:
Advertisements

Tags:

Related Posts

About The Author

Add Comment

Social Media Auto Publish Powered By : XYZScripts.com
Select your currency
USD United States (US) dollar