<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi!</p>
<p>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?<br>
</p>
<p>I will plan use filters likes that, but I can't find what I need
send to function "getneighbortype".....<br>
</p>
<p>function getneighbortype(ip neighbor) -> int<br>
{<br>
case neighbor {<br>
1.1.1.1 : return 1; # router with big RIR<br>
1.1.1.2 : return 3; # router with small RIR<br>
else: return 0; # unknown router<br>
}<br>
}<br>
<br>
filter fromclientrr {<br>
int nt = getneighbortype(<b>router id / src neighbor</b>);<br>
if nt = 0 then reject;<br>
bgp_large_community.add((0,1,nt));<br>
accept;<br>
}<br>
<br>
filter toclientrr {<br>
int nt = getneighbortype(<b>router id / src neighbor</b>);<br>
if net.len = 0 && nt ~ [0, 3] then accept;<br>
if nt ~ [1] then accept;<br>
reject;<br>
}<br>
<br>
</p>
<div class="moz-signature">-- <br>
<div class="moz-signature">
<pre>Regards,
Mikhail Mayorov
</pre>
</div>
</div>
</body>
</html>