HP E MSR Router Configuration Manual

HPE FlexNetwork MSR Router Series
Comware 7 MPLS Configuration Guide
Part number: 5998-8833 Software version: CMW710-R0305 Document version: 6PW106-20160308
© Copyright 2016 Hewlett Packard Enterprise Development LP The info
rmation contained herein is subject to change without notice. The only warranties for Hewlett Packard Enterprise products and services are set forth in the express warranty statements acco mpanying such products and services. Nothing herein should be construe d as constituting an additional warranty. Hewlett Packard Enterprise shall not be liable for technical or editorial errors or omissions co ntained herein.
Confidential computer software. V alid license from Hewlett Packard Enterprise required for possession, use, or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and T e chnical Data for Commercial Items are licensed to the U.S. Government under vendor’s standard commercial license.
Links to third-party websites take you outside the Hewlett Packard Enterprise website. Hewlett Packard Enterprise has no control over and is not responsible for information outside the Hewlett Packard Enterprise website.
Acknowledgments
Intel®, Itanium®, Pentium®, Intel Inside®, and the Intel Inside logo are trademarks of Intel Corporation in the United States and other countries.
Microsoft® and Windows® are trademarks of the Microsoft group of companies. Adobe® and Acrobat® are trademarks of Adobe Systems In corporated. Java and Oracle are registered trademarks of Oracle and/or its affiliates. UNIX® is a registered trademark of The Open Group.

Contents

