Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Example: Configuring Static Label Switched Paths for MPLS in cRPD

 

This example shows how the VPN traffic flows through a v4 MPLS tunnel among PEs by configuring BGP and MPLS static label switched paths.

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 static LSP for MPLS forwarding, you must install the basic components:

Overview

In this example, PE1 acts as a Label Edge Router or ingress node to the MPLS network, which encapsulates the packets by attaching labels. P acts as Label Switching Router that transfers MPLS packets using labels in the MPLS network.

To configure MPLS, you must first create one or more named paths on the ingress and transit routers. For each path, you can specify some or all transit routers in the path.

Configuring static label-switched paths (LSPs) for MPLS is similar to configuring static routes on individual routers.

Topology

Figure 1 shows the topology used in this example.

Figure 1: MPLS Forwarding in cRPD
MPLS Forwarding in cRPD

Configuration

To configure static LSP for MPLS on cRPD:

Configuring PE1 Router

Step-by-Step Procedure

To configure the static LSP:

  1. Create the tables inet.0 and mpls.0.
  2. Configure BGP session.
  3. Configure the static label range and ingress static LSP parameters.
  4. Configure a static route from the ingress PE2.
  5. Configure a VRF routing instance on PE1 and other routing instance parameters.

Results

From configuration mode, confirm your configuration by entering the show protocols bgp and run show configuration protocols mpls commands on PE1. 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 Provider P Router.

Step-by-Step Procedure

To configure the static LSP:

  1. Configure router ID for router P.
  2. Configure a transit static LSP for swap and pop labels.

Results

From configuration mode, confirm your configuration by entering the show protocols bgp, run show configuration protocols mpls, and run show mpls interface commands on P. 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 PE2 Router

Step-by-Step Procedure

To configure the static LSP for MPLS on PE2:

  1. Configure BGP session.
  2. Configure the ingress static LSP parameters.
  3. Configure router ID and a static route from the ingress PE1.
  4. Configure a VRF routing instance on PE2 and other routing instance parameters.

Results

From configuration mode, confirm your configuration by entering the run show configuration protocols mpls and run show mpls interface commands on PE2. 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.

Verification

Verify MPLS forwarding on PE1

Purpose

To verify the configuration for MPLS 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 mpls label usage command:

user@crpd1> show mpls label usage

From operational mode, enter the show mpls static-lsp command:

user@crpd1>show mpls static-lsp

From operational mode, enter the show route table inet.3 command:

user@crpd1> show route table inet.3

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

user@crpd1> show route table mpls.0

From operational 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 operational mode, enter the ip -f mpls route command:

user@crpd1> ip -f mpls route

Verify MPLS forwarding on P

Purpose

To verify the configuration for MPLS on P.

Action

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

user@crpd2>show route table mpls.0
user@crpd2>show mpls static-lsp

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

user@crpd2:/# ip -f mpls route

Verify MPLS forwarding on PE2

Purpose

To verify the configuration for MPLS on P.

Action

From shell 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
user@crpd3>show mpls static-lsp
user@crpd3>show route table mpls.0

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

user@crpd3:/# ip -f mpls route

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

user@crpd3:/# ip route list table 5 1.1.1.1

Meaning

You can verify the static LSP between PEs are up on all the devices and the routes are populated in the corresponding route tables inet.o and inet.3 and in the Linux FIB.

Related Documentation