This document shows how to configure a basic Multiprotocol Label Switching (MPLS) network. Refer to Configuration Examples and TechNotes on the MPLS Support Page for more information on how to configure advanced topics such as VPN or Traffic Engineering (TE).
Cisco recommends that you are familiar with the basic operation of MPLS. Refer to Multiprotocol Label Switching Overview for an overview of MPLS.
The information in this document is based on these software and hardware versions:
Cisco IOS® Software Releases 12.2(28)
Cisco 3600 routers
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
Refer to Cisco Technical Tips Conventions for more information on document conventions.
An MPLS network is commonly a backbone network comprised of MPLS-enabled routers called Label Switch Routers (LSR). Generally, the network consists of a core LSR with an edge LSR that applies labels to packets.
This is the setup mechanism of an MPLS network:
Routing tables of the different LSRs are computed with an Interior Gateway Protocol (IGP). A link-state protocol, such as Open Shortest Path First (OSPF) or Intermediate System-to-Intermediate System (IS-IS), is required if you plan to deploy MPLS TE.
A label distribution protocol (LDP) advertises the bindings between routes and labels. These bindings are checked against the routing table. If the route (prefix/mask and next hop) learned from the LDP matches the route learned from IGP in the routing table, an entry is created in the label that forwards information bases (LFIB) on the LSR.
The LSR uses this forwarding mechanism:
Once an edge LSR receives an unlabelled packet, the Cisco Express Forwarding table is checked and a label is imposed on the packet if needed. This LSR is called the ingress LSR.
Upon the arrival of a labelled packet at the inbound interface of a core LSR, the LFIB provides the outbound interface and the new label that is associated with the outbound packet.
The router before the last LSR (the penultimate hop) pops the label and transmits the packet without the label. The last hop is called the egress LSR.
This diagram illustrates this network setup:
In this section, you are presented with the information to configure the features described in this document.
Note: In order fo find additional information on the commands used in this document, use the Command Lookup Tool (registered customers only) .
This document uses this network setup:
Use this procedure as a quick configuration guide.
Set up your network as usual. MPLS needs a standard IP connection in order to establish forwarding bases.
Ensure that the routing protocol (OSPF or IS-IS) works correctly. These commands are italicized in the configurations in the next section.
Enable ip cef, for better performances use ip cef distributed when available, in the general configuration mode. This is shown in bold in the configurations in the next section.
Enable mpls ip, or tag-switching ip on older Cisco IOS software releases, in the general configuration mode and in each interface, as shown in bold in the configurations in the next section. Even when the mpls ip command is used, the show running output can still show the command as tag-switching ip in some Cisco IOS software releases, as shown in the configurations in the next section.
Note: The LSRs must have (up) Loopback interfaces with an address mask of 32 bits and these interfaces must be reachable with the global IP routing table.
This document uses these configurations:
Pomerol |
---|
! version 12.2 ! hostname Pomerol ! ip subnet-zero ! ip cef ! interface Loopback0 ip address 10.10.10.3 255.255.255.255 ! interface Serial2/0 ip address 10.1.1.21 255.255.255.252 tag-switching ip ! interface Serial3/0 ip address 10.1.1.6 255.255.255.252 tag-switching ip ! interface Serial4/0 ip address 10.1.1.9 255.255.255.252 tag-switching ip ! router ospf 10 log-adjacency-changes network 10.0.0.0 0.255.255.255 area 9 ! ip classless ! end |
Pulligny |
---|
! version 12.2 ! hostname Pulligny ! ! ip subnet-zero ! ip cef ! interface Loopback0 ip address 10.10.10.2 255.255.255.255 ! interface Serial2/0 ip address 10.1.1.2 255.255.255.252 tag-switching ip ! interface Serial3/0 ip address 10.1.1.10 255.255.255.252 tag-switching ip ! router ospf 10 log-adjacency-changes network 10.0.0.0 0.255.255.255 area 9 ! ip classless ! end |
Pauillac |
---|
! version 12.2 ! hostname Pauillac ! ip subnet-zero ! ip cef ! interface Loopback0 ip address 10.10.10.1 255.255.255.255 ! interface Serial2/0 ip address 10.1.1.13 255.255.255.252 tag-switching ip ! interface Serial3/0 ip address 10.1.1.17 255.255.255.252 tag-switching ip ! interface Serial4/0 ip address 10.1.1.1 255.255.255.252 tag-switching ip ! interface Serial5/0 ip address 10.1.1.5 255.255.255.252 tag-switching ip ! router ospf 10 log-adjacency-changes network 10.0.0.0 0.255.255.255 area 9 ! ip classless ! end |
Pescara |
---|
! version 12.2 ! hostname Pescara ! ip subnet-zero ! ip cef ! interface Loopback0 ip address 10.10.10.4 255.255.255.255 ! interface Serial2/0 ip address 10.1.1.14 255.255.255.252 tag-switching ip ! router ospf 10 log-adjacency-changes network 10.0.0.0 0.255.255.255 area 9 ! ip classless ! end |
Pesaro |
---|
! version 12.2 ! hostname Pesaro ! ip subnet-zero ! ip cef ! interface Loopback0 ip address 10.10.10.6 255.255.255.255 ! interface Serial2/0 ip address 10.1.1.22 255.255.255.252 tag-switching ip ! router ospf 10 log-adjacency-changes network 10.0.0.0 0.255.255.255 area 9 ! ip classless ! end |
Perugia |
---|
! version 12.2 ! hostname Perugia ! ip subnet-zero ! ip cef ! interface Loopback0 ip address 10.10.10.5 255.255.255.255 ! interface Serial2/0 ip address 10.1.1.18 255.255.255.252 tag-switching ip ! router ospf 10 log-adjacency-changes network 10.0.0.0 0.255.255.255 area 9 ! ip classless ! end |
This section provides information you can use to confirm your configuration works properly.
Commands used in the Configuring Basic MPLS Using IS-IS sample configuration are also applicable.
In order to illustrate this sample configuration, look at a particular destination, for example 10.10.10.4, on the Pomerol LSR.
Certain show commands are supported by the Output Interpreter Tool (registered customers only) , which allows you to view an analysis of show command output.
show ip route —Used to check the IP route for this destination in the IP routing table:
Pomerol#show ip route 10.10.10.4 Routing entry for 10.10.10.4/32 Known via "ospf 10", distance 110, metric 129, type intra area Last update from 10.1.1.5 on Serial3/0, 17:29:23 ago Routing Descriptor Blocks: * 10.1.1.5, from 10.10.10.4, 17:29:23 ago, via Serial3/0 Route metric is 129, traffic share count is 1
show mpls forwarding-table —Used to check the MPLS forwarding table, which is the label switching equivalent of the IP routing table for standard IP routing. It contains inbound and outbound labels and descriptions of the packets.
Pomerol#show mpls forwarding-table Local Outgoing Prefix Bytes tag Outgoing Next Hop tag tag or VC or Tunnel Id switched interface 16 Pop tag 10.1.1.12/30 636 Se3/0 point2point 17 Pop tag 10.10.10.1/32 0 Se3/0 point2point 18 21 10.10.10.4/32 0 Se3/0 point2point 19 Pop tag 10.1.1.0/30 0 Se4/0 point2point Pop tag 10.1.1.0/30 0 Se3/0 point2point 20 Pop tag 10.10.10.6/32 612 Se2/0 point2point 21 Pop tag 10.1.1.16/30 0 Se3/0 point2point 22 16 10.10.10.5/32 0 Se3/0 point2point 23 Pop tag 10.10.10.2/32 0 Se4/0 point2point
show mpls forwarding-table detail —Used to see MPLS forwarding table details:
Pomerol#show mpls forwarding-table 10.10.10.4 32 detail Local Outgoing Prefix Bytes tag Outgoing Next Hop tag tag or VC or Tunnel Id switched interface 18 21 10.10.10.4/32 0 Se3/0 point2point MAC/Encaps=4/8, MRU=1500, Tag Stack{21} 0F008847 00015000 No output feature configured Per-packet load-sharing
show mpls ldp bindings or show tag-switching tdp bindings (based on which Cisco IOS software release you use) —Used to see the label bindings associated with a particular destination. Both the local as well as the remote bindings can be seen.
Pomerol#show tag-switching tdp bindings 10.10.10.4 32 tib entry: 10.10.10.4/32, rev 14 local binding: tag: 18 remote binding: tsr: 10.10.10.1:0, tag: 21 remote binding: tsr: 10.10.10.2:0, tag: 23 remote binding: tsr: 10.10.10.6:612, tag: 20
Note that labels for each forwarding class are established at each LSR, even if they are not on the preferred (shortest) path. In this case, a packet destined to 10.10.10.4/32 can go by 10.10.10.1 (with label 21) or by 10.10.10.2 (with label 23). The LSR chooses the first solution because it is the shortest one. This decision is made with the standard IP routing table, which in this case, is built with OSPF.
show ip cef detail —Used to check that Cisco Express Forwarding works properly and that tags are swapped correctly:
Pomerol#show ip cef 10.10.10.4 detail 10.10.10.4/32, version 37, cached adjacency to Serial3/0 0 packets, 0 bytes tag information set local tag: 18 fast tag rewrite with Se3/0, point2point, tags imposed: {21} via 10.1.1.5, Serial3/0, 0 dependencies next hop 10.1.1.5, Serial3/0 valid cached adjacency tag rewrite with Se3/0, point2point, tags imposed: {21}
Refer to MPLS Troubleshooting for information on how to troubleshoot MPLS.
Revision | Publish Date | Comments |
---|---|---|
1.0 |
10-Aug-2005 |
Initial Release |