Exporting a larger prefix if a smaller prefix is being exported

Lukas Haase lukashaase at gmx.at
Sat Jan 13 01:56:50 CET 2024


Hi,

Is is somehow possible to export a larger prefix if one or more sub-prefixes (subnets) are exported ... but also remove that prefix if no smaller subnet exist any more?

Example: As soon as 192.0.2.44/32 or 192.0.2.208/28 (or any other prefix inside 192.0.2.0/24) is exported via eBGP, also export prefix 192.0.2.0/24. If no sub-prefixes are left, also remove 192.0.2.0/24 from export.

Background for my question is BGP. As is well known, the smallest prefix I can announce over eBGP is /24. I use bird as a border gateway and I announce various smaller prefixes via iBGP. The smaller prefixes will take precedence in my peering neighboring AS but the /24 is required to announce my network farther out.

But why would I want that? Because there are actually two border gateways. If all internal links to one of these gateways breaks, the full subnet should not be announced any more (otherwise the traffic would be dropped). If at least one subnet is announced, I assume that the internal mesh is strong enough to find its way.


Thanks,
Luke




More information about the Bird-users mailing list