SOURCECODEBD.NET

Live Experience

5.  BGP NEXT-HOP ATTRIBUTE

HOW TO BGP NEXT-HOP ATTRIBUTE CONFIGURATION
 
Interface IP Address Configuration 
 
R1 
 
Interface  IP Address   Subnet Mask 
S 0/2/0    1.1.1.1           255.0.0.0 
E 0         10.1.1.1         255.0.0.0 
 
R2 
 
Interface  IP Address   Subnet Mask 
S 0           1.1.1.2           255.0.0.0 
S 1           2.2.2.1           255.0.0.0 
E 0          20.1.1.1          255.0.0.0
 
R3 
 
Interface  IP Address   Subnet Mask 
S 0            2.2.2.2          255.0.0.0 
E 0          30.1.1.1         255.0.0.0 
 
Task 1: 
 
Configure BGP on the routers as per the above scenario. 
 
R1 
 
Router bgp 100 
Neighbor 1.1.1.2 remote-as 200 
Network 1.0.0.0 
Network 10.0.0.0 
No synchronization
 
R2 
 
Router bgp 200 
Neighbor 2.2.2.2 remote-as 200 
Neighbor 1.1.1.1 remote-as 100 
Network 1.0.0.0 
Network 2.0.0.0 
Network 20.0.0.0 
No synchronization 
 
R3 
 
Router bgp 200 
Neighbor 2.2.2.1 remote-as 200 
Network 2.0.0.0 
Network 30.0.0.0 
No synchronization 
 
 
R1 advertises network 10.0.0.0 to R2 with the next hop of 1.1.1.1 and R2 advertises 
network 20.0.0.0 to R1 with the next hop of 1.1.1.2. 
 
For iBGP, the protocol states that the next hop that eBGP advertises, should be carried 
into iBGP, because of this rule, R2 advertises network 10.0.0.0 to its iBGP peer R3 with 
a next hop of 1.1.1.1. Therefore for R3, the next hop to reach network 10.0.0.0 is via 
1.1.1.1 and not 2.2.2.1
 
Make sure that R3 can reach network 10.0.0.0 via IGP, otherwise R3 drops packets with 
the destination of 10.0.0.0 or advertise via network commands in BGP. 
 
Verification: 
 
R3#show ip route
 
 
Task 2
 
Configure BGP such that R2 advertises its updates to iBGP peers via 2.2.2.1 instead of 
1.1.1.1. You can use the next-hop-self command to accomplish this task. 
 
R2 
 
Router bgp 200 
Neighbor 2.2.2.2 remote-as 200 
Neighbor 2.2.2.2 next-hop-self 
Neighbor 1.1.1.1 remote-as 100 
Neighbor 1.1.1.1 next-hop-self 
Network 1.0.0.0 
Network 2.0.0.0 
Network 20.0.0.0 
No synchronization
 
Verification: 
 
R3#show ip route 
 
The output displays that for R3 to reach network 10.0.0.0 is via 2.2.2.1 because of the 
next-hop-self command. R2 advertises network 10.0.0.0 via 2.2.2.1 to R3, instead of 
carrying the next-hop advertised by eBGP.

 

You are here: Home / BGP / HOW TO BGP NEXT-HOP ATTRIBUTE CONFIGURATION