How to configure MPLS command on DGS‑3630 ?

[Topology]
How to configure MPLS command on DGS-3630_001

VLAN

 VID  Tagged port  Untagged port 
 1  -  SW2 eth1/0/1, SW5 eth1/0/2
 23  SW2 eth1/0/2, SW3 eth1/0/1  -
 34  SW3 eth1/0/2, SW4 eth1/0/1  -
 45  SW4 eth1/0/2, SW5 eth1/0/1  -

IPv4

 Network  Connected Interface
 172.16.12.0/24  SW2 eth1/0/1(.2), IXIA1(.100)
 172.16.23.0/24  SW2 eth1/0/2(.2), SW3 eth1/0/1(.3)
 172.16.34.0/24  SW3 eth1/0/2(.3), SW4 eth1/0/1(.4)
 172.16.45.0/24  SW4 eth1/0/2(.4), SW5 eth1/0/1(.5)
 172.16.56.0/24  SW5 eth1/0/2(.5), IXIA6(.100)

[Device]
DGS-3630 Series R2.10 X 4:
1) SW2 = DGS-3630-52PC (MI)
2) SW3 = DGS-3630-28SC (MI)
3) SW4 = DGS-3630-52TC (MI)
4) SW5 = DGS-3630-28 TC

IXIA port with IxNetwork-FT X 2:
1) IXIA card 12 port 3
2) IXIA card 12 port 4

[Configure]
Step 1 : Create VLANs and two connected interfaces of the same link should have the equal tagged (or untagged) VID.

#SW2

configure terminal
prompt SW2
vlan 23
exit
interface ethernet 1/0/2
switchport mode trunk
switchport trunk allowed vlan 23
exit

#SW3

configure terminal
prompt SW3
vlan 23,34
exit
interface ethernet 1/0/1
switchport mode trunk
switchport trunk allowed vlan 23
exit
interface ethernet 1/0/2
switchport mode trunk
switchport trunk allowed vlan 34
exit


#SW4

configure terminal
prompt SW4
vlan 34,45
exit
interface ethernet 1/0/1
switchport mode trunk
switchport trunk allowed vlan 34
exit
interface ethernet 1/0/2
switchport mode trunk
switchport trunk allowed vlan 45
exit



#SW5

configure terminal
prompt SW5
vlan 45
exit
interface ethernet 1/0/1
switchport mode trunk
switchport trunk allowed vlan 45
exit



Step 2 : Create IP version 4 interfaces with the corresponding VLANs.
#SW2

configure terminal
interface vlan 1
ip address 172.16.12.2 255.255.255.0
exit
interface vlan 23
ip address 172.16.23.2 255.255.255.0
exit



#SW3

configure terminal
interface vlan 23
ip address 172.16.23.3 255.255.255.0
exit
interface vlan 34
ip address 172.16.34.3 255.255.255.0
exit



#SW4

configure terminal
interface vlan 34
ip address 172.16.34.4 255.255.255.0
exit
interface vlan 45
ip address 172.16.45.4 255.255.255.0
exit



#SW5

configure terminal
interface vlan 45
ip address 172.16.45.5 255.255.255.0
exit
interface vlan 1
ip address 172.16.56.5 255.255.255.0
exit



Step 3 : Apply OSPF version 2 for IP routing on the connected interfaces, all interfaces are resident in Backbone (Area 0.0.0.0). SW2 has Router ID 2.2.2.2, SW3 has Router ID 3.3.3.3, SW4 has Router ID 4.4.4.4 and SW5 has Router ID 5.5.5.5.



#SW2

configure terminal
router ospf 1
router-id 2.2.2.2
network 172.16.12.0 255.255.255.0 area 0.0.0.0
network 172.16.23.0 255.255.255.0 area 0.0.0.0
exit



#SW3

configure terminal
router ospf 1
router-id 3.3.3.3
network 172.16.23.0 255.255.255.0 area 0.0.0.0
network 172.16.34.0 255.255.255.0 area 0.0.0.0
exit



#SW4

configure terminal
router ospf 1
router-id 4.4.4.4
network 172.16.34.0 255.255.255.0 area 0.0.0.0
network 172.16.45.0 255.255.255.0 area 0.0.0.0
exit



#SW5

configure terminal
router ospf 1
router-id 5.5.5.5
network 172.16.45.0 255.255.255.0 area 0.0.0.0
network 172.16.56.0 255.255.255.0 area 0.0.0.0
exit




Step 3 : Enable MPLS Global mode and on the specific interface. 

#SW2

configure terminal
mpls ip
mpls label protocol ldp
interface vlan 23
mpls ip 
mpls label protocol ldp
exit


#SW3

configure terminal
mpls ip
mpls label protocol ldp
interface vlan 23
mpls ip
mpls label protocol ldp
exit
interface vlan 34
mpls ip
mpls label protocol ldp
exit






#SW4

configure terminal
mpls ip
mpls label protocol ldp
interface vlan 34
mpls ip
mpls label protocol ldp
exit
interface vlan 45
mpls ip
mpls label protocol ldp
exit



