[j-nsp] REG: Route Filtering.

Eduard Metz emetz@thrupoint.net
Tue, 19 Nov 2002 14:54:43 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_0005_01C28FDB.9947BB20
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

VPN routes are imported into a VRF based on the RT attached to them, and
exported from a VRF with a specific RT attached to it. Basically, you can
just extend the basic import/export policy with additional requirements such
as a prefix-list (match specific RT && match prefix-list). Below I copied
from from the JUNOS 5.5 manual, and added the prefix-list:

[edit]
policy-options {
    policy-statement export-policy-name {
        term export-term-name {
            from {
                 protocol (bgp | ospf | rip | static);
            ==>> prefix-list your-prefix-list;
                       }
            then {
                community add community-id;
                accept;
            }
        }
        term term-name {
            then reject;
        }
    }
}

Then at the routing-instance level: vrf-export <...>

See also:
http://www.juniper.net/techpubs/software/junos/junos55/swconfig55-vpns/html/
vpnl3-config17.html#1015326

The configuration for an import filter is similar.

Ofcourse the above is a basic policy, it needs to be adapted to your
specific needs.

cheers,
    Eduard

  -----Original Message-----
  From: juniper-nsp-admin@puck.nether.net
[mailto:juniper-nsp-admin@puck.nether.net]On Behalf Of Joseph Anthony
  Sent: dinsdag 19 november 2002 13:56
  To: juniper-nsp@puck.nether.net
  Subject: [j-nsp] REG: Route Filtering.


  Hi,

  I am trying to figure out on how to do route filtering (prefix based),
while importing, and exporting routes from VRF table to another. The idea is
to limit the list of prefixes from two different VRFs that would be injected
into each other's table.

  Any sample illustration would be greatly appreciated.

  Best regards,

  Joe.

   Catch all the cricket action. Download Yahoo! Score tracker


------=_NextPart_000_0005_01C28FDB.9947BB20
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">


