H3C SR6600 Routers. MPLS Configuration Guide. Hangzhou H3C Technologies Co., Ltd.

Similar documents
HP A-MSR Router Series MPLS. Configuration Guide. Abstract

HP MSR Router Series. MPLS Configuration Guide(V5) Part number: Software version: CMW520-R2513 Document version: 6PW

H3C S10500 Switch Series

H3C S10500 Switch Series

HP Routing Switch Series

Table of Contents Chapter 1 MPLS Basics Configuration

HP 5920 & 5900 Switch Series

H3C S9500 Series Routing Switches

H3C S7500E-XS Switch Series

HP MSR Router Series. MPLS Configuration Guide(V7) Part number: Software version: CMW710-R0106 Document version: 6PW

HP A5820X & A5800 Switch Series MPLS. Configuration Guide. Abstract

H3C SecPath Series High-End Firewalls

H3C S5120-EI Switch Series

H3C S5830V2 & S5820V2 Switch Series

Operation Manual MPLS. Table of Contents

H3C S5830V2 & S5820V2 Switch Series

H3C S12500-X Switch Series

Layer 3 - IP Routing Command Reference

LARGE SCALE IP ROUTING LECTURE BY SEBASTIAN GRAF

Configuration Guide - MPLS

H3C S5120-SI Switch Series

H3C SecPath Series High-End Firewalls

Configuring MPLS L2VPN

H3C S7500E Series Ethernet Switches. Network Management and Monitoring. Configuration Guide. Hangzhou H3C Technologies Co., Ltd.

H3C S7500E Series Ethernet Switches. Layer 3 - IP Routing. Configuration Guide. Hangzhou H3C Technologies Co., Ltd.

H3C S5820X&S5800 Series Ethernet Switches

Configuring MPLS L2VPN

Configuring MPLS L2VPN

Label Distribution Protocol and Basic MPLS Configuration. APNIC Technical Workshop October 23 to 25, Selangor, Malaysia Hosted by:

H3C WA Series WLAN Access Points. Layer 2 WAN Command Reference. Hangzhou H3C Technologies Co., Ltd.

H3C S5830V2 & S5820V2 Switch Series

H3C S9500 Series Routing Switches

H3C S12500 Series Routing Switches

HP FlexFabric Switch Series

H3C S5120-HI Switch Series

H3C S9800 Switch Series

H3C SecPath Series High-End Firewalls

Basic MPLS commands. display mpls forwarding ilm. Syntax. Views. Predefined user roles. Parameters. Usage guidelines. Examples

H3C S5120-EI Switch Series

H3C SR6600 Routers. High Availability. Configuration Guide. Hangzhou H3C Technologies Co., Ltd.

H3C S10500 Switch Series

H3C S10500 Switch Series

H3C SecPath Series High-End Firewalls

MPLS Core Networks Николай Милованов/Nikolay Milovanov

H3C SR6600 Routers. Layer 3 IP Services. Command Reference. Hangzhou H3C Technologies Co., Ltd.

H3C SR G Core Routers

H3C S3100V2 Switch Series

H3C S5120-EI Series Ethernet Switches. Layer 3 - IP Services. Configuration Guide. Hangzhou H3C Technologies Co., Ltd.

H3C S5500-HI Switch Series

Multi Protocol Label Switching (an introduction) Karst Koymans. Thursday, March 12, 2015

HP 5920 & 5900 Switch Series

Configuring MPLS L3VPN

Quidway S5700 Series Ethernet Switches V100R006C01. Configuration Guide - VPN. Issue 01 Date HUAWEI TECHNOLOGIES CO., LTD.

H3C S10500 Switch Series

H3C Firewall Devices. High Availability Configuration Guide (Comware V7) Hangzhou H3C Technologies Co., Ltd.

PrepAwayExam. High-efficient Exam Materials are the best high pass-rate Exam Dumps

H3C S3600V2 Switch Series

Practice exam questions for the Nokia NRS II Composite Exam

Operation Manual MPLS VLL. Table of Contents

H3C S9500 Series Routing Switches

H3C S5120-EI Series Ethernet Switches. ACL and QoS. Configuration Guide. Hangzhou H3C Technologies Co., Ltd.

Multi-Protocol Label Switching

H3C S9500E Series Routing Switches

H3C SecBlade SSL VPN Card

MPLS VPN Carrier Supporting Carrier Using LDP and an IGP

Computer Network Architectures and Multimedia. Guy Leduc. Chapter 2 MPLS networks. Chapter 2: MPLS

H3C S5820X&S5800 Switch Series

Configuration MPLS Avaya Secure Router 2330/4134

Configuring VPLS. VPLS overview. Operation of VPLS. Basic VPLS concepts

H3C SR6600 Routers. Network Management and Monitoring. Command Reference. Hangzhou H3C Technologies Co., Ltd.

H3C S5500-HI Switch Series

Configuring MPLS L3VPN

MPLS LDP. Agenda. LDP Overview LDP Protocol Details LDP Configuration and Monitoring 9/27/16. Nurul Islam Roman

MPLS Label Distribution Protocol (LDP)

H3C S5120-EI Switch Series

H3C SecPath UTM Series. Configuration Examples. Hangzhou H3C Technologies Co., Ltd. Manual Version: 5W

MPLS etc.. MPLS is not alone TEST. 26 April 2016 AN. Multi-Protocol Label Switching MPLS-TP FEC PBB-TE VPLS ISIS-TE MPƛS GMPLS SR RSVP-TE OSPF-TE PCEP

H3C S6520XE-HI Switch Series

MPLS MULTI PROTOCOL LABEL SWITCHING OVERVIEW OF MPLS, A TECHNOLOGY THAT COMBINES LAYER 3 ROUTING WITH LAYER 2 SWITCHING FOR OPTIMIZED NETWORK USAGE

Cisco Training - HD Telepresence MPLS: Implementing Cisco MPLS V3.0. Upcoming Dates. Course Description. Course Outline

Table of Contents Chapter 1 MPLS L3VPN Configuration

H3C SR6600 Routers. ACL and QoS Configuration Guide. Hangzhou H3C Technologies Co., Ltd.

H3C S5500-HI Switch Series

MPLS VPN Carrier Supporting Carrier IPv4 BGP Label Distribution

BrainDumps.4A0-103,230.Questions

Multiprotocol Label Switching (MPLS)

MPLS Label Distribution Protocol (LDP)

MPLS VPN Carrier Supporting Carrier Using LDP and an IGP

H3C S5130-EI Switch Series

H3C S10500 Switch Series

H3C S12500 Series Routing Switches

Multiprotocol Label Switching (MPLS)

