<!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>