BGP syntax for OR/AND on bgpmask

Ondrej Zajicek santiago at crfreenet.org
Tue Aug 28 16:10:28 CEST 2018


On Tue, Aug 28, 2018 at 10:43:47AM -0300, heisenbug at xpto wrote:
> Hello,
> 
> I'm trying to use logical operators like OR and AND on bgpmask filter,
> but I'm not able, Can you please check if the syntax ir wrong or if is
> possible to do what I expect to do? The data from output is sanitized.
> 
> Doesn't work:
> bird> show route where bgp_path ~ [= 65000 65000 (65002||65001) * =]
> bird> show route where bgp_path ~ [= 65000 65000 (65002&&65001) * =]

Hello

You cannot use logical operators inside bgpmasks, you can use just AS
numbers, intervals and wildcards. See section bgpmask in:

https://bird.network.cz/?get_doc&v=16&f=bird.html#toc5.2

You can write this: [= 65000 65000 65001..65002 * =]

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."


More information about the Bird-users mailing list