08-MPLS Configuration Guide

HomeSupportSwitchesH3C S7500E Switch SeriesConfigure & DeployConfiguration GuidesH3C S7500E Switch Series Configuration Guides-Release7178-6W10008-MPLS Configuration Guide
01-Basic MPLS configuration
Title Size Download
01-Basic MPLS configuration 288.59 KB

Configuring basic MPLS

Multiprotocol Label Switching (MPLS) provides connection-oriented label switching over connectionless IP backbone networks. It integrates both the flexibility of IP routing and the simplicity of Layer 2 switching.

Overview

MPLS has the following features:

·     High speed and efficiency—MPLS uses short- and fixed-length labels to forward packets, avoiding complicated routing table lookups.

·     Multiprotocol support—MPLS resides between the link layer and the network layer. It can work over various link layer protocols to provide connection-oriented services for various network layer protocols (for example, IPv4, IPv6, and IPX).

·     Good scalabilityThe connection-oriented switching and multilayer label stack features enable MPLS to deliver various extended services, such as VPN, traffic engineering, and QoS.

Basic concepts

FEC

MPLS groups packets with the same characteristics (such as packets with the same destination or service class) into a forwarding equivalence class (FEC). Packets of the same FEC are handled in the same way on an MPLS network.

Label

A label uniquely identifies an FEC and has local significance.

Figure 1 Format of a label

 

A label is encapsulated between the Layer 2 header and Layer 3 header of a packet. It is four bytes long and consists of the following fields:

·     Label—20-bit label value.

·     TC3-bit traffic class, used for QoS. It is also called Exp.

·     S—1-bit bottom of stack flag. A label stack can contain multiple labels. The label nearest to the Layer 2 header is called the top label, and the label nearest to the Layer 3 header is called the bottom label. The S field is set to 1 if the label is the bottom label and set to 0 if not.

·     TTL—8-bit time to live field used for MPLS loop prevention.

LSR

A router that performs MPLS forwarding is a label switching router (LSR).

LSP

A label switched path (LSP) is the path along which packets of an FEC travel through an MPLS network.

An LSP is a unidirectional packet forwarding path. Two neighboring LSRs are called the upstream LSR and downstream LSR along the direction of an LSP. As shown in Figure 2, LSR B is the downstream LSR of LSR A, and LSR A is the upstream LSR of LSR B.

Figure 2 Label switched path

 

LFIB

The Label Forwarding Information Base (LFIB) on an MPLS network functions like the Forwarding Information Base (FIB) on an IP network. When an LSR receives a labeled packet, it searches the LFIB to obtain information for forwarding the packet. The information includes the label operation type, the outgoing label value, and the next hop.

Control plane and forwarding plane

An MPLS node consists of a control plane and a forwarding plane.

·     Control plane—Assigns labels, distributes FEC-label mappings to neighbor LSRs, creates the LFIB, and establishes and removes LSPs.

·     Forwarding plane—Forwards packets according to the LFIB.

MPLS network architecture

Figure 3 MPLS network architecture

 

An MPLS network has the following types of LSRs:

·     Ingress LSR—Ingress LSR of packets. It labels packets entering into the MPLS network.

·     Transit LSR—Intermediate LSRs in the MPLS network. The transit LSRs on an LSP forward packets to the egress LSR according to labels.

·     Egress LSR—Egress LSR of packets. It removes labels from packets and forwards the packets to their destination networks.

LSP establishment

LSPs include static and dynamic LSPs.

·     Static LSP—To establish a static LSP, you must configure an LFIB entry on each LSR along the LSP. Establishing static LSPs consumes fewer resources than establishing dynamic LSPs, but static LSPs cannot automatically adapt to network topology changes. Therefore, static LSPs are suitable for small-scale networks with simple, stable topologies.

·     Dynamic LSPEstablished by a label distribution protocol (also called an MPLS signaling protocol). A label distribution protocol classifies FECs, distributes FEC-label mappings, and establishes and maintains LSPs. Label distribution protocols include protocols designed specifically for label distribution, such as the Label Distribution Protocol (LDP), and protocols extended to support label distribution, such as MP-BGP and RSVP-TE.

In this document, the term "label distribution protocols" refers to all protocols for label distribution. The term "LDP" refers to the RFC 5036 LDP.

A dynamic LSP is established in the following steps:

1.     A downstream LSR classifies FECs according to destination addresses.

2.     The downstream LSR assigns a label for each FEC, and distributes the FEC-label binding to its upstream LSR.

