OcNOS-DC : Multi-Protocol Label Switching Guide : Multi-Protocol Label Switching Configuration Guide : Remarking Configuration
Remarking Configuration
This chapter contains a complete sample of configuring Remarking of EXP bits on interface and global level along with LDP LSP for Pipe model and Uniform model.
Configuration
Configuring Remarking for MPLS EXP bits require following configurations:
Enabling label-switching on the interface on NSM.
Configuring LSP (Using LDP, Static or RSVP-TE, in this example we are using LDP for setting UP LSP).
Running an IGP (Internal Gateway Protocol), for example, OSPF, to distribute reachability information within the MPLS cloud.
Enable QoS, Configuring Remarking on interface and Global Level.
Topology
Basic LDP Topology
OSPF and LDP Configuration for R1, R2 and R3
R1
NSM
 
#configure terminal
Enter configure mode.
(config)#interface eth1
Specify the interface (eth1) to be configured.
(config-if)#ip address 10.10.10.1/24
Configure IP address for the interface
(config-if)#label-switching
Enable label switching on interface eth1.
(config-if)#exit
Exit interface mode.
(config)#interface lo
Specify the loopback (lo) interface to be configured.
(config-if)#ip address 192.168.0.1/32
Set the IP address of the loopback interface to
192.168.0.1/32
OSPF
 
#configure terminal
Enter configure mode.
(config)#router ospf 100
Configure the routing process and specify the Process ID (100). The Process ID should be a unique positive integer identifying the routing process.
(config-router)#network 10.10.10.0/24 area 0
(config-router)#network 192.168.0.1/32 area 0
Define the interface on which OSPF runs and associate the area ID (0) with the interface.
(config-router)#exit
Exit from router mode
LDP
 
#configure terminal
Enter configure mode.
(config)#router ldp
Enter Router mode for LDP.
(config-router)#router-id 192.168.0.1
Set the router ID to IP address 192.168.0.1.
(config-router)#transport-address ipv4 192.168.0.1
Configure the transport address to be used for a TCP session over which LDP will run on an IPv4 interface.
Note: It is preferable to use the loopback address as transport address.
(config-router)#exit
Exit router mode.
(config)#interface eth1
Enter interface mode.
(config-if)#enable-ldp ipv4
Enable LDP on eth1.
(config-if)#exit
Exit interface mode.
R2
NSM
 
#configure terminal
Enter configure mode.
(config)#interface eth1
Specify the interface (eth1) to be configured.
(config-if)#ip address 10.10.10.2/24
Configure IP address for the interface
(config-if)#label-switching
Enable label switching on interface eth1.
(config-if)#exit
Exit interface mode.
(config)#interface eth2
Specify the interface (eth2) to be configured.
(config-if)#ip address 10.10.11.1/24
Configure IP address for the interface
(config-if)#label-switching
Enable label switching on interface eth1.
(config-if)#exit
Exit interface mode.
(config)#interface lo
Specify the loopback (lo) interface to be configured.
(config-if)#ip address 192.168.0.2/32
Set the IP address of the loopback interface to 192.168.0.2/32
(config-if)#exit
Exit interface mode.
OSPF
 
#configure terminal
Enter configure mode.
(config)#router ospf 100
Configure the routing process and specify the Process ID (100). The Process ID should be a unique positive integer identifying the routing process.
(config-router)#network 10.10.10.0/24 area 0
(config-router)#network 10.10.11.0/24 area 0
(config-router)#network 192.168.0.2/32 area 0
Define the interface on which OSPF runs and associate the area ID (0) with the interface.
(config-router)#exit
Exit from router mode
LDP
 
#configure terminal
Enter configure mode.
(config)#router ldp
Enter Router mode for LDP.
(config-router)#router-id 192.168.0.2
Set the router ID to IP address 192.168.0.2.
(config-router)#transport-address ipv4 192.168.0.2
Configure the transport address to be used for a TCP session over which LDP will run on an IPv4 interface.
Note: It is preferable to use the loopback address as transport address.
(config-router)#exit
Exit router mode.
(config)#interface eth1
Enter interface mode.
(config-if)#enable-ldp ipv4
Enable LDP on eth1.
(config-if)#exit
Exit interface mode.
(config)#interface eth2
Enter interface mode.
(config-if)#enable-ldp ipv4
Enable LDP on eth2.
(config-if)#exit
Exit interface mode.
R3
NSM
 
#configure terminal
Enter configure mode.
(config)#interface eth2
Specify the interface (eth2) to be configured.
(config-if)#ip address 10.10.11.2/24
Configure IP address for the interface
(config-if)#label-switching
Enable label switching on interface eth1.
(config-if)#exit
Exit interface mode.
(config)#interface lo
Specify the loopback (lo) interface to be configured.
(config-if)#ip address 192.168.0.3/32
Set the IP address of the loopback interface to 192.168.0.3/32
OSPF
 
#configure terminal
Enter configure mode.
(config)#router ospf 100
Configure the routing process and specify the Process ID (100). The Process ID should be a unique positive integer identifying the routing process.
(config-router)#network 10.10.11.0/24 area 0
(config-router)#network 192.168.0.3/32 area 0
Define the interface on which OSPF runs and associate the area ID (0) with the interface.
(config-router)#exit
Exit from router mode
LDP
 
