11.07.2015 Views

Catalyst 3750-E and 3560-E Switch Cisco IOS ... - DNIP . NET

Catalyst 3750-E and 3560-E Switch Cisco IOS ... - DNIP . NET

Catalyst 3750-E and 3560-E Switch Cisco IOS ... - DNIP . NET

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

policy-mapChapter 2<strong>Catalyst</strong> <strong>3750</strong>-E <strong>and</strong> <strong>3560</strong>-E <strong>Switch</strong> <strong>Cisco</strong> <strong>IOS</strong> Comm<strong>and</strong>sYou can apply a nonhierarchical policy maps to physical ports or to SVIs. A nonhierarchical policy mapis the same as a port-based policy maps in <strong>Catalyst</strong> <strong>3750</strong> <strong>and</strong> <strong>3560</strong> switches. However, you can onlyapply a hierarchical policy map to SVIs.A hierarchical policy map has two levels. The first level, the VLAN level, specifies the actions to betaken against a traffic flow on an SVI. The second level, the interface level, specifies the actions to betaken against the traffic on the physical ports that belong to the SVI <strong>and</strong> are specified in theinterface-level policy map.In a primary VLAN-level policy map, you can only configure the trust state or set a new DSCP or IPprecedence value in the packet. In a secondary interface-level policy map, you can only configureindividual policers on physical ports that belong to the SVI.After the hierarchical policy map is attached to an SVI, an interface-level policy map cannot be modifiedor removed from the hierarchical policy map. A new interface-level policy map also cannot be added tothe hierarchical policy map. If you want these changes to occur, the hierarchical policy map must firstbe removed from the SVI.For more information about hierarchical policy maps, see the “Policing on SVIs” section in the“Configuring QoS” chapter of the software configuration guide for this release.ExamplesThis example shows how to create a policy map called policy1. When attached to the ingress port, itmatches all the incoming traffic defined in class1, sets the IP DSCP to 10, <strong>and</strong> polices the traffic at anaverage rate of 1 Mb/s <strong>and</strong> bursts at 20 KB. Traffic exceeding the profile is marked down to a DSCPvalue gotten from the policed-DSCP map <strong>and</strong> then sent.<strong>Switch</strong>(config)# policy-map policy1<strong>Switch</strong>(config-pmap)# class class1<strong>Switch</strong>(config-pmap-c)# set dscp 10<strong>Switch</strong>(config-pmap-c)# police 1000000 20000 exceed-action policed-dscp-transmit<strong>Switch</strong>(config-pmap-c)# exitThis example shows how to configure multiple classes in a policy map called policymap2:<strong>Switch</strong>(config)# policy-map policymap2<strong>Switch</strong>(config-pmap)# class class1<strong>Switch</strong>(config-pmap-c)# set dscp 10<strong>Switch</strong>(config-pmap-c)# police 100000 20000 exceed-action policed-dscp-transmit<strong>Switch</strong>(config-pmap-c)# exit<strong>Switch</strong>(config-pmap)# class class2<strong>Switch</strong>(config-pmap-c)# trust dscp<strong>Switch</strong>(config-pmap-c)# police 100000 20000 exceed-action drop<strong>Switch</strong>(config-pmap-c)# exit<strong>Switch</strong>(config-pmap)# class class3<strong>Switch</strong>(config-pmap-c)# set dscp 0 (no policer)<strong>Switch</strong>(config-pmap-c)# exitThis example shows how to create a hierarchical policy map <strong>and</strong> attach it to an SVI:<strong>Switch</strong>(config)# class-map cm-non-int<strong>Switch</strong>(config-cmap)# match access-group 101<strong>Switch</strong>(config-cmap)# exit<strong>Switch</strong>(config)# class-map cm-non-int-2<strong>Switch</strong>(config-cmap)# match access-group 102<strong>Switch</strong>(config-cmap)# exit<strong>Switch</strong>(config)# class-map cm-test-int<strong>Switch</strong>(config-cmap)# match input-interface gigabitethernet2/0/2 - gigabitethernet2/0/3<strong>Switch</strong>(config-cmap)# exit<strong>Switch</strong>(config)# policy-map pm-test-int<strong>Switch</strong>(config-pmap)# class cm-test-int<strong>Switch</strong>(config-pmap-c)# police 18000000 8000 exceed-action drop2-432<strong>Catalyst</strong> <strong>3750</strong>-E <strong>and</strong> <strong>3560</strong>-E <strong>Switch</strong> Comm<strong>and</strong> ReferenceOL-9776-08

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!