Kernel table support in OpenBSD

Ondrej Zajicek santiago at crfreenet.org
Sun Jul 7 14:35:26 CEST 2013


On Fri, Jun 28, 2013 at 01:57:52PM +0400, Alexander V. Chernikov wrote:
>> I wonder what is the situation on FreeBSD, NetBSD and OpenBSD w.r.t.
>> kernel support for multple routing tables. I don't have an idea.
>> No multiple tables, multiple tables specific to some *BSD variants
>> or a common behavior on all *BSDs?
> FreeBSD supports multiple tables (fibs), port has a patch enabling  
> multiple kernel protocol instances (and some fib magic due to lack of  
> MRT support in route socket protocol).
> OpenBSD supports multiple tables, too. MRT support exists inside rtsock  
> (rtm_tableid in rt_msghdr).

Hi

I implemented BIRD MRT support for FreeBSD (partially based on your
patch from ports) and OpenBSD. OpenBSD works OK, FreeBSD is untested (i
cannot convince my FreeBSD testing machine to have multiple fibs) so it
would be useful if someone could test it. The patch for 1.3.10 is
attached (it is also in git).

The code assumes (on FreeBSD) that BIRD runs in fib 0. it would be
simple to change that, but is there any use case for this? Should
fib-aware routing tool depend on my_fibnum?

I have some questions for people more familiar with BSDs about how MRT
should interact with interfaces/addresses. On Linux, there is no
relation between tables and ifaces. OpenBSD (i don't know about FreeBSD)
seems to bind tables to ifaces (ifconfig IFA rdomain X). But i am not
really sure if this binding is relevant for BIRD (e.g.: Do i receive all
ifaces in default scan or should i also do table_id specific scans? If
ifaces are specific to rdomain, am i allowed to create route in one
table/rdomain with nexthop in a different one?) When we use multiple
sockets (one for each fib) for FreeBSD, on which we receive iface
notifications, on all - or are ifaces also related to fibs?

BTW, the setfib() call on BSD for table scan is an ugly hack. For
sockets, i could at least use SO_SETFIB sockopt. It would be nice if
FreeBSD would adopt the same extension (7th arg of sysctl() as fib id)
for route scans.

-- 
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."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mrt.patch
Type: text/x-diff
Size: 24467 bytes
Desc: not available
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20130707/5e50c28b/attachment.patch>


More information about the Bird-users mailing list