H3C SecPath Series Firewalls and UTM Devices

Vendor: Alcatel-Lucent. Exam Code: 4A Exam Name: Alcatel-Lucent Multiprotocol Label Switching. Version: Demo

H3C S5130-EI Switch Series

H3C MSR Series Routers

H3C S9500E Series Routing Switches

Securizarea Calculatoarelor și a Rețelelor 32. Tehnologia MPLS VPN

H3C S12500 Series Routing Switches

MPLS Intro. Cosmin Dumitru March 14, University of Amsterdam System and Network Engineering Research Group ...

Transcription:

H3C SR6600 Routers MPLS Configuration Guide Hangzhou H3C Technologies Co., Ltd. http://www.h3c.com Document Version: 20100930-C-1.08 Product Version: SR6600-CMW520-R2420

Copyright 2007-2010, Hangzhou H3C Technologies Co., Ltd. and its licensors All Rights Reserved No part of this manual may be reproduced or transmitted in any form or by any means without prior written consent of Hangzhou H3C Technologies Co., Ltd. Trademarks H3C,, Aolynk,, H 3 Care,, TOP G,, IRF, NetPilot, Neocean, NeoVTL, SecPro, SecPoint, SecEngine, SecPath, Comware, Secware, Storware, NQA, VVG, V 2 G, V n G, PSPT, XGbus, N-Bus, TiGem, InnoVision and HUASAN are trademarks of Hangzhou H3C Technologies Co., Ltd. All other trademarks that may be mentioned in this manual are the property of their respective owners. Notice The information in this document is subject to change without notice. Every effort has been made in the preparation of this document to ensure accuracy of the contents, but all statements, information, and recommendations in this document do not constitute the warranty of any kind, express or implied.

Preface The H3C SR6600 documentation set includes 13 configuration guides, which describe the software features for the H3C SR6600 Routers and guide you through the software configuration procedures. These configuration guides also provide configuration examples to help you apply software features to different network scenarios. The MPLS Configuration Guide describes fundamentals and configuration of MPLS basics, MPLS TE, MPLS L2VPN, and MPLS L3VPN. This preface includes: Audience Conventions About the H3C SR6600 Documentation Set Obtaining Documentation Documentation Feedback Audience This documentation is intended for: Network planners Field technical support and servicing engineers Network administrators working with the SR6600 Conventions This section describes the conventions used in this documentation set. Command conventions Convention Boldface italic [ ] { x y... } [ x y... ] { x y... } * [ x y... ] * &<1-n> Description Bold text represents commands and keywords that you enter literally as shown. Italic text represents arguments that you replace with actual values. Square brackets enclose syntax choices (keywords or arguments) that are optional. Braces enclose a set of required syntax choices separated by vertical bars, from which you select one. Square brackets enclose a set of optional syntax choices separated by vertical bars, from which you select one or none. Asterisk marked braces enclose a set of required syntax choices separated by vertical bars, from which you select at least one. Asterisk marked square brackets enclose optional syntax choices separated by vertical bars, from which you may select multiple choices or none. The argument or keyword and argument combination before the ampersand (&) sign can be entered 1 to n times. # A line that starts with a pound (#) sign is comments.

GUI conventions Boldface > Convention Description Window names, button names, field names, and menu items are in Boldface. For example, the New User window appears; click OK. Multi-level menus are separated by angle brackets. For example, File > Create > Folder. Symbols Convention Description Means reader be extremely careful. Improper operation may cause bodily injury. Means reader be careful. Improper operation may cause data loss or damage to equipment. Means an action or information that needs special attention to ensure successful configuration or good performance. Means a complementary description. Means techniques helpful for you to make configuration with ease. Network topology icons Convention Description Represents a generic network device, such as a router, switch, or firewall. Represents a routing-capable device, such as a router or Layer 3 switch. Represents a generic switch, such as a Layer 2 or Layer 3 switch, or a router that supports Layer 2 forwarding and other Layer 2 features. About the H3C SR6600 Documentation Set The H3C SR6600 documentation set includes: Category Documents Purposes Product description and specifications Hardware specifications and installation Marketing brochures Technology white papers Card datasheets Compliance and safety manual Installation guide Card manuals Describe product specifications and benefits. Provide an in-depth description of software features and technologies. Describe card specifications, features, and standards. Provides regulatory information and the safety instructions that must be followed during installation. Provides a complete guide to hardware installation and hardware specifications. Provide the hardware specifications of cards.

Category Documents Purposes Software configuration Operations and maintenance H3C N68 Cabinet Installation and Remodel Introduction Configuration guides Command references H3C SR6608 Release notes H3C SR6602 Release notes Guides you through installing and remodeling H3C N68 cabinets. Describe software features and configuration procedures. Provide a quick reference to all available commands. Provide information about the product release, including the version history, hardware and software compatibility matrix, version upgrade information, technical support information, and software upgrading. Obtaining Documentation You can access the most up-to-date H3C product documentation on the World Wide Web at http://www.h3c.com. Click the links on the top navigation bar to obtain different categories of product documentation: [Technical Support & Documents > Technical Documents] Provides hardware installation, software upgrading, and software feature configuration and maintenance documentation. [Products & Solutions] Provides information about products and technologies, as well as solutions. [Technical Support & Documents > Software Download] Provides the documentation released with the software version. Technical Support customer_service@h3c.com http://www.h3c.com Documentation Feedback You can e-mail your comments about product documentation to info@h3c.com. We appreciate your comments.

Table of Contents 1 MPLS Basics Configuration 1-1 MPLS Overview 1-1 Basic Concepts of MPLS 1-1 Structure of the MPLS Network 1-3 LSP Establishment and Label Distribution 1-3 MPLS Forwarding 1-6 LDP 1-8 Protocols 1-10 MPLS Configuration Task List 1-10 Enabling the MPLS Function 1-11 Configuration Prerequisites 1-11 Configuration Procedure 1-11 Configuring a Static LSP 1-12 Configuration Prerequisites 1-12 Configuration Procedure 1-12 Establishing Dynamic LSPs through LDP 1-13 Configuring MPLS LDP Capability 1-13 Configuring Local LDP Session Parameters 1-14 Configuring Remote LDP Session Parameters 1-14 Configuring PHP 1-15 Configuring the Policy for Triggering LSP Establishment 1-16 Configuring the Label Distribution Control Mode 1-17 Configuring LDP Loop Detection 1-17 Configuring LDP MD5 Authentication 1-18 Configuring LDP Label Filtering 1-19 Maintaining LDP Sessions 1-20 Configuring BFD for MPLS LDP 1-20 Resetting LDP Sessions 1-21 Managing and Optimizing MPLS Forwarding 1-21 Configuring MPLS MTU 1-21 Configuring TTL Processing Mode at Ingress 1-22 Sending Back ICMP TTL Exceeded Messages for MPLS TTL Expired Messages 1-24 Configuring LDP GR 1-25 Configuring MPLS Statistics 1-27 Enabling MPLS Statistics Function 1-27 Setting the LSP Statistics Reading Interval 1-27 Inspecting LSPs 1-28 MPLS LSP Ping 1-28 MPLS LSP Tracert 1-28 Enabling MPLS Trap 1-29 Displaying and Maintaining MPLS 1-29 i

