Implicit and Explicit Null

Section 1: Implicit Null (Penultimate Hop Popping)

By default as MPLS packets pass through an LSP the tail end MPLS router instructs the penultimate router to not push an MPLS Shim Label onto packets destined towards itself i.e the final hop of the LSP.

This behaviour is often referred to as Penultimate Hop Popping (or PHP) and is used to reduce label and control plane overhead by popping the MPLS Shim Label on the penultimate router, so the final PE router need only process the inner VPN label, before sending packets onward to an attached device.

The process works by the tail end router signalling downstream to the penultimate router a label value of 3. This label value is interpreted by the penultimate router as an instruction to not push an MPLS Shim Label onto packets destined for the final hop.

This action is the default behaviour in Junos, and applies to both LDP and RSVP signalled LSPs.

Section 1.1: Explicit Null

The opposite of the above would be to carry the MPLS Shim Label on packets destined for the final router within the LSP, which requires changes to the configuration.

In certain MPLS networks this requirement may be desirable, for example to maintain end to end QoS values that could be carried within the Shim Label, and thus to potentially use those QoS values to apply some sort of policy or action on the tail end PE.

When Explicit Null is configured a label value of 0 is signalled to the penultimate router, which instructs this downstream router to push an MPLS Shim Label onto packets that are destined for the final hop.

Section 2: Demonstrating on the CLI

We will first look at the configuration using LDP as the signalling protocol, using a simple topology of four MPLS enabled PEs signalling LSPs between to each other. Once that is understood we will follow with an example using RSVP.

Figure 1: Network Topology

lab-core

Section 2.1: LDP Configuration

By default Junos uses Implicit Null to signal MPLS LSP’s. The information in figures 2.1-2.2 show the LDP database from the perspective of DC-PE1; the LDP database is a reflection of the LDP control plane, so the reference to “output” refers to the label that the local PE is signalling downstream, and the reference to “input” refers to the label that the local PE has received from its LDP neighbour.

Under normal operation signalling between PE1 in DC1 and DC2 uses a label value of 3 for both input and output. This value instructs each PE to not push an MPLS Shim label onto packets being sent to and from each another.

Figure 2.1: Labels received from DC2-PE1

lab@lab-dc1-pe1> show ldp database 
Input label database, 172.16.1.1:0--172.16.2.1:0
Labels received: 2
  Label     Prefix
 299920      172.16.1.1/32
      3      172.16.2.1/32

Output label database, 172.16.1.1:0--172.16.2.1:0
Labels advertised: 2
  Label     Prefix
      3      172.16.1.1/32
 299952      172.16.2.1/32

Figure 2.1: Labels received from DC1-PE1

lab@lab-dc2-pe1> show ldp database    
Input label database, 172.16.2.1:0--172.16.1.1:0
Labels received: 2
  Label     Prefix
      3      172.16.1.1/32
 299952      172.16.2.1/32

Output label database, 172.16.2.1:0--172.16.1.1:0
Labels advertised: 2
  Label     Prefix
 299920      172.16.1.1/32
      3      172.16.2.1/32

Section 2.2: Changing LDP to Explicit Null

When enabled Explicit Null will pass a label value of 0 downstream from each tail end PE. Let’s now apply the relevant command to the LDP configuration on both DC1-PE1 and DC2-PE1 and see what happens to the LDP control plane; the command is applied directly under the LDP protocol heirarchy, which globally sets all configured LSP’s to Explicit Null.

set protocols ldp explicit-null

Figure 3.1: Labels received from DC1-PE1

As predicted once the above command has been applied we now see DC1-PE1 signalling and receiving a label value of 0.

lab@lab-dc1-pe1> show ldp database 
Input label database, 172.16.1.1:0--172.16.2.1:0
Labels received: 2
  Label     Prefix
 299888      172.16.1.1/32
      0      172.16.2.1/32

Output label database, 172.16.1.1:0--172.16.2.1:0
Labels advertised: 2
  Label     Prefix
      0      172.16.1.1/32
 299920      172.16.2.1/32

Figure 3.1: Labels received from DC2-PE1

As expected the input and output labels are also reflected on DC2-PE1.

lab@lab-dc2-pe1> show ldp database 
Input label database, 172.16.2.1:0--172.16.1.1:0
Labels received: 2
  Label     Prefix
      0      172.16.1.1/32
 299920      172.16.2.1/32

Output label database, 172.16.2.1:0--172.16.1.1:0
Labels advertised: 2
  Label     Prefix
 299888      172.16.1.1/32
      0      172.16.2.1/32