3.     The upstream LSR establishes an LFIB entry for the FEC according to the binding information.

After all LSRs along the LSP establish an LFIB entry for the FEC, a dynamic LSP is established for the packets of this FEC.

Figure 4 Dynamic LSP establishment

 

MPLS forwarding

Figure 5 MPLS forwarding

 

As shown in Figure 5, a packet is forwarded over the MPLS network as follows:

1.     Device B (the ingress LSR) receives a packet with no label. Then, it performs the following operations:

a.     Identifies the FIB entry that matches the destination address of the packet.

b.     Adds the outgoing label (40, in this example) to the packet.

c.     Forwards the labeled packet out of the interface GigabitEthernet 1/0/2 to the next hop LSR Device C.

2.     When receiving the labeled packet, Device C processes the packet as follows:

a.     Identifies the LFIB entry that has an incoming label of 40.

b.     Uses the outgoing label 50 of the entry to replace label 40 in the packet.

c.     Forwards the labeled packet out of the outgoing interface GigabitEthernet 1/0/2 to the next hop LSR Device D.

3.     When receiving the labeled packet, Device D (the egress LSR) processes the packet as follows:

a.     Identifies the LFIB entry that has an incoming label of 50.

b.     Removes the label from the packet.

c.     Forwards the packet out of the outgoing interface GigabitEthernet 1/0/2 to the next hop LSR Device E.

If the LFIB entry records no outgoing interface or next hop information, Device D performs the following operations:

a.     Identifies the FIB entry by the IP header.

b.     Forwards the packet according to the FIB entry.

PHP

An egress node must perform two forwarding table lookups to forward a packet:

·     Two LFIB lookups (if the packet has more than one label).

·     One LFIB lookup and one FIB lookup (if the packet has only one label).

The penultimate hop popping (PHP) feature can pop the label at the penultimate node, so the egress node only performs one table lookup.

A PHP-capable egress node sends the penultimate node an implicit null label of 3. This label never appears in the label stack of packets. If an incoming packet matches an LFIB entry containing the implicit null label, the penultimate node pops the top label and forwards the packet to the egress node. The egress node directly forwards the packet.

Sometimes, the egress node must use the TC field in the label to perform QoS. To keep the TC information, you can configure the egress node to send the penultimate node an explicit null label of 0. If an incoming packet matches an LFIB entry containing the explicit null label, the penultimate hop replaces the top label value with value 0, and forwards the packet to the egress node. The egress node gets the TC information, pops the label of the packet, and forwards the packet.

Protocols and standards

·     RFC 3031, Multiprotocol Label Switching Architecture

·     RFC 3032, MPLS Label Stack Encoding

·     RFC 5462, Multiprotocol Label Switching (MPLS) Label Stack Entry: "EXP" Field Renamed to "Traffic Class" Field

Configuration restrictions and guidelines

When you configure MPLS, follow these restrictions and guidelines:

·     The LSQM1SRP8X2QE0 MPU does not support PHP in the current software version.

·     The following interface modules support PHP only when the module operating mode is bridging or normal:

¡     EB interface modules:

-     LSQ1GP24TEB0.

-     LSQ1GP48EB0.

-     LSQ1TGX2EB0.

-     LSQ1TGX4EB0.

¡     SC interface modules:

-     LSQ1TGS8SC0.

-     LSQ3GV48SC0.

¡     SD interface modules:

-     LSQ1GP24TSD0.

-     LSQ1GP24TXSD0.

-     LSQ1GP48SD0.

-     LSQ1GV48SD0.

-     LSQ1TGX2SD0.

-     LSQ1TGX4SD0.

-     LSQ1TGX8SD0.

For more information about the operating modes, see Fundamentals Configuration Guide.

·     If the switch acts as an egress, it can de-encapsulate MPLS packets with a maximum of two labels.

·     SA interface modules do not support MPLS.

·     Basic MPLS is exclusive with EVI and VXLAN.

MPLS configuration task list

Tasks at a glance

(Required.) Enabling MPLS

(Optional.) Setting MPLS MTU

(Optional.) Specifying the label type advertised by egress

(Optional.) Configuring TTL propagation

(Optional.) Enabling sending of MPLS TTL-expired messages

(Optional.) Enabling MPLS label forwarding statistics

(Optional.) Enabling SNMP notifications for MPLS

 

Enabling MPLS

Before you enable MPLS, perform the following tasks:

·     Configure link layer protocols to ensure connectivity at the link layer.

