Hi!
I use dynamic BGP peers in my RR. It's very simple and
comfortable. import/export filters are same for all dynamic
neighbors. How to determine a neighbor? Using what variables?
I will plan use filters likes that, but I can't find what I need
send to function "getneighbortype".....
function getneighbortype(ip neighbor) -> int
{
case neighbor {
1.1.1.1 : return 1; # router with big RIR
1.1.1.2 : return 3; # router with small RIR
else: return 0; # unknown router
}
}
filter fromclientrr {
int nt = getneighbortype(router id / src neighbor);
if nt = 0 then reject;
bgp_large_community.add((0,1,nt));
accept;
}
filter toclientrr {
int nt = getneighbortype(router id / src neighbor);
if net.len = 0 && nt ~ [0, 3] then accept;
if nt ~ [1] then accept;
reject;
}
Regards, Mikhail Mayorov