Displaying MPLS Operation 1-29 Displaying MPLS LDP Operation 1-30 Clearing MPLS Statistics 1-31 MPLS Configuration Examples 1-32 Configuring Static LSPs 1-32 Configuring LDP to Establish LSPs Dynamically 1-35 2 MPLS TE Configuration 2-39 MPLS TE Overview 2-39 Traffic Engineering and MPLS TE 2-39 Basic Concepts of MPLS TE 2-40 MPLS TE Implementation 2-41 CR-LSP 2-41 CR-LDP 2-43 RSVP-TE 2-43 Traffic Forwarding 2-47 Automatic Bandwidth Adjustment 2-49 CR-LSP Backup 2-49 Fast Reroute 2-50 DiffServ-Aware TE 2-51 MPLS LDP over MPLS TE 2-52 Protocols and Standards 2-53 MPLS TE Configuration Task List 2-53 Configuring MPLS TE Basic Capabilities 2-53 Configuration Prerequisites 2-53 Configuration procedure 2-54 Creating MPLS TE Tunnel over Static CR-LSP 2-55 Configuration Prerequisites 2-55 Configuration Procedure 2-55 Configuring MPLS TE Tunnel with Dynamic Signaling Protocol 2-56 Configuration Prerequisites 2-56 Configuration Procedure 2-57 Configuring RSVP-TE Advanced Features 2-62 Configuration Prerequisites 2-62 Configuration Procedure 2-62 Tuning CR-LSP Setup 2-66 Configuration Prerequisites 2-66 Configuration Procedure 2-66 Tuning MPLS TE Tunnel Setup 2-68 Configuration Prerequisites 2-68 Configuration Procedures 2-69 Configuring Traffic Forwarding 2-70 Configuration Prerequisites 2-70 Configuration Procedures 2-70 Configuring Traffic Forwarding Tuning Parameters 2-73 Configuration Prerequisites 2-73 ii

Configuration Procedure 2-74 Configuring Automatic Bandwidth Adjustment 2-75 Configuration Prerequisites 2-75 Configuration Procedure 2-76 Configuring CR-LSP Backup 2-76 Configuration Prerequisites 2-76 Configuration Procedure 2-76 Configuring FRR 2-77 Configuration Prerequisites 2-77 Configuration Procedure 2-78 Inspecting an MPLS TE Tunnel 2-80 Using MPLS LSP Ping 2-80 Using MPLS LSP Tracert 2-80 Displaying and Maintaining MPLS TE 2-81 Displaying and Maintaining MPLS TE 2-81 Resetting Automatic Bandwidth Adjustment 2-82 MPLS TE Configuration Examples 2-83 MPLS TE Using Static CR-LSP Configuration Example 2-83 MPLS TE Tunnel Using RSVP-TE Configuration Example 2-87 Inter-AS MPLS TE Tunnel Using RSVP-TE Configuration Example 2-93 RSVP-TE GR Configuration Example 2-100 MPLS RSVP-TE and BFD Cooperation Configuration Example 2-102 MPLS TE Using CR-LDP Configuration Example 2-104 CR-LSP Backup Configuration Example 2-111 FRR Configuration Example 2-115 MPLS LDP over MPLS TE Configuration Example 2-123 MPLS TE in MPLS L3VPN Configuration Example 2-130 Troubleshooting MPLS TE 2-137 3 MPLS L2VPN Configuration 3-138 MPLS L2VPN Overview 3-138 Introduction to MPLS L2VPN 3-138 Basic concepts of MPLS L2VPN 3-139 Implementation of MPLS L2VPN 3-140 MPLS L2VPN Configuration Task List 3-142 Configuring MPLS L2VPN 3-142 Configuring a PE Interface Connecting a CE 3-143 Configuring a PE Interface Connecting a CE to Use PPP/HDLC/FR 3-143 Configuring a PE Interface Connecting a CE to Use Ethernet 3-144 Configuring a PE Interface Connecting a CE to Use VLAN 3-144 Configuring CCC MPLS L2VPN 3-144 Configuration Prerequisites 3-144 Configuration Procedure 3-145 Configuring SVC MPLS L2VPN 3-146 Configuration Prerequisites 3-146 Configuration Procedure 3-147 iii

Configuring Martini MPLS L2VPN 3-147 Configuration Prerequisites 3-147 Configuration Procedure 3-147 Configuring Kompella MPLS L2VPN 3-148 Configuration Prerequisites 3-148 Configuration Procedure 3-149 Displaying and Maintaining MPLS L2VPN 3-151 Displaying the Operation of MPLS L2VPN 3-151 Resetting BGP L2VPN Connections 3-152 MPLS L2VPN Configuration Examples 3-152 Example for Configuring a Local CCC Connection 3-152 Example for Configuring a Remote CCC Connection 3-154 Example for Configuring SVC MPLS L2VPN 3-157 Example for Configuring Martini MPLS L2VPN 3-161 Example for Configuring Kompella MPLS L2VPN 3-165 Example for Configuring a Kompella Local Connection 3-168 Troubleshooting MPLS L2VPN 3-169 4 MPLS L3VPN Configuration 4-171 MPLS L3VPN Overview 4-171 Introduction to MPLS L3VPN 4-171 MPLS L3VPN Concepts 4-172 MPLS L3VPN Packet Forwarding 4-175 MPLS L3VPN Networking Schemes 4-176 MPLS L3VPN Routing Information Advertisement 4-178 Inter-AS VPN 4-179 Carrier s Carrier 4-182 Nested VPN 4-184 Multi-Role Host 4-186 HoVPN 4-186 OSPF VPN Extension 4-189 BGP AS Number Substitution 4-192 MPLS L3VPN Configuration Task List 4-193 Configuring VPN Instances 4-193 Creating a VPN Instance 4-193 Associating a VPN Instance with an Interface 4-194 Configuring Route Related Attributes of a VPN Instance 4-194 Configuring a Tunneling Policy of a VPN Instance 4-195 Configuring an LDP Instance 4-196 Configuring Basic MPLS L3VPN 4-197 Configuration Prerequisites 4-197 Configuring a VPN Instance 4-198 Configuring Route Advertisement between PE and CE 4-198 Configuring Route Advertisement Between PEs 4-202 Configuring Routing Features for BGP VPNv4 Subaddress Family 4-203 Configuring Inter-Provider VPN 4-206 iv

