22.05.2017 Views

nx.os.and.cisco.nexus.switching.2nd.edition.1587143046

Nexus Switching 2nd Edition

Nexus Switching 2nd Edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

N7K-2(config)# ip access-list acl-match-telnet<br />

N7K-2(config-acl)# 10 permit tcp 10.100.1.0/24 eq telnet<br />

any<br />

N7K-2(config-acl)# class-map type q<strong>os</strong> match-all cm-matchtelnet<br />

N7K-2(config-cmap-q<strong>os</strong>)# match access-group name acl-matchtelnet<br />

N7K-2(config-cmap-q<strong>os</strong>)# policy-map type q<strong>os</strong> pm-matchtelnet<br />

N7K-2(config-pmap-q<strong>os</strong>)# class cm-match-telnet<br />

N7K-2(config-pmap-c-q<strong>os</strong>)# set c<strong>os</strong> 5<br />

N7K-2(config-pmap-c-q<strong>os</strong>)# int e4/1<br />

N7K-2(config-if)# service-policy input pm-match-telnet<br />

N7K-2(config-if)# end<br />

N7K-2# show policy-map interface e4/1 type q<strong>os</strong><br />

Global statistics status :<br />

enabled<br />

Ethernet4/1<br />

Service-policy (q<strong>os</strong>) input: pm-match-telnet<br />

SNMP Policy Index: 285215169<br />

N7K-2#<br />

Class-map (q<strong>os</strong>): cm-match-telnet (match-all)<br />

Match: access-group acl-match-telnet<br />

set c<strong>os</strong> 5<br />

The first step creates an access list to define the traffic you want to have the switch take an<br />

action against. Then a class map is created that refers to the access list. Next, the policy map<br />

is created, which refers to the class map <strong>and</strong> specifies the action to take. In this example, the<br />

goal is to mark the traffic with CoS 5. Finally, the last step applies the policy map to<br />

interface E4/1 for inbound traffic. The policy map can be verified by using the show policymap<br />

comm<strong>and</strong>, as shown in Example 10-1.<br />

Note<br />

It is helpful to prepend MQC entries with their function <strong>and</strong> give them meaningful<br />

names. It helps the network to be “self-documenting” <strong>and</strong> comes in h<strong>and</strong>y at 3:00 a.m.<br />

when reviewing configurations. In Example 10-1, the access control list (ACL) name<br />

is acl-match-telnet, the class map name is cm-match-telnet, <strong>and</strong> the policy map<br />

name is pm-match-telnet.

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

Saved successfully!

Ooh no, something went wrong!