In continuation to my previous post on MPLS (check out for basic mpls config and working), in this post I will be taking a further deep dive and cover other aspects like some crucial concepts and troubleshooting methods. For this I have built up a topology including ISP and and few customer sites. Below you can see the network topology.
In this topology MPLS is running over OSPF as IGP protocol in the ISP domain. I have kept the IGP domain simple with single area 0 OSPF. Intentionally I have put some equal cost paths in the network so that I can cover load sharing etc. Also , this network will be used for my blog on MPLS TE and FRR which also requires redundancy.
Configurations and verification:
This is going to be quick section as the MPLS basic configuration I have already explained in my previous blog(link above). Here I will share the config from router P1 for more clarity about this network. In the config under ospf I have used ldp autoconfig command as I needed to enable MPLS on all the active interfaces. However, in real world I don’t think this is a smart choice because of two reasons.
- In real world you don’t always need to advertise all your interface in MPLS.
- Even if you do want to advertise everything into MPLS today, tomorrow you may not want this and changing from ldp autoconfig to “mpls ip” under interface can become a task. So in my opinion always use mpls ip instead of autoconfig. It is fine to use for lab sake.
! router ospf 1 router-id 188.8.131.52 log-adjacency-changes network 0.0.0.0 255.255.255.255 area 0 mpls ldp autoconfig ! mpls label range 201 300 mpls label protocol ldp mpls ldp router-id Loopback0 force !
For verification purpose you can use following commands. Here you can see mpls neighbor table and forwarding table(LFIB) and LIB(Label information base) is ready. The mpls forwarding table is the real tool to do label switching for the packets but it is also important to mention that mpls forwarding table or LFIB is made up of two important tables FIB + LIB hence LFIB. Forwarding information base or FIB we all know is directly related with routing table(best routes installed for forwarding). The LIB table given below can be seen with the help of mpls binding command(show mpls ldp bindings), this table contains the label that a router assigns to a destination prefix and also the label which neighbor assigns to that prefix.
P1#sh mpls ldp neighbor Peer LDP Ident: 184.108.40.206:0; Local LDP Ident 220.127.116.11:0 TCP connection: 18.104.22.168.64455 - 22.214.171.124.646 State: Oper; Msgs sent/rcvd: 76/77; Downstream Up time: 00:51:47 LDP discovery sources: GigabitEthernet4/0, Src IP addr: 126.96.36.199 Addresses bound to peer LDP Ident: 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168 Peer LDP Ident: 22.214.171.124:0; Local LDP Ident 126.96.36.199:0 TCP connection: 188.8.131.52.646 - 184.108.40.206.13248 State: Oper; Msgs sent/rcvd: 76/76; Downstream Up time: 00:51:37 LDP discovery sources: GigabitEthernet2/0, Src IP addr: 220.127.116.11 Addresses bound to peer LDP Ident: 18.104.22.168 22.214.171.124 Peer LDP Ident: 126.96.36.199:0; Local LDP Ident 188.8.131.52:0 TCP connection: 184.108.40.206.646 - 220.127.116.11.51121 State: Oper; Msgs sent/rcvd: 77/77; Downstream Up time: 00:51:37 LDP discovery sources: GigabitEthernet1/0, Src IP addr: 18.104.22.168 Addresses bound to peer LDP Ident: 22.214.171.124 126.96.36.199 192.168.1.1 Peer LDP Ident: 188.8.131.52:0; Local LDP Ident 184.108.40.206:0 TCP connection: 220.127.116.11.12179 - 18.104.22.168.646 State: Oper; Msgs sent/rcvd: 76/76; Downstream Up time: 00:51:38 LDP discovery sources: GigabitEthernet3/0, Src IP addr: 22.214.171.124 Addresses bound to peer LDP Ident: 126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11 LFIB Table P1#sh mpls forwarding-table Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 201 303 18.104.22.168/32 57200 Gi3/0 22.214.171.124 403 126.96.36.199/32 0 Gi4/0 188.8.131.52 202 Pop Label 184.108.40.206/32 0 Gi4/0 220.127.116.11 203 306 18.104.22.168/30 0 Gi3/0 22.214.171.124 405 126.96.36.199/30 0 Gi4/0 188.8.131.52 204 Pop Label 184.108.40.206/30 0 Gi3/0 220.127.116.11 Pop Label 18.104.22.168/30 0 Gi4/0 22.214.171.124 205 Pop Label 126.96.36.199/30 0 Gi3/0 188.8.131.52 206 Pop Label 184.108.40.206/30 0 Gi4/0 220.127.116.11 207 302 18.104.22.168/32 16655 Gi3/0 22.214.171.124 412 126.96.36.199/32 3660 Gi4/0 188.8.131.52 208 Pop Label 184.108.40.206/32 0 Gi3/0 220.127.116.11 209 Pop Label 18.104.22.168/32 66676 Gi2/0 22.214.171.124 210 Pop Label 126.96.36.199/32 7163 Gi1/0 188.8.131.52
LIB Table: P1#sh mpls ldp bindings lib entry: 184.108.40.206/32, rev 30 local binding: label: 210 remote binding: lsr: 220.127.116.11:0, label: imp-null remote binding: lsr: 18.104.22.168:0, label: 114 remote binding: lsr: 22.214.171.124:0, label: 415 remote binding: lsr: 126.96.36.199:0, label: 313 lib entry: 188.8.131.52/32, rev 28 local binding: label: 209 remote binding: lsr: 184.108.40.206:0, label: imp-null remote binding: lsr: 220.127.116.11:0, label: 24 remote binding: lsr: 18.104.22.168:0, label: 414 remote binding: lsr: 22.214.171.124:0, label: 301 <Output Snipped>
Here I would take a pause and discuss more about this LIB table. Now, LIB table is a tool which provides two necessary information
- What label router assigning to the label and what label router’s LDP neighbor assigns to the router.
- It also tells what are the prefixes directly connected to LDP neighbor. The lsr which has has imp-null label are the once directly connected to the prefix. This information is also present in the ldp neighbor table, see below…
Peer LDP Ident: 126.96.36.199:0; Local LDP Ident 188.8.131.52:0 TCP connection: 184.108.40.206.646 - 220.127.116.11.51121 State: Oper; Msgs sent/rcvd: 77/77; Downstream Up time: 00:51:37 LDP discovery sources: GigabitEthernet1/0, Src IP addr: 18.104.22.168 Addresses bound to peer LDP Ident: 22.214.171.124 126.96.36.199 192.168.1.1
Implicit-Null and Explicit-Null:
MPLS discussion is incomplete without discussing these two labels. Lets take a moment to discuss them.
Implicit-Null –: Implicit null is a reserved label in MPLS with the value 3. The LSR advertising this label will put label value “3” with it to indicate the LDP neighbors to pop out the any outgoing labels for the packet belonging to the prefix. For example in my setup focus on the link between P4 and P2. P2 has prefix 188.8.131.52 as loopback and it advertises that prefix to its LDP neighbor 184.108.40.206 with the label “3” also called implicit Null.
lib entry: 220.127.116.11/32, rev 30 local binding: label: 210 remote binding: lsr: 18.104.22.168:0, label: imp-null remote binding: lsr: 22.214.171.124:0, label: 114 remote binding: lsr: 126.96.36.199:0, label: 415 remote binding: lsr: 188.8.131.52:0, label: 313
Lets understand this with packet capture as well, see the value in the red block the generic label value is 3 for the prefix 184.108.40.206. This prefix was advertised by 220.127.116.11 LSR.
Explicit-Null :- By Default explicit null is not enabled on the router you need to enable it with following command. The problem with implicit null is that since it removes the label before the last hop (PHP-penultimate hop popping) so the QOS information associated with it also gets lost. In few cases you may need to preserve this value.
PE1(config)#mpls ldp explicit-null ? for Access-list specifying controls on destination prefixes to Access-list specifying controls on LDP peers <> On P1 you can see below: P1#sh mpls forwarding-table 18.104.22.168 Local Outgoing Prefix Bytes Label Outgoing Next Hop Label Label or VC or Tunnel Id Switched interface 210 explicit-n 22.214.171.124/32 1096 Gi1/0 126.96.36.199 P1#
See the packet capture information below…
Here is the ping packet with explicit null enabled, notice the we have MPLS exp bits available which can be used to preserve qos information.
The major technique for mpls troubleshooting is MPLS ping and MPLS traceroute. These tools provide you end to end connectivity information over MPLS, if mpls ping and traceroute is providing you expected information then you can safely consider that everything is fine with respect to MPLS. Here is how to use them.
PE1#ping mpls ipv4 188.8.131.52/32 Sending 5, 100-byte MPLS Echos to 184.108.40.206/32, timeout is 2 seconds, send interval is 0 msec: Type escape sequence to abort. !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 12/52/108 ms PE1#tra PE1#traceroute mpl PE1#traceroute mpls ip PE1#traceroute mpls ipv4 220.127.116.11/32 Tracing MPLS Label Switched Path to 18.104.22.168/32, timeout is 2 seconds Type escape sequence to abort. 0 22.214.171.124 MRU 1500 [Labels: 207 Exp: 0] L 1 126.96.36.199 MRU 1500 [Labels: 302 Exp: 0] 20 ms L 2 188.8.131.52 MRU 1500 [Labels: 508 Exp: 0] 24 ms L 3 184.108.40.206 MRU 1504 [Labels: implicit-null Exp: 0] 44 ms ! 4 220.127.116.11 32 ms PE1#
There is alot to discuss in MPLS but I think a single article will not do justice to it. In this article I have set the stage to discuss advance areas of MPLS and will be covering more in next article. In next article you will see MPLS MRU, Load Sharing, Path tracing etc. Stay tuned to keep learning more…To be Cont..Thanks for visiting the blog.