[PATCH] Netlink on FreeBSD support

Alexander V. Chernikov melifaro at ipfw.ru
Thu Dec 1 14:48:16 CET 2022


Dear bird developers,

Netlink support was added to FreeBSD recently [1].
It’s not as “full-featured” as its Linux counterpart yet, however the added subset is enough to make a routing daemon work.
Specifically, it supports multiple tables, multipath, nexthops and nexthops groups. No MPLS support yet.
It aims to be compatible (whenever possible) to minimise the netlink users adoption efforts.
The first FreeBSD releases to have netlink support will be 14.0 and 13.2. Both are planned to be released in ~Q1 2023.

The attached change adds 'bsd-netlink’ sysconf target, allowing to build both netlink & rtsock versions on FreeBSD.


Example output:

bird> show status
BIRD 2.0.10-124-g8e63db05
Router ID is 10.0.0.4
Hostname is devel2.ipfw.ru
Current server time is 2022-12-01 13:40:08.960
Last reboot on 2022-12-01 13:35:39.293
Last reconfiguration on 2022-12-01 13:37:20.593
Daemon is up and running
bird> show interfaces
vtnet0 up (index=1)
	MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500
	10.0.0.4/24 (Preferred, scope site)
	fe80::5054:ff:fe14:e319/64 (Preferred, scope link)
	2a01:4f9:3a:fa00:5054:ff:fe14:e319/64 (Preferred, scope univ)
lo0 up (index=2)
	MultiAccess Multicast AdminUp LinkUp Loopback Ignored MTU=16384
	127.0.0.1/8 (Preferred, scope host)
	::1/128 (Preferred, scope host)
	fe80::1/64 (Preferred, scope link)
vtnet0.2 up (index=3)
	MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500
	fe80::5054:ff:fe14:e319/64 (Preferred, scope link)
bird> show route protocol ospf2
Table master4:
7.7.7.0/24           unicast [ospf2 13:39:41.717] * E2 (150/10/10000) [10.0.0.157]
	via 10.0.0.2 on vtnet0
10.0.0.0/24          unicast [ospf2 13:37:26.734] I (150/10) [10.0.0.4]
	dev vtnet0
bird> show route protocol static2
Table master4:
10.1.0.0/24          unicast [static2 13:46:16.543] * (200)
	via 10.0.0.6 on vtnet0 weight 4
	via 10.0.0.5 on vtnet0 weight 3



[1] https://github.com/freebsd/freebsd-src/commit/7e5bf68495cc0a8c9793a338a8a02009a7f6dbb6

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-FreeBSD-add-netlink-support.patch
Type: application/octet-stream
Size: 2991 bytes
Desc: not available
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20221201/0ce5f89f/attachment.obj>


More information about the Bird-users mailing list