Using as set a list of routes to advertise

William bird at is.unlawful.id.au
Wed May 10 11:13:29 CEST 2023


Hi All,
I've been digging around trying to find a nice way of doing it but can't 
seem to find a valid answer.

Is there a way to use a prefix set to create static routes?

Ideally though being able to specify the set as the route to be added 
would be ideal.  An alternative of something like a "for" loop that 
iterate through the set and adds the routes to the table would suffice.

For example:

define my_route_set = [ 10.1.2.3/24, 172.20.4.2/24, 10.200.0.0/23 ];

protocol static route_set {
   ipv4 {
     table Some_Routes;
   }
   route my_route_set via 192.168.55.2;    # downstream static gateway
}

The prefix set is used to define the subnets for a remote node and used 
in import/export filters via BGP upstream.  Being able to re-use the set 
without having to split it out would be hugely advantageous.

I want to avoid having the neighbour device provide the routes via a 
routing protocol where it can be avoided.

TIA.

Regards,
William


More information about the Bird-users mailing list