Configuration Prerequisites 4-206 Configuring Inter-Provider VPN Option A 4-206 Configuring Inter-Provider VPN Option B 4-207 Configuring Inter-Provider VPN Option C 4-208 Configuring Nested VPN 4-210 Configuration Prerequisites 4-210 Configuring Nested VPN 4-210 Configuring Multi-Role Host 4-211 Configuration Prerequisites 4-211 Configuring and Applying Policy Routing 4-212 Configuring a Static Route 4-212 Configuring HoVPN 4-212 Configuration Prerequisites 4-212 Configuring HoVPNs 4-212 Configuring OSPF Sham Link 4-213 Configuration Prerequisites 4-213 Configuring a Loopback Interface 4-213 Advertising Routes of a Loopback Interface 4-214 Creating a Sham Link 4-214 Configuring Route Exchange for Multi-VPN-Instance CE 4-215 Configuration Prerequisites 4-215 Configuration Procedure 4-215 Specifying the VPN Label Processing Mode 4-220 Configuring BGP AS Number Substitution 4-221 Configuration Prerequisites 4-221 Configuration Procedure 4-221 Displaying and Maintaining MPLS L3VPN 4-222 Resetting BGP Connections 4-222 Displaying and Maintaining MPLS L3VPN 4-222 MPLS L3VPN Configuration Examples 4-224 Example for Configuring MPLS L3VPNs 4-224 Example for Configuring MPLS L3VPNs Using a GRE Tunnel 4-231 Example for Configuring Inter-Provider VPN Option A 4-236 Example for Configuring Inter-Provider VPN Option B 4-241 Example for Configuring Inter-Provider VPN Option C 4-246 Example for Configuring Carrier s Carrier 4-252 Example for Configuring Nested VPN 4-259 Example for Configuring Multi-Role Host 4-269 Example for Configuring HoVPN 4-271 Example for Configuring OSPF Sham Links 4-277 Example for Configuring BGP AS Number Substitution 4-282 5 Index 5-286 v

1 MPLS Basics Configuration This chapter includes these sections: MPLS Overview Enabling the MPLS Function Configuring a Static LSP Establishing Dynamic LSPs through LDP Maintaining LDP Sessions Managing and Optimizing MPLS Forwarding Configuring MPLS Statistics Inspecting LSPs Enabling MPLS Trap Displaying and Maintaining MPLS MPLS Configuration Examples MPLS Overview Multiprotocol Label Switching (MPLS) is a new IP backbone technology. It introduces connection-oriented label switching into connectionless IP networks, and seamlessly integrates the flexibility of IP routing and the simpleness of Layer 2 switching. MPLS is widely used on large-scale networks for it features the following advantages: On an MPLS network, devices forward packets according to short- and fixed-length labels, instead of doing Layer 3 header analysis and complicated routing table lookup independently. This is a highly effective and fast data transmission method on backbone networks. Residing between the link layer and the network layer, MPLS can work on various link layer protocols (for example, PPP, ATM, frame relay, and Ethernet), provide connection-oriented services for various network layer protocols (for example, IPv4, IPv6, and IPX), and work with mainstream network technologies. As MPLS is connection-oriented and supports label stack, it is used in various services, such as VPN, traffic engineering, and QoS. Basic Concepts of MPLS FEC As a forwarding technology based on classification, MPLS groups packets with the same characteristics (such as packets with the same destination or service class) into a class, called a forwarding equivalence class (FEC). Packets of the same FEC are handled in the same way on an MPLS network. At present, the router supports classifying FECs according to the network layer destination addresses of packets. 1-1

Label A label is a short, fixed length identifier for identifying a single FEC. A label is locally significant and must be locally unique. Figure 1-1 Format of a label As shown in Figure 1-1, a label is encapsulated between the Layer 2 header and Layer 3 header of a packet. A label is four bytes in length and consists of four fields: Label: 20 bits in length. Label value for identifying a FEC. Exp: Three bits in length. Reserved field, usually used for CoS. S: One bit in length. MPLS supports multiple levels of labels. This field is used to indicate whether a label is at the bottom of the label stack. 1 indicates that the label is at the bottom of the label stack. TTL: Eight bits in length. Like the homonymous IP header field, it is used to prevent loops. LSR A Label switching router (LSR) is a fundamental component on an MPLS network. LSRs support label distribution and label swapping. LER A Label edge router (LER) resides at the edge of an MPLS network and is connected with another network. LSP A Label switched path (LSP) is the path along which packets of a FEC travel through an MPLS network. An LSP is a unidirectional path from the ingress of an MPLS network to the egress. On an LSP, in the packet transfer direction, two neighboring LSRs are called the upstream LSR and downstream LSR respectively. In Figure 1-2, LSR B is the downstream LSR of LSR A, while LSR A is the upstream LSR of LSR B. Figure 1-2 Diagram for an LSP LSR A LSP LSP LSP LSR D LSR B LSR C LFIB On an MPLS network, labeled packets are forwarded according to the Label Forwarding Information Base (LFIB), which is like the FIB for IP packet forwarding on an IP network. 1-2

Structure of the MPLS Network Figure 1-3 Diagram for the MPLS network structure MPLS domain LER Ingress LSR LSP LER Egress LSR IP network Transit LSR IP network As shown in Figure 1-3, the element of an MPLS network is LSR. LSRs in the same routing or administrative domain form an MPLS domain. An MPLS domain consists of three types of LSRs: Ingress LSRs for receiving and labeling packets coming into the MPLS domain. Transit LSRs for forwarding packets along LSPs to their egress LERs according to the labels. Egress LSRs for removing labels from packets and IP forwarding the packets to their destination networks. In a word, transit LSRs perform MPLS forwarding based on labels of packets, while the ingress and egress LSRs deal with the switchover between MPLS and IP forwarding. LSP Establishment and Label Distribution LSP establishment Establishing LSPs is to bind FECs with labels on each LSR involved and notify its adjacent LSRs of the bindings, so as to establish the LFIB on each LSR. LSPs can be established through manual configuration, or be established dynamically through label distribution protocols. 1) Establishing a static LSP through manual configuration To establish a static LSP, you need to assign a label to the FEC on each LSR along the packet forwarding path. Establishment of static LSPs consumes fewer resources than dynamic LSP establishment. However, static LSPs cannot adapt to network topology changes. Therefore, static LSPs are suitable for small-scale networks with simple, stable topologies. 2) Establishing an LSP through a label distribution protocol Label distribution protocols are MPLS signaling protocols. They can classify FECs, distribute labels, and establish and maintain 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 BGP and RSVP-TE. This document introduces LDP only. 1-3

