Wednesday, April 3, 2019

Specifying allowed subnets on BGP bird filter?

This is for internal BGP only for internal routing flexibility.

Let's say the client owns 203.0.113.0/24 subnet and we want to allow him to announce various IP prefixes from within 203.0.113.0/24 subnet to route collecter which would deny or accept based on filter. How can I specify in the route collector filter to allow anything from 203.0.113.0/24 subnet to be accepted from that client? Which could possible involve prefixes like 203.0.113.64/27.

I can allow prefix variation but not the network IP:

filter client_filter{ if!(net ~ [203.0.113.0/24{24,32}]) then { reject; } accept; } 

Maybe some kind of regex is possible?



No comments:

Post a Comment