To configure a basic Layer 3 VPN, Layer 2 VPN, or Layer 2 circuit, perform the following tasks. Use Table 196 to help you select the tasks for your VPN type. For information about using the J-Web and CLI configuration editors, see the J-Web Interface User Guide and the JUNOS CLI User Guide.
Table 196: VPN Configuration Task Summary
Configuring the Services Router interfaces that participate in the VPN is similar to configuring them for other uses, with a few requirements for VPN.
Before following the procedures in this section, make sure you have initially configured the interface as described in Configuring Ethernet, DS1, DS3, and Serial Interfaces.
To configure an interface for a VPN:
Table 197: Configuring an Interface for a VPN
Task |
J-Web Configuration Editor |
CLI Configuration Editor |
|---|---|---|
Configure IPv4. (interfaces on all Services Routers) (See the interface naming conventions in Network Interface Naming.) |
|
|
Configure the MPLS address family. (for interfaces on a PE or provider Services Router that communicate with a PE or provider Services Router only, and not for loopback addresses) |
On the Unit page, select Mpls in the Family group. |
At the [edit interfaces interface] level, enter set unit logical_interfacefamily mpls |
For Layer 2 VPNs and circuits, configure encapsulation. If multiple logical units are configured, the encapsulation type is needed at the interface level only. It is always required at the unit level. (for interfaces on a PE Services Router that communicate with a CE Services Router) |
|
|
The Services Routers in a VPN use a variety of protocols to communicate between PE and provider Services Routers. Use Table 198 to help you select the tasks for your VPN type. For more information about configuring routing protocols, see the JUNOS Routing Protocols Configuration Guide and the JUNOS MPLS Applications Configuration Guide.
This section contains the following topics:
Table 198: VPN Protocol Configuration Task Summary
Section |
Layer 3 VPN |
Layer 2 VPN |
Layer 2 Circuit |
|---|---|---|---|
N/A unless you are using RSVP |
PE and provider Services Routers |
PE Services Routers |
|
PE Services Routers |
PE Services Routers |
PE Services Routers |
|
All Services Routers |
All Services Routers |
All Services Routers |
|
Configuring an IGP and a Signaling Protocol—one of the following tasks: |
PE and provider Services Routers |
PE Services Routers |
PE Services Routers |
N/A |
N/A |
PE Services Routers |
For Layer 2 VPN and Layer 2 circuit interfaces that communicate with other PE Services Routers and provider Services Routers, you must advertise the interface using MPLS. Unless you are using RSVP, this section does not apply to Layer 3 VPNs because MPLS is configured on the interface.
For more information about configuring MPLS, see Multiprotocol Label Switching OverviewJUNOS MPLS Applications Configuration Guide.
To configure MPLS for VPNs:
Table 199: Configuring MPLS for VPNs
Task |
J-Web Configuration Editor |
CLI Configuration Editor |
|---|---|---|
Navigate to the top of the configuration hierarchy and specify the interfaces used for communication between PE routers and between PE routers and provider routers. (PE and provider Services Routers) (See the interface naming conventions in Network Interface Naming.) |
|
From the [edit] hierarchy level, enter the following command for each interface you want to enable: edit protocols mpls interface interface-name |
For RSVP only, configure an MPLS label-switched path (LSP) to the destination point on the PE router for LSP. During configuration, you specify the IP address of the LSP destination point, which is an address on the remote PE router. The path name is defined on the source Services Router only and is unique between two routers. (PE Services Router interface communicating with another PE Services Router) |
|
|
You must configure an internal BGP (IBGP) session between PE Services Routers so the Services Routers can exchange information about routes originating and terminating in the VPN. The PE routers use this information to determine which labels to use for traffic destined for remote sites. The IBGP session for the VPN runs through the loopback address. This section is valid for Layer 2 VPNs and Layer 3 VPNs, but not Layer 2 circuits.
For the Layer 3 example, you also configure an EBGP session.
For more information about configuring IBGP sessions, see Configuring BGP Within a Network (Required) and the JUNOS Routing Protocols Configuration Guide.
To configure an IBGP session:
Table 200: Configuring an IBGP Session
The only required routing option for VPNs is the autonomous system (AS) number. You must specify it on each router involved in the VPN.
To configure routing options for a VPN:
Table 201: Configuring Routing Options for a VPN
The PE Services Routers and provider Services Routers must be able to exchange routing information. To enable this exchange, you must configure either an IGP such as OSPF or static routes on these routers. You must configure the IGP at the [edit protocols] level, not within the routing instance at the [edit routing-instances] level.
You can use LDP or RSVP between PE routers and between PE routers and provider routers, but not for interfaces between PE routers and CE routers. LDP routes traffic using IGP metrics. RSVP has traffic engineering that lets you override IGP metrics as needed. For more information about these protocols, see Signaling Protocols Overview.
Each PE Services Router's loopback address must appear as a separate route. Do not configure any summarization of the PE Services Router's loopback addresses at the area boundary.
For more information about configuring IGPs and static routes, see Configuring a RIP Network, Configuring an OSPF Network , Configuring the IS-IS Protocol, Configuring Static Routes, and the JUNOS Routing Protocols Configuration Guide.
Configure the appropriate signaling protocol for your VPN:
You must configure LDP and OSPF on PE and provider routers. For more information about configuring OSPF see Configuring an OSPF Network.
To configure LDP and OSPF:
For the protocols to work properly, you also must configure the MPLS address family for each interface that uses LDP or RSVP, as described previously in Configuring Interfaces Participating in a VPN.
Table 202: Configuring LDP and OSPF for Signaling
Task |
J-Web Configuration Editor |
CLI Configuration Editor |
|---|---|---|
Navigate to the top of the configuration hierarchy and specify the LDP protocol. Enable local interfaces that communicate with a PE router or provider router, and the loopback interface of the PE router. (PE and provider Services Routers) (See the interface naming conventions in Network Interface Naming.) |
|
From the [edit] hierarchy level, enter the following command for each interface you want to enable: edit protocols ldp interface interface-name |
Configure OSPF for each interface that uses LDP. For OSPF, you must configure at least one area on at least one of the router's interfaces. An AS can be divided into multiple areas. This example uses the backbone area 0.0.0.0. (PE and provider Services Routers) |
For OSPF:
|
For OSPF:
|
You must enable RSVP for all connections that participate in the label-switched path (LSP) on PE and provider Services Routers. In addition, you must configure OSPF on various interfaces.
For more information about configuring OSPF see Configuring an OSPF Network.
To configure RSVP and OSPF:
Table 203: Configuring RSVP and OSPF for Signaling
Task |
J-Web Configuration Editor |
CLI Configuration Editor |
|---|---|---|
Navigate to the top of the configuration hierarchy and configure OSPF with traffic engineering support. (PE Services Router) |
For OSPF, follow these steps:
|
From the [edit] hierarchy level, enter the following command for each interface you want to enable: edit protocols ospf traffic-engineering shortcuts |
Enable RSVP on interfaces that participate in the LSP. (PE Services Router) Enable interfaces on the source and destination points. (provider Services Router) Enable interfaces that connect the LSP between the PE Services Routers. (See the interface naming conventions in Network Interface Naming.) |
|
From the [edit] hierarchy level, enter the following command for each interface you want to enable: edit protocols rsvp interface interface-name |
Each Layer 2 circuit is represented by the logical interface connecting the local PE Services Router to the local CE Services Router. All Layer 2 circuits using a particular remote PE Services Router neighbor is identified by its IP address and is usually the endpoint destination for the LSP tunnel transporting the Layer 2 circuit.
You configure a virtual circuit ID on each interface. Each virtual circuit ID uniquely identifies the Layer 2 circuit among all the Layer 2 circuits to a specific neighbor. The key to identifying a particular Layer 2 circuit on a PE router is the neighbor address and the virtual circuit ID. Based on the virtual circuit ID and the neighbor relationship, an LDP label is bound to an LDP circuit. LDP uses the binding for sending traffic on that Layer 2 circuit to the remote CE router.
To configure a Layer 2 circuit:
Table 204: Configuring a Layer 2 Circuit
Task |
J-Web Configuration Editor |
CLI Configuration Editor |
|---|---|---|
Navigate to the top of the configuration hierarchy and enable a Layer 2 circuit on the appropriate interface. (PE Services Router) (See the interface naming conventions in Network Interface Naming.) |
|
|
You must configure a routing instance for each VPN on each PE Services Router participating in the VPN. The routing instance has the same name on each PE router. VPN routing instances need a route distinguisher to help BGP distinguish between potentially identical network layer reachability information (NLRI) messages received from different VPNs. This section does not apply to Layer 2 circuit configurations.
Each routing instance that you configure on a PE router must have a unique route distinguisher. There are two possible formats:
The route target defines which route is part of a VPN. A unique route target helps distinguish between different VPN services on the same router. Each VPN also has a policy that defines how routes are imported into the VPN routing and forwarding (VRF) table on the router. A Layer 2 VPN is configured with import and export policies. A Layer 3 VPN uses a unique route target to distinguish between VPN routes.
To configure a VPN routing instance:
Table 205: Configuring a VPN Routing Instance
Task |
J-Web Configuration Editor |
CLI Configuration Editor |
|---|---|---|
Navigate to the top of the configuration hierarchy and create the routing instance. (PE Services Router) |
|
From the [edit] hierarchy level, enter edit routing-instances routing-instance-name |
Specify a text description for the routing instance. This text appears in the output of the show route instance detail command. (PE Services Router) |
In the Description box, type a description. |
Enter set description “text” |
Specify the instance type, either l2vpn for Layer 2 VPNs or vrf for Layer 3 VPNs. (PE Services Router) |
From the Instance type list, select an instance type. |
Enter set instance-typeinstance-type |
Specify the interface of the remote PE Services Router. (PE Services Router) (See the interface naming conventions in Network Interface Naming.) |
|
Enter set interface interface-name |
Specify the route distinguisher. (PE Services Router) |
In the Rd type box, enter a route distinguisher in the format as-number:numberor ip-address:number. |
Enter one of the following commands:
|
Specify the policy for the Layer 2 VRF table. For the Layer 2 VPN example, the routing policies are defined in Configuring a Routing Policy for Layer 2 VPNs. (PE Services Router) |
For the sample Layer 2 VPN configuration, which uses import and export policies:
|
For the sample Layer 2 VPN configuration, which uses import and export policies, enter set vrf-import import-policy-name vrf-export export-policy-name |
Specify the policy for the Layer 3 VRF table. For the Layer 3 VPN example, the routing policy is defined in Configuring a Routing Policy for Layer 3 VPNs. (PE Services Router) |
For the sample Layer 3 VPN configuration, which uses a route target:
|
For the sample Layer 3 VPN configuration, which uses a route target, enter set vrf-target target:community-id Replace community-id with either of the following:
|
Layer 2 and Layer 3 VPNs require a routing policy that describes which packets are sent and received across the VPN. Layer 2 circuits do not use a policy, and therefore, Layer 2 circuits send and receive all packets. For Layer 2 VPNs, the routing policy resides on the PE Services Routers. For the Layer 3 VPN example, the routing policy resides on the CE Services Routers.
This section contains the following topics. For more information about configuring routing policies, see Configuring Routing Policies and the JUNOS Routing Protocols Configuration Guide.
If the routing instance uses a policy for accepting and rejecting packets instead of a route target, you must specify the import and export routing policies and the community on each PE Services Router.
To configure a Layer 2 VPN routing policy on a PE Services Router:
Table 206: Configuring an Import Routing Policy for Layer 2 VPNs
After configuring an import routing policy for a Layer 2 VPN, configure an export routing policy for the Layer 2 VPN. The export routing policy defines how routes are exported from the PE Services Router routing table. An export policy is applied to routes sent to other PE Services Routers in the VPN. The export policy must also evaluate all routes received over the routing protocol session with the CE Services Router. The export policy must also contain a second term for rejecting all other routes.
Table 207: Configuring an Export Routing Policy for Layer 2 VPNs
To configure a Layer 3 VPN routing policy on a CE Services Router:
Table 208: Configuring a Routing Policy for Layer 3 VPNs