BGP on /32 (/128) interfaces
Daniel Gröber
dxld at darkboxed.org
Mon Apr 15 12:10:05 CEST 2024
Hi Arzhel,
On Fri, Apr 12, 2024 at 11:57:38AM +0200, Arzhel Younsi wrote:
> But for IPv6, it's cleaner to only require the router's link local address:
> testvm2006:~$ ip -6 addr
> inet6 2620:0:860:140:10:192:24:4/128 scope global
> testvm2006:~$ ip -6 route
> default via fe80::2022:22ff:fe22:2201 dev ens13 metric 1024 pref medium
>
> In Bird:
> neighbor fe80::2022:22ff:fe22:2201%ens13 external;
>
> But then the link local address doesn't work with multihop (for obvious
> reason).
> bird: /etc/bird/bird.conf:22:1 Multihop BGP cannot be used with link-local
> addresses
I use lladdrs for BGP endpoints in my network and that works fine. I think
using `direct` instead of `multihop` in the v6-lladdr case would make it
work for you.
One word of advice: don't use the %scope syntax, use the `interface`
directive instead. I don't recall exactly why but I had some subtle problem
with that.
As for your v4/32 problem, give `multihop 1` a try. That enforces no
routers on the path to the peer like direct but allows off-subnet
endpoints. Do keep in mind the docs recommend setting the source address
explicitly when enabling multihop.
multihop [number]
Configure multihop BGP session to a neighbor that isn't directly
connected. Accurately, this option should be used if the configured
neighbor IP address does not match with any local network subnets. Such
IP address have to be reachable through system routing table. The
alternative is the direct option. For multihop BGP it is recommended to
explicitly configure the source address to have it stable. Optional
number argument can be used to specify the number of hops (used for
TTL). Note that the number of networks (edges) in a path is counted;
i.e., if two BGP speakers are separated by one router, the number of
hops is 2. Default: enabled for iBGP.
The reason why direct isn't working is also clear from the docs:
direct
Specify that the neighbor is directly connected. The IP address of
the neighbor must be from a directly reachable IP range
(i.e. associated with one of your router's interfaces), >>>otherwise
the BGP session wouldn't start but it would wait for
such interface to appear<<<. The alternative is the multihop
option. Default: enabled for eBGP.
Hope that helps,
--Daniel
More information about the Bird-users
mailing list