Broadcast RIP to each broadcast address on interface with multiple aliases
Hi all, I want to broadcast a last-resort old-school default route via RIPv1. The following config works: filter default_route { if net ~ [ 0.0.0.0/0 ] then { accept; } reject; } # ...snip... protocol rip { export filter default_route; interface "em0" { version 1; mode broadcast; update time 5; }; } ...but it only sends to the broadcast address of the main interface IP. How can I get it to send to the broadcast addresses of the aliases as well? These are the networks on the em0 adapter: x.x.x.192/28 (main) 192.168.x.0/24 (alias) 192.168.y.0/24 (alias) After consulting https://bird.network.cz/doc/bird-3.html#proto-iface , I tried the following to force additional/different addresses: interface x.x.x.193/28 { # actual interface IP/prefix interface x.x.x.192/28 { # network IP/prefix interface x.x.x.x { # interface IP only interface "em0" x.x.x.x { # interface name and IP interface "em0" x.x.x.x/28 { # interface name and IP/prefix All of these are rejected with the error "Interface name/mask expected, not IP prefix", regardless of whether I list the main interface IP, or main plus aliases (comma separated). Am I missing something simple in the syntax, or is the RIPv1 implementation not capable of doing this? Thanks in advance.
Following up my message from a few days ago. Even the simplest possible config causes a syntax error, despite the interface directive being a sample copied straight from the docs. I tried bird.conf with ONLY these 3 lines: protocol rip { interface -192.168.1.0/24, 192.168.0.0/16; # from https://bird.network.cz/doc/bird-3.html#proto-iface } bird: /usr/local/etc/bird.conf:2:42 Interface name/mask expected, not IP prefix Is this a bug (in either code or docs), or is the interface directive different for RIP? I'm using FreeBSD 12.2 and bird 1.6.8 Thanks. On Tue, 19 Oct 2021, bird21@sensation.net.au wrote:
Hi all,
I want to broadcast a last-resort old-school default route via RIPv1. The following config works:
filter default_route { if net ~ [ 0.0.0.0/0 ] then { accept; } reject; } # ...snip... protocol rip { export filter default_route; interface "em0" { version 1; mode broadcast; update time 5; }; }
...but it only sends to the broadcast address of the main interface IP. How can I get it to send to the broadcast addresses of the aliases as well?
These are the networks on the em0 adapter:
x.x.x.192/28 (main) 192.168.x.0/24 (alias) 192.168.y.0/24 (alias)
After consulting https://bird.network.cz/doc/bird-3.html#proto-iface , I tried the following to force additional/different addresses:
interface x.x.x.193/28 { # actual interface IP/prefix
interface x.x.x.192/28 { # network IP/prefix
interface x.x.x.x { # interface IP only
interface "em0" x.x.x.x { # interface name and IP
interface "em0" x.x.x.x/28 { # interface name and IP/prefix
All of these are rejected with the error "Interface name/mask expected, not IP prefix", regardless of whether I list the main interface IP, or main plus aliases (comma separated).
Am I missing something simple in the syntax, or is the RIPv1 implementation not capable of doing this?
Thanks in advance.
On Tue, Oct 19, 2021 at 03:38:47AM +1100, bird21@sensation.net.au wrote:
Hi all,
I want to broadcast a last-resort old-school default route via RIPv1. The following config works:
filter default_route { if net ~ [ 0.0.0.0/0 ] then { accept; } reject; } # ...snip... protocol rip { export filter default_route; interface "em0" { version 1; mode broadcast; update time 5; }; }
...but it only sends to the broadcast address of the main interface IP. How can I get it to send to the broadcast addresses of the aliases as well?
I do not think that RIP in BIRD supports that. In OSPFv2, we have to treat each network prefix on interface as separate pseudo-interface, because one-prefix-per-interface approach is hardcoded in OSPFv2 design, but with RIP, we just have one RIP interface structure per real interface, and it uses the main interface IP.
These are the networks on the em0 adapter:
x.x.x.192/28 (main) 192.168.x.0/24 (alias) 192.168.y.0/24 (alias)
After consulting https://bird.network.cz/doc/bird-3.html#proto-iface , I tried the following to force additional/different addresses:
interface x.x.x.193/28 { # actual interface IP/prefix
interface x.x.x.192/28 { # network IP/prefix
interface x.x.x.x { # interface IP only
interface "em0" x.x.x.x { # interface name and IP
interface "em0" x.x.x.x/28 { # interface name and IP/prefix
All of these are rejected with the error "Interface name/mask expected, not IP prefix", regardless of whether I list the main interface IP, or main plus aliases (comma separated).
It is noted in the docs that 'extended clauses' (with prefixes) are allowed by just some protocols: Some protocols (namely OSPFv2 and Direct) support extended clauses that may contain a mask, a prefix, or both of them. An interface matches such clause if its name matches the mask (if specified) and its address matches the prefix (if specified). Extended clauses are used when the protocol handles multiple addresses on an interface independently. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@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."
participants (2)
-
bird21@sensation.net.au -
Ondrej Zajicek