#configure terminal
Enter configure mode.
(config)#router ldp
Enter Router mode for LDP.
(config-router)#router-id 192.168.0.3
Set the router ID to IP address 192.168.0.3.
(config-router)#explicit-null
To disable PHP.
(config-router)#transport-address ipv4 192.168.0.3
Configure the transport address to be used for a TCP session over which LDP will run on an IPv4 interface.
Note: It is preferable to use the loopback address as transport address.
(config-router)#exit
Exit router mode.
(config)#interface eth2
Enter interface mode.
(config-if)#enable-ldp ipv4
Enable LDP on eth2.
(config-if)#exit
Exit interface mode.
Configuration of Marking or Remarking
Marking/Remarking can be done in Global level and in Interface level. Both methods are shown in the following sample configurations.
Global level configuration for R2
 
#configure terminal
Enter configure mode.
(config)#qos enable
Enable QOS.
(config)#qos statistics
Enable QOS statistics.
(config)#qos map exp 5 class 7
Map exp value 5 to Class 7.
Validation
R2:
#show mpls diffserv
 
MPLS Differentiated Services EXP to CLASS mapping data:
exp 0 class 0
exp 1 class 1
exp 2 class 2
exp 3 class 3
exp 4 class 4
exp 5 class 7
exp 6 class 6
exp 7 class 7
 
MPLS Differentiated Services CLASS to EXP mapping data:
class 0 exp 0
class 1 exp 1
class 2 exp 2
class 3 exp 3
class 4 exp 4
class 5 exp 5
class 6 exp 6
class 7 exp 7
 
Interface level configuration for R2
 
#configure terminal
Enter configure mode.
(config)#qos enable
Enable QOS.
(config)#qos statistics
Enable QOS statistics.
(config)#mpls lsp-model uniform
To change the lsp model to Uniform.
(config)#class-map cmap2
Enter Class-map mode
(config-class-qos)#match mpls experimental topmost 5
Configure match EXP as EXP with Value 5
(config-class-qos)#exit
Exit Class-map mode
(config)#policy-map pmap2
Enter policy-map mode
(config-pmap-qos)#class cmap2
Assign Class cmap1 to Policy-map pmap1
(config-pmap-c-qos)#set mpls class 7
Remark EXP from EXP 2 to class 7
(config-pmap-c-qos)#exit
Exit out of policy-class-map mode
(config-pmap-qos)#exit
Exit out of Policy-map mode
(config)#interface eth1
Enter eth1 interface
(config-if)#service-policy type qos input pmap2
Assign service-policy to interface on in-direction
(config-if)#exit
Exit interface mode.
Validation:
R2#show class-map
 
Type qos class-maps
===================
class-map type qos match-any class-default
 
class-map cmap2
match mpls experimental topmost 5
 
Type queuing class-maps
=======================
class-map match-any q0
 
class-map match-any q1
 
class-map match-any q2
 
class-map match-any q3
 
class-map match-any q4
 
class-map match-any q5
 
class-map match-any q6
 
class-map match-any q7
 
Type Vlan-Queuing class-maps
============================
 
R2#show policy-map
 
Type qos policy-maps
====================
 
policy-map pmap2
class cmap2
set mpls class 7
exit
 
 
Type queuing policy-maps
========================
 
policy-map type queuing default default-out-policy
class type queuing default q0
priority level 1
exit
class type queuing default q1
priority level 1
exit
class type queuing default q2
priority level 1
exit
class type queuing default q3
priority level 1
exit
class type queuing default q4
priority level 1
exit
class type queuing default q5
priority level 1
exit
class type queuing default q6
priority level 1
exit
class type queuing default q7
priority level 1
exit
 
 
R2#show running-config qos
qos enable
!
qos map exp 5 class 7
qos statistics
!
class-map cmap2
match mpls experimental topmost 5
!
policy-map pmap2
class cmap2
set mpls class 7
exit
!
interface ce10/1
service-policy type qos input pmap2
!
 
#show mpls diffserv
 
MPLS Differentiated Services EXP to CLASS mapping data:
exp 0 class 0
exp 1 class 1
exp 2 class 2
exp 3 class 3
exp 4 class 4
exp 5 class 7
exp 6 class 6
exp 7 class 7
 
MPLS Differentiated Services CLASS to EXP mapping data:
class 0 exp 0
class 1 exp 1
class 2 exp 2
class 3 exp 3
class 4 exp 4
class 5 exp 5
class 6 exp 6
class 7 exp 7
 
R2# show policy-map interface eth2
 
Global statistics status : enabled
 
Service-policy (queuing) output: default-out-policy
-----------------------------------
Class-map (queuing): q0
priority level 1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q1
priority level 1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q2
priority level 1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q3
priority level 1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q4
priority level 1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q5
priority level 1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q6
priority level 1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q7
priority level 1
output : 22993 packets, 1563572 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q0
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q2
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q3
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q4
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q5
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q6
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): mc-q7
output : 35 packets, 2872 bytes
dropped : 0 packets, 0 bytes
 
Wred Drop Statistics :
----------------------
green : 0 packets
yellow : 0 packets
red : 0 packets
 
 
R2#