·     Configure IP addresses for interfaces to ensure IP connectivity between neighboring nodes.

·     Configure static routes or an IGP protocol to ensure IP connectivity among LSRs.

To enable MPLS:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Configure an LSR ID for the local node.

mpls lsr-id lsr-id

By default, no LSR ID is configured.

An LSR ID must be unique in an MPLS network and in IP address format. As a best practice, use the IP address of a loopback interface as an LSR ID.

3.     Enter the view of the interface that needs to perform MPLS forwarding.

interface interface-type interface-number

N/A

4.     Enable MPLS on the interface.

mpls enable

By default, MPLS is disabled on the interface.

 

Setting MPLS MTU

MPLS adds the label stack between the link layer header and network layer header of each packet. To make sure the size of MPLS labeled packets is smaller than the MTU of an interface, configure an MPLS MTU on the interface.

MPLS compares each MPLS packet against the interface MPLS MTU. When the packet exceeds the MPLS MTU:

·     If fragmentation is allowed, MPLS performs the following operations:

a.     Removes the label stack from the packet.

b.     Fragments the IP packet. The length of a fragment is the MPLS MTU minus the length of the label stack.

c.     Adds the label stack to each fragment, and forwards the fragments.

·     If fragmentation is not allowed, the LSR drops the packet.

To set an MPLS MTU for an interface:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enter interface view.

interface interface-type interface-number

N/A

3.     Set an MPLS MTU for the interface.

mpls mtu value

By default, no MPLS MTU is set on an interface.

 

The following applies when an interface handles MPLS packets:

·     MPLS packets carrying L2VPN or IPv6 packets are always forwarded by an interface, even if the length of the MPLS packets exceeds the MPLS MTU of the interface.

·     If the MPLS MTU of an interface is greater than the MTU of the interface, data forwarding might fail on the interface.

·     If you do not configure the MPLS MTU of an interface, fragmentation of MPLS packets is based on the MTU of the interface without considering MPLS labels. An MPLS fragment might be larger than the interface MTU and be dropped.

Specifying the label type advertised by egress

In an MPLS network, an egress can advertise the following types of labels:

·     Implicit null label with a value of 3.

·     Explicit null label with a value of 0.

·     Non-null label.

For LSPs established by a label distribution protocol, the label advertised by the egress determines how the penultimate hop processes a labeled packet.

·     If the egress advertises an implicit null label, the penultimate hop directly pops the top label of a matching packet.

·     If the egress advertises an explicit null label, the penultimate hop swaps the top label value of a matching packet with the explicit null label.

·     If the egress advertises a non-null label, the penultimate hop swaps the top label of a matching packet with the label assigned by the egress.

Configuration guidelines

As a best practice, configure the egress to advertise an implicit null label to the penultimate hop if the penultimate hop supports PHP. If you want to simplify packet forwarding on the egress but keep labels to determine QoS policies, configure the egress node to advertise an explicit null label to the penultimate hop. Use non-null labels only in particular scenarios. For example, when OAM is configured on the egress, the egress can get the OAM function entity status only through non-null labels.

As a penultimate hop, the device accepts the implicit null label, explicit null label, or non-null label advertised by the egress device.

For LDP LSPs, the mpls label advertise command triggers LDP to delete the LSPs established before the command is executed and re-establishes new LSPs.

For BGP LSPs, the mpls label advertise command takes effect only on the BGP LSPs established after the command is executed. To apply the new setting to BGP LSPs established before the command is executed, delete the routes corresponding to the BGP LSPs, and then redistribute the routes.

For CRLSPs established by using RSVP, the mpls label advertise command takes effect only on the CRLSPs established after the command is executed. To apply the new setting to CRLSPs established before the command is executed, delete the CRLSPs and re-establish them.

Configuration procedure

To specify the type of label that the egress node will advertise to the penultimate hop:

 

Step

Command

Remarks

4.     Enter system view.

system-view

N/A

5.     Specify the label type advertised by the egress to the penultimate hop.

mpls label advertise { explicit-null | implicit-null | non-null }

By default, an egress advertises an implicit null label to the penultimate hop.

 

Configuring TTL propagation

When TTL propagation is enabled, the ingress node copies the TTL value of an IP packet to the TTL field of the label. Each LSR on the LSP decreases the label TTL value by 1. The LSR that pops the label copies the remaining label TTL value back to the IP TTL of the packet. The IP TTL value can reflect how many hops the packet has traversed in the MPLS network. The IP tracert facility can show the real path along which the packet has traveled.

