EBGP multihop
EBGP multihop option often is used to peer with an external neighbor. If there are multiple paths between EBGP peers you will probably want to take advantage of that. Therefore you will need to use a loopback interface as update source. By default, BGP allows to establish EBGP neighborships to peers residing on direclty connected networks, it is limited by TTL (which is 1 by default for EBGP peers).
If you want to establish connections to peers which are not directly connected use this command:
neighbor {ip-add | group-name} ebgp-multihop [ttl]
ttl
is Time to Live value.
Let’s examine a scenario and to apply EBGP multihop feature to it. Below you see the scenario used for this.
As usual, Interior Gateway Protocol (IGP) information is not exchanged between ISPs, therefore I will use static routes on ISP1 to have routes to ISP2’s loopback and viceversa. Next, I present you interfaces configurations and static routes on routers.
ISP1
ISP1(config)#interface fastEthernet 0/0 ISP1(config-if)#ip address 10.0.0.1 255.255.255.252 ISP1(config-if)#no shutdown ISP1(config-if)#interface fastEthernet 0/1 ISP1(config-if)#ip address 10.0.1.1 255.255.255.252 ISP1(config-if)#no shutdown ISP1(config-if)#interface lo 0 ISP1(config-if)#ip address 192.168.0.1 255.255.255.255 ISP1(config-if)#exit ISP1(config)#ip route 192.168.100.1 255.255.255.255 10.0.0.2 ISP1(config)#ip route 192.168.100.1 255.255.255.255 10.0.1.2
ISP2
ISP2(config)#interface fastEthernet 0/0 ISP2(config-if)#ip address 10.0.0.2 255.255.255.252 ISP2(config-if)#no shutdown ISP2(config-if)#interface fastEthernet 0/1 ISP2(config-if)#ip address 10.0.1.2 255.255.255.252 ISP2(config-if)#no shutdown ISP2(config-if)#interface lo 0 ISP2(config-if)#ip address 192.168.100.1 255.255.255.255 ISP2(config-if)#exit ISP2(config)#ip route 192.168.0.1 255.255.255.255 10.0.0.1 ISP2(config)#ip route 192.168.0.1 255.255.255.255 10.0.1.1
Now, once we have connection, we can proceed to BGP configuration:
ISP1
ISP1(config)#router bgp 65000 ISP1(config-router)#neighbor 192.168.100.1 remote-as 65100 ISP1(config-router)#neighbor 192.168.100.1 update-source loopback 0 ISP1(config-router)#neighbor 192.168.100.1 ebgp-multihop 2
ISP2
ISP2(config)#router bgp 65100 ISP2(config-router)#neighbor 192.168.0.1 remote-as 65000 ISP2(config-router)#neighbor 192.168.0.1 update-source loopback 0 ISP2(config-router)#neighbor 192.168.0.1 ebgp-multihop 2
And now verification on ISP1:
ISP1#show ip bgp summary BGP router identifier 192.168.0.1, local AS number 65000 BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 192.168.100.1 4 65100 7 7 1 0 0 00:04:10 0 ISP1#
TTL value can be checked this way:
ISP1#show ip bgp neighbors ... output ommited ... Connections established 1; dropped 0 Last reset never External BGP neighbor may be up to 2 hops away. Connection state is ESTAB, I/O status: 1, unread input bytes: 0 Connection is ECN Disabled, Mininum incoming TTL 0, Outgoing TTL 2 Local host: 192.168.0.1, Local port: 37835 Foreign host: 192.168.100.1, Foreign port: 179 ... output ommited ... ISP1#
