07-MPLS Configuration Guide

HomeSupportResource CenterH3C S6520X-EI[HI][SI] & S6520-SI & S5560X-HI Switch Series Configuration Guides-R65xx-6W10307-MPLS Configuration Guide
09-MPLS SR configuration
Title Size Download
09-MPLS SR configuration 135.15 KB

Configuring MPLS SR

About MPLS SR

Segment Routing (SR) is a source routing technology. The source node selects a path for the packets, and then encodes the path in the packet header as an ordered list of segments. Each segment is identified by the segment identifier (SID). The SR nodes along the path forward the packets based on the SIDs in the packets. Only the source node needs to maintain the path status.

SR can operate with MPLS. In an MPLS network, SR uses MPLS labels as SIDs to forward packets on an LSP.

MPLS SR characteristics

MPLS SR has the following characteristics:

·     MPLS SR forwards packets based on the existing MPLS infrastructure. No infrastructure modifications are needed to implement SR on an MPLS network. For more information about the MPLS infrastructure, see MPLS basics configuration in MPLS Configuration Guide.

Basic concepts

·     SR node—A node enabled with the MPLS SR feature. The ingress node (source node) adds labels to packets. The transit nodes forward packets based on labels. The egress node removes labels and forwards packets to the destination networks. SR nodes form an SR domain.

·     Segment—An instruction an SR node executes on the incoming packet.

·     SID—Segment ID, which is MPLS label in MPLS SR.

·     Segment type—The following types of segments are available:

¡     Prefix segment—SIDs are assigned to nodes based on destination address prefix. The nodes create prefix-specific forwarding entries.

¡     Adjacency segment—SIDs are assigned to nodes based on adjacency.

·     SRLSP—Segment routing label switched path, an LSP along which SR uses MPLS labels as SIDs to forward packets.

How MPLS SR works

MPLS SR involves the following steps:

1.     Label allocation for all nodes and links along the packet forwarding paths.

2.     Label forwarding entries installation. All MPLS SR devices in the SR domain use the allocated labels to create label forwarding entries.

3.     SRLSP setup.

When the ingress node of an SRLSP receives a packet, it adds labels to the packet and forwards the packet to the egress node through the SRLSP. After receiving a packet from the SRLSP, the egress node removes the label and forwards the packet based on the routing table.

Static segment configuration

Static MPLS SR provides the following methods for configuring static segments for a destination:

·     Prefix segment method—Manually configure the incoming label, outgoing label, and next hop for the destination address prefix on each SR node.

·     Adjacency segment method—Manually configure the incoming label and next hop for the adjacency to the neighbor on each SR node.

SRLSP setup

You can manually configure an SRLSP. To configure an SRLSP, you must specify the label stack for packets to be forwarded along the SRLSP on the ingress node. Each label in the stack corresponds to a prefix SID or adjacency SID. The system can look for the outgoing label and next hop based on the prefix SID or adjacency SID.

Packet forwarding in MPLS SR

Based on the SID allocation method, MPLS SR uses one of the following packet forwarding methods:

·     Prefix SID-based packet forwarding—The ingress node encapsulates the prefix SID for the egress node to a packet. The transit nodes forward the packet based on label forwarding entries.

·     Adjacency SID-based packet forwarding—The ingress node encapsulates the label stack that contains the adjacency SIDs of all links along the forwarding path to a packet. Each transit node uses the top label in the label stack to determine the next hop and pops the top label before forwarding the packet to the next hop.

·     Prefix and adjacency SID-based packet forwarding—The nodes use prefix SID-based packet forwarding in combination with adjacency-based packet forwarding.

Prefix SID-based packet forwarding within the same AS

Figure 1 shows how a packet is forwarded along the SRLSP from Device A to Device E based on prefix SIDs. In this example, the outgoing label for the packet is 21201 on Device A.

1.     Ingress node Device A searches for a forwarding entry for label 21201, adds outgoing label 20201 to the packet and sends the packet to the next hop (Device B).

2.     When transit node Device B receives the packet, it searches for a label forwarding entry that matches the label in the packet. Then, Device B uses the outgoing label of the matched entry (19201) to replace the label in the packet and forwards the packet to the next hop (Device C).

3.     Transit nodes Device C and Device D process the packet in the same way Device B does.

4.     When egress node Device E receives the packet, it removes the label and forwards the packet by IP address.

Figure 1 Prefix SID-based packet forwarding within the same AS

 

Adjacency SID-based packet forwarding

Figure 2 shows how a packet is forwarded along the SRLSP from Device A to Device E based on adjacency SIDs. In this example, the label stack for the packet is configured as (200, 201, 202, and 203) on Device A.

1.     Ingress node Device A searches for a forwarding entry for the top label (200) to determine the next hop. Then, Device A adds label stack (201, 202, and 203) to the packet, and forwards the packet to the next hop (Device B).

2.     When transit node Device B receives the packet, it searches for a forwarding entry for the top label (201) to determine the next hop. Then, Device B removes the top label from the stack and forwards the packet to the next hop (Device C).

3.     When transit node Device C receives the packet, it searches for a forwarding entry for the top label (202) to determine the next hop. Then, Device C removes the top label from the stack and forwards the packet to the next hop (Device D).

4.     When transit node Device D receives the packet, it searches for a forwarding entry for the label (203) to determine the next hop. Then, Device D removes the label stack from the packet and forwards the packet to the next hop (Device E).

