Check bgp_path.len without some AS

Alexander Zubkov green at qrator.net
Fri Jan 4 07:42:16 CET 2019


Hi,

> I need to remove two As numbers per bgp_path

You can use a set as a second parameter. From the documentation:
"delete(P,A) ... A may also be an integer set".

On Fri, Jan 4, 2019 at 3:37 AM Xavier Trilla <xavier.trilla at clouding.io> wrote:
>
> Hi Alexander,
>
> That’s interesting I will play with this syntax, although I’m not 100% sure if I will be able to use it (I need to remove two As numbers per bgp_path) but maybe I can work something out.
>
> Thanks!
> Xavier
>
>
> El 4 gen 2019, a les 1:47, Alexander Zubkov <green at qrator.net> va escriure:
>
> > Hi,
> >
> > Something like this worked for me:
> >
> > delete(bgp_path, XXXX).len < N
> >
> >
> >> On Fri, Jan 4, 2019 at 12:19 AM Xavier Trilla <xavier.trilla at clouding.io> wrote:
> >>
> >> Hi,
> >>
> >>
> >>
> >> For some route selection configurations I need to check the bgp_path.len without some AS numbers.
> >>
> >>
> >>
> >> I tried something like:
> >>
> >>
> >>
> >> bgp_path.delete(AS_1);
> >>
> >> bgp_path.delete(AS_2);
> >>
> >>
> >>
> >> if bgp_path.len < N then …
> >>
> >>
> >>
> >> But doing this I modify permanently the AS path.
> >>
> >>
> >>
> >> I’ve tried using a temp variable, but looks like bird doesn’t allow to create bgppath “variables”.
> >>
> >>
> >>
> >> Any ideas about how this could be achieved?
> >>
> >>
> >>
> >> Thanks!
> >>
> >> Xavier
> >>
> >>



More information about the Bird-users mailing list