Subject: FreeBSD/OSPF: ospf1: Socket error on wg0: Network is unreachable

adam at adammccarthy.co.uk adam at adammccarthy.co.uk
Mon Jan 25 05:21:16 CET 2021


Some progress here:

1) Changing 'set skip on wg0' to 'pass in quick on wg0' removed this 
error and permitted inbound OSPFv2 hello. This is received by BIRD and 
it goes into and Init/Other state. I don't understand why these are 
different.
2) Running a tcpdump -ni wg0 doesn't show any outbound hello packets, 
even though I have a 'pass out quick all' rule.

Does pf require any explicit setting to permit outbound ospf?

Thanks,
Adam


On 2021-01-24 17:26, Adam McCarthy wrote:
> Sorry, wg-lon1 should read wg0. I mistyped in the email.
> 
> On 24 January 2021 17:20:58 GMT, adam at adammccarthy.co.uk wrote:
> 
>> Hello,
>> 
>> I run OSPFv2 between multiple Linux hosts over wireguard tunnels
>> between
>> them in a full mesh. This works fine in Ubuntu Linux 20.04, but if I
>> try
>> to add a FreeBSD 12.2-RELEASE-p1 host, I receive the following
>> error:
>> 
>> bird[9767]: ospf1: Socket error on wg-lon1: Network is unreachable
>> 
>> Could this be related to changes in FreeBSD 12, like FreeBSD 11
>> e.g.,
>> https://github.com/BIRD/bird/pull/1?
>> 
>> Thanks for any advice you can give me.
>> 
>> Best,
>> Adam
>> 
>> BIRD and Wireguard are built from FreeBSD ports.
>> 
>> $ bird --version
>> BIRD version 2.0.7
>> 
>> $ wg --version
>> wireguard-tools v1.0.20200827 -
>> https://git.zx2c4.com/wireguard-tools/
>> 
>> $ uname -a
>> FreeBSD <hostname> 12.2-RELEASE-p1 FreeBSD 12.2-RELEASE-p1 GENERIC
>> amd64
>> 
>> wg0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1420
>> options=80000<LINKSTATE>
>> inet 10.1.5.5 --> 10.1.5.5 netmask 0xfffffff8
>> groups: tun
>> nd6 options=101<PERFORMNUD,NO_DAD>
>> Opened by PID 9459
>> 
>> $ netstat -rn
>> [...]
>> 10.1.5.1           wg-lon1            UHS     wg-lon1
>> 10.1.5.5           link#5             UH      wg-lon1
>> [...]
>> 
>> $ cat /etc/bird/bird.conf
>> [...]
>> protocol ospf {
>> ipv4{
>> import all;
>> export all;
>> };
>> 
>> graceful restart on;
>> 
>> area 0 {
>> interface "wg0" {
>> type nbma;
>> authentication none;
>> neighbors {
>> 10.1.5.1 eligible;
>> };
>> };
>> };
>> }
>> [...]


More information about the Bird-users mailing list