Enable eBGP Multihop

This example shows the minimum configuration required for enabling eBGP multihop on peers speaking BGP. eBGP multihop is used for routers that are not directly connected to each other. Typically, eBGP peers are directly connected, but if there is a requirement that necessitates this scenario, this configuration can be used.

The IP addresses used in the configuration should be accessible through an IGP or static routing.

Topology

Figure 38. eBGP Multihop Connection

R1

#configure terminal

Enter configure mode.

(config)#interface lo

Enter loopback interface mode.

(config-if)#ip address 100.100.100.1/24 secondary

Specify IP address to the interface.

(config-if)#exit

Exit loopback interface mode.

(config)#ip route 200.200.200.0/24 1.1.1.2

Specify route IP address.

(config)#router bgp 1

Define the routing process. The number 1 specifies the AS number of R1.

(config-router)#neighbor 200.200.200.1 remote-as 2

Define BGP neighbors, and establish a TCP session. 200.200.200.1 is the IP address of the neighbor (R2), and 2 is the neighbor’s AS number.

(config-router)#neighbor 200.200.200.1 update-source lo

Define BGP neighbors, to update the source routes.

(config-router)#neighbor 200.200.200.1 ebgp-multihop

Define the neighbor 200.200.200.1 for eBGP multihops.

(config-router)#address-family ipv4 unicast

Enter the Ipv4 Unicast Address Family.

(config-router-af)# neighbor 200.200.200.1 activate

Activate the neighbor under address family mode

(config-router-af)# exit-address-family

Exit address-family mode.

(config-router)#commit

Commit the candidate configuration to the running configuration.

R2

#configure terminal

Enter configure mode.

(config)#interface lo

Enter loopback interface mode.

(config-if)#ip address 200.200.200.1/24 secondary

Specify IP address to the interface.

(config-if)#exit

Exit loopback interface mode.

(config)#ip route 100.100.100.0/24 1.1.1.1

Specify route IP address.

(config)#router bgp 2

Define the routing process. The number 2 specifies the AS number of R1.

(config-router)#neighbor 100.100.100.1 remote-as 1

Define BGP neighbors, and establish a TCP session. 100.100.100.1 is the IP address of the neighbor (R2), and 1 is the neighbor's AS number.

(config-router)#neighbor 100.100.100.1 update-source lo

Define BGP neighbors, to update the source routes.

(config-router)#neighbor 100.100.100.1 ebgp-multihop

Define the neighbor 100.100.100.1 for eBGP multihops.

(config-router)#address-family ipv4 unicast

Config redistribute under address-family

(config-router-af)# neighbor 100.100.100.1 activate

Activate the neighbor under address family mode

(config-router-af)#redistribute static

Redistribute static route

(config-router-af)#exit-address-family

Exit address-family mode

(config-router)#commit

Commit the candidate configuration to the running configuration.

Validation

R1

R2