Configuring basic MPLS ················································································· 1
Overview ···························································································································································· 1
Basic concepts ··········································································································································· 1 MPLS network architecture ························································································································ 2 LSP establishment ····································································································································· 3 MPLS forwarding ········································································································································ 4 PHP ···························································································································································· 4
Protocols and standards ···························································································································· 5 Compatibility information ···································································································································· 5 MPLS configuration task list ······························································································································· 5 Enabling MPLS ·················································································································································· 6 Setting MPLS MTU ············································································································································ 6 Specifying the label type advertised by the egress ···························································································· 7 Configuring TTL propagation ····························································································································· 8 Enabling sending of MPLS TTL-expired messages ··························································································· 9 Enabling MPLS forwarding statistics ·················································································································· 9
Enabling FTN forwarding statistics ············································································································· 9
Enabling MPLS label forwarding statistics for LSPs ················································································ 10
Enabling MPLS label forwarding statistics for a VPN instance ································································ 10 Enabling split horizon for MPLS forwarding ····································································································· 10 Enabling SNMP notifications for MPLS ············································································································ 11 Displaying and maintaining MPLS ··················································································································· 11
Configuring a static LSP ··············································································· 13
Overview ·························································································································································· 13 Configuration prerequisites ······························································································································ 13 Configuration procedure ·································································································································· 13 Displaying static LSPs ····································································································································· 14 Static LSP configuration example ···················································································································· 14
Configuring LDP ···························································································· 17
Overview ·························································································································································· 17
Terminology ············································································································································· 17
LDP messages ········································································································································· 17
LDP operation ·········································································································································· 18
Label distribution and control ··················································································································· 19
LDP GR ···················································································································································· 21
LDP NSR ·················································································································································· 22
LDP-IGP synchronization ························································································································· 23
LDP FRR ·················································································································································· 23
LDP over MPLS TE ·································································································································· 24
Protocols ·················································································································································· 25 Compatibility information ·································································································································· 25 LDP configuration task list ······························································································································· 25 Enabling LDP ··················································································································································· 26
Enabling LDP globally ······························································································································ 26
Enabling LDP on an interface ·················································································································· 26 Configuring Hello parameters ·························································································································· 26 Configuring LDP session parameters ·············································································································· 27 Configuring LDP backoff ·································································································································· 29 Configuring LDP MD5 authentication ··············································································································· 29 Configuring LDP to redistribute BGP unicast routes ························································································ 30 Configuring an LSP generation policy ·············································································································· 30 Configuring the LDP label distribution control mode ························································································ 31 Configuring a label advertisement policy ········································································································· 31 Configuring a label acceptance policy ············································································································· 32 Configuring LDP loop detection ······················································································································· 33
Configuring LDP session protection ················································································································· 34 Configuring LDP GR ········································································································································ 35 Configuring LDP NSR ······································································································································ 35 Configuring LDP-IGP synchronization ············································································································· 35
Configuring LDP-OSPF synchronization ·································································································· 36
Configuring LDP-ISIS synchronization ····································································································· 37 Configuring LDP FRR ······································································································································ 37 Setting a DSCP value for outgoing LDP packets ····························································································· 37 Resetting LDP sessions ··································································································································· 38 Enabling SNMP notifications for LDP ·············································································································· 38 Displaying and maintaining LDP ······················································································································ 38 IPv4 LDP configuration examples ···················································································································· 39
LDP LSP configuration example ·············································································································· 39
Label acceptance control configuration example ····················································································· 43
Label advertisement control configuration example ················································································· 47
LDP FRR configuration example ·············································································································· 52 IPv6 LDP configuration examples ···················································································································· 55
IPv6 LDP LSP configuration example ······································································································ 55
IPv6 label acceptance control configuration example ·············································································· 61
IPv6 label advertisement control configuration example ·········································································· 65
Configuring MPLS TE ··················································································· 71
Overview ·························································································································································· 71
TE and MPLS TE ····································································································································· 71
MPLS TE basic concepts ························································································································· 71
Static CRLSP establishment ···················································································································· 71
Dynamic CRLSP establishment ··············································································································· 71
CRLSP establishment using PCE path calculation ·················································································· 73
Traffic forwarding ····································································································································· 74
Make-before-break ··································································································································· 75
Route pinning ··········································································································································· 76
Tunnel reoptimization ······························································································································· 76
Automatic bandwidth adjustment ············································································································· 76
CRLSP backup ········································································································································· 77
FRR ·························································································································································· 77
DiffServ-aware TE ···································································································································· 78
Bidirectional MPLS TE tunnel ·················································································································· 80
Protocols and standards ·························································································································· 80 MPLS TE configuration task list ······················································································································· 81 Enabling MPLS TE ··········································································································································· 82 Configuring a tunnel interface ·························································································································· 83 Configuring DS-TE ··········································································································································· 83 Configuring an MPLS TE tunnel to use a static CRLSP ·················································································· 84 Configuring an MPLS TE tunnel to use a dynamic CRLSP ············································································· 85
Configuration task list ······························································································································· 85
Configuring MPLS TE attributes for a link ································································································ 85
Advertising link TE attributes by using IGP TE extension ········································································ 86
Configuring MPLS TE tunnel constraints ································································································· 87
Establishing an MPLS TE tunnel by using RSVP-TE ··············································································· 89
Controlling CRLSP path selection ············································································································ 89
Controlling MPLS TE tunnel setup ··········································································································· 91 Configuring an MPLS TE tunnel to use a CRLSP calculated by PCEs ··························································· 93
Configuring a PCE ··································································································································· 93
Discovering PCEs ···································································································································· 94
Establishing a CRLSP by using the path calculated by PCEs ································································· 94
Establishing a backup CRLSP by using the path calculated by PCEs ····················································· 94
Configuring PCEP session parameters ···································································································· 95 Configuring load sharing for an MPLS TE tunnel ····························································································· 95 Configuring traffic forwarding ··························································································································· 96
Configuring static routing to direct traffic to an MPLS TE tunnel or tunnel bundle ··································· 96
Configuring PBR to direct traffic to an MPLS TE tunnel or tunnel bundle ················································ 97
Configuring automatic route advertisement to direct traffic to an MPLS TE tunnel or tunnel bundle ······· 97
ii
Configuring a bidirectional MPLS TE tunnel ···································································································· 98 Configuring CRLSP backup ····························································································································· 99 Configuring MPLS TE FRR ···························································································································· 100
Enabling FRR ········································································································································· 100
Configuring a bypass tunnel on the PLR ································································································ 100
Configuring node fault detection ············································································································ 104
Configuring the optimal bypass tunnel selection interval ······································································· 105 Enabling SNMP notifications for MPLS TE ···································································································· 105 Displaying and maintaining MPLS TE ············································································································ 105 MPLS TE configuration examples ·················································································································· 106
Establishing an MPLS TE tunnel over a static CRLSP ·········································································· 106
Establishing an MPLS TE tunnel with RSVP-TE ···················································································· 111
Establishing an inter-AS MPLS TE tunnel with RSVP-TE ······································································ 117
Establishing an inter-area MPLS TE tunnel over a CRLSP calculated by PCEs ··································· 124
Bidirectional MPLS TE tunnel configuration example ············································································ 128
CRLSP backup configuration example ·································································································· 134
Manual bypass tunnel for FRR configuration example ·········································································· 138
Auto FRR configuration example ··········································································································· 144
IETF DS-TE configuration example ······································································································· 150 Troubleshooting MPLS TE ····························································································································· 157
No TE LSA generated ···························································································································· 157
Configuring a static CRLSP ········································································ 158
Overview ························································································································································ 158 Configuration procedure ································································································································ 158 Displaying static CRLSPs ······························································································································ 159 Static CRLSP configuration example ············································································································· 159
Configuring RSVP ······················································································· 165
Overview ························································································································································ 165
RSVP messages ···································································································································· 165
CRLSP setup procedure ························································································································ 166
RSVP refresh mechanism ······················································································································ 166
RSVP authentication ······························································································································ 167
RSVP GR ··············································································································································· 167
Protocols and standards ························································································································ 168 RSVP configuration task list ··························································································································· 168 Enabling RSVP ·············································································································································· 168 Configuring RSVP refresh ······························································································································ 168 Configuring RSVP Srefresh and reliable RSVP message delivery ································································ 169 Configuring RSVP hello extension ················································································································· 169 Configuring RSVP authentication ·················································································································· 170 Setting a DSCP value for outgoing RSVP packets ························································································ 171 Configuring RSVP GR ··································································································································· 172 Enabling BFD for RSVP ································································································································· 172 Displaying and maintaining RSVP ················································································································· 172 RSVP configuration examples ······················································································································· 173
Establishing an MPLS TE tunnel with RSVP-TE ···················································································· 173
RSVP GR configuration example ··········································································································· 179
Configuring tunnel policies ·········································································· 182
Overview ························································································································································ 182 Configuring a tunnel policy ····························································································································· 182
Configuration guidelines ························································································································· 182
Configuration procedure ························································································································· 183 Displaying tunnel information ························································································································· 184 Tunnel policy configuration examples ············································································································ 184
Preferred tunnel configuration example ································································································· 184
Exclusive tunnel configuration example ································································································· 184
Tunnel selection order configuration example ······················································································· 185
Preferred tunnel and tunnel selection order configuration example ······················································· 186
iii
Configuring MPLS L3VPN ·········································································· 188
Overview ························································································································································ 188
Basic MPLS L3VPN architecture ··········································································································· 188
MPLS L3VPN concepts ·························································································································· 188
MPLS L3VPN route advertisement ········································································································ 190
MPLS L3VPN packet forwarding ············································································································ 191
MPLS L3VPN networking schemes ······································································································· 192
Inter-AS VPN ·········································································································································· 194
Carrier's carrier ······································································································································ 198
Nested VPN ··········································································································································· 200
Multirole host ·········································································································································· 201
HoVPN ··················································································································································· 202
OSPF VPN extension ····························································································································· 204
BGP AS number substitution and SoO attribute ···················································································· 206
MPLS L3VPN FRR ································································································································· 207
Multi-VPN instance CE ··························································································································· 209
Protocols and standards ························································································································ 210 MPLS L3VPN configuration task list ·············································································································· 211 Configuring basic MPLS L3VPN ···················································································································· 211
Configuration prerequisites ···················································································································· 211
Configuring VPN instances ···················································································································· 211
Configuring routing between a PE and a CE ························································································· 213
Configuring routing between PEs ··········································································································· 218
Configuring BGP VPNv4 route control ··································································································· 219 Configuring inter-AS VPN ······························································································································ 220
Configuring inter-AS option A ················································································································· 220
Configuring inter-AS option B ················································································································· 221
Configuring inter-AS option C ················································································································ 222 Configuring nested VPN ································································································································ 224 Configuring multirole host ······························································································································ 225
Configuring and applying PBR ··············································································································· 226
Configuring a static route ······················································································································· 226 Configuring HoVPN ········································································································································ 226 Configuring an OSPF sham link ····················································································································· 227
Configuring a loopback interface ············································································································ 228
Redistributing the loopback interface address ······················································································· 228
Creating a sham link ······························································································································ 228 Configuring routing on an MCE ······················································································································ 229
Configuring routing between an MCE and a VPN site ··········································································· 229
Configuring routing between an MCE and a PE ···················································································· 234 Specifying the VPN label processing mode on the egress PE ······································································ 237 Configuring BGP AS number substitution and SoO attribute ········································································· 238 Configuring MPLS L3VPN FRR ····················································································································· 238 Enabling SNMP notifications for MPLS L3VPN ····························································································· 240 Displaying and maintaining MPLS L3VPN ····································································································· 240 MPLS L3VPN configuration examples ··········································································································· 242
Configuring basic MPLS L3VPN ············································································································ 242
Configuring MPLS L3VPN over a GRE tunnel ······················································································· 247
Configuring a hub-spoke network ·········································································································· 251
Configuring MPLS L3VPN inter-AS option A ························································································· 258
Configuring MPLS L3VPN inter-AS option B ························································································· 262
Configuring MPLS L3VPN inter-AS option C ························································································· 267
Configuring MPLS L3VPN carrier's carrier in the same AS ··································································· 274
Configuring MPLS L3VPN carrier's carrier in different ASs ··································································· 282
Configuring nested VPN ························································································································· 289
Configuring multirole host ······················································································································ 298
Configuring HoVPN ································································································································ 300
Configuring an OSPF sham link ············································································································· 307
Configuring MCE ···································································································································· 311
Configuring BGP AS number substitution ······························································································ 316
Configuring BGP AS number substitution and SoO attribute ································································· 320
iv
Configuring MPLS L3VPN FRR through VPNv4 route backup for a VPNv4 route ································ 323
Configuring MPLS L3VPN FRR through VPNv4 route backup for an IPv4 route ·································· 325
Configuring MPLS L3VPN FRR through IPv4 route backup for a VPNv4 route ···································· 327
Configuring IPv6 MPLS L3VPN ·································································· 330
Overview ························································································································································ 330
IPv6 MPLS L3VPN packet forwarding ··································································································· 330
IPv6 MPLS L3VPN routing information advertisement ·········································································· 331
IPv6 MPLS L3VPN network schemes and functions ············································································· 331
Protocols and standards ························································································································ 332 IPv6 MPLS L3VPN configuration task list ······································································································ 332 Configuring basic IPv6 MPLS L3VPN ············································································································ 332
Configuring VPN instances ···················································································································· 332
Configuring routing between a PE and a CE ························································································· 335
Configuring routing between PEs ··········································································································· 340
Configuring BGP VPNv6 route control ··································································································· 341 Configuring inter-AS IPv6 VPN ······················································································································ 342
Configuring inter-AS IPv6 VPN option A ································································································ 343
Configuring inter-AS IPv6 VPN option C ································································································ 343 Configuring multirole host ······························································································································ 344
Configuring and applying IPv6 PBR ······································································································· 344
Configuring an IPv6 static route ············································································································· 345 Configuring an OSPFv3 sham link ················································································································· 345
Configuring a loopback interface ············································································································ 345
Redistributing the loopback interface address ······················································································· 345
Creating a sham link ······························································································································ 346 Configuring routing on an MCE ······················································································································ 346
Configuring routing between an MCE and a VPN site ··········································································· 346
Configuring routing between an MCE and a PE ···················································································· 351 Configuring BGP AS number substitution and SoO attribute ········································································· 355 Displaying and maintaining IPv6 MPLS L3VPN ····························································································· 355 IPv6 MPLS L3VPN configuration examples ··································································································· 356
Configuring IPv6 MPLS L3VPNs ············································································································ 356
Configuring an IPv6 MPLS L3VPN over a GRE tunnel ·········································································· 363
Configuring IPv6 MPLS L3VPN inter-AS option A ················································································· 366
Configuring IPv6 MPLS L3VPN inter-AS option C ················································································· 371
Configuring IPv6 MPLS L3VPN carrier's carrier in the same AS ··························································· 377
Configuring multirole host ······················································································································ 385
Configuring an OSPFv3 sham link ········································································································· 387
Configuring IPv6 MCE ···························································································································· 391
Configuring BGP AS number substitution ······························································································ 396
Configuring BGP AS number substitution and SoO attribute ································································· 401
Configuring MPLS L2VPN ·········································································· 404
Overview ························································································································································ 404
Basic concepts of MPLS L2VPN ············································································································ 404
MPLS L2VPN network models ··············································································································· 405
Remote connection establishment ········································································································· 406
Local connection establishment ············································································································· 407
PW types ················································································································································ 407
Control word ··········································································································································· 409
MPLS L2VPN interworking ····················································································································· 409
PW redundancy ······································································································································ 410
Multi-segment PW ·································································································································· 410
VCCV ····················································································································································· 412 Compatibility information ································································································································ 412 MPLS L2VPN configuration task list ·············································································································· 412 Enabling L2VPN ············································································································································· 413 Configuring an AC ·········································································································································· 413
Configuring the interface with Ethernet or VLAN encapsulation ···························································· 414
Configuring the interface with PPP encapsulation ················································································· 414
Configuring the interface with HDLC encapsulation ··············································································· 414
v
Configuring a cross-connect ·························································································································· 415 Configuring a PW ··········································································································································· 415
Configuring a PW class ·························································································································· 415
Configuring a static PW ·························································································································· 415
Configuring an LDP PW ························································································································· 416
Configuring a BGP PW ·························································································································· 416
Configuring a remote CCC connection ·································································································· 418 Binding an AC to a cross-connect ·················································································································· 419 Configuring PW redundancy ·························································································································· 419
Configuring static PW redundancy ········································································································· 420
Configuring LDP PW redundancy ·········································································································· 420 Configuring interworking for a cross-connect ································································································· 421 Enabling SNMP notifications for L2VPN PW ································································································· 422 Displaying and maintaining MPLS L2VPN ····································································································· 422 MPLS L2VPN configuration examples ··········································································································· 423
Configuring local MPLS L2VPN connections ························································································· 423
Configuring IP interworking over local MPLS L2VPN connections ························································ 424
Configuring a static PW ·························································································································· 426
Configuring an LDP PW ························································································································· 429
Configuring IP interworking over an LDP PW ························································································ 433
Configuring a BGP PW ·························································································································· 436
Configuring a remote CCC connection ·································································································· 440
Configuring an intra-domain multi-segment PW ···················································································· 444
Configuring an inter-domain multi-segment PW ···················································································· 447
Configuring VPLS ······················································································· 453
Overview ························································································································································ 453
Basic VPLS architecture ························································································································ 453
VPLS implementation ····························································································································· 454
H-VPLS ·················································································································································· 456
Hub-spoke networking ··························································································································· 458 Compatibility information ································································································································ 458 VPLS configuration task list ··························································································································· 459 Enabling L2VPN ············································································································································· 459 Configuring an AC ·········································································································································· 460 Configuring a VSI ··········································································································································· 460 Configuring a PW ··········································································································································· 461
Configuring a PW class ·························································································································· 461
Configuring a static PW ·························································································································· 461
Configuring an LDP PW ························································································································· 462
Configuring a BGP PW ·························································································································· 462
Configuring a BGP auto-discovery LDP PW ·························································································· 464 Binding an AC to a VSI ·································································································································· 466 Configuring UPE dual homing ························································································································ 466
Configuring static PW redundancy ········································································································· 466
Configuring LDP PW redundancy ·········································································································· 467 Configuring MAC address learning ················································································································ 468 Enabling SNMP notifications for L2VPN PW ································································································· 468 Displaying and maintaining VPLS ·················································································································· 468 VPLS configuration examples ························································································································ 470
Static PW configuration example ··········································································································· 470
LDP PW configuration example ············································································································· 474
BGP PW configuration example ············································································································· 476
BGP auto-discovery LDP PW configuration example ············································································ 480
H-VPLS using MPLS access configuration example ············································································· 485
Hub-spoke VPLS configuration example ······························································································· 489
H-VPLS UPE dual homing configuration example ················································································· 492
Configuring L2VPN access to L3VPN or IP backbone ································ 498
Overview ························································································································································ 498
Conventional L2VPN access to L3VPN or IP backbone ········································································ 498
Improved L2VPN access to L3VPN or IP backbone ·············································································· 499
vi
Configuring conventional L2VPN access to L3VPN or IP backbone ····························································· 500 Configuring improved L2VPN access to L3VPN or IP backbone ··································································· 500
Configuring an L2VE interface ··············································································································· 501
Configuring an L3VE interface ··············································································································· 501 Displaying and maintaining L2VPN access to L3VPN or IP backbone ·························································· 502 Improved L2VPN access to L3VPN or IP backbone configuration examples ················································ 502
Access to MPLS L3VPN through an LDP MPLS L2VPN ······································································· 502
Access to IP backbone through an LDP VPLS ······················································································ 508
Configuring MPLS OAM ·············································································· 513
Overview ························································································································································ 513
MPLS ping ·············································································································································· 513
MPLS tracert ·········································································································································· 513
BFD for MPLS ········································································································································ 513
Periodic MPLS tracert ···························································································································· 514 Protocols and standards ································································································································ 514 Configuring MPLS OAM for LSP tunnels ······································································································· 514
Configuring MPLS ping for LSPs ··········································································································· 514
Configuring MPLS tracert for LSPs ········································································································ 515
Configuring BFD for LSPs ······················································································································ 515
Configuring periodic MPLS tracert for LSPs ·························································································· 516 Configuring MPLS OAM for MPLS TE tunnels ······························································································ 516
Configuring MPLS ping for MPLS TE tunnels ························································································ 516
Configuring MPLS tracert for MPLS TE tunnels ····················································································· 516
Configuring BFD for MPLS TE tunnels ·································································································· 517 Configuring MPLS OAM for a PW ·················································································································· 517
Configuring MPLS ping for a PW ··········································································································· 518
Configuring BFD for a PW ······················································································································ 518 Displaying MPLS OAM ·································································································································· 521 BFD for LSP configuration example ··············································································································· 522
Configuring MPLS protection switching ······················································ 525
Overview ························································································································································ 525
Protection switching triggering modes ··································································································· 525
Protection switching modes ··················································································································· 525
Path switching modes ···························································································································· 526 Protocols and standards ································································································································ 526 Compatibility information ································································································································ 526 MPLS protection switching configuration task list ·························································································· 527 Enabling MPLS protection switching ·············································································································· 527 Creating a protection group ··························································································································· 527 Configuring PS attributes for the protection group ························································································· 529 Configuring command switching for the protection group ·············································································· 530 Configuring the PSC message sending interval ···························································································· 530 Displaying and maintaining MPLS protection switching ················································································· 530 MPLS protection switching configuration example························································································· 531
Network requirements ···························································································································· 531
Configuration procedure ························································································································· 532
Verifying the configuration ······················································································································ 534
Document conventions and icons ······························································· 535
Conventions ··················································································································································· 535 Network topology icons ·································································································································· 536
Support and other resources ······································································ 537
Accessing Hewlett Packard Enterprise Support ···························································································· 537 Accessing updates ········································································································································· 537
Websites ················································································································································ 538
Customer self repair ······························································································································· 538
Remote support ······································································································································ 538
Documentation feedback ······················································································································· 538
vii
Index ··········································································································· 540
viii

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 (for example, PPP, ATM, frame relay, and Ethernet) to provide connection-oriented services for various network layer protocols (for example, IPv4, IPv6, and IPX).
Good scalability—The 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 betwee n the Layer 2 heade r and Layer 3 header of a packet. It is four bytes long and consists of the following fields:
Label—20-bit label value.
TC—3-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).
1
LSP
LFIB
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 downstream LSR of LSR A, and LSR A is the upstream LSR of LSR B.
Figure 2 Label switched path
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.
is the
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.
2
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 LSP—Established 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 inform ation.
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
3

