misleading documentation for the "direct" protocol

Lexi Winter lexi at le-fay.org
Sun May 31 23:57:54 CEST 2026


hello,

the BIRD documentation says for the "direct" protocol[0]:

> The question is whether it is a good idea to have such device routes
> in BIRD routing table. OS kernel usually handles device routes for
> directly connected networks by itself so we don't need (and don't
> want) to export these routes to the kernel protocol. OSPF protocol
> creates device routes for its interfaces itself and BGP protocol is
> usually used for exporting aggregate routes. But the Direct protocol
> is necessary for distance-vector protocols like RIP or Babel to
> announce local networks. 

[0] https://bird.network.cz/?get_doc&v=30&f=bird-6.html#ss6.7

as i read this, it is suggesting that if BIRD is only running OSPF, then
the "direct" protocol is not needed.  however, i've tested this and i'm
not sure it's true.

without direct, and with a basic OSPF configuration with no peers, BIRD
will flag the OSPF interface routes with '!':

	root at witch:/usr/local/etc # birdc show route
	BIRD 3.2.0 ready.
	Table master4:
	81.2.96.160/28       unicast [core4 22:45:00.630] ! I (150/10) [198.18.2.4]
		dev genet0

	Table master6:
	2001:8b0:aab5:c401::/64 unicast [core6 22:45:00.630] ! I (150/10) [198.18.2.4]
		dev genet0

it will also log very much some netlink errors:

May 31 22:51:04 witch bird[31390]: Netlink: File exists
May 31 22:51:04 witch syslogd: last message repeated 1 times
May 31 22:52:04 witch bird[31390]: Netlink: Address already in use
May 31 22:52:04 witch bird[31390]: Netlink: File exists
May 31 22:52:04 witch syslogd: last message repeated 1 times

after configuring BIRD with:

	protocol direct { 
		ipv4;
		ipv6;
	};

the OSPF interface routes are correctly installed (or rather, not installed,
since the kernel already installed them):

	root at witch:/usr/local/etc # birdc show route
	BIRD 3.2.0 ready.
	Table master4:
	81.2.96.160/28       unicast [direct1 22:53:29.436] * (240)
		dev genet0
			     unicast [core4 22:53:29.529] I (150/10) [198.18.2.4]
		dev genet0

	Table master6:
	2001:8b0:aab5:c401::/64 unicast [direct1 22:53:29.436] * (240)
		dev genet0
			     unicast [core6 22:53:29.529] I (150/10) [198.18.2.4]
		dev genet0

and BIRD does not log anymore the netlink-related errors.

i tested this on FreeBSD 15.0, so possibly this is a FreeBSD-specific
behaviour that isn't present on Linux; i don't have any Linux systems
to test with.  but, i think the documentation of the "direct" protocol
could be changed to indicate that configuring it may be necessary in
at least some situations.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20260531/9d2c46e3/attachment.sig>


More information about the Bird-users mailing list