BGP Path manipulation

Ondrej Zajicek santiago at crfreenet.org
Fri Jul 3 15:55:44 CEST 2015


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 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."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20150703/8f7248a2/attachment.asc>


More information about the Bird-users mailing list