Section 3.1: RSVP Configuration

For RSVP signalled LSP’s we will first observe the Implicit Null default behaviour, signalling a label value of 3.

Figure 4.1: Labels sent and received from DC1-PE1

From the output below we can see that the LSP from DC1-PE1 to DC2-PE1 is signalled with a label value of 3, indicated in the “Labelout” section – this is interpreted by the remote PE as Implicit Null.

In the opposite direction DC2-PE1 has established an LSP towards the local PE, informing the local PE that it will receive packets with Implicit Null applied (using a label value of 3), as indicated in the “Labelin” section.

lab@lab-dc1-pe1> show rsvp session    
Ingress RSVP: 1 sessions
To              From            State   Rt Style Labelin Labelout LSPname 
172.16.2.1      172.16.1.1      Up       0  1 FF       -        3 dc1-pe1-to-dc2-pe1
Total 1 displayed, Up 1, Down 0

Egress RSVP: 1 sessions
To              From            State   Rt Style Labelin Labelout LSPname 
172.16.1.1      172.16.2.1      Up       0  1 FF       3        - dc2-pe1-to-dc1-pe1
Total 1 displayed, Up 1, Down 0

Transit RSVP: 0 sessions
Total 0 displayed, Up 0, Down 0

lab@lab-dc1-pe1> 

Figure 4.1: Labels sent and received from DC2-PE1

From the perspective of DC2-PE1 we effectively see the same behavior in reverse. The local PE is signally an LSP to DC1-PE1 with a label value of 3, meaning all packets entering this LSP with have Implicit Null applied.

The LSP arriving from DC1-PE1 is signalled with a Labelin value of 3, informing the local PE that Implicit Null is applied to packets arriving on the LSP.

lab@lab-dc2-pe1> show rsvp session 
Ingress RSVP: 1 sessions
To              From            State   Rt Style Labelin Labelout LSPname 
172.16.1.1      172.16.2.1      Up       0  1 FF       -        3 dc2-pe1-to-dc1-pe1
Total 1 displayed, Up 1, Down 0

Egress RSVP: 1 sessions
To              From            State   Rt Style Labelin Labelout LSPname 
172.16.2.1      172.16.1.1      Up       0  1 FF       3        - dc1-pe1-to-dc2-pe1
Total 1 displayed, Up 1, Down 0

Transit RSVP: 0 sessions
Total 0 displayed, Up 0, Down 0

lab@lab-dc2-pe1> 

Section 2.2: Changing RSVP to Explicit Null

Let’s now apply the same command to the RSVP configuration on both DC1-PE1 and DC2-PE1 and observe the results; in the case of RSVP the command is applied under the MPLS protocol heirarchy, where all RSVP signalled LSP’s are configured in Junos.

set protocols mpls explicit-null

Figure 3.1: Labels received from DC1-PE1

As predicted once the above command has been applied we now see DC1-PE1 signalling and receiving a label value of 0.

lab@lab-dc1-pe1> show rsvp session    
Ingress RSVP: 1 sessions
To              From            State   Rt Style Labelin Labelout LSPname 
172.16.2.1      172.16.1.1      Up       0  1 FF       -        0 dc1-pe1-to-dc2-pe1
Total 1 displayed, Up 1, Down 0

Egress RSVP: 1 sessions
To              From            State   Rt Style Labelin Labelout LSPname 
172.16.1.1      172.16.2.1      Up       0  1 FF       0        - dc2-pe1-to-dc1-pe1
Total 1 displayed, Up 1, Down 0

Transit RSVP: 0 sessions
Total 0 displayed, Up 0, Down 0

Figure 3.1: Labels received from DC2-PE1

As expected the input and output labels are also reflected on DC2-PE1.

lab@lab-dc2-pe1> show rsvp session 
Ingress RSVP: 1 sessions
To              From            State   Rt Style Labelin Labelout LSPname 
172.16.1.1      172.16.2.1      Up       0  1 FF       -        0 dc2-pe1-to-dc1-pe1
Total 1 displayed, Up 1, Down 0

Egress RSVP: 1 sessions
To              From            State   Rt Style Labelin Labelout LSPname 
172.16.2.1      172.16.1.1      Up       0  1 FF       0        - dc1-pe1-to-dc2-pe1
Total 1 displayed, Up 1, Down 0

Transit RSVP: 0 sessions
Total 0 displayed, Up 0, Down 0