bgp / bgpq4

BGP Filter generator
https://github.com/bgp/bgpq4
BSD 2-Clause "Simplified" License
299 stars 44 forks source link

Support for frr ? #96

Open opsec opened 1 year ago

opsec commented 1 year ago

Is there a plan to support frr syntax ?

https://frrouting.org/

The syntax is very similar to cisco, but some differences exist.

job commented 1 year ago

Can you articulate the differences and perhaps provide a patch via a pull-request?

gabrieltackitt commented 1 year ago

Not the OP, but I use Vyos (which is Frr under the hood). The one major thing that I've found bgpq4 can't do that would be a big help for both FRR and Vyos is a way to sequence prefix lists.

FRR prefix list syntax is this:

ipv6 prefix-list SAMPLE-TITLE seq 1 permit 2001:db8::/32 ge 48 le 48

Vyos syntax is for one prefix item is:

set policy prefix-list SAMPLE-TITLE rule 1 prefix 2001:db8::/32
set policy prefix-list SAMPLE-TITLE rule 1 action permit
set policy prefix-list SAMPLE-TITLE rule 1 le 48
set policy prefix-list SAMPLE-TITLE rule 1 ge 32

I currently use the following to generate a custom format in bgpq4 and then go and manually change the ### into rule numbers.

-F "set rule ### action permit\nset rule ### prefix %n/%l\nset rule ### ge %A\nset rule ### le %a\n\n"

Even if not a fully supported format, I would love to see a way to sequence rules with numbers added into the custom format options.