#SW5

configure terminal
mpls ip
mpls label protocol ldp
interface vlan 45
mpls ip
mpls label protocol ldp
exit



[Verification]
Test 1: Ping IXIA6 IP 172.16.56.100 from IXIA1 (Implicit-Null Mode)
After building the environment, we sniffer the ICMP packet on the below segment: 

SW2 -> SW3, SW3 -> SW4 and SW4 -> SW5 

Then, using IXIA1 ping to IXIA6, 
   
1) SW2 -> SW3: 

When the ICMP echo packet enter the SW2, it will check the MPLS forwarding table:
 
 How to configure MPLS command on DGS-3630_002


Since the destination network is 172.16.56.0/24, it will tag label 1000 and push it out. 


We can see some information in the packet via sniffer.   

MPLS label: 1000
MPLS Bottom of Label Stack: 1 
MPLS TTL: 63
IPv4 TTL: 63
How to configure MPLS command on DGS-3630_003

2) SW3 -> SW4: 

When the ICMP echo packet which label is 1000 ingress to the SW3, it will check the MPLS forwarding table:
How to configure MPLS command on DGS 3630_004
How to configure MPLS command on DGS 3630_005

Since the destination network is 172.16.56.0/24 and In label is 1000, it will swap the label to  1000 and push it out to SW4.

We can see some information in the packet via sniffer.   

MPLS label: 1000
MPLS Bottom of Label Stack: 1 
MPLS TTL: 62 (MPLS TTL will minus 1 to 62)  
IPv4 TTL: 63 (L3 TTL will keep the value) 

How to configure MPLS command on DGS-3630_006

3) SW4 -> SW5:

When the ICMP echo packet which label is 1000 ingress to the SW4, it will check the MPLS forwarding table:
How to configure MPLS command on DGS-3630_007

How to configure MPLS command on DGS-3630_008

Since the destination network is 172.16.56.0/24 and In label is 1000, it will pop and untag the label 1000 due to the PHP feature. (Penultimate Hop Popping) and forward it to SW5.
#Note. The last hop router is SW5 for the destination network 172.16.56.0/24. 

We can see some information in the packet via sniffer.   

MPLS label: Removed
IPv4 TTL: 63 (L3 TTL will minus to 61) 
How to configure MPLS command on DGS-3630_009

After receiving the ICMP echo packet on SW5, SW5 will find the L3 Routing table and know the destination address belongs to its local network (172.16.56.0/24).   

#Note. Due to no label tagged on ICMP echo packet, SW5 will search on L3 routing table, not MPLS forwarding table.   

Test 2: Ping IXIA6 IP 172.16.56.100 from IXIA1 (Explicit-Null Mode) 

For now, we change the mode to “Explicit-Null” on SW5, 
please configure the below commands on SW5.

#SW5

configure terminal
mpls configuration 
explicit-null


The LDP process will restart on SW5.  
After LDP restart, we can see destination network 172.16.56.0/24 which “Out Label would be 0” on SW4 & SW5. 

It means that label 1000 of packet which is destination network 172.16.56.0/24 will not be removed when egress from SW4 to SW5, and will be swapped to label 0. 

How to configure MPLS command on DGS-3630_011

SW4 -> SW5:

We can see some information in the packet via sniffer.   

MPLS label: 0
MPLS Bottom of Label Stack: 1 
MPLS TTL: 61 (MPLS TTL will minus 1)  
IPv4 TTL: 63 (L3 TTL will keep the value) 
How to configure MPLS command on DGS-3630_012

[Question]

Q1) Why do we need to implement PHP on SWs?

Ans: PHP is penultimate hop popping which means remove the label one hop before its destination. It refers to the process whereby the outermost label of an MPLS tagged packet is removed by a Label Switch Router(LSR) before the packet is passed to an adjacent Label Edge Router.

To avoid this extra work on the very last (ultimate) LSR (e.g. SW5), 
MPLS uses a feature called penultimate hop popping (PHP). (Penultimate simply means “1 less than the ultimate.”) 
So, the penultimate hop is not the very last LSR to process a labeled packet, but the second-to-last LSR (SW4) to process a labeled packet. 
PHP causes the penultimate-hop LSR (SW4) to pop the outer label, so that the last LSR(SW5)—the ultimate hop if you will—receives a packet without MPLS label. 
the egress PE(SW5) don't need to remove the label and just look up only from the routing table.



Q2) Why do we need to use Explicit-Null Mode on SW5?

Ans: The answer is Class of Service.
When a packet forward to penultimate LSR (SW4), SW4 will not pop the outer label, 
but swap the label, used between the penultimate LSR (SW4), and last LSR SW5 (called the egress LSR).
When a packet or Ethernet frame is encapsulated in MPLS, you have the option of copying the IP precedence or 802.1p bits to the three CoS bits of the MPLS header (called the Experimental or EXP bits), so that the MPLS LSP provides the same CoS behavior, or you can set the EXP bits independently, so that the LSP CoS behavior has a designated CoS behavior that is independent of any encapsulated payload.

 
Rank: 1.5