In this document, the term label distribution protocols represents all protocols for label distribution, and the term LDP refers to the Label Distribution Protocol defined in RFC 5036. For more information on LDP, see LDP. As shown in Figure 1-4, a dynamic LSP is established in the following procedure: A downstream LSR classifies FECs according to the routing table, assigns a label to a FEC, and distributes the FEC-label binding to its upstream LSR, which then establishes an LFIB entry for the FEC according to the binding information. After all LSRs along the packet forwarding path establish a LFIB entry for the FEC, an LSP is established for packets of this FEC. Figure 1-4 Process of dynamic LSP establishment Ingress Egress LSR A LSR B LSR C LSR D LSR E LSR F LSR G LSR H Label mapping LSP Label distribution and management An LSR informs its upstream LSRs of labels assigned to FECs through label distribution, or label advertisement. According to the label distribution condition and order, the label advertisement mode can be downstream unsolicited (DU) and downstream on demand (DoD), and the label distribution control mode can be independent or ordered. Label management refers to the processing of a received label binding that is not useful at the moment, that is, the label retention mode, which can be liberal or conservative. 1) Label advertisement mode 1-4

Figure 1-5 Label advertisement mode Figure 1-5 shows the two label advertisement modes: DU: In this mode, an LSR assigns a label to a FEC and then distributes the FEC-label binding to its upstream LSR unsolicitedly. DoD: In this mode, an LSR assigns a label to a FEC and distributes the FEC-label binding to its upstream LSR only when it receives a label request from the upstream LSR. Currently, the router supports only the DU mode. An upstream LSR and its downstream LSR for an FEC must use the same label advertisement mode; otherwise, no LSP can be established normally. 2) Label distribution control There are two label distribution control modes: Independent: In this mode, an LSR can distribute label bindings upstream at anytime. This means that an LSR may have distributed a label binding to its upstream LSR before it receives a binding from its downstream LSR. As shown in Figure 1-6, in independent label distribution control mode, if the label advertisement mode is DU, an LSR will assign labels to its upstream even if it has not obtained labels from its downstream; if the label advertisement mode is DoD, the LSR distributes a label to its upstream as long as it receives a label request from the upstream. 1-5

Figure 1-6 Independent label distribution control Ordered: In this mode, an LSR distributes its label binding for a FEC upstream only when it receives a label binding for the FEC from its downstream or it is the egress of the FEC. In Figure 1-5, label distribution control is in ordered mode. In this case, if the label advertisement mode is DU, an LSR will distribute a label upstream only when it receives a label binding for the FEC from its downstream; if the label advertisement mode is DoD, after an LSR (Transit in this example) receives a label request from its upstream (Ingress), the LSR (Transit) sends a label request to its downstream (Egress). Then, after the LSR (Transit) receives the label binding from its downstream (Egress), it distributes a label binding to the upstream (Ingress). 3) Label retention mode There are two label retention modes: Liberal: In this mode, an LSR keeps any received label binding regardless of whether the binding is from its next hop for the FEC or not. This allows for quicker adaptation to route changes but will waste label resources as LSRs need to keep extra labels. Conservative: In this mode, an LSR keeps only label bindings that are from its next hops for the FECs. This allows LSRs to maintain less labels but makes LSRs slower in adapting to route changes. Currently, the router supports only the liberal mode. MPLS Forwarding LFIB The LFIB consists of three forwarding tables: 1-6

Next Hop Label Forwarding Entry (NHLFE): Describes the label operation to be performed. It is used when forwarding MPLS packets. FEC to NHLFE (FTN) map: FTN maps each FEC to a set of NHLFEs at the ingress LSR. The FTN map is used for forwarding unlabeled packets that need MPLS forwarding. When an LSR receives an unlabeled packet, it looks for the corresponding FIB entry. If the Token value of the FIB entry is not Invalid, the packet needs to be forwarded through MPLS. The LSR will then look for the corresponding NHLFE entry according to Token value to determine the label operation to be performed. Incoming Label Map (ILM): ILM maps each incoming label to a set of NHLFEs. It is used when forwarding labeled packets. When an LSR receives a labeled packet, it looks for the corresponding ILM entry. If the Token value of the ILM entry is not null, the LSR will look for the corresponding NHLFE entry to determine the label operation to be performed. FTN and ILM are associated with NHLFE through Token. MPLS data forwarding Figure 1-7 MPLS forwarding process diagram NHLFE Out int Token Oper Next hop Out label GE1/0/2 0 Push 20.1.1.2 40 Out int Token Oper Next hop Out label GE1/0/2 0 Swap 30.1.1.2 50 FIB ILM Dest Token 40.1.1.0/24 0 In label 40 In int GE1/0/1 Token 0 In label 50 In int GE1/0/1 Token 40 IP:40.1.1.2 50 IP:40.1.1.2 GE1/0/1 10.1.1.2/24 IP:40.1.1.2 GE1/0/1 10.1.1.1/24 Router B Ingress GE1/0/2 20.1.1.1/24 GE1/0/1 GE1/0/2 20.1.1.2/24 30.1.1.1/24 Router C MPLS domain GE1/0/1 30.1.1.2/24 Router D Egress GE1/0/2 40.1.1.1/24 IP:40.1.1.2 GE1/0/1 40.1.1.2/24 Router A Router E As shown in Figure 1-7, in an MPLS domain, a packet is forwarded in the following procedure: 1) The ingress (Router B) receives a packet carrying no label. Router B determines the FEC of the packet according to the destination address, and searches the FIB table for the Token value. As the Token value is not Invalid, Router B looks for the corresponding NHLFE entry of the Token value. According to the NHLFE entry, Router B pushes label 40 to the packet, and then forwards 1-7

