cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Popup Hotspot Using ISR 1000 with WiFi/LTE for Teleworkers and Micro Branchesr
464
Views
0
Helpful
11
Replies
Highlighted
Participant

iBGP next-hop self without next-hop self configured!

Hi

 

I have setup a lab with both eBGP and iBGP connections. I am noticing some strange results with iBGP.

I am running iBGP between the loopbacks of two routers and do not have "next-hop self" set on the iBGP neighbours but still the routers are changing the next hop of prefixes learned from eBGP to the loopback IP when updating an iBGP neighbour. I have tried with both a 3700 image and a 7200VXR (ver (C7200-ADVIPSERVICESK9-M), Version 15.2(4)S5)  with the same result. GNS3 is 2.2.3 on Ubuntu 18.04.3 LTS up to date as of this morning.

 

Without "next-hop self" iBGP should use the IP of the originating eBGP router as the next hop (in this case that should be 172.20.1.2 and 172.22.1.2) and not modify it but it is.

 

I know i should have "next-hop" self in for this to work but I am trying to document common errors for a customer so am deliberately leaving it out to show the effect (unfortunately leaving it out isnt doing anything).

 

R2 Advertising router:

 

interface Loopback0
 ip address 172.16.1.2 255.255.255.255
end

 

 router bgp 65001
  bgp log-neighbor-changes
  neighbor 172.16.1.1 remote-as 65001
  neighbor 172.16.1.1 update-source Loopback0
  neighbor 172.16.1.1 soft-reconfiguration inbound
  neighbor 172.20.1.2 remote-as 65004
  neighbor 172.20.1.2 soft-reconfiguration inbound
  neighbor 172.22.1.2 remote-as 65004
  neighbor 172.22.1.2 soft-reconfiguration inbound
  neighbor 172.24.1.2 remote-as 65002
  neighbor 172.24.1.2 soft-reconfiguration inbound
  neighbor 172.26.1.2 remote-as 65002
  neighbor 172.26.1.2 soft-reconfiguration inbound
  maximum-paths 2

R2#debug ip bgp update

 

*Nov 19 19:57:27.779: BGP(0): 172.16.1.1 NEXT_HOP is set to self for net 0.0.0.0/0,
*Nov 19 19:57:27.779: BGP(0): (base) 172.16.1.1 send UPDATE (format) 0.0.0.0/0, next 172.16.1.2, metric 0, path 65004
*Nov 19 19:57:27.779: BGP(0): 172.16.1.1 NEXT_HOP is set to self for net 192.168.1.0/24,

 

R1 receiving router:

 

interface Loopback0
 ip address 172.16.1.1 255.255.255.255
end

 

router bgp 65001
 bgp log-neighbor-changes
 neighbor 172.16.1.2 remote-as 65001
 neighbor 172.16.1.2 update-source Loopback0
 neighbor 172.16.1.2 soft-reconfiguration inbound
 neighbor 172.19.1.2 remote-as 65004
 neighbor 172.19.1.2 soft-reconfiguration inbound
 neighbor 172.21.1.2 remote-as 65004
 neighbor 172.21.1.2 soft-reconfiguration inbound
 neighbor 172.23.1.2 remote-as 65002
 neighbor 172.23.1.2 soft-reconfiguration inbound
 neighbor 172.25.1.2 remote-as 65002
 neighbor 172.25.1.2 soft-reconfiguration inbound
 maximum-paths 2

 

show ip route (snippet)

 

B     192.168.1.0/24 [200/0] via 172.16.1.2, 00:04:28

 

R1#show ip bgp neigh 172.16.1.2 received-routes
BGP table version is 8, local router ID is 172.16.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>i 0.0.0.0          172.16.1.2               0    100      0 65004 i
 *>i 192.168.1.0      172.16.1.2               0    100      0 65004 i
 * i 192.168.2.0      172.16.1.2               0    100      0 65002 65003 i

Total number of prefixes 3

 

Weird. Any ideas why it's doing this ? IOS bug or GNS3 bug ?

 

Thanks

Everyone's tags (3)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Cisco Employee

Re: iBGP next-hop self without next-hop self configured!

This looks like a bug. The expected behavior should be that the next hop is unchanged unless the next-hop-self command is configured.

 

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

View solution in original post

11 REPLIES 11
Highlighted
Cisco Employee

Re: iBGP next-hop self without next-hop self configured!

This looks like a bug. The expected behavior should be that the next hop is unchanged unless the next-hop-self command is configured.

 

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

View solution in original post

Highlighted
Participant

Re: iBGP next-hop self without next-hop self configured!