MPLS forwarding

Figure 5 MPLS forwarding
10.1.0.0
Router A
FIB table
NexthopDest Out intOut label
Router C
IP:10.1.1.1
GE2/0/1 GE2/0/2
GE2/0/240
In label
Router B
Ingress
40
Oper
Swap
GE2/0/1
LFIB table Out label
50
Router C
Router F
Nexthop
Router D
GE2/0/2
In label
Out int GE2/0/2
GE2/0/1
Oper
50
Router D
Egress
MPLS network
Pop
Out label
IP:10.1.1.140 IP:10.1.1.1 50 IP:10.1.1.1
GE2/0/2
LFIB table
Nexthop
--
Router E
Router E
Out int
GE2/0/2
As shown in Figure 5, a packet is forwarded over the MPLS network as follows:
1. Router 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 la bel (40, in this example) to the packet. c. Forwards the labeled packet out of the interface GigabitEthernet 2/0/2 to the next hop LSR
Router C.
2. When receiving the labeled packet, Router C processes the packet as follows: a. Identifies the LFIB entry that has an incoming label of 40. b. Uses the outgoing label 5 0 of the entry to replace label 40 in the packet. c. Forwards the labeled packet out of the outgoing interface GigabitEthernet 2/0/2 to the next
hop LSR Router D.
3. When receiving the labeled packet, Router 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 th e packet. c. Forwards the packet out of the outgoing interface GigabitEthernet 2/0/2 to the next hop LSR
Router E.
If the LFIB entry records no outgoing interface or next hop information, Router 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 lookup s (if the packet has more than one label).
4
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
"T raffic Class" Field