the labeled packet to the next hop LSR (Router C) through the outgoing interface (GigabitEthernet1/0/2). 2) Upon receiving the labeled packet, Router C looks for the ILM entry according to the label (40) to get the Token value. As the Token value is not null, Router C looks for the corresponding NHLFE entry of the Token value. According to the NHLFE entry, Router C swaps the original label with label 50, and then forwards the labeled packet to the next hop LSR (Router D) through the outgoing interface (GigabitEthernet1/0/2). 3) Upon receiving the labeled packet, Router D (the egress) looks for the ILM entry according to the label (50) to get the Token value. As the Token is null, Router D removes the label from the packet. If the ILM entry records the outgoing interface, Router D forwards the packet through the outgoing interface; if no outgoing interface is recorded, router D forwards the packet according to the IP header of the packet. PHP In an MPLS network, when an egress node receives a labeled packet, it looks up the LFIB, pops the label of the packet, and then performs the next level label forwarding or performs IP forwarding. That is, an egress node needs to do forwarding table look up twice to forward a packet: looks up the LFIB twice, or looks up the LFIB once and the FIB once. In this case, the penultimate hop popping (PHP) feature can pop the label at the penultimate node, relieving the egress of the label operation burden and improving the packet processing capability of the MPLS network. PHP is configurable on the egress node. The label assigned by a PHP-capable egress node to the penultimate hop can be one of the following: A label value of 0 represents an IPv4 explicit null label and is valid only when it appears at the bottom of a label stack. An egress assigns an IPv4 explicit null label to a FEC and advertises the FEC-label binding to the upstream LSR. When forwarding an MPLS packet, the upstream LSR substitutes the label at the stack top with the explicit null label and then sends the packet to the egress. When the egress receives the packet, which carries a label of 0, it does not look up for the LFIB entry but pops the label stack directly and performs IPv4 forwarding. A label value of 3 represents an implicit null label and never appears in the label stack. When an LSR finds that it is assigned an implicit null label, it directly performs a pop operation, rather than substitutes the implicit null label for the original label at the stack top, and then forwards the packet to the downstream LSR, that is, the egress. The egress thus can directly perform the next level forwarding upon receiving the packet. LDP The LDP protocol is used to establish LSPs dynamically. Using LDP, LSRs can map network layer routing information to data link layer switching paths. Basic concepts of LDP LDP session LDP sessions are established between LSRs based on TCP connections and used to exchange messages for label binding, label releasing, and error notification. LDP peer Two LSRs with an LDP session established between them and using LDP to exchange FEC-label bindings are called LDP peers. 1-8

LDP message type There are four types of LDP messages: Discovery message: Used to declare and maintain the presence of LSRs on a network. Session message: Used to establish, maintain, and terminate sessions between LDP peers. Advertisement message: Used to create, alter, or remove FEC-label bindings. Notification message: Used to provide advisory information and to notify errors. For reliable transport of LDP messages, TCP is used for LDP session messages, advertisement messages, and notification messages. UDP is used only for discovery messages. LDP operation LDP goes through four phases in operation: 1) Discovery Every LSR that wants to establish LDP sessions sends Hello messages periodically to notify neighboring LSRs of its presence. In this way, LSRs can automatically discover their LDP peers. LDP provides two discovery mechanisms: Basic discovery mechanism: Used to discover local LDP peers, that is, LSRs directly connected at the link layer. In this mechanism, an LSR periodically sends LDP link Hello messages to multicast address 224.0.0.2, that is, all routers on the subnet, so that all LSRs directly connected at the link layer discover this LSR. Extended discovery mechanism: Used to discover remote LDP peers, that is, LSRs not directly connected at the link layer. In this mechanism, an LSR periodically sends LDP targeted Hello messages to a given IP address so that the LSR with the IP address discovers the LDP peer. 2) Session establishment and maintenance After an LSR finds a LDP peer, they start to establish a session. The LSRs goes through two steps to establish a session: Establishing a transport layer connection, that is, a TCP connection between them. Initializing negotiation of session parameters such as the LDP version, label advertisement mode, and Keepalive interval. After establishing a session between them, the two LDP peers send Hello messages and Keepalive messages to maintain the session. 3) LSP establishment and maintenance LDP sends label requests and label binding messages, so as to advertise label bindings between LDP peers and thereby establish LSPs. For the LSP establishment process, see LSP Establishment and Label Distribution. 4) Session termination An LSR terminates its LDP session with an LDP peer in the following cases: All Hello adjacencies are deleted between the two peers LDP peers periodically send Hello messages to indicate that they intend to keep the Hello adjacency. If an LSR does not receive any Hello message from a peer before the Hello timer expires, it deletes the Hello adjacency with this peer. An LDP session has one or more Hello adjacencies. When the last Hello adjacency for the session is deleted, the LSR will send a Notification message to terminate the LDP session. Loss of session connectivity 1-9

An LSR determines the integrity of an LDP session according to the LDP PDU (which carries one or more LDP messages) transmitted on the session. Before the Keepalive timer times out, if two LDP peers have no information to exchange, they can send Keepalive messages to each other to maintain the LDP session. If an LSR does not receive any LDP PDU from its peer during a Keepalive interval, it closes the TCP connection and terminates the LDP session. Receiving a shutdown message from the peer An LSR can also send a Shutdown message to its LDP peer to terminate the LDP session. Therefore, when receiving the Shutdown message from an LDP peer, an LSR will terminate the session with the LDP peer. Protocols MPLS related protocols include: RFC 3031: Multiprotocol Label Switching Architecture RFC 3032: MPLS Label Stack Encoding RFC 5036: LDP Specification MPLS Configuration Task List Complete the following tasks to configure MPLS: Task Remarks Enabling the MPLS Function Configuring a Static LSP Configuring MPLS LDP Capability Configuring Local LDP Session Parameters Optional Configuring Remote LDP Session Parameters Optional Establishing Dynamic LSPs through LDP Configuring PHP Configuring the Policy for Triggering LSP Establishment Optional Optional Use either the static or dynamic LSP configuration method Configuring the Label Distribution Control Mode Optional Configuring LDP Loop Detection Optional Configuring LDP MD5 Authentication Optional Configuring LDP Label Filtering Optional Maintaining LDP Sessions Configuring BFD for MPLS LDP Resetting LDP Sessions Optional Optional Managing and Optimizing MPLS Forwarding Configuring MPLS MTU Configuring TTL Processing Mode at Ingress Optional Optional Sending Back ICMP TTL Exceeded Messages for MPLS TTL Expired Message Optional 1-10

