Cisco Catalyst 3560-X Command Reference Manual page 120

Hide thumbs Also See for Catalyst 3560-X:
Table of Contents

Advertisement

class
Examples
Catalyst 3750-X and 3560-X Switch Command Reference
2-88
Downloaded from
www.Manualslib.com
The class command performs the same function as the class-map global configuration command. Use
the class command when a new classification, which is not shared with any other ports, is needed. Use
the class-map command when the map is shared among many ports.
You can configure a default class by using the class class-default policy-map configuration command.
Unclassified traffic (traffic that does not meet the match criteria specified in the traffic classes) is treated
as default traffic.
This example shows how to create a policy map called policy1. When attached to the ingress direction,
it matches all the incoming traffic defined in class1, sets the IP Differentiated Services Code Point
(DSCP) to 10, and polices the traffic at an average rate of 1 Mb/s and bursts at 20 KB. Traffic exceeding
the profile is marked down to a DSCP value gotten from the policed-DSCP map and then sent.
Switch(config)# policy-map policy1
Switch(config-pmap)# class class1
Switch(config-pmap-c)# set dscp 10
Switch(config-pmap-c)# police 1000000 20000 exceed-action policed-dscp-transmit
Switch(config-pmap-c)# exit
This example shows how to configure a default traffic class to a policy map:
Switch# configure terminal
Switch(config)# class-map cm-3
Switch(config-cmap)# match ip dscp 30
Switch(config-cmap)# match protocol ipv6
Switch(config-cmap)# exit
Switch(config)# class-map cm-4
Switch(config-cmap)# match ip dscp 40
Switch(config-cmap)# match protocol ip
Switch(config-cmap)# exit
Switch(config)# policy-map pm3
Switch(config-pmap)# class class-default
Switch(config-pmap-c)# set dscp 10
Switch(config-pmap-c)# exit
Switch(config-pmap)# class cm-3
Switch(config-pmap-c) set dscp 4
Switch(config-pmap-c)# exit
Switch(config-pmap)# class cm-4
Switch(config-pmap-c)# trust cos
Switch(config-pmap-c)# exit
Switch(config-pmap)# exit
You can verify your settings by entering the show policy-map privileged EXEC command.
This example shows how the default traffic class is automatically placed at the end of policy-map pm3
even though class-default was configured first:
Switch# show policy-map pm3
Policy Map pm3
Class cm-3
set dscp 4
Class cm-4
trust cos
Class class-default
set dscp 10
Switch#
manuals search engine
Chapter 2
Catalyst 3750-X and 3560-X Switch Cisco IOS Commands
OL-21522-02

Advertisement

Table of Contents
loading

This manual is also suitable for:

Catalyst 3750-x

Table of Contents