Quagga fails to set route on FreeBSD 13.0-Release

von_Gaden

Active Member

Reaction score: 21
Messages: 152

Hi all,
I found an unexpected problem running net/quagga after upgrade FreeBSD 12.2-RELEASE to FreeBSD 13.0-RELEASE.
bgpd seems to work fine, but obviously zebra is unable to set the default route in the Kernel. In zebra.log I have:
Code:
ZEBRA: Try to set TE Link Param
ZEBRA: Try to set TE Link Param
ZEBRA: if_ioctl(SIOCGIFMEDIA) failed: Invalid argument
ZEBRA: rtm_write: write : Invalid argument (22)
ZEBRA: kernel_rtm_ipv4: 0.0.0.0/0: rtm_write() unexpectedly returned -5 for command RTM_ADD
ZEBRA: Try to set TE Link Param
ZEBRA: Try to set TE Link Param
ZEBRA: rtm_write: write : Invalid argument (22)
ZEBRA: kernel_rtm_ipv4: 0.0.0.0/0: rtm_write() unexpectedly returned -5 for command RTM_ADD
ZEBRA: rtm_write: write : Invalid argument (22)
ZEBRA: kernel_rtm_ipv4: 0.0.0.0/0: rtm_write() unexpectedly returned -5 for command RTM_ADD
net/quagga was built in my ports-mgmt/poudriere with the default options as for FreeBSD 12.2. I've tested with the package from the official FreeBSD repository with the same result.
Some details for my setup:
I have a stub IPv4 network, part of a bigger AS. BGP is used to switch between three links - main and two backups. We have to announce our subnet to the upstream and get default route.
Is this related to the lack of maintainer to the net/quagga port?

Thank you in advance.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,206
Messages: 37,359

Do you use FIBs? This might be a reason for the failure:
Code:
20201108:
        Default value of net.add_addr_allfibs has been changed to 0.
        If you have multi-fib configuration and rely on existence of all
        interface routes in every fib, you need to set the above sysctl to 1.
 
OP
V

von_Gaden

Active Member

Reaction score: 21
Messages: 152

No, I have just one routing table with several static routes inside the LAN and one default route acquired via BGP.
 

covacat

Well-Known Member

Reaction score: 133
Messages: 279

try to ktrace/truss, get more info on the failed syscalls
 
OP
V

von_Gaden

Active Member

Reaction score: 21
Messages: 152

I'll do my best but it will take some time. It's production system and I have to fit in a maintenance window.
 

Donald Baud

Member

Reaction score: 19
Messages: 27

You might want to try net/frr7
It is the descendant of zebra -> quagga -> frr
from the website frrrouting.org
"
FRR has its roots in the Quagga project. In fact, it was started by many long-time Quagga developers who combined their efforts to improve on Quagga’s well-established foundation in order to create the best routing protocol stack available.
"
 

sko

Aspiring Daemon

Reaction score: 301
Messages: 550

You might want to try net/frr7
[...]

If changing the BGP daemon is on the table (and with the quagga port being orphaned I would highly suggest looking for other options!), I'd suggest looking at net/openbgpd
I'm running our whole multi-homed, multi-site routing infrastructure with OpenBGPd (on Open- and FreeBSD) for internal and external routing, and couldn't be more pleased with it. I especially like the clear, simple and easy to read config (similar syntax to PF) which prevents a lot of headaches in the first place. It also nicely integrates with multiple FIBs (or routing domains on OpenBSD) and for very special cases (or testing) you can even run multiple instances of it (in different routing domains).

It also comes with bgpctl for manual interaction/configuration/management and which is great for scripting and (ab)using BGP for other purposes (e.g. distributing blacklists between nameservers, firewalls and mailservers with some scripting-ducttape around bgpctl and pfctl/spamdb)
 
OP
V

von_Gaden

Active Member

Reaction score: 21
Messages: 152

Thank you very much for the helpful replies!
I'll test both routing daemons later.
Sadly now I have troubles with unexpected kernel panics in FreeBSD 13.0-Release. I believe they are related to ipfw and natd and are discussed here or in PRs. Without official patches (with unclear schedule yet) it's pointless. I've already managed to migrate several production systems to 13.0-Release and I consider reinstalling them with 12.2-Release.
 
Top