as-path flter problem

Alexander Zubkov green at qrator.net
Thu Jan 2 20:10:15 CET 2020


Hi,

Maybe something like this will work:
bgp_path ~ [= 65001 * =] && bgp_path ~ [= * 65001 65002 * =] &&
bgp_path ~ [= * 65002 65003 * =] && bgp_path ~ [= * 65003 =]
It will though pass some malformed pathes like 65001 65999 65001 65002 65003.

On Thu, Jan 2, 2020 at 2:36 PM Marcelo Balbinot <marcelo at gegnet.com.br> wrote:
>
>
> Hello
> I'm having difficulty using as-path math expressions
>
> Look at my case.
> correct as-path: 65001 65002 65003
>
> I would like to validate if the as-path of the received prefix conforms
> to the as-path above. But, I would like to allow prepend of all ASes,
> so:
> 65001 65001 65002 65003 is valid
> 65001 65002 65002 65003 is valid
> 65001 65002 65003 65003 is valid
> 65001 65001 65002 65002 65002 65003 65003 is valid
> 65001 65999 65002 65003 is NOT valid
>
> The best expression I found was
> if (bgp_path ~ [= 65001* 65002* 65003* =]) then
>
> but it considers the path '65001 65999 65002 65003' to be valid
>
> With regex that would be easier, but with bird bgpmask I couldn't solve
> it.
>
> Any suggestion?
>
>
> --
> Marcelo Balbinot
> IP/MPLS Backbone Manager at AS53062
> G G NET Telecomunicações
> www.gegnet.com.br
> INOC 53062*100
>



More information about the Bird-users mailing list