Handling IPv6 BGP routes with :: next-hop
Ondrej Zajicek
santiago at crfreenet.org
Tue Aug 3 16:25:09 CEST 2021
On Tue, Aug 03, 2021 at 10:13:09AM +0300, Alexander Shikov wrote:
> Hello!
>
> Yesterday we noticed a strange behavior of Bird 1.6.8 with handling
> one IPv6 BGP route:
>
> >birdc6 show route for 2a09:8387:ffff:: all
> BIRD 1.6.8 ready.
> 2a09:8387:ffff::/48 via 2001:7f8:63::f2 on bge0 [SIMTELECOM 2021-08-03 00:07:16] * (100) [AS51972i]
> Type: BGP unicast univ
> BGP.origin: IGP
> BGP.as_path: 51972
> BGP.next_hop: ::
> BGP.med: 0
> BGP.local_pref: 100
> BGP.community: (31210,31210)
> BGP.ext_community: (rt, 31210, 31210)
>
> The first (best) route has next-hop '::' and routers of some of our customers
> started dropping BGP sessions with 'Invalid next-hop' cause.
>
> I dumped packets coming from customer 2001:7f8:63::f2 and it is really sending next-hop
> as '::'.
>
> I enabled logging of 'gw' and 'from' route attributes for net 2a09:8387:ffff::/48,
> and I got the following:
>
> Aug 3 09:57:10 <daemon.info> rs1 bird6: DEBUG: gw:2001:7f8:63::f4 ---- from:2001:7f8:63::f4
> Aug 3 09:57:10 <daemon.info> rs1 bird6: DEBUG: gw:2001:7f8:63::69 ---- from:2001:7f8:63::69
>
> Thus 'gw' and 'from' variables both contain IPv6 address of the peer.
> But shouldn't 'gw' contain '::'?
Hello
The bgp_next_hop is ::, 'gw' a is different attribute - immediate next
hop computed from bgp_next_hop, local routing table and other factors.
That is shown after 'via' in 'show route' output. When a route is
propagated on a route server or a route reflector, original bgp_next_hop
is kept.
BTW, bgp_next_hop :: is clearly invalid (without attached link-local
bgp_next_hop).
--
Elen sila lumenn' omentielvo
Ondrej 'Santiago' Zajicek (email: santiago at 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."
More information about the Bird-users
mailing list