Traceroute is a versatile tool that is frequently used to troubleshoot problems on the Internet. An excellent presentation is given in NANOG 47 meeting where a lot of real use cases are demystified.
When analysing MPLS deployments on the Internet, traceroute can also be helpful. Thanks to the support of ICMP Extensions for Multiprotocol Label Switching, MPLS Label Switching Routers (LSR) append MPLS information to ICMP messages. Selected ICMP messages include the MPLS label stack, as it arrived at the router that is sending the ICMP message.
For example, a traceroute to www.univ-rennes1.fr
reveals the different hops toward the destination:
$ traceroute -P icmp www.univ-rennes1.fr traceroute to frontalhttp.univ-rennes1.fr (129.20.126.100), 64 hops max, 72 byte packets 1 neufbox 1.804 ms 1.718 ms 1.510 ms 2 129.112.16.109.rev.sfr.net 28.440 ms 34.535 ms 28.499 ms 3 77.56.66.86.rev.sfr.net 28.384 ms 29.678 ms 27.561 ms 4 185.73.66.86.rev.sfr.net 30.758 ms 30.744 ms 29.597 ms 5 renater-ix1.sfinx.tm.fr 37.389 ms 38.937 ms 41.514 ms 6 te4-2-rouen-rtr-021.noc.renater.fr 41.297 ms 42.737 ms * 7 te4-2-caen-rtr-021.noc.renater.fr 42.710 ms 41.381 ms 40.157 ms 8 te1-5-rennes-rtr-021.noc.renater.fr 42.530 ms 43.130 ms 43.615 ms 9 * u-1-rennes-cri-gi8-1-rennes-rtr-021.noc.renater.fr 46.353 ms 41.514 ms 10 frontalhttp.univ-rennes1.fr 42.702 ms 41.322 ms 42.429 ms
Examining the detail of the received ICMP time exceeded messages with Wireshark reveals an ICMP Multi-part extension that carries the MPLS label as it arrived to the hop sending the message. In the following capture, the router te4-2-rouen-rtr-021.noc.renater.fr
received label 53, most probably from the MPLS edge router renater-ix1.sfinx.tm.fr
.
No. Time Source Destination Protocol Length Info 41 5.947446000 193.51.189.50 192.168.1.24 ICMP 182 Time-to-live exceeded (Time to live exceeded in transit) Internet Control Message Protocol Type: 11 (Time-to-live exceeded) Code: 0 (Time to live exceeded in transit) Checksum: 0x3974 [correct] Internet Protocol Version 4, Src: 192.168.1.24, Dst: 131.254.254.131 User Datagram Protocol, Src Port: 46416 (46416), Dst Port: 33452 (33452) Data (24 bytes) ICMP Multi-Part Extensions Version: 2 Reserved: 0x000 Checksum: 0x8df2 [correct] MPLS Stack Entry Length: 8 Class: 1 C-Type: 1 Label: 53, Exp: 0, S: 1, TTL: 1 0000 0000 0000 0011 0101 .... = Label: 53 .... .... .... .... .... 000. = Experimental: 0 .... .... .... .... .... ...1 = Stack bit: Set Time to live: 1
In order to easily visualise the label switching, MTR produces a traceroute-like result with labels used at each hop:
$ mtr -e www.univ-rennes1.fr 1. neufbox 2. 129.112.16.109.rev.sfr.net 3. 77.56.66.86.rev.sfr.net 4. 185.73.66.86.rev.sfr.net 5. renater-ix1.sfinx.tm.fr 6. te4-2-rouen-rtr-021.noc.renater.fr [MPLS: Lbl 53 Exp 0 S 1 TTL 1] 7. te4-2-caen-rtr-021.noc.renater.fr [MPLS: Lbl 546 Exp 0 S 1 TTL 1] 8. te1-5-rennes-rtr-021.noc.renater.fr 9. u-1-rennes-cri-gi8-1-rennes-rtr-021.noc.renater.fr 10. frontalhttp.univ-rennes1.fr