Dual Policy

Dual policy enables support for two output policies. The output policies are based on traffic class and qos-group. Traffic class is used for queue selection and queuing policy. Qos-group is used for marking policies.

This chapter provides the conceptual and configuration details for dual policy.

Dual Policy

To achieve QoS Egress marking/queuing, the Cisco NCS 4000 Series Routers utilize the dual policy model on egress with independent policies for marking and queuing.

Egress marking can be achieved by applying a policy-map on the ingress interface. Similarly, egress queuing can be achieved by applying a policy-map on the ingress interface by setting the traffic-class. Then the traffic-class is used by the egress-policy map to perform queuing actions.

Cisco NCS 4000 Series router supports dual policies on a single interface (egress only).

QoS Egress Marking and Queueing is summarised as below:

  • Configure an ingress policy-map

    Create a class-map
    Router#config
    Router(config)#class-map match-any cos2
    Router(config-cmap)#match cos 2
    Router(config-cmap)#commit
    Router(config)#class-map match-any cos3
    Router(config-cmap)#match cos 3
    Router(config-cmap)#commit
    Router(config)#class-map match-any cos4
    Router(config-cmap)#match cos 4
    Router(config-cmap)#commit
    
    Create classification policies
    Router#config
    Router(config)#policy-map ingress-classification 
    Route(config-pmap)#class cos 2 
    Router(config-pmap-c)#set qos-group 1
    Router(config-pmap-c)#set traffic-class 3
    Router(config-pmap-c)#class cos3
    Router(config-pmap-c)#set qos-group 2
    Router(config-pmap-c)#set traffic-class 5
    Router(config-pmap-c)#class cos4
    Router(config-pmap-c)#set qos-group 3
    Router(config-pmap-c)#set traffic-class 4
    Router(config-pmap-c)#class class-default
    Router(config-pmap-c)#set qos-group 7
    Router(config-pmap-c)#set traffic-class 6
    Router(config-pmap-c)#commit
  • Configure an egress policy-map

    Create egress marking policy
    Router#config
    Router(config)#class-map match-any qos1
    Router(config-cmap)#match qos-group 1 
    Router(config-cmap)#commit
    Router(config)#class-map match-any qos2
    Router(config-cmap)#match qos-group 2 
    Router(config-cmap)#commit
    Router(config)#class-map match-any qos3
    Router(config-cmap)#match qos-group 3 
    Router(config-cmap)#commit
    Router#config
    Router(config)#policy-map egress-marking
    Route(config-pmap)#class qos1
    Router(config-pmap-c)#set cos 1
    Router(config-pmap-c)#class qos2
    Router(config-pmap-c)#set cos 2
    Router(config-pmap-c)#set dei 1
    Router(config-pmap-c)#class qos3
    Router(config-pmap-c)#set cos 3
    Router(config-pmap-c)#class class-default
    Router(config-pmap-c)#set cos 7
    Router(config-pmap-c)#commit
    
    Create Egress queueing policy
    Router#config
    Router(config)#class-map match-any tc3   
    Router(config-cmap)#match traffic-class 3   
    Router(config-cmap)#commit
    Router(config)#class-map match-any tc4
    Router(config-cmap)#match traffic-class 3   
    Router(config-cmap)#commit
    Router(config)#class-map match-any tc5
    Router(config-cmap)#match traffic-class 3   
    Router(config-cmap)#commit
    Router#config
    Router(config)#policy-map egress-queuing
    Route(config-pmap)#class tc3
    Router(config-pmap-c)#shape average 2 mbps
    Router(config-pmap-c)#class tc4
    Router(config-pmap-c)#shape average 5 mbps
    Router(config-pmap-c)#class tc5 
    Router(config-pmap-c)#shape average 7 mbps
    Router(config-pmap-c)#class class-default
    Router(config-pmap-c)#commit
  • Attach the policies to an interface

    
    Router#config
    Router(config)#interface tenGigE 0/0/1/0/0 
    Router(config-if)#service-policy input ingress-classification 
    Router(config-if)#service-policy output egress-marking 
    Router(config-if)#service-policy output egress-queuing  
    Router(config-if)#commit