Hello
I'm using some dirty trick for this
(It's example for some peer. Configs is generating automatically, so
template is the same for all peers, changes only currentas variable)
filter Peer_export
int currentas;
int myas;
{
currentas = 20000;
myas = 50000;
if (currentas = 123456) then
{
currentas = 65502;
}
if (currentas = 123457) then
{
currentas = 65504;
}
if (currentas = 123458) then
{
currentas = 65501;
}
if ( (1,currentas) ~ bgp_community ) then
{
bgp_path.prepend(bgp_path.first);
}
if ( (2,currentas) ~ bgp_community ) then
{
bgp_path.prepend(bgp_path.first);
bgp_path.prepend(bgp_path.first);
}
if ( (3,currentas) ~ bgp_community ) then
{
bgp_path.prepend(bgp_path.first);
bgp_path.prepend(bgp_path.first);
bgp_path.prepend(bgp_path.first);
}
if (0, currentas) ~ bgp_community then reject;
if (currentas,myas) ~ bgp_community then accept;
if (59712,5000) ~ bgp_community then accept;
if (0, myas) ~ bgp_community then reject;
}
And my peers using 655xx AS in community for prefix control.
I'm understanding that it's not the best and most elegant solution, but
it works.
22.01.2018 15:15, Piotr Marciniak пишет:
Hello,
I've spent a while on below docs and faced a problem with 4B ASN we use.
Bird reports an error 'when 'myas' is 4B => so above 65535.
See some testing example below:
bird> configure
Reading configuration from /etc/bird/bird.conf
/etc/bird/bird.conf, line 81: Value 165250 out of range (0-65535)
The only way this config reports no error is to set here private ASn -
fe. 65250. But it will never match our real ASn.
Two questions:
1. Is it possible to enable 4B ASn for communities in Bird? Will it work
with other rouers?
2. Can we use instead private ASn just for community filters? Are they
processed corretly by other Internet routers of our peers?
Or maybe there is another work around?
Best wishes,
Peter
-----Oryginalna wiadomość----- From: Piotr Marciniak
Sent: Friday, December 29, 2017 5:01 PM
To: Ondrej Zajicek
Cc: [email protected]
Subject: Re: Community for small IX
There are some examples in BIRD wiki, mainly:
https://gitlab.labs.nic.cz/labs/bird/wikis/Route_server_with_community_based_filtering_and_multiple_RIBs
https://gitlab.labs.nic.cz/labs/bird/wikis/Route_server_with_community_based_filtering_and_single_RIB