Task Remarks Configuring MPLS Statistics Inspecting LSPs Enabling MPLS Trap Configuring LDP GR Enabling MPLS Statistics Function Setting the LSP Statistics Reading Interval MPLS LSP Ping MPLS LSP Tracert Optional Optional Optional Optional Optional Optional Currently, these types of interfaces support MPLS capability: serial interface, Layer 3 Ethernet interface, ATM interface, POS interface, Layer 3 virtual Ethernet interface, Layer 3 aggregate interface, virtual template, Mp-group interface, MFR interface, tunnel interface, VLAN interface, and RPR logical interface. Enabling the MPLS Function In an MPLS domain, you need to enable MPLS on all routers for MPLS forwarding before you can configure other MPLS features. Configuration Prerequisites Before enabling MPLS, be sure to complete these tasks: Configuring link layer protocols to ensure the connectivity at the link layer. Assigning IP addresses to interfaces, making all neighboring nodes reachable at the network layer. Configuring static routes or an IGP protocol, ensuring that LSRs can communicate with each other at the network layer. Configuration Procedure Follow these steps to enable MPLS: To do Use the command Remarks Enter system view system-view Configure the MPLS LSR ID Enable MPLS globally and enter MPLS view mpls lsr-id lsr-id mpls Not configured by default Not enabled by default Return to system view quit Enter interface view interface interface-type interface-number 1-11

To do Use the command Remarks Enable MPLS for the interface mpls Not enabled by default An MPLS LSR ID is in the format of an IP address and must be unique within an MPLS domain. You are recommended to use the IP address of a loopback interface on an LSR as the MPLS LSR ID. Configuring a Static LSP The principle of establishing a static LSP is that the outgoing label of an upstream LSR is the incoming label of its downstream LSR. Configuration Prerequisites Before configuring a static LSP, be sure to complete these tasks: Determining the ingress LSR, transit LSRs, and egress LSR for the static LSP. Enabling MPLS on all these LSRs. Configuration Procedure Follow these steps to configure a static LSP: To do Use the command Remarks Enter system view system-view Configure a static LSP taking the current LSR as the ingress Configure a static LSP taking the current LSR as a transit LSR Configure a static LSP taking the current LSR as the egress static-lsp ingress lsp-name destination dest-addr { mask mask-length } { nexthop next-hop-addr outgoing-interface interface-type interface-number } out-label out-label static-lsp transit lsp-name incoming-interface interface-type interface-number in-label in-label { nexthop next-hop-addr outgoing-interface interface-type interface-number } out-label out-label static-lsp egress lsp-name incoming-interface interface-type interface-number in-label in-label 1-12

When configuring a static LSP on the ingress LSR, be sure that there is a route available from the ingress LSR to the FEC destination. This is not required on the transit LSRs and egress LSR. When you configure a static LSP on the ingress LSR, the next hop or outgoing interface specified must be consistent with the next hop or outgoing interface of the optimal route in the routing table. If you configure a static IP route for the LSP, be sure to specify the same next hop or outgoing interface for the static route and the static LSP. For an ingress or transit LSR, do not specify the public address of an interface on the LSR as the next hop address. For information about configuring a static IP route, see Static Routing in the Layer 3 IP Routing Configuration Guide. Establishing Dynamic LSPs through LDP Configuring MPLS LDP Capability Follow these steps to configure MPLS LDP capability: To do Use the command Remarks Enter system view system-view Enable LDP capability globally and enter MPLS LDP view Configure the LDP LSR ID mpls ldp lsr-id lsr-id Not enabled by default Optional MPLS LSR ID of the LSR by default Return to system view quit Enter interface view Enable LDP capability for the interface interface interface-type interface-number mpls ldp Not enabled by default Disabling LDP on an interface terminates all LDP sessions on the interface. As a result, all LSPs using the sessions will be deleted. Usually, you do not need to configure the LDP LSR ID but use the default, which is the MPLS LSR ID. In some VPN applications (for example, MPLS L3VPN applications), however, you need to ensure that different LDP instances have different LDP LSR IDs if the address spaces overlap. Otherwise, the TCP connections cannot be established normally. 1-13

Configuring Local LDP Session Parameters LDP sessions established between local LDP peers are referred to as local LDP sessions. To establish a local LDP session: Determine the LDP transport addresses of the two peers and make sure that the LDP transport addresses are reachable to each other. This is to establish the TCP connection. If there are a many LDP sessions between the two LSRs or the CPU is occupied much, you need to adjust timers to ensure the stability of the LDP sessions. Follow these steps to configure local LDP session parameters: To do Use the command Remarks Enter system view system-view Enter interface view Set the link Hello timer Set the link Keepalive timer Configure the LDP transport address interface interface-type interface-number mpls ldp timer hello-hold value mpls ldp timer keepalive-hold value mpls ldp transport-address { ip-address interface } Optional 15 seconds by default Optional 45 seconds by default Optional MPLS LSR ID of the LSR by default If you configure an LDP transport address by specifying an IP address, the specified IP address must be the IP address of an interface on the router. Otherwise, the LDP sessions cannot be established. Configuring Remote LDP Session Parameters LDP sessions established between remote LDP peers are referred to as remote LDP sessions. Remote LDP sessions are mainly used in Martini MPLS L2VPN and MPLS LDP over MPLS TE. See MPLS L2VPN and MPLS TE in the MPLS Configuration Guide for more information. To establish a remote LDP session: Determine the LDP transport addresses of the two peers and make sure that the LDP transport addresses are reachable to each other. This is to establish the TCP connection. If there are a many LDP sessions between the two LSRs or the CPU is occupied much, you need to adjust timers to ensure the stability of the LDP sessions. Follow these steps to configure remote LDP session parameters: To do Use the command Remarks Enter system view system-view Create a remote peer entity and enter MPLS LDP remote peer view mpls ldp remote-peer remote-peer-name 1-14

To do Use the command Remarks Configure the remote peer IP address Configure LDP to advertise prefix-based labels through a remote session Set the targeted Hello timer Set the targeted Keepalive timer Configure the LDP transport address remote-ip ip-address prefix-label advertise mpls ldp timer hello-hold value mpls ldp timer keepalive-hold value mpls ldp transport-address ip-address Optional By default, LDP does not advertise prefix-based labels through a remote session. Optional 45 seconds by default Optional 45 seconds by default Optional MPLS LSR ID of the LSR by default The IP address specified as the LDP transport address must be the IP address of an interface on the router. The remote peer IP address to be configured must be different from all existing remote peer IP addresses. If a local adjacency exists between two peers, no remote adjacency can be established between them. If a remote adjacency exists between two peers, you can configure a local adjacency for them. However, the local adjacency can be established only when the transport address and keepalive settings for the local peer and those for the remote peer match respectively, in which case the remote adjacency will be removed. That is, only one remote session or local session can exist between two LSRs, and the local session takes precedence over the remote session. By default, LDP does not advertise any prefix-based label mapping message through a remote session, and remote sessions are used only to transfer messages for L2VPNs. For applications of remote sessions, see information about Martini MPLS L2VPN configuration in MPLS L2VPN in the MPLS Configuration Guide. Configuring LDP to advertise prefix-based labels through a remote session is for implementing MPLS LDP over MPLS TE. For information about MPLS LDP over MPLS TE, see MPLS TE in the MPLS Configuration Guide. Configuring PHP Follow these steps to configure PHP: To do Use the command Remarks Enter system view system-view Enter MPLS view mpls 1-15