5.     When egress node Device E receives the packet, it forwards the packet by IP address.

Figure 2 Adjacency SID-based packet forwarding

 

Prefix and adjacency SID-based packet forwarding

Figure 3 shows how a packet is forwarded along the SRLSP from Device A to Device E based on prefix SIDs and adjacency SIDs. In this example, the index value for the prefix SID of Device C is 1. The prefix SIDs for Device A, Device B, and Device C are 18001, 17001, and 16001, respectively. The Adjacency SIDs that Device C and Device D allocate to the adjacencies are 16 and 17, respectively. On Device A, the label stack for the packet is (18001, 16, 17).

1.     Ingress node Device A searches for a forwarding entry for label 18001 to determine the outgoing label (17001) and next hop (Device B). Device A swaps label 18001 with 17001. Then, it adds label stack (17001, 16, 17) to the packet and sends the packet to the next hop (Device B).

2.     When transit node Device B receives the packet, it searches for a label forwarding entry that matches the top label in the label stack (17001). Then, Device B uses the outgoing label of the matched entry (16001) to replace the top label and forwards the packet to the next hop (Device C).

3.     When transit node Device C receives the packet, it removes the top label 16001 and searches for a forwarding entry for the next label (16) to determine the next hop. Then, Device C removes label 16 from the stack and forwards the packet to the next hop (Device D).

4.     When transit node Device D receives the packet, it searches for a forwarding entry for the label (17) to determine the next hop. Then, Device D removes the label stack from the packet and forwards the packet to the next hop (Device E).

5.     When egress node Device E receives the packet, it forwards the packet by IP address.

Figure 3 Prefix and adjacency SID-based packet forwarding

 

Restrictions and guidelines: MPLS SR configuration

Before configuring MPLS, perform the following tasks:

·     In standalone mode, execute the switch-mode 3 command to switch the operating mode of the device to MPLS, and then restart the device.

·     In IRF mode, execute the switch-mode 4 command to switch the operating mode of the device to MPLS-IRF, and then restart the IRF fabric.

MPLS SR tasks at a glance

IP traffic forwarding over SRLSPs tasks at a glance

To forward IP traffic over SRLSPs, perform the following configuration tasks:

Configuring static segments

MPLS TE traffic forwarding over static SRLSPs tasks at a glance

To forward MPLS TE traffic over static SRLSPs, perform the following configuration tasks:

1.     Configuring static segments

2.     Configuring a static SRLSP

Configuring static segments

Prerequisites for static segment configuration

Before you configure static segments for a static SRLSP, perform the following tasks:

·     Determine the ingress node, transit nodes, and egress node of the static SRLSP.

·     Determine the incoming label for the adjacency segment from a node to next hop of the node. Determine the incoming label of the prefix segment for the destination IP address on each node. On a device, a static SRLSP and a static LSP cannot use the same incoming label.

·     Enable MPLS on all nodes and interfaces that will participate in MPLS forwarding. For information about enabling MPLS, see basic MPLS configuration in MPLS Configuration Guide.

Configuring a static adjacency segment

Restrictions and guidelines

This task is required on all nodes of a static SRLSP.

Multiple static SRLSPs can share an adjacency segment.

If you specify the next hop address for a static adjacency segment, make sure the following requirements are met:

·     The device has a route to the next hop address.

·     MPLS is enabled on the output interface of the route.

If you specify an output interface for a static adjacency segment, make sure the following requirements are met:

·     The interface is up.

·     The interface can receive direct routes.

·     MPLS is enabled on the interface.

A static adjacency segment must use a different incoming label than existing static LSPs and static PWs. If not, the configured adjacency segment is unavailable. The adjacency segment cannot become available even if you change the incoming label of the static LSP or static PW. To resolve this problem, you must delete the existing adjacency segment and configure a new one with a different incoming label.

Procedure

1.     Enter system view.

system-view

2.     Configure a static adjacency segment.

static-sr-mpls adjacency adjacency-path-name in-label label-value { nexthop ip-address | outgoing-interface interface-type interface-number }

The next hop address for a static adjacency segment cannot be a local public IP address.

Configuring a static prefix segment

Restrictions and guidelines

This task is required on all nodes of a static SRLSP.

Multiple static SRLSPs to the same destination can share a prefix segment.

A prefix segment must use the next hop or output interface of the optimal route to the destination address of the prefix segment. You can configure multiple prefix segments to the destination address for load sharing if the optimal route has more than one next hop or output interface. To avoid configuration failure, make sure all prefix segments use the same prefix segment name and incoming label.

Procedure

1.     Enter system view.

system-view

2.     Configure a static prefix segment.

static-sr-mpls prefix prefix-path-name destination ip-address { mask-length | mask } in-label in-label-value [ { nexthop ip-address | outgoing-interface interface-type interface-number } out-label out-label-value ]

The next hop address for a static prefix segment cannot be a local public IP address.

Configuring a static SRLSP

1.     Enter system view.

system-view

2.     Configure a static SRLSP.

static-sr-mpls lsp lsp-name out-label out-label-value&<1-4>

Display and maintenance commands for MPLS SR

Execute display commands in any view.

 

Task

Command

Display static SRLSP and adjacency segment information.

display mpls static-sr-mpls { lsp [ lsp-name ] | adjacency [ adjacency-path-name ] }

Display static prefix segment information.

display mpls static-sr-mpls prefix [ path lsp-name | destination ip-address [ mask | mask-length ] ]