Compatibility information

Commands and descriptions for centralized devices apply to the followin g routers:
MSR1002-4/1003-8S.
MSR2003.
MSR2004-24/2004-48.
MSR3012/3024/3044/3064.
Commands and descriptions for distributed devices apply to MSR4060 and MSR4080 routers.

MPLS configuration task list

Tasks at a glance
(Required.) Enabling MPLS (Optional.) Setting MPLS MTU (Optional.) Specifying the label type advertised by the egress (Optional.) Configuring TTL propagation (Optional.) Enabling sending of MPLS TTL-expired messages (Optional.) Enabling MPLS forwarding statistics (Optional.) Enabling split horizon for MPLS forwarding (Optional.) Enabling SNMP notifications for MPLS
5

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 conne ctivity 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.
2. Configure an LSR ID for the
local node.
3. Enter the view of the interface that needs to perform MPLS forwarding.
system-view
mpls lsr-id
interface
interface-number
lsr-id
interface-type
N/A 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.
N/A
4. Enable MPLS on the interface.

Setting MPLS MTU

MPLS adds the label stack between the link layer header and network layer header of each packet. T o ma ke sure the size of MPLS labeled packets i s smaller than the MTU of an interface, configure a n 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.
mpls enable
system-view
By default, MPLS is disabled on the interface.
N/A
2. Enter interface view.
3. Set an MPLS MTU for the
interface.
interface
interface-number
mpls mtu
interface-type
value
The following applies when an interface handles MPLS packets:
6
N/A
By default, no MPLS MTU is set on an interface.
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. Whether the forwarding can succeed depends on the actual forwarding capacity 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 the 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 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 normal 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 estab lished 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.

