Prerequisites for Implementing Cisco MPLS Forwarding
These prerequisites are required to implement MPLS Forwarding:
You must be in a user group associated with a task group that includes the proper task IDs. The command reference guides include the task IDs required for each command. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Router that runs Cisco IOS XR software.
Installed composite mini-image and the MPLS package, or a full composite image.
Restrictions for Implementing Cisco MPLS Forwarding
Label switching on a Cisco router requires that Cisco Express Forwarding (CEF) be enabled.
CEF is mandatory for Cisco IOS XR software and it does not need to be enabled explicitly.
Information About Implementing MPLS Forwarding
To implement MPLS Forwarding, you should understand these concepts:
MPLS combines the performance and capabilities of Layer 2 (data link layer) switching with the proven scalability of Layer 3 (network layer) routing. MPLS enables service providers to meet the challenges of growth in network utilization while providing the opportunity to differentiate services without sacrificing the existing network infrastructure. The MPLS architecture is flexible and can be employed in any combination of Layer 2 technologies. MPLS support is offered for all Layer 3 protocols, and scaling is possible well beyond that typically offered in today’s networks.
Based on routing information that is stored in the VRF IP routing table and VRF CEF table, packets are forwarded to their destination using MPLS.
A PE router binds a label to each customer prefix learned from a CE router and includes the label in the network reachability information for the prefix that it advertises to other PE routers. When a PE router forwards a packet received from a CE router across the provider network, it labels the packet with the label learned from the destination PE router. When the destination PE router receives the labeled packet it pops the label and uses it to direct the packet to the correct CE router. Label forwarding across the provider backbone, is based on either dynamic label switching or traffic engineered paths. A customer data packet carries two levels of labels when traversing the backbone:
Top label directs the packet to the correct PE router
Second label indicates how that PE router should forward the packet to the CE router
In conventional Layer 3 forwarding mechanisms, as a packet traverses the network, each router extracts all the information relevant to forwarding the packet from the Layer 3 header. This information is then used as an index for a routing table lookup to determine the next hop for the packet.
In the most common case, the only relevant field in the header is the destination address field, but in some cases, other header fields might also be relevant. As a result, the header analysis must be done independently at each router through which the packet passes. In addition, a complicated table lookup must also be done at each router.
In label switching, the analysis of the Layer 3 header is done only once. The Layer 3 header is then mapped into a fixed-length, unstructured value called a label.
Many different headers can map to the same label, as long as those headers always result in the same choice of next hop. In effect, a label represents a forwarding equivalence class—that is, a set of packets which, however different they may be, are indistinguishable by the forwarding function.
The initial choice of a label need not be based exclusively on the contents of the Layer 3 packet header; for example, forwarding decisions at subsequent hops can also be based on routing policy.
Once a label is assigned, a short label header is added at the front of the Layer 3 packet. This header is carried across the network as part of the packet. At subsequent hops through each MPLS router in the network, labels are swapped and forwarding decisions are made by means of MPLS forwarding table lookup for the label carried in the packet header. Hence, the packet header does not need to be reevaluated during packet transit through the network. Because the label is of fixed length and unstructured, the MPLS forwarding table lookup process is both straightforward and fast.
Distribution of Label Bindings
Each label switching router (LSR) in the network makes an independent, local decision as to which label value to use to represent a forwarding equivalence class. This association is known as a label binding.
The distribution of label bindings cannot be done statically for the Layer 2 VPN pseudowire.
Each LSR informs its neighbors of the label bindings it has made. This awareness of label bindings by neighboring routers is facilitated by these protocols:
Label Distribution Protocol (LDP)
Supports MPLS forwarding along normally routed paths.
Resource Reservation Protocol (RSVP)
Supports MPLS traffic engineering.
Border Gateway Protocol (BGP)
Supports MPLS virtual private networks (VPNs).
When a labeled packet is sent from LSR A to the neighboring LSR B, the label value carried by the IP packet is the label value that LSR B assigned to represent the forwarding equivalence class of the packet. Thus, the label value changes as the IP packet traverses the network.
MFI Control-Plane Services
The MFI control-plane provides services to MPLS applications, such as Label Distribution Protocol (LDP) and Traffic Engineering (TE), that include enabling and disabling MPLS on an interface, local label allocation, MPLS rewrite setup (including backup links), management of MPLS label tables, and the interaction with other forwarding paths (IP Version 4 [IPv4] for example) to set up imposition and disposition.
MFI Data-Plane Services
The MFI data-plane provides a software implementation of MPLS forwarding in all of these forms:
Time-to-Live Propagation in Hierarchical MPLS
Cisco IOS XR software provides the flexibility to enable or disable the time-to-live (TTL) propagation for locally generated packets that are independent of packets forwarded form a customer edge (CE) device.
The IP header contains a field of 8 bits that signifies the time that a packet still has before its life ends and is dropped. When an IP packet is sent, its TTL is usually 255 and is then decremented by 1 at each hop. When the TTL field is decremented down to zero, the datagram is discarded. In such a case, the router that dropped the IP packet for which the TTL reached 0 sends an Internet Control Message Protocol (ICMP) message type 11 and code 0 (time exceeded) to the originator of the IP packet.
MPLS maximum transmission unit (MTU) indicates that the maximum size of the IP packet can still be sent on a data link, without fragmenting the packet. In addition, data links in MPLS networks have a specific MTU, but for labeled packets. All IPv4 packets have one or more labels. This does imply that the labeled packets are slightly bigger than the IP packets, because for every label, four bytes are added to the packet. So, if n is the number of labels, n * 4 bytes are added to the size of the packet when the packet is labeled. The MPLS MTU parameter pertains to labeled packets.
How to Implement MPLS Forwarding on Cisco IOS XR Software
These topics explain how to configure a router for MPLS forwarding.
For additional information related to implementing MPLS Forwarding, refer to the following references:
MPLS Forwarding commands
MPLS Forwarding Commands on Cisco IOS XR Software module inCisco IOS XR MPLS Command Reference for the Cisco CRS Router
Getting started material
Cisco IOS XRGetting Started Guide for theCisco CRS Router
Information about user groups and task IDs
Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XRSystem Security Configuration Guide for theCisco CRS Router
Technical Assistance Center (TAC) home page, containing 30,000 pages of searchable technical content, including links to products, technologies, solutions, technical tips, and tools. Registered Cisco.com users can log in from this page to access even more content.