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 ~ [= 28263 28263 (65002&&65001) * =] The NLRI for the aspath/network exist: bird> show route where bgp_path ~ [= 65000 65000 65001 * =] 203.0.113.0/24 via 192.0.2.2 on em2 [bgp_65001 2018-08-24 from 127.0.0.15] * (100/0) [AS65001i] bird> show route where bgp_path ~ [= 65000 65000 65002 * =] 198.51.100.0/24 via 192.0.2.3 on em2 [bgp_65002 2018-08-22 from 127.0.0.15] * (100/0) [AS65002i] Thanks in advance. Best regards.
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) * =] The NLRI for the aspath/network exist: bird> show route where bgp_path ~ [= 65000 65000 65001 * =] 203.0.113.0/24 via 192.0.2.2 on em2 [bgp_65001 2018-08-24 from 127.0.0.15] * (100/0) [AS65001i] bird> show route where bgp_path ~ [= 65000 65000 65002 * =] 198.51.100.0/24 via 192.0.2.3 on em2 [bgp_65002 2018-08-22 from 127.0.0.15] * (100/0) [AS65002i] Thanks in advance. Best regards. On 28/08/2018 10:41, 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 ~ [= 28263 28263 (65002&&65001) * =]
The NLRI for the aspath/network exist: bird> show route where bgp_path ~ [= 65000 65000 65001 * =] 203.0.113.0/24 via 192.0.2.2 on em2 [bgp_65001 2018-08-24 from 127.0.0.15] * (100/0) [AS65001i] bird> show route where bgp_path ~ [= 65000 65000 65002 * =] 198.51.100.0/24 via 192.0.2.3 on em2 [bgp_65002 2018-08-22 from 127.0.0.15] * (100/0) [AS65002i]
Thanks in advance.
Best regards.
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@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."
Hello, Thanks Odrej, this will be used on some scripts, so not always will be as on sequence, this was just to avoid to make a lot of conditionals/bgpmasks. Congratz to all, this project is really amazing. []s On 28/08/2018 11:10, Ondrej Zajicek wrote:
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 * =]
participants (2)
-
heisenbug at xpto -
Ondrej Zajicek