Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Full Mesh VPNs

Configuring a Simple Full-Mesh VPN Topology

This example shows how to set up a simple full-mesh service provider VPN configuration, which consists of the following components (see Figure 1):

  • Two separate VPNs (VPN-A and VPN-B)

  • Two provider edge (PE) routers, both of which service VPN-A and VPN-B

  • RSVP as the signaling protocol

  • One RSVP label-switched path (LSP) that tunnels between the two PE routers through one provider (P) router

Figure 1: Example of a Simple VPN TopologyExample of a Simple VPN Topology

In this configuration, route distribution in VPN A from Router VPN-A-Paris to Router VPN-A-Tokyo occurs as follows:

  1. The customer edge (CE) router VPN-A-Paris announces routes to the PE router Router A.

  2. Router A installs the received announced routes into its VPN routing and forwarding (VRF) table, VPN-A.inet.0.

  3. Router A creates an MPLS label for the interface between it and Router VPN-A-Paris.

  4. Router A checks its VRF export policy.

  5. Router A converts the Internet Protocol version 4 (IPv4) routes from Router VPN-A-Paris into VPN IPv4 format using its route distinguisher and announces these routes to PE Router C over the IBGP between the two PE routers.

  6. Router C checks its VRF import policy and installs all routes that match the policy into its bgp.l3vpn.0 routing table. (Any routes that do not match are discarded.)

  7. Router C checks its VRF import policy and installs all routes that match into its VPN-A.inet.0 routing table. The routes are installed in IPv4 format.

  8. Router C announces its routes to the CE router Router VPN-A-Tokyo, which installs them into its primary routing table. (For routing platforms running Junos OS, the primary routing table is inet.0.)

  9. Router C uses the LSP between it and Router A to route all packets from Router VPN-A-Tokyo that are destined for Router VPN-A-Paris.

The final section in this example consolidates the statements needed to configure VPN functionality on each of the service P routers shown in Figure 1.

Note:

In this example, a private autonomous system (AS) number is used for the route distinguisher and the route target. This number is used for illustration only. When you are configuring VPNs, you should use an assigned AS number.

The following sections explain how to configure the VPN functionality on the PE and P routers. The CE routers have no information about the VPN, so you configure them normally.

Enabling an IGP on the PE and P Routers

To allow the PE and P routers to exchange routing information among themselves, you must configure an interior gateway protocol (IGP) on all these routers or you must configure static routes. You configure the IGP on the primary instance of the routing protocol process (rpd) (that is, at the [edit protocols] hierarchy level), not within the VPN routing instance (that is, not at the [edit routing-instances] hierarchy level).

You configure the IGP in the standard way. This configuration example does not include this portion of the configuration.

Enabling RSVP and MPLS on the P Router

On the P router, Router B, you must configure RSVP and MPLS because this router exists on the MPLS LSP path between the two PE routers, Router A and Router C:

Configuring the MPLS LSP Tunnel Between the PE Routers

In this configuration example, RSVP is used for VPN signaling. Therefore, in addition to configuring RSVP, you must enable traffic engineering support in an IGP and you must create an MPLS LSP to tunnel the VPN traffic.

On PE Router A, enable RSVP and configure one end of the MPLS LSP tunnel. In this example, traffic engineering support is enabled for OSPF. When configuring the MPLS LSP, include interface statements for all interfaces participating in MPLS, including the interfaces to the PE and CE routers. The statements for the interfaces between the PE and CE routers are needed so that the PE router can create an MPLS label for the private interface. In this example, the first interface statement configures MPLS on the interface connected to the LSP, and the remaining three configure MPLS on the interfaces that connect the PE router to the CE routers.

On PE Router C, enable RSVP and configure the other end of the MPLS LSP tunnel. Again, traffic engineering support is enabled for OSPF, and you configure MPLS on the interfaces to the LSP and the CE routers.

Configuring IBGP on the PE Routers