<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D637462913-19112002><FONT face=3DArial color=3D#0000ff =
size=3D2>VPN=20
routes are imported into a VRF based on the RT attached to them, and =
exported=20
from a VRF with a specific RT attached to it. Basically, you can just =
extend the=20
basic import/export policy with additional requirements such as a =
prefix-list=20
(match specific RT &amp;&amp; match prefix-list). Below I copied from=20
fr</FONT></SPAN><SPAN class=3D637462913-19112002><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>om the JUNOS 5.5 manual, and added the =
prefix-list:</FONT></SPAN></DIV>
<DIV><SPAN class=3D637462913-19112002><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV><SPAN class=3D637462913-19112002>
<DIV class=3DExample3><FONT face=3D"Courier New" color=3D#0000ff=20
size=3D2>[edit]<BR></FONT><FONT face=3D"Courier New" color=3D#0000ff=20
size=3D2>policy-options {<BR></FONT><FONT face=3D"Courier New" =
color=3D#0000ff=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;policy-statement=20
<CODE><I>export-policy-name</I></CODE> {<BR></FONT><FONT=20
face=3D"Courier New"><FONT color=3D#0000ff=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;term=20
<CODE><I>export-term-name</I></CODE>=20
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;from&nbsp;<SPAN=20
class=3D637462913-19112002>{</SPAN></FONT></FONT></DIV>
<DIV class=3DExample3><SPAN class=3D637462913-19112002></SPAN><FONT=20
face=3D"Courier New"><FONT color=3D#0000ff><FONT size=3D2><SPAN=20
class=3D637462913-19112002>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
</SPAN>protocol (bgp | ospf | rip | static);</FONT></FONT></FONT></DIV>
<DIV class=3DExample3><FONT color=3D#0000ff><FONT size=3D2><FONT=20
face=3D"Courier New"><SPAN=20
class=3D637462913-19112002>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;=20
=3D=3D&gt;&gt;&nbsp;prefix-list=20
<EM>your-prefix-list</EM>;</SPAN></FONT></FONT></FONT></DIV>
<DIV class=3DExample3><SPAN class=3D637462913-19112002></SPAN><SPAN=20
class=3D637462913-19112002></SPAN><FONT face=3D"Courier New" =
color=3D#0000ff=20
size=3D2>&nbsp;<SPAN class=3D637462913-19112002><FONT=20
face=3DArial>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
}</FONT></SPAN><BR></FONT><FONT face=3D"Courier New" color=3D#0000ff=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;then=20
{<BR></FONT><FONT face=3D"Courier New" color=3D#0000ff=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;community=20
add <CODE><I>community-id</I></CODE>;<BR></FONT><FONT face=3D"Courier =
New"=20
color=3D#0000ff=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;accept;<BR></FONT><FONT=20
face=3D"Courier New" color=3D#0000ff=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;}<BR></FONT><FONT=20
face=3D"Courier New" color=3D#0000ff=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR></FONT><FON=
T=20
face=3D"Courier New" color=3D#0000ff=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;term=20
<CODE><I>term-name</I></CODE> {<BR></FONT><FONT face=3D"Courier New" =
color=3D#0000ff=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;then=20
reject;<BR></FONT><FONT face=3D"Courier New" color=3D#0000ff=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR></FONT><FON=
T=20
face=3D"Courier New" color=3D#0000ff=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;}<BR></FONT><FONT face=3D"Courier New"=20
color=3D#0000ff size=3D2>}<BR></FONT></DIV>
<DIV class=3DExample3><SPAN class=3D637462913-19112002><FONT =
face=3D"Courier New"=20
color=3D#0000ff size=3D2>Then at the routing-instance level: vrf-export=20
&lt;...&gt;</FONT></SPAN></DIV>
<DIV class=3DExample3><FONT face=3D"Courier New" color=3D#0000ff =
size=3D2><FONT=20
face=3DArial></FONT>&nbsp;</DIV></FONT>
<DIV class=3DExample3></SPAN><SPAN class=3D637462913-19112002><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>See also: <A=20
href=3D"http://www.juniper.net/techpubs/software/junos/junos55/swconfig55=
-vpns/html/vpnl3-config17.html#1015326">http://www.juniper.net/techpubs/s=
oftware/junos/junos55/swconfig55-vpns/html/vpnl3-config17.html#1015326</A=
></FONT></SPAN></DIV>
<DIV><SPAN class=3D637462913-19112002></SPAN><SPAN =
class=3D637462913-19112002><FONT=20
face=3DArial color=3D#0000ff size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D637462913-19112002><FONT face=3DArial color=3D#0000ff =
size=3D2>The=20
configuration for an import filter is similar. </FONT></SPAN></DIV>
<DIV><SPAN class=3D637462913-19112002></SPAN><SPAN =
class=3D637462913-19112002><FONT=20
face=3DArial color=3D#0000ff size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D637462913-19112002><FONT face=3DArial color=3D#0000ff =

size=3D2>Ofcourse the above is a basic policy, it needs to be adapted to =
your=20
specific needs.</FONT></SPAN></DIV>
<DIV><SPAN class=3D637462913-19112002><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D637462913-19112002><FONT face=3DArial color=3D#0000ff =

size=3D2>cheers,</FONT></SPAN></DIV>
<DIV><SPAN class=3D637462913-19112002>&nbsp;&nbsp;&nbsp; <FONT =
face=3DArial=20
color=3D#0000ff size=3D2>Eduard</FONT></SPAN></DIV>
<DIV><SPAN class=3D637462913-19112002><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid; MARGIN-RIGHT: 0px">
  <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B>=20
  juniper-nsp-admin@puck.nether.net=20
  [mailto:juniper-nsp-admin@puck.nether.net]<B>On Behalf Of </B>Joseph=20
  Anthony<BR><B>Sent:</B> dinsdag 19 november 2002 13:56<BR><B>To:</B>=20
  juniper-nsp@puck.nether.net<BR><B>Subject:</B> [j-nsp] REG: Route=20
  Filtering.<BR><BR></FONT></DIV>
  <P>Hi,</P>
  <P>I am trying to figure out on how to do route filtering (prefix =
based),=20
  while importing, and exporting routes from VRF table to another. The =
idea is=20
  to limit the list of prefixes from two different VRFs that would be =
injected=20
  into each other's table.</P>
  <P>Any sample illustration would be greatly appreciated.</P>
  <P>Best regards,</P>
  <P>Joe.</P>
  <P><IMG height=3D28 =
src=3D"http://sg.yimg.com/i/aa/icons/28/cricket.gif" width=3D28=20
  NOSEND=3D"1"> Catch all the cricket action. Download <A =
target=3D_blank=20
  href=3D"http://in.sports.yahoo.com/cricket/tracker.html">Yahoo! Score=20
  tracker</A></P></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0005_01C28FDB.9947BB20--