Temporarily announcing more specific prefix?
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. How do I achieve that? Regards -- Robert Sander Heinlein Support GmbH Schwedter Str. 8/9b, 10119 Berlin http://www.heinlein-support.de Tel: 030 / 405051-43 Fax: 030 / 405051-19 Zwangsangaben lt. §35a GmbHG: HRB 93818 B / Amtsgericht Berlin-Charlottenburg, Geschäftsführer: Peer Heinlein -- Sitz: Berlin
Hello, You can use an additional table. And attach your and static protocols bgp there. And do not pipe those prefixes to your main table. On Thu, Sep 17, 2020 at 4:00 PM Robert Sander <r.sander@heinlein-support.de> wrote:
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.
How do I achieve that?
Regards -- Robert Sander Heinlein Support GmbH Schwedter Str. 8/9b, 10119 Berlin
http://www.heinlein-support.de
Tel: 030 / 405051-43 Fax: 030 / 405051-19
Zwangsangaben lt. §35a GmbHG: HRB 93818 B / Amtsgericht Berlin-Charlottenburg, Geschäftsführer: Peer Heinlein -- Sitz: Berlin
Am 17.09.20 um 16:15 schrieb Alexander Zubkov:
You can use an additional table. And attach your and static protocols bgp there. And do not pipe those prefixes to your main table.
I understand. I will create a new table for the external BGP peers and pipe it with a filter to the main table. Attach all peers there and the static protocols for the exported prefixes. The pipe filter will reject the static prefixes to the main table and everything from the main table to the new table. This could work. Thanks. Regards -- Robert Sander Heinlein Support GmbH Schwedter Str. 8/9b, 10119 Berlin http://www.heinlein-support.de Tel: 030 / 405051-43 Fax: 030 / 405051-19 Zwangsangaben lt. §35a GmbHG: HRB 93818 B / Amtsgericht Berlin-Charlottenburg, Geschäftsführer: Peer Heinlein -- Sitz: Berlin
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.
Hi Maximilian On 21.09.20 20:59, Maximilian Wilhelm wrote:
If the /24 is always present in the RIB why adding a static route for it?
Not all /24 are present in the RIB, some are.
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; }
Yes, that would be possible but would also make the filter rules more complex. I already implemented the "second table" idea with the pipe protocol and it works. It just adds a few megabytes RAM because the FRT is stored twice in the BIRD process. That does not matter when the router has 16GB RAM. :) Regards -- Robert Sander Heinlein Support GmbH Schwedter Str. 8/9b, 10119 Berlin https://www.heinlein-support.de Tel: 030 / 405051-43 Fax: 030 / 405051-19 Amtsgericht Berlin-Charlottenburg - HRB 93818 B Geschäftsführer: Peer Heinlein - Sitz: Berlin
participants (3)
-
Alexander Zubkov -
Maximilian Wilhelm -
Robert Sander