--------------------------------------------------------------------------------
Routing tables of the different LSRs are computed using 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're going to deploy MPLS Traffic Engineering.
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 via the LDP matches
the route learned via IGP in the routing table, an entry is created
in the label forwarding information bases (LFIB) on the LSR.
The LSR uses the following forwarding mechanism:
Once an edge LSR receives an unlabelled packet, the Cisco express forwarding
(CEF) 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 incoming interface of
a core LSR, the LFIB provides the outgoing interface and the new label
that will be associated with the outgoing 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.
The following diagram illustrates this network setup:
Configurations
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) is
working correctly. These commands are underlined is the configs below.
Enable ip cef (for better performances use ip cef distributed
when available) in the general configuration mode (shown in bold in
the following configs).
Enable mpls ip (or tag-switching ip on older IOS versions)
in the general configuration mode and in each interface (shown in
bold in the following configs).
Note: The LSRs must have (up) Loopback interfaces with an address
mask of 32 bits.
Configuration File
Pomerol
Current configuration:
!
version 12.0
!
hostname Pomerol
!
ip cef
!
interface Loopback0
ip address 10.10.10.3 255.255.255.255
ip router isis
!
interface Serial0/1
encapsulation frame-relay
!
interface Serial0/1.1 point-to-point
ip address 10.1.1.6 255.255.255.252
ip router isis
tag-switching ip
frame-relay interface-dlci 301
!
interface Serial0/1.2 point-to-point
ip address 10.1.1.9 255.255.255.252
ip router isis
tag-switching ip
frame-relay interface-dlci 303
!
interface Serial0/1.3 point-to-point
ip address 10.1.1.21 255.255.255.252
ip router isis
tag-switching ip
frame-relay interface-dlci 306
!
router isis
net 49.0001.0000.0000.0003.00
is-type level-1
!
ip classless
!
end
Pulligny
Current configuration:
!
version 12.1
!
hostname Pulligny
!
ip cef
!
interface Loopback0
ip address 10.10.10.2 255.255.255.255
!
interface Serial0/1
no ip address
encapsulation frame-relay
!
interface Serial0/1.1 point-to-point
ip address 10.1.1.2 255.255.255.252
ip router isis
tag-switching ip
frame-relay interface-dlci 201
!
interface Serial0/1.2 point-to-point
ip address 10.1.1.10 255.255.255.252
ip router isis
tag-switching ip
frame-relay interface-dlci 203
!
router isis
redistribute static ip
passive-interface Loopback0
net 49.0001.0000.0000.0002.00
is-type level-1
!
ip classless
!
end
Pauillac
Current configuration : 2366 bytes
!
version 12.1
!
hostname pauillac
!
ip cef
!
interface Loopback0
ip address 10.10.10.1 255.255.255.255
ip router isis
!
interface Serial0/0
no ip address
encapsulation frame-relay
!
interface Serial0/0.1 point-to-point
ip address 10.1.1.1 255.255.255.252
ip router isis
tag-switching ip
frame-relay interface-dlci 102
!
interface Serial0/0.2 point-to-point
ip address 10.1.1.5 255.255.255.252
ip access-group 150 out
ip router isis
tag-switching ip
frame-relay interface-dlci 103
!
interface Serial0/0.3 point-to-point
bandwidth 512
ip address 10.1.1.13 255.255.255.252
ip router isis
tag-switching ip
frame-relay interface-dlci 104
!
interface Serial0/0.4 point-to-point
ip address 10.1.1.17 255.255.255.252
ip router isis
tag-switching ip
frame-relay interface-dlci 105
!
!
router isis
net 49.0001.0000.0000.0001.00
is-type level-1
metric-style wide
!
ip classless
!
end
debug and show Commands
Before issuing debug commands, please see Important Information on
Debug Commands.
show tag-switching tdp neighbor
show tag-switching tdp bindings
show tag-switching forwarding-table
show tag-switching forwarding-table a.b.c.d detail
traceroute a.b.c.d
An exhaustive list of commands is included in the MPLS Command Reference.
Other sample show commands are illustrated in Configuring Basic MPLS
Using OSPF.
Sample Debug Output
The following output focusses on the LDP. The LDP currently implemented
in IOS is TDP (Tag Distribution Protocol), which contains some Cisco-proprietary
extensions, but it be used with LDP, the IETF official protocol for
label distribution. TDP will be replaced by LDP in the future.
You can use the show tag-switching tdp * commands to
verify the state of TDP. You can see neighbors using show tag-switching
tdp neighbor:
Pulligny#show tag-switching tdp neighbor
Peer TDP Ident: 10.10.10.1:0; Local TDP Ident 10.10.10.2:0
TCP connection: 10.10.10.1.711 - 10.10.10.2.11001
State: Oper; PIEs sent/rcvd: 27907/27925; ; Downstream
Up time: 2w2d
TDP discovery sources:
Serial0/1.1
Addresses bound to peer TDP Ident:
10.1.1.1 10.1.1.13 10.1.1.17 10.10.10.1
10.1.1.5 10.200.28.89
Peer TDP Ident: 10.10.10.3:0; Local TDP Ident 10.10.10.2:0
TCP connection: 10.10.10.3.11001 - 10.10.10.2.711
State: Oper; PIEs sent/rcvd: 22893/22874; ; Downstream
Up time: 1w6d
TDP discovery sources:
Serial0/1.2
Addresses bound to peer TDP Ident:
10.200.28.91 10.1.1.6 10.1.1.9 10.1.1.21
10.10.10.3
You can view the established bindings between labels
and routes using show tag-switching tdp bindings:
Pulligny#show tag-switching tdp bindings
(...)
tib entry: 10.10.10.4/32, rev 22
local binding: tag: 21
remote binding: tsr: 10.10.10.1:0, tag: 22
remote binding: tsr: 10.10.10.3:0, tag: 25
tib entry: 10.10.10.6/32, rev 51
local binding: tag: 23
remote binding: tsr: 10.10.10.3:0, tag: 18
remote binding: tsr: 10.10.10.1:0, tag: 20
(...)
To see which bindings are used to build the LFIB, use
show tag-switching forwarding-table:
Pulligny#show tag-switching 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.4/30 0 Se0/1.2 point2point
Pop tag 10.1.1.4/30 0 Se0/1.1 point2point
17 Pop tag 10.1.1.12/30 0 Se0/1.1 point2point
18 Pop tag 10.1.1.16/30 0 Se0/1.1 point2point
19 Pop tag 10.10.10.1/32 1394 Se0/1.1 point2point
20 Pop tag 10.1.1.20/30 0 Se0/1.2 point2point
21 22 10.10.10.4/32 12103 Se0/1.1 point2point
22 Pop tag 10.10.10.3/32 88 Se0/1.2 point2point
23 18 10.10.10.6/32 0 Se0/1.2 point2point
24 21 10.10.10.5/32 67 Se0/1.1 point2point
25 19 10.10.10.20/32 0 Se0/1.2 point2point
Of course, you can also check the details for a given
destination using show tag-switching forwarding-table 10.10.10.4 detail:
Pulligny#show tag-switching forwarding-table 10.10.10.4
detail
Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
21 22 10.10.10.4/32 12103 Se0/1.1 point2point
MAC/Encaps=4/8, MTU=1500, Tag Stack{22}
30918847 00016000
Per-packet load-sharing
Finaly, if the network does IP TTL propagation (see
mpls ip ttl propagate for more information), you can also do a traceroute
and see the hops:
Pesaro#traceroute 10.10.10.4
Type escape sequence to abort.
Tracing the route to 10.10.10.4
1 10.1.1.21 [MPLS: Label 25 Exp 0] 296 msec 256 msec
244 msec
2 10.1.1.5 [MPLS: Label 22 Exp 0] 212 msec 392 msec 352 msec
3 10.1.1.14 436 msec * 268 msec