I thought it probably was. I'll see if I can try a different IOS version.

Highlighted
VIP Mentor

Re: iBGP next-hop self without next-hop self configured!

Hello
Possible bug, however have you cleared the bgp sessions?
Also on a side note you shouldn't need to use soft-reconfiguration inbound as route-refresh is less resource intensive and is a much better option to use.


You can see if your rtra support this by:
sh ip bgp neighbors x.x.x.x | sec cap



kind regards
Paul

Please rate and mark posts accordingly if you have found any of the information provided useful.
It will hopefully assist others with similar issues in the future
Highlighted
Participant

Re: iBGP next-hop self without next-hop self configured!

Yes I have tried clear ip bgp x.x.x.x and even all as well as rebooting the routers. Still does the same.

I like "soft-reconfiguration inbound" as it allows for "show ip bgp neighbour received routes", especially useful in labs or for general fault finding.

 

I agree its more resource intensive and if a customer had large routing tables then I wouldn't recommend it but most of mine are enterprise customers and their routing tables aren't that big.

 

Highlighted
VIP Mentor

Re: iBGP next-hop self without next-hop self configured!

@Patrick Colbeck wrote:

I like "soft-reconfiguration inbound" as it allows for "show ip bgp neighbour received routes",


The same output can be shown with
sh ip bgp neighbors x.x.x.x routes



kind regards
Paul

Please rate and mark posts accordingly if you have found any of the information provided useful.
It will hopefully assist others with similar issues in the future
Highlighted
Participant

Re: iBGP next-hop self without next-hop self configured!

Well changing the IOS version didn't help. Changed it from 15.2(4)S5 to 12.4(24)T5 and absolutely the same result. This is really odd.

Highlighted
VIP Mentor

Re: iBGP next-hop self without next-hop self configured!

Hello

Are you uisng dynamips or a vm for the routers?
What gns version are you running?

 

I have just tested this both on a vm and dynamips using Gn3 2.1.21 and all seems fine -



kind regards
Paul

Please rate and mark posts accordingly if you have found any of the information provided useful.
It will hopefully assist others with similar issues in the future
Highlighted
Participant

Re: iBGP next-hop self without next-hop self configured!

GNS3 2.2.3 with dynamips for IOS on Ubuntu 18.04.3 LTS.

 

I have tried 7200 images (two IOS versions) and a 3745 image.

I just tried with the 7200s changing from using loopbacks for iBGP to the actual inter router interfaces with exactly the same result.

In real life it works exactly as expected (a mixture of CAT6509E, Nexus 7706 and 9500 plus some Cat 9500 as well. I'm labing it to show the customer who is new to BGP common errors and how to fault find them.

I would say it s aGNS3 bug but since GNS3 is just running the Cisco code I cant see a logical reason for GNS3 or dynamips changing the behaviour of BGP.

Maybe I have config blindness as I have been looking at this too long and too late on a night. I have attached the complete config of the iBGP router that is advertising the routes and changing the next hop (R2).

 

Highlighted
Participant

Re: iBGP next-hop self without next-hop self configured!

Well I just tried creating a new project and did a minimal version of this with just three 7200 routers one in AS 65001 and two in AS 65002 and a single connection form router A to B and from B to C.

Guess what it behaves exactly as it should. I can toggle next-hop self on and off and when I do the iBGP next hop changes now.

I have rebooted the routers and exited and gone back in to GNS3 and reloaded the project multiple times and it still works as expected.

So it looks like there is something weird going on in the original project file. Maybe because I did a GNS3 upgrade in the middle of setting all the routers up. Who knows, will probably never have a root cause but its working !

I will delete the original project file where it doesn't work and redo from scratch.

Thanks for looking at this chaps.

 

 

Highlighted
VIP Mentor

Re: iBGP next-hop self without next-hop self configured!

Hello

Alteast you now know your not going mad!
I use gns3 alot but not for validation, Just to many anolmiles in there, Howerver for to familise myself with say a new platform its ideal.



kind regards
Paul

Please rate and mark posts accordingly if you have found any of the information provided useful.
It will hopefully assist others with similar issues in the future
Highlighted
Participant

Re: iBGP next-hop self without next-hop self configured!

OK definitely some kind of GNS3/dynamips issue. I deleted the config files for the two routers in GNS3 under the project (after backing them up first). Started the project with blank router configs and pasted the configs I had saved in.

Worked fine, could toggle next-hop self on and off. Two restarts of GNS3 later and its broken again with no config change!

I'm going to chase this down on the GNS3 forums.

 

i need that VIRL license my boss has promised me!