cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
8025
Views
20
Helpful
3
Replies
rehan alam
Beginner

BGP || next-hop-self not working while doing RR

An issue came While practicing for Route-reflector with R1, R2, R3, R4 in AS 111, R5 in AS 555 and R6 in AS.
All the routes are being advertised to all the neighbor but the routes learned from RR is not installed as the best one.
I issued Next hop self command on R1 for all the BGP pairs. 
But still R1 is not changing the next hop IP while advertising the attributes. Wanted to know if next-hop not supported while doing RR. 

Below is the output from R3 and config of R1. Please help me out.


R3#sh ip bgp
BGP table version is 2, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
* i2.3.4.0/24       22.22.11.1               0    100      0 i
*> 3.4.5.0/24       0.0.0.0                  0         32768 i
* i4.5.6.0/24       11.11.44.2               0    100      0 i
* i5.6.7.0/24       22.22.11.1               0    100      0 555 i
* i55.56.57.0/24    22.22.11.1               0    100      0 555 i
* i66.66.1.0/24     11.11.44.2               0    100      0 666 i
* i66.66.2.0/24     11.11.44.2               0    100      0 666 i
R3#


R1#sh run | sec bgp
router bgp 111
 bgp router-id 1.1.1.1
 bgp log-neighbor-changes
 neighbor 11.11.33.2 remote-as 111
 neighbor 11.11.44.2 remote-as 111
 neighbor 22.22.11.1 remote-as 111
 !
 address-family ipv4
  neighbor 11.11.33.2 activate
  neighbor 11.11.33.2 route-reflector-client
  neighbor 11.11.33.2 next-hop-self
  neighbor 11.11.33.2 soft-reconfiguration inbound
  neighbor 11.11.44.2 activate
  neighbor 11.11.44.2 route-reflector-client
  neighbor 11.11.44.2 next-hop-self
  neighbor 11.11.44.2 soft-reconfiguration inbound
  neighbor 22.22.11.1 activate
  neighbor 22.22.11.1 next-hop-self
  neighbor 22.22.11.1 soft-reconfiguration inbound
1 ACCEPTED SOLUTION

Accepted Solutions
Rolf Fischer
Engager

Hi,

from Cisco BGP documentation:

Do not use the neighbor next-hop-self command to modify the next hop
attribute for a route reflector when this feature is enabled for a
route reflector client. Using the neighbor next-hop-self command on
the route reflector will modify next hop attributes only for routes
that are learned from eBGP peers and not the intended routes that are
being reflected from the route reflector clients. To modify the next
hop attribute when reflecting a route, use an outbound route map. 

However, in some recent IOS an "all" option is available for the "neighbor next-hop-self" command which seems to change the next hops of reflected routes as well:

If you do not use the optional all keyword, the next hop of only eBGP-learned routes 
will be updated by the RR. With the all keyword configured, the next hop of 
both eBGP- and iBGP-learned routes will be updated by the RR.

http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_bgp/command/irg-cr-book/bgp-m1.html#wp4972925610

 

HTH

Rolf

View solution in original post

3 REPLIES 3
Rolf Fischer
Engager

Hi,

from Cisco BGP documentation:

Do not use the neighbor next-hop-self command to modify the next hop
attribute for a route reflector when this feature is enabled for a
route reflector client. Using the neighbor next-hop-self command on
the route reflector will modify next hop attributes only for routes
that are learned from eBGP peers and not the intended routes that are
being reflected from the route reflector clients. To modify the next
hop attribute when reflecting a route, use an outbound route map. 

However, in some recent IOS an "all" option is available for the "neighbor next-hop-self" command which seems to change the next hops of reflected routes as well:

If you do not use the optional all keyword, the next hop of only eBGP-learned routes 
will be updated by the RR. With the all keyword configured, the next hop of 
both eBGP- and iBGP-learned routes will be updated by the RR.

http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_bgp/command/irg-cr-book/bgp-m1.html#wp4972925610

 

HTH

Rolf

View solution in original post

Thanks Rolf for easing my BGP life :)

To modify the next hop attribute when reflecting a route, use an outbound route map. 

 I've tried that but it didn't work:

 

R1(config)#do sh run | s router bgp
router bgp 123
bgp router-id 1.1.1.1
bgp log-neighbor-changes
redistribute connected
neighbor 2.2.2.2 remote-as 123
neighbor 2.2.2.2 update-source Loopback0
neighbor 2.2.2.2 route-reflector-client
neighbor 2.2.2.2 route-map NEXT_HOP_SELF out
neighbor 3.3.3.3 remote-as 123
neighbor 3.3.3.3 update-source Loopback0
neighbor 3.3.3.3 route-reflector-client
neighbor 3.3.3.3 route-map NEXT_HOP_SELF out

 

R1(config)#route-map NEXT_HOP_SELF permit 10

R1(config-route-map)#set ip next-hop self
% "NEXT_HOP_SELF" used as BGP outbound route-map, set use own IP/IPv6 address for the nexthop not supported
% "NEXT_HOP_SELF" used as BGP outbound route-map, set use own IP/IPv6 address for the nexthop not supported

 

I removed the route-map and configured "neighbor x.x.x.x next-hop-self all" and it worked like a charm :)

Thanks!