GNS3 LAB: Cisco MPLS Basics and Beyond Concepts…

Introduction:

Hi Friends,

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.

  1. In real world you don’t always need to advertise all your interface in MPLS.
  2. 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 4.4.4.4
  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: 6.6.6.6:0; Local LDP Ident 4.4.4.4:0
     TCP connection: 6.6.6.6.64455 - 4.4.4.4.646
     State: Oper; Msgs sent/rcvd: 76/77; Downstream
     Up time: 00:51:47
     LDP discovery sources:
       GigabitEthernet4/0, Src IP addr: 30.30.30.6
         Addresses bound to peer LDP Ident:
           30.30.30.6      40.40.40.5      40.40.40.10     6.6.6.6
     Peer LDP Ident: 3.3.3.3:0; Local LDP Ident 4.4.4.4:0
     TCP connection: 3.3.3.3.646 - 4.4.4.4.13248
     State: Oper; Msgs sent/rcvd: 76/76; Downstream
     Up time: 00:51:37
     LDP discovery sources:
       GigabitEthernet2/0, Src IP addr: 20.20.20.5
         Addresses bound to peer LDP Ident:
           20.20.20.5      3.3.3.3
     Peer LDP Ident: 2.2.2.2:0; Local LDP Ident 4.4.4.4:0
     TCP connection: 2.2.2.2.646 - 4.4.4.4.51121
     State: Oper; Msgs sent/rcvd: 77/77; Downstream
     Up time: 00:51:37
     LDP discovery sources:
       GigabitEthernet1/0, Src IP addr: 20.20.20.1
         Addresses bound to peer LDP Ident:
           20.20.20.1      2.2.2.2         192.168.1.1
     Peer LDP Ident: 5.5.5.5:0; Local LDP Ident 4.4.4.4:0
     TCP connection: 5.5.5.5.12179 - 4.4.4.4.646
     State: Oper; Msgs sent/rcvd: 76/76; Downstream
     Up time: 00:51:38
     LDP discovery sources:
       GigabitEthernet3/0, Src IP addr: 30.30.30.2
         Addresses bound to peer LDP Ident:
           30.30.30.2      40.40.40.1      40.40.40.9      5.5.5.5

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           7.7.7.7/32        57200         Gi3/0      30.30.30.2
        403           7.7.7.7/32        0             Gi4/0      30.30.30.6
 202    Pop Label     6.6.6.6/32        0             Gi4/0      30.30.30.6
 203    306           50.50.50.0/30     0             Gi3/0      30.30.30.2
        405           50.50.50.0/30     0             Gi4/0      30.30.30.6
 204    Pop Label     40.40.40.8/30     0             Gi3/0      30.30.30.2
        Pop Label     40.40.40.8/30     0             Gi4/0      30.30.30.6
 205    Pop Label     40.40.40.0/30     0             Gi3/0      30.30.30.2
 206    Pop Label     40.40.40.4/30     0             Gi4/0      30.30.30.6
 207    302           8.8.8.8/32        16655         Gi3/0      30.30.30.2
        412           8.8.8.8/32        3660          Gi4/0      30.30.30.6
 208    Pop Label     5.5.5.5/32        0             Gi3/0      30.30.30.2
 209    Pop Label     3.3.3.3/32        66676         Gi2/0      20.20.20.5
 210    Pop Label     2.2.2.2/32        7163          Gi1/0      20.20.20.1
LIB Table:

P1#sh mpls  ldp  bindings
   lib entry: 2.2.2.2/32, rev 30
     local binding:  label: 210
     remote binding: lsr: 2.2.2.2:0, label: imp-null
     remote binding: lsr: 3.3.3.3:0, label: 114
     remote binding: lsr: 6.6.6.6:0, label: 415
     remote binding: lsr: 5.5.5.5:0, label: 313
   lib entry: 3.3.3.3/32, rev 28
     local binding:  label: 209
     remote binding: lsr: 3.3.3.3:0, label: imp-null
     remote binding: lsr: 2.2.2.2:0, label: 24
     remote binding: lsr: 6.6.6.6:0, label: 414
     remote binding: lsr: 5.5.5.5: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

  1. What label router assigning to the label and what label router’s LDP neighbor assigns to the router.
  2. 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: 2.2.2.2:0; Local LDP Ident 4.4.4.4:0
     TCP connection: 2.2.2.2.646 - 4.4.4.4.51121
     State: Oper; Msgs sent/rcvd: 77/77; Downstream
     Up time: 00:51:37
     LDP discovery sources:
       GigabitEthernet1/0, Src IP addr: 20.20.20.1
         Addresses bound to peer LDP Ident:
           20.20.20.1      2.2.2.2         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 2.2.2.2 as loopback and it advertises that prefix to its LDP neighbor 4.4.4.4 with the label “3” also called implicit Null.

   lib entry: 2.2.2.2/32, rev 30
     local binding:  label: 210
     remote binding: lsr: 2.2.2.2:0, label: imp-null
     remote binding: lsr: 3.3.3.3:0, label: 114
     remote binding: lsr: 6.6.6.6:0, label: 415
     remote binding: lsr: 5.5.5.5: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 2.2.2.2. This prefix was advertised by 2.2.2.2 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 2.2.2.2
 Local  Outgoing      Prefix            Bytes Label   Outgoing   Next Hop
 Label  Label or VC   or Tunnel Id      Switched      interface
 210    explicit-n    2.2.2.2/32        1096          Gi1/0      20.20.20.1
 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.

Basic troubleshooting:

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 8.8.8.8/32
 Sending 5, 100-byte MPLS Echos to 8.8.8.8/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 8.8.8.8/32
 Tracing MPLS Label Switched Path to 8.8.8.8/32, timeout is 2 seconds
 Type escape sequence to abort.
   0 20.20.20.1 MRU 1500 [Labels: 207 Exp: 0]
 L 1 20.20.20.2 MRU 1500 [Labels: 302 Exp: 0] 20 ms
 L 2 30.30.30.2 MRU 1500 [Labels: 508 Exp: 0] 24 ms
 L 3 40.40.40.2 MRU 1504 [Labels: implicit-null Exp: 0] 44 ms
 ! 4 50.50.50.2 32 ms
 PE1#

Summary :

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.

Leave a Reply