28.06.2014 Views

Discussion

Discussion

Discussion

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

All routes that are part of the VPN are identified by a route distinguisher, which you<br />

define with the set route-distinguisher command:<br />

[edit routing-instances VPN2]<br />

aviva@RouterG# set route-distinguisher 65500:02<br />

You can specify the route distinguisher in two ways. This recipe uses the AS number<br />

followed by a colon and an identifying value. You can also use an IP address followed<br />

by a colon and an identifying value. Neither format is better than the other.<br />

The format you choose depends entirely on your design and specific requirements.<br />

Using the IP address:value format allows you to identify the originating PE router<br />

when you are looking at a route and its communities, because you normally set the<br />

IP portion to the PE router’s lo0 address. This format can assist with troubleshooting<br />

and operational monitoring. Using the AS:value format has the advantage of leaving<br />

more space for the Administrator variable (four bytes instead of two bytes).<br />

Service providers often choose this second format, using the value field to hold a<br />

numeric customer identifier. When looking at routes, this format makes it possible,<br />

on a network-wide basis, to identify the customer associated with a route.<br />

For the VPN to know which routes belong to it, you define a VRF target using the<br />

set vrf-target command:<br />

[edit routing-instances VPN2]<br />

aviva@RouterG# set vrf-target target:65520:100<br />

The command sets the route target (the target VPN), which is one of the BGP<br />

extended community attributes. The VRF target identifies which route belongs to<br />

which VPN and allows the VPN to accept routes into its VRF routing table and to<br />

advertise them.<br />

The set vrf-target command also associates a default import and export policy with<br />

the VRF routing table to accept and advertise routes. The default policy uses the configured<br />

target, here 65520:100, as the match condition for routes received from<br />

remote PE routers. As the import policy states, any routes containing this target are<br />

placed into the VRF table. Similarly, when sending routes to local PE routers, the<br />

export policy is for the VPN to advertise any routes matching this target. The default<br />

routing policy is a simple policy that would look something like this if you configured<br />

it manually:<br />

[edit policy-options]<br />

aviva@RouterG# set community VPN2 members target:65500:2<br />

[edit policy-options policy-statement VPN2-import-policy]<br />

aviva@RouterG# set term 1 from protocol bgp<br />

aviva@RouterG# set term 1 from community VPN2<br />

aviva@RouterG# set term 1 then accept<br />

aviva@RouterG# set term 2 then reject<br />

[edit policy-options policy-statement VPN2-export-policy]<br />

aviva@RouterG# set term 1 from protocol static<br />

Setting Up a Simple Layer 3 VPN | 561<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!