Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Example: Configuring Layer 3 VPN (VRF) on cRPD Instance

 

This example shows the VPNv4 route resolution on PE routers and route reflectors by configuring the PE routers with specific policies to control the import of routes into and the export of routes from the VRF table and with next hops learnt using BGP labeled unicast. In this example, the traffic flows from CE1 to CE2.

Requirements

This example uses the following hardware and software components:

  • Ubuntu software version 18.04

  • Linux kernel version 4.5 or later

  • cRPD software Release version 19.4R1 or later

Before you configure a Layer 3 VPN (VRF), you must install the basic components:

Overview

To configure the VPNv4 route resolution, you need to configure a routing instance of type VRF for each VPN on each of the PE routers participating in the VPN and add static routes to it. The static statement configures the static routes that are installed in the vrfblue.inet.0 routing table. There is no loopback interface or device for every VRF device created in the Linux kernel. But the loopback host addresses are directly added to the VRF device which can be learnt by RPD.

Topology

Figure 1 shows the Layer 3 VPN (VRF) Topology

Figure 1: Layer 3 VPN (VRF) Topology
Layer 3 VPN (VRF) Topology

Configuration

Configuring PE1 router with BGP LU

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy.

  1. Create the table mpls.0.
  2. Configure policy that accepts routes.
  3. Configure a VRF routing instance on PE1 and other routing instance parameters.
  4. Configure the router ID.
  5. Configure BGP session.
  6. Configure the interface on MPLS.

Results

From configuration mode, confirm your configuration by entering the show protocols bgp and show routing-instances commands. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

If you are done configuring the device, enter commit from configuration mode.

Configuring P router with BGP LU

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy.

  1. Create the table mpls.0.
  2. Configure policy that accepts routes.
  3. Configure BGP session.
  4. Configure the router ID.
  5. Configure the interface on MPLS.

Results

From configuration mode, confirm your configuration by entering the show protocols bgp and show policy-options commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

Configuring PE2 router with BGP LU

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy.

  1. Create the table mpls.0.
  2. Configure policy that accepts routes.
  3. Configure a VRF routing instance on PE2 and other routing instance parameters.
  4. Configure BGP session.
  5. Configure the router ID.
  6. Configure the interface on MPLS.

Results

From configuration mode, confirm your configuration by entering the show protocols bgp and show routing-instances commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

Verification

Verifying VPNv4 Resolution on PE1

Purpose

To verify VPNv4 routes on PE1:

Action

From operational mode, enter the show route table vrfblue.inet.0 5.5.5.5 command:

user@crpd1>show route table vrfblue.inet.0 5.5.5.5

From operational mode, enter the show route table mpls.0 command:

user@crpd1>show route table mpls.0

From bash mode, enter the ip route list table 5 5.5.5.5 command:

user@crpd1>ip route list table 5 5.5.5.5

From bash mode, enter the ip -f mpls route command:

user@crpd1>ip -f mpls route

Meaning

You can view PE1 has a route under vrfblue.inet.0 to CE2 which is learnt from PE2 with nexthop 4.4.4.4, which is resolved using BGP LU from P router.

Verifying BGP LU on P

Purpose

To verify VPNv4 routes on P:

Action

From bash mode, enter the ip -f mpls route show command:

user@crpd2>ip -f mpls route show

From operational mode, enter the show route table mpls.0 command:

user@crpd2>show route table mpls.0

Meaning

You can view the MPLS and VPN routes from P to PE1 and P to PE2.

Verifying VPNv4 Resolution on PE2

Purpose

To verify VPNv4 routes on PE2:

Action

From operational mode, enter the show route table vrfblue.inet.0 1.1.1.1 command:

user@crpd3>show route table vrfblue.inet.0 1.1.1.1

From operational mode, enter the show route table mpls.0 command:

user@crpd3>show route table mpls.0

From bash mode, enter the ip route list table 5 1.1.1.1 command:

user@crpd3>ip route list table 5 1.1.1.1

From bash mode, enter the ip -f mpls route command:

user@crpd3>ip -f mpls route

Meaning

On PE2 router, PE1 displays the routes for the VRF table vrfblue.inet.0 using BGP LU about 1.1.1.1 as a VPNv4 prefix with nexthop as 2.2.2.2..