Figure 6 TTL propagation

 

When TTL propagation is disabled, the ingress node sets the label TTL to 255. Each LSR on the LSP decreases the label TTL value by 1. The LSR that pops the label does not change the IP TTL value when popping the label. Therefore, the MPLS backbone nodes are invisible to user networks, and the IP tracert facility cannot show the real path in the MPLS network.

Figure 7 Without TTL propagation

 

Follow these guidelines when you configure TTL propagation:

·     As a best practice, set the same TTL processing mode on all LSRs of an LSP.

·     To enable TTL propagation for a VPN, you must enable it on all PE devices in the VPN. Then, you can get the same traceroute result (hop count) from those PEs.

To enable TTL propagation:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enable TTL propagation.

mpls ttl propagate { public | vpn }

By default, TTL propagation is enabled for public network packets and is disabled for VPN packets.

This command affects only the propagation between IP TTL and label TTL. Within an MPLS network, TTL is always copied between the labels of an MPLS packet.

 

Enabling sending of MPLS TTL-expired messages

This feature enables an LSR to generate an ICMP TTL-expired message upon receiving an MPLS packet with a TTL of 1. If the MPLS packet has only one label, the LSR sends the ICMP TTL-expired message back to the source through IP routing. If the MPLS packet has multiple labels, the LSR sends it along the LSP to the egress node, which then sends the message back to the source.

To enable sending of MPLS TTL-expired messages:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enable sending of MPLS TTL-expired messages.

mpls ttl expiration enable

By default, this feature is enabled.

 

Enabling MPLS label forwarding statistics

MPLS label forwarding forwards a labeled packet based on its incoming label.

Perform this task to enable MPLS label forwarding statistics and MPLS statistics reading, so that you can use the display mpls lsp verbose command to view MPLS label statistics.

To enable MPLS label forwarding statistics:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enable MPLS label forwarding statistics for specific LSPs.

mpls statistics { all | [ vpn-instance vpn-instance-name ] { ipv4 ipv4-destination mask-length | ipv6 ipv6-destination prefix-length } | static | te ingress-lsr-id tunnel-id }

By default, MPLS label forwarding statistics are disabled for all LSPs.

3.     Enable MPLS label statistics reading, and set the reading interval.

mpls statistics interval interval

By default, MPLS label statistics reading is disabled.

 

Enabling SNMP notifications for MPLS

This feature enables MPLS to generate SNMP notifications. The generated SNMP notifications are sent to the SNMP module.

For more information about SNMP notifications, see Network Management and Monitoring Configuration Guide.

To enable SNMP notifications for MPLS:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enable SNMP notifications for MPLS.

snmp-agent trap enable mpls

By default, SNMP notifications for MPLS are enabled.

 

Displaying and maintaining MPLS

Execute display commands in any view and reset commands in user view.

 

Task

Command

Display MPLS interface information.

display mpls interface [ interface-type interface-number ]

Display usage information for MPLS labels.

display mpls label { label-value1 [ to label-value2 ] | all }

Display LSP information.

display mpls lsp [ egress | in-label label-value | ingress | outgoing-interface interface-type interface-number | protocol { bgp | ldp | local | rsvp-te | static | static-cr } | transit ] [ vpn-instance vpn-instance-name ] [ ipv4-dest mask-length | ipv6 [ ipv6-dest prefix-length ] ] [ verbose ]

Display MPLS Nexthop Information Base (NIB) information.

display mpls nib [ nib-id ]

Display usage information for NIDs.

display mpls nid [ nid-value1 [ to nid-value2 ] ]

Display LSP statistics.

display mpls lsp statistics

Display MPLS summary information.

display mpls summary

Display ILM entries (in standalone mode).

display mpls forwarding ilm [ label ] [ slot slot-number ]

Display ILM entries (in IRF mode).

display mpls forwarding ilm [ label ] [ chassis chassis-number slot slot-number ]

Display NHLFE entries (in standalone mode).

display mpls forwarding nhlfe [ nid ] [ slot slot-number ]

Display NHLFE entries (in IRF mode).

display mpls forwarding nhlfe [ nid ] [ chassis chassis-number slot slot-number ]

Clear MPLS forwarding statistics for the specified LSPs.

reset mpls statistics { all | [ vpn-instance vpn-instance-name ] { ipv4 ipv4-destination mask-length | ipv6 ipv6-destination prefix-length } | static | te ingress-lsr-id tunnel-id }

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网