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 PE1, P and PE2
PE1
NSM
 
#configure terminal
Enter the configure mode.
(config)#interface xe2
Specify the interface (xe2) 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 xe2
(config-if)#exit
Exit the 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
(config-router)#exit
Exit the router mode.
(config)#interface xe2
Enter the interface mode.
(config-if)#enable-ldp ipv4
Enable the LDP on xe2
(config-if)#exit
Exit the interface mode
P
The following steps describe how to configure the router P.
NSM
 
#configure terminal
Enter the configure mode.
(config)#interface xe2
Specify the interface (xe2) 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 xe2
(config-if)#exit
Exit the interface mode.
(config)#interface xe1
Specify the interface (xe1) 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 xe1
(config-if)#exit
Exit the 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 the interface mode.
OSPF
 
#configure terminal
Enter the 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 the from router mode
LDP
 
#configure terminal
Enter the configure mode
(config)#router ldp
Enter the 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
(config-router)#exit
Exit the router mode
(config)#interface xe2
Enter the interface mode
(config-if)#enable-ldp ipv4
Enable the LDP on xe1
(config-if)#exit
Exit the interface mode
(config)#interface xe2
Enter the interface mode
(config-if)#enable-ldp ipv4
Enable LDP on xe2
(config-if)#exit
Exit the interface mode
PE2
The following steps describe how to configure router PE2.
NSM
 
#configure terminal
Enter the configure mode
(config)#interface xe1
Specify the interface (xe1) 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 xe1
(config-if)#exit
Exit the 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 the 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 the router mode
LDP
 
#configure terminal
Enter the configure mode
(config)#router ldp
Enter the 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
(config-router)#exit
Exit the router mode
(config)#interface xe1
Enter the interface mode
(config-if)#enable-ldp ipv4
Enable the LDP on xe1
(config-if)#exit
Exit the 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 P
 
#configure terminal
Enter the configure mode
(config)#qos enable
Enable QoS
(config)#qos statistics
Enable QoS statistics
(config)#qos profile exp-to-queue default
Configure global exp to queue map
(config-ingress-exp-queue-map)#exp 5 queue 7
Map exp value 5 to class 7
Validation
P:
#show qos-profile default
profile name: default
profile type: queue-to-exp
configured mapping:
Detailed mapping:
 
INPUT | OUTPUT
-------+----------
TC | EXP
-------+----------
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
 
profile name: default
profile type: exp-to-queue
configured mapping:
Detailed mapping:
-------+-----------------
INPUT | OUTPUT
-------+-----------------
EXP | TC | Color
-------+--------+--------
0 0 green
1 1 green
2 2 green
3 3 green
4 4 green
5 7 green
6 6 green
7 7 green
 
Interface level configuration for P
 
#configure terminal
Enter the configure mode
(config)#qos enable
Enable the QoS
(config)#qos statistics
Enable the QoS statistics
(config)#mpls lsp-model uniform
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 the class map mode
(config)#policy-map pmap2
Enter the 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 xe2
Enter xe2 interface
(config-if)#service-policy type qos input pmap2
Assign service-policy to interface on in-direction
(config-if)#exit
Exit interface mode
Validation:
P#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
============================
 
P#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
 
 
P#show running-config qos
qos enable
qos statistics
!
qos profile exp-to-queue default
exp 5 queue 7
!
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 qos-profile default
profile name: default
profile type: queue-to-exp
configured mapping:
Detailed mapping:
 
INPUT | OUTPUT
-------+----------
TC | EXP
-------+----------
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
 
profile name: default
profile type: exp-to-queue
configured mapping:
Detailed mapping:
-------+-----------------
INPUT | OUTPUT
-------+-----------------
EXP | TC | Color
-------+--------+--------
0 0 green
1 1 green
2 2 green
3 3 green
4 4 green
5 7 green
6 6 green
7 7 green
 
P# show policy-map interface
 
xe2 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