Broadcast RIP to each broadcast address on interface with multiple aliases

Ondrej Zajicek santiago at crfreenet.org
Sat Oct 23 15:53:02 CEST 2021


On Tue, Oct 19, 2021 at 03:38:47AM +1100, bird21 at 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 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."


More information about the Bird-users mailing list