Hi all! Please help me with recursion to caclulate bgp_next_hop using IGP. I have 2 router "A" and "B" connected to each other via iBGP. Each of the routers has connection to the outside world in different AS and get full view. "A" has a eBGP session to the neighbor "A2" and "B" has a eBGP session to the neighbor "B2". I configure "gateway recursive; direct;" on iBGP. In this case, all the routes from the A2 got to B via A are as unreachable. A IP: 95.174.97.1/26 A2 IP: 188.43.24.90/30 B: 95.174.97.33/26 B2: 87.245.238.204/31 This is debug from birdcl router B: bird ~ # birdcl 'show route for 37.231.192.1' table master all BIRD 1.6.3 ready. 37.231.192.0/22 via 87.245.238.204 on vlan91-retn [retn_ipv4 07.08.2017 11:06:57] * (100) [AS47589i] Type: BGP unicast univ BGP.origin: IGP BGP.as_path: 9002 15412 9155 47589 BGP.next_hop: 87.245.238.204 BGP.med: 999 BGP.local_pref: 100 BGP.community: (9002,9002) (9002,64679) (49037,0) (49037,10001) unreachable [twix_ipv4 07.08.2017 17:17:17 from 95.174.97.1] (100) [AS47589i] Type: BGP unicast univ BGP.origin: IGP BGP.as_path: 20485 15412 9155 47589 BGP.next_hop: 188.43.24.90 BGP.med: 999 BGP.local_pref: 100 BGP.community: (20485,22007) (20485,22307) (49037,0) bird ~ # birdcl 'show route for 188.43.24.90' table master all BIRD 1.6.3 ready. 188.43.24.88/30 via 95.174.97.1 on vlan8 [twix_ipv4 07.08.2017 17:17:17] * (100) [i] Type: BGP unicast univ BGP.origin: IGP BGP.as_path: BGP.next_hop: 95.174.97.1 BGP.med: 0 BGP.local_pref: 500 BGP.community: (49037,49037) bird ~ # birdcl 'show route for 95.174.97.1' table master all BIRD 1.6.3 ready. 95.174.97.0/26 dev vlan8 [direct1 07.08.2017 00:20:09] * (240) Type: device unicast univ via 95.174.97.1 on vlan8 [twix_ipv4 07.08.2017 17:17:17] (100) [i] Type: BGP unicast univ BGP.origin: IGP BGP.as_path: BGP.next_hop: 95.174.97.1 BGP.med: 0 BGP.local_pref: 500 BGP.community: (49037,49037) -- Regards, Mikhail V. Majorov
On Mon, Aug 07, 2017 at 06:49:56PM +0300, Mikhail Mayorov wrote:
Hi all!
Please help me with recursion to caclulate bgp_next_hop using IGP. I have 2 router "A" and "B" connected to each other via iBGP. Each of the routers has connection to the outside world in different AS and get full view. "A" has a eBGP session to the neighbor "A2" and "B" has a eBGP session to the neighbor "B2". I configure "gateway recursive; direct;" on iBGP. In this case, all the routes from the A2 got to B via A are as unreachable.
Hi Recursive routes are supposed to be resolved through IGP routes, they cannot be resolved through routes that are also recursive (to avoid multiple levels of recursion and cycles). You could set 'next hop self' so bgp_next_hop is directly 95.174.97.1, or just do not use 'gateway recursive' in this case. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
On 10/08/17 01:28, Ondrej Zajicek wrote:
On Mon, Aug 07, 2017 at 06:49:56PM +0300, Mikhail Mayorov wrote:
Hi all!
Please help me with recursion to caclulate bgp_next_hop using IGP. I have 2 router "A" and "B" connected to each other via iBGP. Each of the routers has connection to the outside world in different AS and get full view. "A" has a eBGP session to the neighbor "A2" and "B" has a eBGP session to the neighbor "B2". I configure "gateway recursive; direct;" on iBGP. In this case, all the routes from the A2 got to B via A are as unreachable.
Hi
Recursive routes are supposed to be resolved through IGP routes, they cannot be resolved through routes that are also recursive (to avoid multiple levels of recursion and cycles). You could set 'next hop self' so bgp_next_hop is directly 95.174.97.1, or just do not use 'gateway recursive' in this case.
Hi! Now I have zebra(quagga) for eBGP and bird for OSPF (IGP). So as I use iBGP between borders and I configure "next hop self" on they. And I was planning to switch IGP to iGBP on all my routers. It's 3 borders + 30 NAS. From documentation on bird: next hop self Avoid calculation of the Next Hop attribute and always advertise our own source address as a next hop. This needs to be used only occasionally to circumvent misconfigurations of other routers. Default: disabled. I want to throw away the crutch "next hop self". I may be wrong?! I'm more interested in the principle of seeking this route (next_hop) and why it is not found. I understand the IGP table is the same table connects to protocol. Here I do not understand how this recursion works. Example: I received an announcement net = 37.231.192.0/22, BGP.next_hop: 188.43.24.90. I have a config file explicitly specified "gateway recursive;". If you search for route 188.43.24.90, we find: 188.43.24.88/30 via 95.174.97.1 on vlan8 [twix_ipv4 07.08.2017 17:17:17] * (100) [i] Type: BGP unicast univ BGP.origin: IGP BGP.as_path: BGP.next_hop: 95.174.97.1 BGP.med: 0 BGP.local_pref: 500 BGP.community: (49037,49037) Why bird don't set gw = 95.174.97.1?! This host from local connected network! -- Regards, Mikhail V. Majorov
participants (2)
-
Mikhail Mayorov -
Ondrej Zajicek