Syntax
This command is used for creating a new MAC class with a given name. The name will be used when configuring the policy to associate a class with a given action. Upon configuring a class the user will be placed into the class context to configure the rules.
|
|
NOTE: The command |
|
|
Syntax
Syntax
[no]
SEQ_NUM
match|ignore
any|host
SRC-MAC|SRC-MAC SRC-MAC-MASK
any|host
SRC-MAC|SRC-MAC SRC-MAC-MASK
any|
vlanETHERTYPE
cosCOS
vlan_id
A class is composed of entries that describe the traffic that is to be matched and ignored. Later when the class is added to a policy an action can be applied to the matched traffic. Traffic that is ignored will exclude the traffic from the rest of the policy and take no action. A class can be composed of many entries and these entries are processed in sequence number order.
SOURCE MAC
DESTINATION MAC
ETHERTYPE
OPTIONS
Match packets with a specified 802.1Q Priority Code Point value.
Match packets with a specified 802.1Q Priority Code Point value.
Configuring a basic rule to match ARP traffic
(config)# class mac “mac-class-1” (config-class)# match any any arp
A policy is used to associate a class with an action. The policy is not active until it is applied to an interface. Also a policy that contains no entries will have no effect on the traffic. The available actions of a policy will differ depending on the type of policy that is configured. Mac classes are only valid with QoS and Mirror policies. After creating a policy the user is placed in that policies context in order to add, remove or modify entries in the policy. A policy can contain many entries that provide same or different actions for a class.
Syntax
Syntax
The mirror policy context is used to associate classes with a mirror actions. After creating a policy the user is placed in the mirror policy context. Traffic that matches the rules inside the class will be mirrored using the associated mirror instance. Traffic that matches an ignore rule will not be mirrored. Traffic that does not match any entries will have the default-mac-class action applied. MAC classes cannot be configured in the same policy with IPv4 and IPv6 classes. The default-class is to be used with policies that contain IPv4 and IPv6 classes whereas the default-mac-class is to be used with MAC classes.
|
|
NOTE: The mirror action can be matched multiple times for the number of mirror sessions available. If there are a max of 4 mirror sessions available it’s possible to have 4 mirror actions associated with a single class. |
|
|
Syntax
The default-mac-class is used to apply an action to the packets that are neither matched nor ignored by any class associated with the mirror policy. The default MAC class is used in a policy that contains only MAC classes.
Create a Mirror policy with a default MAC class
(config)# policy mirror “mirror-policy-1” (policy-mirror)# default-mac-class action mirror 1
NOTE: The default-mac-class is to only be used in a policy that contains MAC classes.
Syntax
Syntax
The QoS policy context is used to associate classes with policy actions. One is placed in this context after creating a QoS policy. Traffic that matches the rules in the class will have the specified QoS action applied. Traffic that matches an ignore statement in the class will not have an action applied. Traffic that does not match any entries will have the default-mac-class action applied. MAC classes cannot be configured in the same policy with IPv4 and IPv6 classes. The default-class is to be used with policies that contain IPv4 and IPv6 classes whereas the default-mac-class is to be used with MAC classes.
DSCP OPTIONS
IP-PRECEDENCE OPTIONS
<0-7> |
routine |
priority |
immediate |
flash |
flash-override |
critical |
internet |
network |
PRIORITY Options
<0-7> Enter an integer number. |
RATE-LIMIT Options
kbps Specify the rate limit in kilobits per second. |
Create a QoS policy that rate remarks a packet
(config)# policy qos “qos-policy-1” (policy-qos)# class mac mac-class-1 action dscp ef
Create a QoS policy that rate limits traffic
(config)# policy qos “qos-policy-1” (policy-qos)# class mac mac-class-1 action rate-limit kbps 1000
|
|
NOTE: The dscp and ip-precedence actions set the same set of bits in the IP header. |
|
|
Syntax
The default-mac-class is used to apply an action to the packets that are neither matched nor ignored by any class associated with the mirror policy. The default MAC class is used in a policy that contains only MAC classes.
Create a QoS policy with a default MAC class
(config)# policy qos “qos-policy-1” (policy-qos)# default-mac-class action dscp af11
|
|
NOTE: The default-mac-class is to only be used in a policy that contains MAC classes. |
|
|
Syntax
The remark command allows for a comment to be inserted into the policy at the specified sequence number. If no sequence number is given it will be added to the end of the list. Remarks consume the sequence number that they are given and will remain in order if the policy is resequenced.
Add a remark to a mirror policy
(config)# policy qos “qos-policy-1” (policy-qos)# 100 remark “Add user specific rules above this point”
|
|
NOTE: A policy does not perform any action until it is applied to an interface. A policy that contains MAC classes can be applied to a port, trunk, or VLAN. The interface and direction of the application determine where in the flow of traffic through the switch that the traffic will be compared with the policies entries. |
|
|
Syntax
A policy does not perform any action until it is applied to an interface. A policy that contains MAC classes can be applied to a port, trunk, or VLAN. The interface and direction of the application determine where in the flow of traffic through the switch that the traffic will be compared with the policies entries.
Apply a QoS policy to the inbound direction of a port
(config)# interface a1 (eth-A1)# service-policy qos-policy-1 inApply a QoS policy to the inbound direction of a VLAN
(config)# vlan 10 (vlan-10)# service-policy qos-policy-2 in