Hi, I'm working on a Enterprise-network merger where I have to temporarily workaround an AS-Path issue and need to clean the path. I want to use the Filter language for that, http://bird.network.cz/?get_doc&f=bird-5.html For example on those AS-Path: 10.0.0.0/8 65500 65500 65500 192.168.0.0/16 65500 172.16.22.0/24 65500 65122 65100 I want to apply this function: filter bgp_cut_path () { if p.first == 65500 && p.last != 65500 { delete(P, 65500) } then return; } which doesn't touch the first two, but removes 65500 from the third. Is this possible? Am I on the right way? :-) Thanks -dominik -- rrbone UG (haftungsbeschraenkt) - Leibnizstr. 8a - 44147 Dortmund HR B 23168 Amtsgericht Dortmund - Geschaeftsfuehrer: Dominik Bay
On Thu, Jul 02, 2015 at 01:37:48PM +0100, Dominik Bay wrote:
Hi,
I'm working on a Enterprise-network merger where I have to temporarily workaround an AS-Path issue and need to clean the path.
I want to use the Filter language for that, http://bird.network.cz/?get_doc&f=bird-5.html
I want to apply this function:
filter bgp_cut_path () { if p.first == 65500 && p.last != 65500 { delete(P, 65500) } then return; }
which doesn't touch the first two, but removes 65500 from the third.
Is this possible? Am I on the right way? :-)
Hi It is possible. This should work: if (bgp_path.first = 65500) and (bgp_path.last != 65500) then bgp_path.delete(65500); Note that if conditions apply, it will delete all instances of 65500 from the path. See documentation on bgppath: http://bird.network.cz/?get_doc&f=bird-5.html#ss5.2 -- 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."
participants (2)
-
Dominik Bay -
Ondrej Zajicek