Lab 92 - BGP Next-Hop Modification - Learn Cisco

Post Top Ad

Lab 92 - BGP Next-Hop Modification

Prerequisites: CCNP level skills.


Topology

Pic. 1 - Topology Diagram.
Icons designed by: Andrzej Szoblik - http://www.newo.pl

Task 1
Configure OSPF area 0 on R1, R3 and R4. Do not run OSPF on links between R2 and R4, or R3 and R5.

Task 2
Configure basic BGP between all the routers as per topology diagram. Advertise Loopbacks into BGP. On R1 check the next-hop attribute for 172.16.102.0/24 and 172.16.105.0/24.

Task 3
Modify the next hop attribute for the subnets in question (task 1). Use two different ways to accomplish this goal.

Lab Solution

Task 1
Configure OSPF area 0 on R1, R3 and R4. Do not run OSPF on links between R2 and R4, or R3 and R5.

R1 Configuration:
!
router ospf 1
 router-id 172.16.101.1
 log-adjacency-changes
 network 10.1.13.1 0.0.0.0 area 0
 network 10.1.14.1 0.0.0.0 area 0
!

R3 Configuration:
!
router ospf 1
 router-id 172.16.103.3
 log-adjacency-changes
 network 10.1.13.3 0.0.0.0 area 0
!

R4 Configuration:
!
router ospf 1
 router-id 172.16.104.4
 log-adjacency-changes
 network 10.1.14.4 0.0.0.0 area 0
!


Task 2
Configure basic BGP between all the routers as per topology diagram. Advertise Loopbacks into BGP. On R1 check the next-hop attribute for 172.16.102.0/24 and 172.16.105.0/24.

R1 Configuration:
!
router bgp 134
 no synchronization
 bgp router-id 172.16.101.1
 bgp log-neighbor-changes
 network 172.16.101.0 mask 255.255.255.0
 neighbor 10.1.13.3 remote-as 134
 neighbor 10.1.14.4 remote-as 134
 no auto-summary
!

R2 Configuration:
!
router bgp 20
 no synchronization
 bgp router-id 172.16.102.2
 bgp log-neighbor-changes
 network 172.16.102.0 mask 255.255.255.0
 neighbor 10.1.24.4 remote-as 134
 no auto-summary
!

R3 Configuration:
!
router bgp 134
 no synchronization
 bgp router-id 172.16.103.3
 bgp log-neighbor-changes
 network 172.16.103.0 mask 255.255.255.0
 neighbor 10.1.13.1 remote-as 134
 neighbor 10.1.35.5 remote-as 50
 no auto-summary
!


R4 Configuration:
!
router bgp 134
 no synchronization
 bgp router-id 172.16.104.4
 bgp log-neighbor-changes
 network 172.16.104.0 mask 255.255.255.0
 network 172.16.144.0 mask 255.255.255.0
 neighbor 10.1.14.1 remote-as 134
 neighbor 10.1.24.2 remote-as 20
 no auto-summary
!

R5 Configuration:
!
router bgp 50
 no synchronization
 bgp router-id 172.16.105.5
 bgp log-neighbor-changes
 network 172.16.105.0 mask 255.255.255.0
 neighbor 10.1.35.3 remote-as 134
 no auto-summary
!


Note!
With this BGP configuration we have some other connectivity issues except the one addressed in this post. I'll deal with them in my next posts. For now, next-hop attribute is my major area of concern.

Verification:
Pic. 2 - R1's BGP Table.
Notice!
The two prefixes have no best path available since the next hop address is not reachable.



Task 3
Modify the next hop attribute for the subnets in question (task 1). Use two different ways to accomplish this goal.

R3 Configuration:
!
route-map SET_NH permit 10
 set ip next-hop 10.1.13.3
!
router bgp 134
 no synchronization
 bgp router-id 172.16.103.3
 bgp log-neighbor-changes
 network 172.16.103.0 mask 255.255.255.0
 neighbor 10.1.13.1 remote-as 134
 neighbor 10.1.13.1 route-map SET_NH out
 neighbor 10.1.35.5 remote-as 50
 no auto-summary
!

Notice!
When configuring route-map with the next-hop to itself, the warning is sent to the console. Disregard it!
% Warning: Next hop address is our address

Also, clear ip bgp 10.1.13.1 out is required for this change to take effect!

Verification:
Pic. 3 - R1's BGP Table.

R4 Configuration:
!
router bgp 134
 no synchronization
 bgp router-id 172.16.104.4
 bgp log-neighbor-changes
 network 172.16.104.0 mask 255.255.255.0
 network 172.16.144.0 mask 255.255.255.0
 neighbor 10.1.14.1 remote-as 134
 neighbor 10.1.14.1 next-hop-self
 neighbor 10.1.24.2 remote-as 20
 no auto-summary
!

Verification:
Pic. 4 -  R1's BGP Table.

Notice!
The third option to deal with next-hop inaccessible would be to advertise the link between R2 and R4 as well as R3 and R5 into OSPF. Fourth option: redistribute connected links into OSPF on R3 and R4.

Post Top Ad