OcNOS-DC 6.4.2 : Quality of Service Guide : Quality of Service Configuration Guide : Shaping Configuration
Shaping Configuration
This chapter contains a complete sample of configuring Shaping.
Topology
Simple configuration of Shaping
L2/L3 Interface
The following steps describe how to configure Shaping.
 
#configure terminal
Enter configure mode.
(config)#qos enable
Enable QoS globally.
(config)#qos statistics
Enable QoS statistics.
(config)#policy-map type queuing default P1
Configure policy-map of type queuing with name P1, and enter into policy-map mode
(config-pmap-que)#class type queuing default q0
Configure class type queuing of type default and enter into class map configuration mode
(config-pmap-c-que)#shape 200 mbps
Configure shaping to 200 mbps
(config-pmap-c-que)#exit
Exit out of policy-class mode
(config-pmap-que)#exit
Exit out of Policy-map mode
(config)#class-map type qos c1
Enter Class-map mode
(config-cmap-qos)#match dscp 10
Configure match criteria as dscp 10
(config-cmap-qos)#match cos 3
Configure match criteria as cos 3
(config-cmap-qos)#exit
Exit out of class-map mode
(config)#class-map type qos c2
Enter Class-map mode
(config-cmap-qos)#match dscp 22
Configure match criteria as dscp 22
(config-cmap-qos)#match cos 4
Configure match criteria as cos 4
(config-cmap-qos)#exit
Exit out of class-map mode
(config)#policy-map type qos pmap1
Configure policy-map with name pmap1 and enter policy-map mode
(config-pmap-qos)#class type qos c1
Assign Class c1 to Policy-map pmap1
(config-pmap-c-qos)#set queue 2
Set queue 2 for frames with either cos 3 or dscp 10
(config-pmap-c-qos)#exit
Exit out of pmap-c mode
(config-pmap-qos)#class type qos c2
Assign Class c2 to Policy-map pmap1
(config-pmap-c-qos)#set queue 3
Set queue 3 for frames with either cos 4 or dscp 22
(config-pmap-c-qos)#exit
Exit out of pmap-c mode
(config-pmap-qos)#exit
Exit policy-map mode
(config)#interface xe3
Enter interface mode
(config-if)#service-policy type queuing output P1
Attach service-policy P1 of type queuing on out direction
(config-if)#exit
Exit out of interface mode
(config)#interface xe2
Enter interface mode
(config-if)#service-policy type qos input pmap1
Attach service-policy pmap1 of type qos on in direction
(config-if)#exit
Exit out of interface mode
(config)#bridge 1 protocol rstp vlan-bridge
Specify VLAN for bridge 1.
(config)#vlan database
Enter the VLAN configuration mode.
(config-vlan)#vlan 2-3 bridge 1 state enable
Enable VLAN (2-3) on bridge 1. Specifying the enable state.
(config-vlan)#exit
Exit the VLAN configuration mode.
(config)#interface vlan1.2
Enter interface mode.
(config-if)# ip address 10.1.1.2/24
Configure the IP address.
(config-if)#exit
Exit the interface mode.
(config)#interface vlan1.3
Enter interface mode.
(config-if)# ip address 20.1.1.1/24
Configure the IP address.
(config-if)#exit
Exit the interface mode.
(config)#interface xe2
Enter interface mode.
(config-if)#switchport
Configure xe2 as a Layer 2 port.
(config-if)#bridge-group 1
Associate the interface with bridge group 1.
(config-if)#switchport mode trunk
Configure port as a trunk.
(config-if)#switchport trunk allowed vlan all
Allow all the VLANs on the xe3 interface.
(config-if)#exit
Exit the interface mode.
(config)#interface xe3
Enter interface mode.
(config-if)#switchport
Configure xe3 as a Layer 2 port.
(config-if)#bridge-group 1
Associate the interface with bridge group 1.
(config-if)#switchport mode trunk
Configure port as a trunk.
(config-if)#switchport trunk allowed vlan all
Allow all the VLANs on the xe3 interface.
(config-if)#exit
Exit the interface mode
Validation
Enter the commands listed in the sections below to confirm the configurations.
#show policy-map type queuing
 
Type queuing policy-maps
========================
 
policy-map type queuing default P1
class type queuing default q0
shape 200 mbps
priority
class type queuing default q1
priority
class type queuing default q2
priority
class type queuing default q3
priority
class type queuing default q4
priority
class type queuing default q5
priority
class type queuing default q6
priority
class type queuing default q7
priority
 
policy-map type queuing default default-out-policy
class type queuing default q0
priority
exit
class type queuing default q1
priority
exit
class type queuing default q2
priority
exit
class type queuing default q3
priority
exit
class type queuing default q4
priority
exit
class type queuing default q5
priority
exit
class type queuing default q6
priority
exit
class type queuing default q7
priority
exit
 
 
#show policy-map type qos
Type qos policy-maps
====================
 
policy-map type qos pmap1
class type qos c1
set queue 2
exit
class type qos c2
set queue 3
exit
 
#show class-map type queuing
 
Type queuing class-maps
=======================
class-map type queuing q0
 
class-map type queuing q1
 
class-map type queuing q2
 
class-map type queuing q3
 
class-map type queuing q4
 
class-map type queuing q5
 
class-map type queuing q6
 
class-map type queuing q7
 
#show class-map type qos
Type qos class-maps
===================
class-map type qos match-all c1
match cos 3
match dscp af11
 
class-map type qos match-all c2
match cos 4
match dscp af23
 
#show queuing interface xe2
 
Egress Queuing for Ethernet xe2 [System]
----------------------------------------------------------------------------------------------------
L0 L1 L2 Group PrioLevel Shape Bandwidth
----------------------------------------------------------------------------------------------------
q0 - High 200 mbps -
q1 - High - -
q2 - High - -
q3 - High - -
q4 - High - -
q5 - High - -
q6 - High - -
q7 - High - -
 
#show queuing interface xe3
 
Egress Queuing for Ethernet xe3 [System]
---------------------------------------------------------------------------------------
L0 L1 L2 Group PrioLevel Shape Bandwidth
---------------------------------------------------------------------------------------
q0 - High - -
q1 - High - -
q2 - High - -
q3 - High - -
q4 - High - -
q5 - High - -
q6 - High - -
q7 - High - -
 
#show policy-map interface xe3
 
Interface xe3
Type QoS statistics status : enabled
 
Class-map (qos): c1 (match all)
match dscp af11
match cos 3
set queue 2
 
Class-map (qos): c2 (match all)
match dscp af23
match cos 4
set queue 3
 
 
Type Queuing policy-map : default-out-policy
 
Class-map (queuing): q0
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q1
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q2
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q3
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q4
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q5
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q6
priority
output : 6 packets, 724 bytes
dropped : 0 packets, 0 bytes
 
Class-map (queuing): q7
priority
output : 0 packets, 0 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 : 1 packets, 90 bytes
dropped : 0 packets, 0 bytes
 
Wred/Tail Drop Statistics :
----------------------
green : 0 packets
yellow : 0 packets
red : 0 packets