Anno domini 2020 Robert Sander scripsit: Hi,
I have the task to configure BIRD to be able to announce a more specific prefix temporarily to our BGP peers.
Currently we announce a /22 and want to be able to flip a switch and announce one /24 from that /22.
As we partition the network internally I cannot use the prefixes learned for the BGP announcements.
Currently there is one static protocol that contains the /22 and the export filter looks at the protocol name.
I was thinking about setting up another static protocol and enable it if needed. But the /24 is also used internally and therefor the preferred route in the table, even when the static protocol is enabled. This means I cannot filter on the protocol name in the export filter. I cannot filter on the prefix itself as it must not be exported always.
If the /24 is always present in the RIB why adding a static route for it? Just put another block into the BGP export filter for the /24 and guard it with a global variable, so you just have to change the global variable and "birdc c" # Somewhere global, maybe in an own file define MORE_SPECIFID = 0; # Boiler plate export filter filter some_export_filter { # regular annonucement(s) if net ~ [ aaa/22 ] then accept; if net ~ [ x/24 ] && MORE_SPECIFID = 1 then accept; reject; } Best Max -- "Does it bother me, that people hurt others, because they are to weak to face the truth? Yeah. Sorry 'bout that." -- Thirteen, House M.D.