To do Use the command Remarks Specify the type of the label to be distributed by the egress to the penultimate hop label advertise { explicit-null implicit-null non-null } Optional By default, an egress distributes to the penultimate hop an implicit null label. When specifying the type of labels for an egress to distribute to penultimate hops, check whether the penultimate hops support PHP. If the penultimate hops support PHP, you can configure the egress to distribute explicit null or implicit null labels to the penultimate hops. If the penultimate hops do not support PHP, you need to configure the egress to distribute normal labels. The router supports PHP when it works as a penultimate hop. For LDP sessions existing before the label advertise command is configured, you need to reset the LDP sessions by using the reset mpls ldp command for the PHP configuration to take effect. Configuring the Policy for Triggering LSP Establishment You can configure an LSP triggering policy on an LSR, so that only routes matching the policy can trigger establishment of LSPs, reducing the number of LSPs to be established on the LSR and avoiding instability of the LSR caused by excessive LSPs. There are two types of LSP triggering policies: Allowing all routing entries to trigger establishment of LSPs. Filtering routing entries by an IP prefix list, so that static and IGP routes denied by the IP prefix list will not trigger LSP establishment. Follow these steps to configure the policy for triggering LSP establishment: To do Use the command Remarks Enter system view system-view Enter MPLS view mpls Configure the LSP establishment triggering policy lsp-trigger [ vpn-instance vpn-instance-name ] { all ip-prefix prefix-name } Optional By default, only local loopback addresses with 32-bit masks can trigger establishment of LSPs. 1-16

For an LSP to be established, an exactly matching routing entry must exist on the LSR. For example, on an LSR, to establish an LSP to a loopback address with a 32-bit mask, there must be an exactly matching host routing entry on the LSR. If the vpn-instance vpn-instance-name combination is specified, the command configures an LSP establishment triggering policy for the specified VPN instance; otherwise, the command configures an LSP establishment triggering policy for the public network routes. For information about IP prefix list, see Routing Policy in the Layer 3 IP Routing Configuration Guide. Configuring the Label Distribution Control Mode With the label re-advertisement function enabled, an LSR periodically looks for FECs not assigned with labels, assigns labels to them if any, and advertises the label-fec bindings. You can set the label re-advertisement interval as needed. Follow these steps to configure the LDP label distribution control mode: To do Use the command Remarks Enter system view system-view Enter MPLS LDP view mpls ldp Specify the label distribution control mode Enable label re-advertisement for DU mode Set the interval for label re-advertisement in DU mode label-distribution { independent ordered } du-readvertise du-readvertise timer value Optional Ordered by default For LDP sessions existing before the command is configured, you need to reset the LDP sessions for the specified label distribution control mode to take effect. Optional Enabled by default Optional 30 seconds by default Configuring LDP Loop Detection LSPs established in an MPLS domain may be looping. The LDP loop detection mechanism can detect looping LSPs and prevent LDP messages from looping forever. LDP loop detection can be in either of the following two modes: 1) Maximum hop count A label request message or label mapping message carries information about its hop count, which increments by 1 for each hop. When this value reaches the specified limit, LDP considers that a loop is present and terminates the establishment of the LSP. 2) Path vector 1-17

A label request message or label mapping message carries path information in the form of path vector list. When such a message reaches an LSR, the LSR checks the path vector list of the message to see whether its MPLS LSR ID is in the list. If not, the LSR will add its LSR ID to the path vector list; if yes, the LSR considers that a loop appears and terminates the establishment of the LSP. In the path vector mode, you also need to specify the maximum number of hops of an LSP. An LSR will also terminate the establishment of an LSP when the hop count of the path, or the length of the path vector, reaches the specified limit. Follow these steps to configure LDP loop detection: To do Use the command Remarks Enter system view system-view Enter MPLS LDP view mpls ldp Enable loop detection Set the maximum hop count Set the maximum path vector length loop-detect hops-count hop-number path-vectors pv-number Disabled by default Optional 32 by default Optional 32 by default The loop detection modes configured on two LDP peers must be the same. Otherwise, the LDP session cannot be established. To implement loop detection in an MPLS domain, you need to enable loop detection on every LSR in the MPLS domain. You need to configure loop detection before enabling LDP capability on any interface. All loop detection configurations take effect for only the LSPs established after the configurations. Changing the loop detection configurations does not affect existing LSPs. You can execute the reset mpls ldp command in user view, so that the loop detection configurations can take effect for all LSPs. As LDP loop detection may result in LSP update, which will generate redundant information and consume many system resources, it is recommended to use the routing loop detection methods. Configuring LDP MD5 Authentication LDP sessions are established based on TCP connections. To improve the security of LDP sessions, you can configure MD5 authentication for the underlying TCP connections, so that the TCP connections can be established only if the peers have the same authentication password. Follow these steps to configure LDP MD5 authentication: To do Use the command Remarks Enter system view system-view Enter MPLS LDP view mpls ldp 1-18

To do Use the command Remarks Enable LDP MD5 authentication and set the password md5-password { cipher plain } peer-lsr-id password Disabled by default To establish an LDP session successfully between two LDP peers, make sure that the LDP MD5 authentication configurations on the LDP peers are consistent. Configuring LDP Label Filtering The LDP label filtering feature provides two mechanisms, label acceptance control for controlling which labels will be accepted and label advertisement control for controlling which labels will be advertised. In complicated MPLS network environments, LDP label filtering can be used to control which LSPs are to be established dynamically and prevent routers from accepting and advertising excessive label bindings. 1) Label acceptance control Label acceptance control is for filtering received label bindings. An upstream LSR filters the label bindings received from the specified downstream LSR and accepts only those permitted by the specified prefix list. As shown in Figure 1-8, upstream router LSR A filters the label bindings received from downstream router LSR B. Only if the destination address of an FEC matches the specified prefix list, does LSR A accept the label binding of the FEC from LSR B. LSR A does not filter label bindings received from downstream router LSR C. Figure 1-8 Network diagram for label acceptance control Do not filter label bindings 2) Label advertisement control Label advertisement control is for filtering label bindings to be advertised. A downstream LSR advertises only the label bindings of the specified FECs to the specified upstream LSR. As shown in Figure 1-9, downstream router LSR A advertises to upstream router LSR B only label bindings with FEC destinations permitted by prefix list B, and advertises to upstream router LSR C only label bindings with FEC destinations permitted by prefix list C. 1-19