On the PE routers, configure an IBGP session with the following properties:

  • VPN family—To indicate that the IBGP session is for the VPN, include the family inet-vpn statement.

  • Loopback address—Include the local-address statement, specifying the local PE router’s loopback address. The IBGP session for VPNs runs through the loopback address. You must also configure the lo0 interface at the [edit interfaces] hierarchy level. The example does not include this part of the router’s configuration.

  • Neighbor address—Include the neighbor statement, specifying the IP address of the neighboring PE router, which is its loopback (lo0) address.

On PE Router A, configure IBGP:

On PE Router C, configure IBGP:

Configuring Routing Instances for VPNs on the PE Routers

Both PE routers service VPN-A and VPN-B, so you must configure two routing instances on each router, one for each VPN. For each VPN, you must define the following in the routing instance:

  • Route distinguisher, which must be unique for each routing instance on the PE router.

  • It is used to distinguish the addresses in one VPN from those in another VPN.

  • Instance type of vrf, which creates the VRF table on the PE router.

  • Interfaces connected to the CE routers.

  • VRF import and export policies, which must be the same on each PE router that services the same VPN. Unless an import policy contains only a then reject statement, it must include reference to a community. Otherwise, when you try to commit the configuration, the commit fails.

    Note:

    In this example, a private AS number is used for the route distinguisher. This number is used for illustration only. When you are configuring VPNs, you should use an assigned AS number.

  • Routing between the PE and CE routers, which is required for the PE router to distribute VPN-related routes to and from connected CE routers. You can configure a routing protocol—BGP, OSPF, or RIP—or you can configure static routing.

On PE Router A, configure the following routing instance for VPN-A. In this example, Router A uses static routes to distribute routes to and from the two CE routers to which it is connected.

On PE Router C, configure the following routing instance for VPN-A. In this example, Router C uses BGP to distribute routes to and from the CE router to which it is connected.

On PE Router A, configure the following routing instance for VPN-B. In this example, Router A uses OSPF to distribute routes to and from the CE router to which it is connected.

On PE Router C, configure the following routing instance for VPN-B. In this example, Router C uses RIP to distribute routes to and from the CE router to which it is connected.

Configuring VPN Policy on the PE Routers

Configure the VPN import and export policies on each PE router so that the appropriate routes are installed in the PE router’s VRF tables. The VRF table is used to forward packets within a VPN. For VPN-A, the VRF table is VPN-A.inet.0, and for VPN-B it is VPN-B.inet.0.

In the VPN policy, you also configure VPN target communities.

In the following example, a private AS number is used for the route target. This number is used for illustration only. When you are configuring VPNs, you should use an assigned AS number. The policy qualifiers shown in this example are only those needed for the VPN to function. You can configure additional qualifiers, as needed, for any policies that you configure.

On PE Router A, configure the following VPN import and export policies:

On PE Router C, configure the following VPN import and export policies:

To apply the VPN policies on the routers, include the vrf-export and vrf-import statements when you configure the routing instance. For both VPNs, the VRF import and export policies handle the route distribution across the IBGP session running between the PE routers.

To apply the VPN policies on PE Router A, include the following statements:

To apply the VPN policies on PE Router C, include the following statements:

Simple VPN Configuration Summarized by Router

Router A (PE Router)

Routing Instance for VPN-A

Instance Routing Protocol

Routing Instance for VPN-B

Instance Routing Protocol

Primary Protocol Instance

Enable RSVP

Configure an MPLS LSP

Configure IBGP

Configure OSPF for Traffic Engineering Support

Configure VPN Policy

Router B (P Router)

Primary Protocol Instance

Enable RSVP

Enable MPLS

Router C (PE Router)

Routing Instance for VPN-A

Instance Routing Protocol

Routing Instance for VPN-B

Instance Routing Protocol

Primary Protocol Instance

Enable RSVP

Configure an MPLS LSP

Configure IBGP

Configure OSPF for Traffic Engineering Support

Configure VPN Policy

Configuring a Full-Mesh VPN Topology with Route Reflectors

This example is a variation of the full-mesh VPN topology example (described in Configuring a Simple Full-Mesh VPN Topology) in which one of the PE routers is a BGP route reflector. In this variation, Router C in Configuring a Simple Full-Mesh VPN Topology is a route reflector. The only change to its configuration is that you need to include the cluster statement when configuring the BGP group: