Physical Ports - Cisco Catalyst 2960 Command Reference Manual

Hide thumbs Also See for Catalyst 2960:
Table of Contents

Advertisement

Chapter 2
Catalyst 2960 Switch Cisco IOS Commands
policy-map
Only one policy map per ingress port is supported. You can apply the same policy map to multiple

physical ports.

You can apply policy maps to physical ports. A policy map is the same as a port-based policy map.
Examples
This example shows how to create a policy map called policy1. When attached to the ingress port, it
matches all the incoming traffic defined in class1, sets the IP DSCP to 10, and polices the traffic at an
average rate of 1 Mbps 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 multiple classes in a policy map called policymap2:
Switch(config)# policy-map policymap2
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
Switch(config-pmap)# class class2
Switch(config-pmap-c)# trust dscp
Switch(config-pmap-c)# police 1000000 20000 exceed-action drop
Switch(config-pmap-c)# exit
Switch(config-pmap)# class class3
Switch(config-pmap-c)# set dscp 0 (no policer)
Switch(config-pmap-c)# exit
This example shows how to create a hierarchical policy map and attach it to an SVI:
Switch(config)# class-map cm-non-int
Switch(config-cmap)# match access-group 101
Switch(config-cmap)# exit
Switch(config)# class-map cm-non-int-2
Switch(config-cmap)# match access-group 102
Switch(config-cmap)# exit
Switch(config)# class-map cm-test-int
Switch(config-cmap)# match input-interface gigabitethernet0/2 - gigabitethernet0/3
Switch(config-cmap)# exit
Switch(config)# policy-map pm-test-int
Switch(config-pmap)# class cm-test-int
Switch(config-pmap-c)# police 18000000 8000 exceed-action drop
Switch(config-pmap-c)# exit
Switch(config-pmap)# exit
Switch(config)# policy-map pm-test-pm-2
Switch(config-pmap)# class cm-non-int
Switch(config-pmap-c)# set dscp 7
Switch(config-pmap-c)# service-policy pm-test-int
Switch(config-pmap)# class cm-non-int-2
Switch(config-pmap-c)# set dscp 15
Switch(config-pmap-c)# service-policy pm-test-int
Switch(config-pmap-c)# end
Switch(config-cmap)# exit
Switch(config)# interface vlan 10
Switch(config-if)# service-policy input pm-test-pm-2
Catalyst 2960 Switch Command Reference
2-222
78-16882-01

Advertisement

Table of Contents
loading

Table of Contents