Configuration procedure

To specify the type of label that the egress node will advertise to the penultimate hop:
Step Command Remarks
1. Enter system view.
2. Specify the label type
advertised by the egress to the penultimate hop.
system-view mpls label advertise
explicit-null
{
non-null
}
implicit-null
|
N/A
|
By default, an egress advertises an implicit null label to the penultimate hop.
7

Configuring TTL propagation

When TTL propagation is enabl ed, the ingress node copi es 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 disabl ed, 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
8
Step Command Remarks
By default, TTL propagation is enabled only for public-network packets.
2. Enable TTL propagation.
mpls ttl propagate vpn
}
public
{
|
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, which then sends the message back to the sou rce.
To enable sending of MPLS TTL-expired messages:
Step Command Remarks
1. Enter system view.
2. Enable sending of MPLS
TTL-expired messages.
system-view
mpls ttl expiration enable
N/A By default, this function is
enabled.

Enabling MPLS forwarding statistics

Enabling FTN forwarding statistics

FEC-to-NHLFE map (FTN) entries are FIB entries that contain outgoing labels used for FTN forwarding. When an LSR receives an unlabeled packet, it searches for the corresponding FTN entry based on the destination IP address. If a match is found, the LSR adds the outgoing label i n the FTN entry to the packet and forwards the labeled packet.
To enable FTN forwarding statistics:
Step Command Remarks
1. Enter system view.
2. Enter RIB view.
3. Create a RIB IPv4 address
family and enter RIB IPv4 address family view.
4. Enable the device to maintain FTN entries in the RIB.
5. Enable FTN forwarding statistics for a destination network.
system-view rib
address-family ipv4
ftn enable
mpls-forwarding statistics prefix-list
prefix-list-name
N/A N/A
By default, no RIB IPv4 address family is created.
By default, the device does not maintain FTN entries in the RIB.
By default, FTN forwarding statistics is disabled for all destination networks.
9

Enabling MPLS label forwarding statistics for LSPs

MPLS label forwarding for LSPs forwards a labeled packet based on its incoming label. Perform this task to enable MPLS label forwarding statistics for LSPs and MPLS statistics reading.
Then, 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 the specified LSPs.
3. Enable MPLS label statistics reading, and set the reading interval.
mpls statistics
vpn-instance-name ] { ipv4-destination mask-length | ipv6-destination prefix-length } |
static
mpls statistics interval
te
|
all
vpn-instance
{
| [
ipv4
ipv6
ingress-lsr-id tunnel-id }
interval
By default, MPLS label forwarding statistics are disabled for all LSPs.
By default, MPLS label statistics reading is disabled.

Enabling MPLS label forwarding statistics for a VPN instance

MPLS label forwarding for a VPN instance performs the following operations:
Forwards a labeled packet for the VPN instance based on its incoming label.
Adds a label to an unlabeled packet received by the VPN instance and forwards the labeled
packet.
Perform this task to enable MPLS label forwarding statistics for a VPN instance and MPLS st atistics reading. Then, you can use the display ip vpn-instance mpls statistics command to view MPLS label statistics.
To enable MPLS label forwarding statistics:
Step Command Remarks
1. Enter system view.
2. Enter VPN instance view.
3. Enable MPLS label
forwarding statistics for the VPN instance.
4. Enable MPLS label statistics reading, and set the reading interval.
system-view ip vpn-instance
mpls statistics enable
mpls statistics interval
vpn-instance-name N/A
interval
N/A
By default, MPLS label forwarding statistics are disabled for all VPN instances.
By default, MPLS label statistics reading is disabled.

Enabling split horizon for MPLS forwarding

This feature prevents MPLS packets received from an interface from being forwarded back to that interface to provide loop-free forwarding.
To enable split horizon for MPLS forwarding:
Step Command Remarks
1. Enter system view.
system-view
10
N/A
Step Command Remarks
2. Enable split horizon for
MPLS forwarding.
mpls forwarding split-horizon
By default, split horizon is disabled for MPLS forwarding.

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.
2. Enable SNMP
notifications for MPLS.
system-view
snmp-agent trap enable mpls
N/A 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 usage information for MPLS
labels.
Display LSP information.
Display MPLS Nexthop Information Base (NIB) information.
Display usage information for NIDs. Display LSP statistics. Display MPLS summary information. Display MPLS label forwarding statistics
for VPN instances. Display ILM entries (centralized devices
in standalone mode).
display mpls interface
display mpls label
display mpls lsp outgoing-interface
bgp
ldp
{
vpn-instance
[
ipv6
display mpls nib
display mpls nid display mpls lsp statistics display mpls summary display ip vpn-instance mpls statistics
vpn-instance-name ]
display mpls forwarding ilm
local
|
|
vpn-instance-name ] [ ipv4-dest mask-length |
[ ipv6-dest prefix-length ] ] [
[ interface-type interface-number ]
{ label-value1 [
egress
[
|
[ nib-id ]
[ nid-value1 [ to nid-value2 ] ]
|
interface-type interface-number |
rsvp-te
in-label
static
|
[ label ]
to
label-value2 ] |
label-value |
static-cr
|
verbose
ingress
transit
} |
]
instance-name
[
all }
|
protocol
]
Display ILM entries (distributed devices in standalone mode/centralized devices in IRF mode).
Display ILM entries (distributed devices in IRF mode).
Display NHLFE entries (centralized
display mpls forwarding ilm
display mpls forwarding ilm slot
slot-number ]
display mpls forwarding nhlfe
11
[ label ] [
[ label ] [
[ nid ]
slot
slot-number ]
chassis
chassis-number
Task Command
devices in standalone mode).
Display NHLFE entries (distributed devices in standalone mode/centralized devices in IRF mode).
display mpls forwarding nhlfe
[ nid ] [
slot
slot-number ]
Display NHLFE entries (distributed devices in IRF mode).
Clear MPLS forwarding statistics for the specified LSPs.
Clear MPLS forwarding statistics for VPN instances.
display mpls forwarding nhlfe slot
slot-number ]
reset mpls statistics
ipv4
{
ipv4-destination mask-length |
prefix-length } |
all
{
static
| te ingress-lsr-id tunnel-id }
[ nid ] [
vpn-instance
| [
reset ip vpn-instance mpls statistics
vpn-instance-name ]
chassis
chassis-number
vpn-instance-name ]
ipv6
ipv6-destination
instance-name
[
12

Configuring a static LSP

Overview

A static label switched path (LSP) is established by manually specifying the incoming label and outgoing label on each node (ingress, transit, or egress node) of the forwarding path.
Static LSPs consume fewer resources, but they cannot automatically adapt to network topology changes. Therefore, static LSPs are suitable for small and stable n etworks with simple topologies.
Follow these guidelines to establish a static LSP:
The ingress node performs the following operations: a. Determines an FEC for a packet according to the destination address. b. Adds the label for that FEC into the packet. c. Forwards the packet to the next hop or out of the outgoing interface.
Therefore, on the ingress node, you must specify the outgoing label for the destination address (the FEC) and the next hop or the outgoing interface.
A transit node swaps the label carried in a received p acket with a label, and forwards the packet to the next hop or out of the outgoing interface. Therefore, on each transit node, you must specify the incoming label, the outgoing label, and the next hop or the outgoing interface.
If PHP is not configured, an egress node pops the incoming label of a packet, and performs label forwarding according to the inner label or IP forwarding. Therefore, on the e gre ss node, you only need to specify the incoming label.
The outgoing label specified on an LSR must be the same as the incoming label specified on the directly connected downstream LSR.

Configuration prerequisites

Before you configure a static LSP, perform the following tasks:
1. Identify the ingress node, transit nodes, and egress node of the LSP.
2. Enable MPLS on all interfaces that participate in MPLS forwarding. For more information, see
"Configuring basic MPLS."
3. Make
sure the ingress node has a route to the destination address of the LSP. This is not
required on transit and egress nodes.

Configuration procedure

To configure a static LSP:
Step Command Remarks
1. Enter system view.
2. Configure the ingress
node of the static LSP.
3. Configure the transit node of the static LSP.
system-view static-lsp ingress
destination
mask-length } {
outgoing-interface
interface-number }
static-lsp transit
in-label {
dest-addr { mask |
nexthop
lsp-name
nexthop
lsp-name
interface-type
out-label
next-hop-addr |
next-hop-addr |
out-label
in-label
N/A
If you specify a next hop for the static LSP, make sure the ingress node has an active route to the specified next hop address.
If you specify a next hop for the static LSP, make sure the transit
13
Step Command Remarks
outgoing-interface
interface-number }
interface-type
out-label
out-label
node has an active route to the specified next hop address.
4. Configure the egress node of the static LSP.
static-lsp egress
in-label
lsp-name
in-label

Displaying static LSPs

Execute display commands in any view .
Task Command
Display static LSP information.
display mpls static-lsp

Static LSP configuration example

Network requirements

Router A, Router B, and Router C all support MPLS. Establish static LSPs between Router A and Router C, so that subnets 11.1.1.0/24 and 21.1.1.0/24
can access each other over MPLS.
Figure 8 Network diagram
You do not need to configure this command if the outgoing label configured on the penultimate hop of the static LSP is 0 or 3.
lsp-name
[
lsp-name ]

Configuration restrictions and guidelines

For an LSP, the outgoing label specified on an LSR must be identical with the incoming label specified on the downstream LSR.
LSPs are unidirectional. You must configure an LSP for each direction of the data forwarding path.
A route to the destination address of the LSP must be available on the ingress and egress nodes, but it is not needed on transit nodes. Therefore, you do not need to configure a routing protocol to ensure IP connectivity among all routers.

Configuration procedure

1. Configure IP addresses for all interfaces, including the loopback interfaces, as shown in Figure
8. (Details not shown.)
2. Configure a static route to the destination address of each LSP: # On Router A, configure a static route to network 21.1.1.0/24.
14
<RouterA> system-view [RouterA] ip route-static 21.1.1.0 24 10.1.1.2
# On Router C, configure a static route to network 11.1.1.0/24.
<RouterC> system-view [RouterC] ip route-static 11.1.1.0 255.255.255.0 20.1.1.1
3. Configure basic MPLS on the routers: # Configure Router A.
[RouterA] mpls lsr-id 1.1.1.9 [RouterA] interface serial 2/1/0 [RouterA-Serial2/1/0] mpls enable [RouterA-Serial2/1/0] quit
# Configure Router B.
[RouterB] mpls lsr-id 2.2.2.9 [RouterB] interface serial 2/1/0 [RouterB-Serial2/1/0] mpls enable [RouterB-Serial2/1/0] quit [RouterB] interface serial 2/1/1 [RouterB-Serial2/1/1] mpls enable [RouterB-Serial2/1/1] quit
# Configure Router C.
[RouterC] mpls lsr-id 3.3.3.9 [RouterC] interface serial 2/1/0 [RouterC-Serial2/1/0] mpls enable [RouterC-Serial2/1/0] quit
4. Configure a static LSP from Router A to Router C: # Configure the LSP ingress node, Router A.
[RouterA] static-lsp ingress AtoC destination 21.1.1.0 24 nexthop 10.1.1.2 out-label 30
# Configure the LSP transit node, Router B.
[RouterB] static-lsp transit AtoC in-label 30 nexthop 20.1.1.2 out-label 50
# Configure the LSP egress node, Router C.
[RouterC] static-lsp egress AtoC in-label 50
5. Create a static LSP from Router C to Router A: # Configure the LSP ingress node, Router C.
[RouterC] static-lsp ingress CtoA destination 11.1.1.0 24 nexthop 20.1.1.1 out-label 40
# Configure the LSP transit node, Router B.
[RouterB] static-lsp transit CtoA in-label 40 nexthop 10.1.1.1 out-label 70
# Configure the LSP egress node, Router A.
[RouterA] static-lsp egress CtoA in-label 70

Verifying the configuration

# Display static LSP information on routers, for example, on Router A.
[RouterA] display mpls static-lsp Total: 2 Name FEC In/Out Label Nexthop/Out Interface State AtoC 21.1.1.0/24 NULL/30 10.1.1.2 Up CtoA -/- 70/NULL - Up
15
# Test the connectivity of the LSP from Router A to Router C.
[RouterA] ping mpls -a 11.1.1.1 ipv4 21.1.1.0 24 MPLS Ping FEC: 21.1.1.0/24 : 100 data bytes 100 bytes from 20.1.1.2: Sequence=1 time=4 ms 100 bytes from 20.1.1.2: Sequence=2 time=1 ms 100 bytes from 20.1.1.2: Sequence=3 time=1 ms 100 bytes from 20.1.1.2: Sequence=4 time=1 ms 100 bytes from 20.1.1.2: Sequence=5 time=1 ms
--- FEC: 21.1.1.0/24 ping statistics ---
5 packets transmitted, 5 packets received, 0.0% packet loss round-trip min/avg/max = 1/1/4 ms
# Test the connectivity of the LSP from Router C to Router A.
[RouterC] ping mpls -a 21.1.1.1 ipv4 11.1.1.0 24 MPLS Ping FEC: 11.1.1.0/24 : 100 data bytes 100 bytes from 10.1.1.1: Sequence=1 time=5 ms 100 bytes from 10.1.1.1: Sequence=2 time=1 ms 100 bytes from 10.1.1.1: Sequence=3 time=1 ms 100 bytes from 10.1.1.1: Sequence=4 time=1 ms 100 bytes from 10.1.1.1: Sequence=5 time=1 ms
--- FEC: 11.1.1.0/24 ping statistics ---
5 packets transmitted, 5 packets received, 0.0% packet loss round-trip min/avg/max = 1/1/5 ms
16

Configuring LDP

Overview

The Label Distribution Protocol (LDP) dynamically distributes FEC-label mapping information between LSRs to establish LSPs.

Terminology

LDP session
Two LSRs establish a TCP-based LDP session to exchange FEC-label mappings.
LDP peer
Two LSRs that use L DP to exchange FEC-label mappings are LSR peers.
Label spaces and LDP identifiers
Label spaces include the following types:
Per-interface label space—Each interface uses a single, independent label space. Different interfaces can use the same label values.
Per-platform label space—Each LSR uses a single label space. The device only supports the per-platform label space.
A six-byte LDP Identifier (LDP ID) identifies a label space on an LSR. It is in the format of <LSR ID>:<label space number>, where:
The LSR ID takes four bytes to identity the LSR.
The label space number takes two bytes to identify a label space within the LSR.
A label space number of 0 indicates that the label spa ce is a per-platform label sp ace. A label space number other than 0 indicates a per-interface label space.
LDP uses the same LDP ID format on IPv4 and IPv6 networks. An LDP ID must be globally unique.
FECs and FEC-label mappings
MPLS groups packets with the same characteristics (such as the same destination or service class) into a class, called an FEC. The packets of the same FEC are handled in the same way on an MPLS network.
LDP can classify FECs by destination IP address and by PW. This document describes FEC classification by destination IP address. For information about FEC classification by PW, see "Configuring MPLS L2VPN" and "Configuring VPLS."
An LSR assig its peers in a Label Mapping message.
ns a label for an FEC and advertises the FEC-label mapping, or FEC-label binding, to

LDP messages

LDP mainly uses the following types of messages:
Discovery messages—Declare and maintain the presence of LS Rs, such as Hello me ssages.
Session messages—Establish, maintain, and terminate sessions between LDP peers, such
as Initialization messages used for parameter negotiation and Keepalive messages used to maintain sessions.
17
Advertisement messages—Create, alter , and remove FEC-label mappings, such as Label Mapping messages used to advertise FEC-label mappings.
Notification messages—Provide advisory information and notify errors, such as Notification messages.
LDP uses UDP to transport discovery messages for efficiency, and uses TCP to transport session, advertisement, and notification messages for reliability.

LDP operation

LDP can operate on an IPv4 or IPv6 network, or a network where IPv4 coexists with IPv6. LDP operates similarly on IPv4 and IPv6 networks.
LDP operates in the following phases:
Discovering and maintaining LDP peers
LDP discovers peers in the following ways:
Basic Discovery—Discovers directly connected LSRs.
{ On an IPv4 network, an LSR sends IPv4 Link Hello messages to multicast address
224.0.0.2. All directly connected LSRs can discover the LSR and establish an IPv4 Link Hello adjacency.
{ On an IPv6 network, an LSR sends IPv6 Link Hello messages to FF02:0:0:0:0:0:0:2. All
directly connected LSRs can discover the LSR and establish an IPv6 Link Hello adjacency.
{ On a network where IPv4 and IPv6 coexist, an LSR sends both IPv4 and IPv6 Link Hello
messages to each directly connected LSR and keeps both the IPv4 and IPv6 Link Hello adjacencies with a neighbor.
Extended Discovery—Sends LDP IPv4 Targeted Hello messages to an IPv4 address or LDP IPv6 Targeted Hello messages to an IPv6 address. The destination LSR can discover the LSR and establish a hello adjacency. This mechanism is typically used i n LDP session protection, LDP over MPLS TE, MPLS L2VPN, and VPLS. For more information about MPLS L2VPN and VPLS, see "Configuring MPLS L2VPN," and "Configuring VPLS."
can establish two hello adjacencies with a directly connected neighbor through both discovery
LDP mechanisms. It sends Hello messages at the hello interval to maintain a hello adjacency. If LDP receives no Hello message from a hello adjacency before the hello hold timer expires, it removes the hello adjacency.
Establishing and maintaining LDP sessions
LDP establishes a session to a peer in the following steps:
1. Establishes a TCP connection with the neighbor. On a network where IPv4 and IPv6 coexist, LDP establishes an IPv6 TCP connection. If LDP
fails to establish the IPv6 TCP connection, LDP tries to establish an IPv4 TCP connection.
2. Negotiates session parameters such as LDP version, label distribution method, and Keepalive timer, and establishes an LDP session to the neighbor if the negotiation succeeds.
After a session is established, LDP sends LDP PDUs (an LDP PDU carries one or more LDP messages) to maintain the session. If no information is exchanged between the LDP peers within th e Keepalive interval, LDP sends Keepalive messages at the Keepali ve interval to maintain the session. If LDP receives no LDP PDU from a neighbor before the keep alive hold timer expires, or the last hello adjacency with the neighbor is removed, LDP terminates the session.
LDP can also send a Shutdown message to a neighbor to terminate the LDP session. An LSR can establish only one LDP session to a neighbor. The session can be used to exchange
IPv4 and IPv6 FEC-label mappings at the same time.
18
Establishing LSPs
LDP classifies FECs according to destination IP addresses in IP routing entries, creates FEC-label mappings, and advertises the mappings to LDP peers through LDP sessions. After an LDP peer receives an FEC-label mapping, it uses the received label and the label locally assigne d to that FEC to create an LFIB entry for that FEC. When all LSRs (from the Ingress to the Egress) establish an LFIB entry for the FEC, an LSP is established exclusively for the FEC.
Figure 9 Dynamically establishing an LSP

Label distribution and control

Label advertisement modes
Figure 10 Label advertisement modes
LDP advertises label-FEC mappings in one of the following way s:
Downstream Unsolicited (DU) mode—Distributes FEC-label mappings to the upstre am LSR, without waiting for label requests. The device supports only the DU mode.
19
A
Downstream on Demand (DoD) mode—Sends a label request for an FEC to the downstream LSR. After receiving the label reque st, the downstre am LSR distrib utes the FEC-label mapping for that FEC to the upstream LSR.
NOTE:
pair of upstream and downstream LSRs must use the same label advertisement mode. Otherwise,
the LSP cannot be established.
Label distribution control
LDP controls label distribution in one of the following ways:
Independent label distribution—Distributes an FEC-label mapping to an upstream LSR at any time. An LSR might distribute a mapping for an FEC to its upstream LSR before it receives a label mapping for that FEC from its downstream LSR. As shown in Figure 11, in DU mode, each LSR di label-switch the FEC. The LSRs do not need to wait for a label mapping for the FEC from its downstream LSR. In DoD mode, an LSR distributes a label mapping for an FEC to its upstream LSR after it receives a label request for the FEC. The LSR does not need to wait for a label mapping for the FEC from its downstream LSR.
Figure 11 Independent label distribution control mode
stributes a label mapping for an FEC to its upstream LSR whenever it is ready to
Ordered label distribution—Distributes a label mapping for an FEC to its upstream LSR only after it receives a label mapping for that FEC from its downstream LSR unless the local node is the egress node of the FEC. As shown in Figure 10, in DU mo
de, an LSR distributes a label mapping for an FEC to its upstream LSR only if it receiv es a label mappin g for the FEC from its downstream LSR. In DoD mode, when an LSR (Transit) receives a label request for an FEC from its upstream LSR (Ingress), it continues to send a label request for the FEC to its downstream LSR (Egress). After the transit LSR receives a label m apping for the FEC from the egress LSR, it distributes a label mapping for the FEC to the ingress LSR.
Label retention mode
The label retention mode specifies whether an LSR maintains a label mapping for an FEC learned from a neighbor that is not its next hop.
Liberal label retention—Retains a received label mapping for an FEC regardless of whether the advertising LSR is the next hop of the FEC. This mechanism allows for quicke r adaptation to topology changes, but it wastes system resources because LDP has to keep us eless labels. The device only supports liberal label retention.
20
Loading...
+ 517 hidden pages