C H A P T E R  7

Quality of Service (QoS) Commands

This chapter describes the Quality of Service (QoS) commands available in the FASTPATH® CLI.

The commands in this chapter are in two functional groups:

This chapter contains the following sections:


Class of Service (CoS) Commands

This section describes the commands you use to configure and view Class of Service (CoS) settings for the switch. The commands in this section allow you to control the priority and transmission rate of traffic.



Note - Commands you issue in the Interface Config mode only affect a single interface. Commands you issue in the Global Config mode affect all interfaces.


classofservice dot1p-mapping

This command maps an 802.1p priority to an internal traffic class. The <userpriority> values can range from 0-7. The <trafficclass> values range from 0-6, although the actual number of available traffic classes depends on the platform. For more information about 802.1p priority, see Provisioning (IEEE 802.1p) Commands.


Format

classofservice dot1p-mapping <userpriority> <trafficclass>

Modes

Global Config
Interface Config


no classofservice dot1p-mapping

This command maps each 802.1p priority to its default internal traffic class value.


Format

no classofservice dot1p-mapping

Modes

Global Config
Interface Config


classofservice ip-precedence-mapping

This command maps an IP precedence value to an internal traffic class. The <ip-precedence> values can range from 0-7. The <trafficclass> values can range from 0-6, although the actual number of available traffic classes depends on the platform.


Format

classofservice ip-precedence-mapping <ip-precedence> <trafficclass>

Modes

Global Config
Interface Config


no classofservice ip-precedence-mapping

This command maps each IP precedence value to its default internal traffic class value.


Format

no classofservice ip-precedence-mapping

Modes

Global Config
Interface Config


classofservice ip-dscp-mapping

This command maps an IP DSCP value to an internal traffic class. The <ipdscp> value is specified as either an integer from 0 to 63, or symbolically through one of the following keywords: af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, be, cs0, cs1, cs2, cs3, cs4, cs5, cs6, cs7, ef.

The <trafficclass> values can range from 0-6, although the actual number of available traffic classes depends on the platform.


Format

classofservice ip-dscp-mapping <ipdscp> <trafficclass>

Mode

Global Config


no classofservice ip-dscp-mapping

This command maps each IP DSCP value to its default internal traffic class value.


Format

no classofservice ip-dscp-mapping

Mode

Global Config


classofservice trust

This command sets the class of service trust mode of an interface. You can set the mode to trust one of the Dot1p (802.1p), IP DSCP, or IP Precedence packet markings. You can also set the interface mode to untrusted. If you configure an interface to use Dot1p, the mode does not appear in the output of the show running config command because Dot1p is the default.



Note - The classofservice trust dot1p command will not be supported in future releases of the software because Dot1p is the default value. Use the no classofservice trust command to set the mode to the default value.



Default

dot1p

Format

classofservice trust {dot1p | ip-dscp | ip-precedence | untrusted}

Mode

Global Config
Interface Config


no classofservice trust

This command sets the interface mode to the default value.


Format

no classofservice trust

Modes

Global Config
Interface Config


cos-queue min-bandwidth

This command specifies the minimum transmission bandwidth guarantee for each interface queue. The total number of queues supported per interface is platform specific. A value from 0-100 (percentage of link rate) must be specified for each supported queue, with 0 indicating no guaranteed minimum bandwidth. The sum of all values entered must not exceed 100.


Format

cos-queue min-bandwidth <bw-0> <bw-1> ... <bw-n>

Modes

Global Config

Interface Config

 


no cos-queue min-bandwidth

This command restores the default for each queue's minimum bandwidth value.


Format

no cos-queue min-bandwidth

Modes

Global Config

Interface Config

 


cos-queue strict

This command activates the strict priority scheduler mode for each specified queue.


Format

cos-queue strict <queue-id-1> [<queue-id-2> ... <queue-id-n>]

Modes

Global Config
Interface Config


no cos-queue strict

This command restores the default weighted scheduler mode for each specified queue.


Format

no cos-queue strict <queue-id-1> [<queue-id-2> ... <queue-id-n>]

Modes

Global Config
Interface Config


traffic-shape

This command specifies the maximum transmission bandwidth limit for the interface as a whole. Also known as rate shaping, traffic shaping has the effect of smoothing temporary traffic bursts over time so that the transmitted traffic rate is bounded.


Format

traffic-shape <bw>

Modes

Global Config
Interface Config


no traffic-shape

This command restores the interface shaping rate to the default value.


Format

no traffic-shape

Modes

Global Config

Interface Config

 


show classofservice dot1p-mapping

This command displays the current Dot1p (802.1p) priority mapping to internal traffic classes for a specific interface. The <slot/port> parameter is optional and is only valid on platforms that support independent per-port class of service mappings. If specified, the 802.1p mapping table of the interface is displayed. If omitted, the most recent global configuration settings are displayed. For more information, see Provisioning (IEEE 802.1p) Commands.


Format

show classofservice dot1p-mapping [<slot/port>]

Mode

Privileged EXEC


The following information is repeated for each user priority.


TABLE 7-1 Entry Definitions for User Priority

Entry

Definition

User Priority

The 802.1p user priority value.

Traffic Class

The traffic class internal queue identifier to which the user priority value is mapped.


show classofservice ip-precedence-mapping

This command displays the current IP Precedence mapping to internal traffic classes for a specific interface. The slot/port parameter is optional and is only valid on platforms that support independent per-port class of service mappings. If specified, the IP Precedence mapping table of the interface is displayed. If omitted, the most recent global configuration settings are displayed.


Format

show classofservice ip-precedence-mapping [<slot/port>]

Mode

Privileged EXEC


The following information is repeated for each user priority.


TABLE 7-2 Entry Definitions for IP Precedence

Entry

Definition

IP Precedence

The IP Precedence value

Traffic Class

The traffic class internal queue identifier to which the IP Precedence value is mapped.


show classofservice ip-dscp-mapping

This command displays the current IP DSCP mapping to internal traffic classes for the global configuration settings.


Format

show classofservice ip-dscp-mapping

Mode

Privileged EXEC


The following information is repeated for each user priority.

IP DSCP

The IP DSCP value.

Traffic Class

The traffic class internal queue identifier to which the IP DSCP value is mapped.

show classofservice trust

This command displays the current trust mode setting for a specific interface. The <slot/port> parameter is optional and is only valid on platforms that support independent per-port class of service mappings. If you specify an interface, the command displays the port trust mode of the interface. If you do not specify an interface, the command displays the most recent global configuration settings.


Format

show classofservice trust [<slot/port>]

Mode

Privileged EXEC



TABLE 7-3 Entry Definitions for show classofservice trust

Entry

Definition

Non-IP Traffic Class

The traffic class used for non-IP traffic. This is only displayed when the COS trust mode is set to trust IP Precedence or IP DSCP (on platforms that support IP DSCP).

Untrusted Traffic Class

The traffic class used for all untrusted traffic. This is only displayed when the COS trust mode is set to 'untrusted'.


show interfaces cos-queue

This command displays the class-of-service queue configuration for the specified interface. The slot/port parameter is optional and is only valid on platforms that support independent per-port class of service mappings. If specified, the class-of-service queue configuration of the interface is displayed. If omitted, the most recent global configuration settings are displayed.


Format

show interfaces cos-queue [<slot/port>]

Mode

Privileged EXEC



TABLE 7-4 Entry Definitions for show interfaces cos-queue

Entry

Definition

Queue Id

An interface supports n queues numbered 0 to (n-1). The specific n value is platform dependent.

Minimum Bandwidth

The minimum transmission bandwidth guarantee for the queue, expressed as a percentage. A value of 0 means bandwidth is not guaranteed and the queue operates using best-effort. This is a configured value.

Scheduler Type

Indicates whether this queue is scheduled for transmission using a strict priority or a weighted scheme. This is a configured value.

Queue Management Type

The queue depth management technique used for this queue (tail drop). If you specify the interface, the command also displays the following information.

Interface

This displays the slot/port of the interface. If displaying the global configuration, this output line is replaced with a Global Config indication.

Interface Shaping Rate

The maximum transmission bandwidth limit for the interface as a whole. It is independent of any per-queue maximum bandwidth value(s) in effect for the interface. This is a configured value.



Differentiated Services (DiffServ) Commands

This section describes the commands you use to configure QOS Differentiated Services (DiffServ).

You configure DiffServ in several stages by specifying three DiffServ components:

The DiffServ class defines the packet filtering criteria. The attributes of a DiffServ policy define the way the switch processes packets. You can define policy attributes on a per-class instance basis. The switch applies these attributes when a match occurs.

Packet processing begins when the switch tests the match criteria for a packet. The switch applies a policy to a packet when it finds a class match within that policy.

The following rules apply when you create a DiffServ class:

A given class definition can contain a maximum of one reference to another class. You can combine the reference with other match criteria. The referenced class is truly a reference and not a copy since additions to a referenced class affect all classes that reference it. Changes to any class definition currently referenced by any other class must result in valid class definitions for all derived classes, otherwise the switch rejects the change. You can remove a class reference from a class definition.

The only way to remove an individual match criterion from an existing class definition is to delete the class and re-create it.



Note - The mark possibilities for policing include CoS, IP DSCP, and IP Precedence. While the latter two are only meaningful for IP packet types, CoS marking is allowed for both IP and non-IP packets, since it updates the 802.1p user priority field contained in the VLAN tag of the layer 2 packet header.




Note - Traffic to be processed by the DiffServ feature requires an IP header.


diffserv

This command sets the DiffServ operational mode to active. While disabled, the DiffServ configuration is retained and can be changed, but it is not activated. When enabled, Diffserv services are activated.


Format

diffserv

Mode

Global Config


no diffserv

This command sets the DiffServ operational mode to inactive. While disabled, the DiffServ configuration is retained and can be changed, but it is not activated. When enabled, Diffserv services are activated.


Format

no diffserv

Mode

Global Config



DiffServ Class Commands

Use the DiffServ class commands to define traffic classification. To classify traffic, you specify Behavior Aggregate (BA), based on DSCP and Multi-Field (MF) classes of traffic (name, match criteria)

This set of commands consists of class creation/deletion and matching, with the class match commands specifying Layer 3, Layer 2, and general match criteria. The class match criteria are also known as class rules, with a class definition consisting of one or more rules to identify the traffic that belongs to the class.



Note - Once you create a class match criterion for a class, you cannot change or delete the criterion. To change or delete a class match criterion, you must delete and re-create the entire class.


The CLI command root is class-map.

class-map

This command defines a DiffServ class of type match-all. When used without any match condition, this command enters the class-map mode. The <class-map-name> is a case sensitive alphanumeric string from 1 to 31 characters uniquely identifying an existing DiffServ class.



Note - The class-map-name 'default' is reserved and must not be used.


The class type of match-all indicates all of the individual match conditions must be true for a packet to be considered a member of the class.



Note - The CLI mode is changed to Class-Map Config when this command is successfully executed.



Format

class-map match-all <class-map-name>

Mode

Global Config


no class-map

This command eliminates an existing DiffServ class. The <class-map-name> is the name of an existing DiffServ class ( The class name 'default' is reserved and is not allowed here). This command may be issued at any time; if the class is currently referenced by one or more policies or by any other class, the delete action fails.


Format

no class-map <class-map-name>

Mode

Global Config


class-map rename

This command changes the name of a DiffServ class. The <class-map-name> is the name of an existing DiffServ class. The <new-class-map-name> parameter is a case-sensitive alphanumeric string from 1 to 31 characters uniquely identifying the class (The <class-map-name> ‘default’ is reserved and must not be used here).


Default

none

Format

class-map rename <class-map-name> <new-class-map-name>

Mode

Global Config


match ethertype

This command adds to the specified class definition a match condition based on the value of the ethertype. The <ethertype> value is specified as one of the following keywords: appletalk, arp, ibmsna, ipv4, ipv6, ipx, mplsmcast, mplsucast, netbios, novell, pppoe, rarp or as a custom ethertype value in the range of 0x0600-0xFFFF.



Note - This command is not available on the Broadcom 5630x platform.



Format

match ethertype {<keyword> | custom <0x0600-0xFFFF>}

Mode

Class-Map Config


match any

This command adds to the specified class definition a match condition whereby all packets are considered to belong to the class.


Default

none

Format

match any

Mode

Class-Map Config


match class-map

This command adds to the specified class definition the set of match conditions defined for another class. The <refclassname> is the name of an existing DiffServ class whose match conditions are being referenced by the specified class definition.

no match class-map

This command removes from the specified class definition the set of match conditions defined for another class. The <refclassname> is the name of an existing DiffServ class whose match conditions are being referenced by the specified class definition.


Format

no match class-map <refclassname>

Mode

Class-Map Config


match cos

This command adds to the specified class definition a match condition for the Class of Service value (the only tag in a single tagged packet or the first or outer 802.1Q tag of a double VLAN tagged packet). The value may be from 0 to 7.



Note - This command is not available on the Broadcom 5630x platform.



Default

none

Format

match cos <0-7>

Mode

Class-Map Config


match secondary-cos

This command adds to the specified class definition a match condition for the secondary Class of Service value (the inner 802.1Q tag of a double VLAN tagged packet). The value may be from 0 to 7.



Note - This command is not available on the Broadcom 5630x platform.



Default

none

Format

match secondary-cos <0-7>

Mode

Class-Map Config


match destination-address mac

This command adds to the specified class definition a match condition based on the destination MAC address of a packet. The <macaddr> parameter is any layer 2 MAC address formatted as six, two-digit hexadecimal numbers separated by colons (e.g., 00:11:22:dd:ee:ff). The <macmask> parameter is a layer 2 MAC address bit mask, which need not be contiguous, and is formatted as six, two-digit hexadecimal numbers separated by colons (e.g., ff:07:23:ff:fe:dc).



Note - This command is not available on the Broadcom 5630x platform.



Default

none

Format

match destination-address mac <macaddr> <macmask>

Mode

Class-Map Config


match dstip

This command adds to the specified class definition a match condition based on the destination IP address of a packet. The <ipaddr> parameter specifies an IP address. The <ipmask> parameter specifies an IP address bit mask and must consist of a contiguous set of leading 1 bits.


Default

none

Format

match dstip <ipaddr> <ipmask>

Mode

Class-Map Config


match dstl4port

This command adds to the specified class definition a match condition based on the destination layer 4 port of a packet using a single keyword or numeric notation. To specify the match condition as a single keyword, the value for <portkey> is one of the supported port name keywords. The currently supported <portkey> values are: domain, echo, ftp, ftpdata, http, smtp, snmp, telnet, tftp, www. Each of these translates into its equivalent port number. To specify the match condition using a numeric notation, one layer 4 port number is required. The port number is an integer from 0 to 65535.


Default

none

Format

match dstl4port {<portkey> | <0-65535>}

Mode

Class-Map Config


match ip dscp

This command adds to the specified class definition a match condition based on the value of the IP DiffServ Code Point (DSCP) field in a packet, which is defined as the high-order six bits of the Service Type octet in the IP header (the low-order two bits are not checked). The <dscpval> value is specified as either an integer from 0 to 63, or symbolically through one of the following keywords: af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, be, cs0, cs1, cs2, cs3, cs4, cs5, cs6, cs7, ef.



Note - The ip dscp, ip precedence, and ip tos match conditions are alternative ways to specify a match criterion for the same Service Type field in the IP header, but with a slightly different user notation.



Default

none

Format

match ip dscp <dscpval>

Mode

Class-Map Config


match ip precedence

This command adds to the specified class definition a match condition based on the value of the IP Precedence field in a packet, which is defined as the high-order three bits of the Service Type octet in the IP header (the low-order five bits are not checked). The precedence value is an integer from 0 to 7.



Note - The IP DSCP, IP Precedence, and IP ToS match conditions are alternative ways to specify a match criterion for the same Service Type field in the IP header, but with a slightly different user notation.



Default

none

Format

match ip precedence <0-7>

Mode

Class-Map Config


match ip tos

This command adds to the specified class definition a match condition based on the value of the IP TOS field in a packet, which is defined as all eight bits of the Service Type octet in the IP header. The value of <tosbits> is a two-digit hexadecimal number from 00 to ff. The value of <tosmask> is a two-digit hexadecimal number from 00 to ff. The <tosmask> denotes the bit positions in <tosbits> that are used for comparison against the IP TOS field in a packet. For example, to check for an IP TOS value having bits 7 and 5 set and bit 1 clear, where bit 7 is most significant, use a <tosbits> value of a0 (hex) and a <tosmask> of a2 (hex).



Note - The IP DSCP, IP Precedence, and IP ToS match conditions are alternative ways to specify a match criterion for the same Service Type field in the IP header, but with a slightly different user notation.




Note - This “free form” version of the IP DSCP/Precedence/TOS match specification gives the user complete control when specifying which bits of the IP Service Type field are checked.



Default

none

Format

match ip tos <tosbits> <tosmask>

Mode

Class-Map Config


match protocol

This command adds to the specified class definition a match condition based on the value of the IP Protocol field in a packet using a single keyword notation or a numeric value notation.

To specify the match condition using a single keyword notation, the value for <protocol-name> is one of the supported protocol name keywords. The currently supported values are: icmp, igmp, ip, tcp, udp. A value of ip matches all protocol number values.

To specify the match condition using a numeric value notation, the protocol number is a standard value assigned by IANA and is interpreted as an integer from 0 to 255.



Note - This command does not validate the protocol number value against the current list defined by IANA.



Default

none

Format

match protocol {<protocol-name> | <0-255>}

Mode

Class-Map Config


match source-address mac

This command adds to the specified class definition a match condition based on the source MAC address of a packet. The <address> parameter is any layer 2 MAC address formatted as six, two-digit hexadecimal numbers separated by colons (e.g., 00:11:22:dd:ee:ff). The <macmask> parameter is a layer 2 MAC address bit mask, which may not be contiguous, and is formatted as six, two-digit hexadecimal numbers separated by colons (e.g., ff:07:23:ff:fe:dc).



Note - This command is not available on the Broadcom 5630x platform.



Default

none

Format

match source-address mac <address> <macmask>

Mode

Class-Map Config


match srcip

This command adds to the specified class definition a match condition based on the source IP address of a packet. The <ipaddr> parameter specifies an IP address. The <ipmask> parameter specifies an IP address bit mask and must consist of a contiguous set of leading 1 bits.


Default

none

Format

match srcip <ipaddr> <ipmask>

Mode

Class-Map Config


match srcl4port

This command adds to the specified class definition a match condition based on the source layer 4 port of a packet using a single keyword or numeric notation. To specify the match condition as a single keyword notation, the value for <portkey> is one of the supported port name keywords (listed below). The currently supported <portkey> values are: domain, echo, ftp, ftpdata, http, smtp, snmp, telnet, tftp, www. Each of these translates into its equivalent port number, which is used as both the start and end of a port range.

To specify the match condition as a numeric value, one layer 4 port number is required. The port number is an integer from 0 to 65535.


Default

none

Format

match srcl4port {<portkey> | <0-65535>}

Mode

Class-Map Config


match vlan

This command adds to the specified class definition a match condition based on the value of the layer 2 VLAN Identifier field (the only tag in a single tagged packet or the first or outer tag of a double VLAN tagged packet). The VLAN ID is an integer from 1 to 4095.



Note - This command is not available on the Broadcom 5630x platform.



Default

none

Format

match vlan <1-4095>

Mode

Class-Map Config


match secondary-vlan

This command adds to the specified class definition a match condition based on the value of the layer 2 secondary VLAN Identifier field (the inner 802.1Q tag of a double VLAN tagged packet). The secondary VLAN ID is an integer from 1 to 4095.



Note - This command is not available on the Broadcom 5630x platform.



Default

none

Format

match secondary-vlan <1-4095>

Mode

Class-Map Config



DiffServ Policy Commands

Use the DiffServ policy commands to specify traffic conditioning actions, such as policing and marking, to apply to traffic classes

Use the policy commands to associate a traffic class that you define by using the class command set with one or more QoS policy attributes. Assign the class/policy association to an interface to form a service. Specify the policy name when you create the policy.

Each traffic class defines a particular treatment for packets that match the class definition. You can associate multiple traffic classes with a single policy. When a packet satisfies the conditions of more than one class, preference is based on the order in which you add the classes to the policy. The first class you add has the highest precedence.

This set of commands consists of policy creation/deletion, class addition/removal, and individual policy attributes.



Note - The only way to remove an individual policy attribute from a class instance within a policy is to remove the class instance and re-add it to the policy. The values associated with an existing policy attribute can be changed without removing the class instance.


The CLI command root is policy-map.

assign-queue

This command modifies the queue id to which the associated traffic stream is assigned. The queueid is an integer from 0 to n-1, where n is the number of egress queues supported by the device.


Format

assign-queue <queueid>

Mode

Policy-Class-Map Config

Incompatibilities

Drop


drop

This command specifies that all packets for the associated traffic stream are to be dropped at ingress.


Format

drop

Mode

Policy-Class-Map Config

Incompatibilities

Assign Queue, Mark (all forms), Mirror, Police, Redirect


mirror

This command specifies that all incoming packets for the associated traffic stream are copied to a specific egress interface (physical port or LAG).



Note - This command is not available on the Broadcom 5630x platform.



Format

mirror <slot/port>

Mode

Policy-Class-Map Config

Incompatibilities

Drop, Redirect


redirect

This command specifies that all incoming packets for the associated traffic stream are redirected to a specific egress interface (physical port or port-channel).



Note - This command is not available on the Broadcom 5630x platform.



Format

redirect <slot/port>

Mode

Policy-Class-Map Config

Incompatibilities

Drop, Mirror


conform-color

Use this command to enable color-aware traffic policing and define the conform-color class map. Used in conjunction with the police command where the fields for the conform level are specified. The <class-map-name> parameter is the name of an existing Diffserv class map.



Note - This command may only be used after specifying a police command for the policy-class instance.



Format

conform-color <class-map-name>

Mode

Policy-Class-Map Config


class

This command creates an instance of a class definition within the specified policy for the purpose of defining treatment of the traffic class through subsequent policy attribute statements. The <classname> is the name of an existing DiffServ class.



Note - This command causes the specified policy to create a reference to the class definition.




Note - The CLI mode is changed to Policy-Class-Map Config when this command is successfully executed.



Format

class <classname>

Mode

Policy-Map Config


no class

This command deletes the instance of a particular class and its defined treatment from the specified policy. <classname> is the names of an existing DiffServ class.



Note - This command removes the reference to the class definition for the specified policy.



Format

no class <classname>

Mode

Policy-Map Config


mark cos

This command marks all packets for the associated traffic stream with the specified class of service value in the priority field of the 802.1p header (the only tag in a single tagged packet or the first or outer 802.1Q tag of a double VLAN tagged packet). If the packet does not already contain this header, one is inserted. The CoS value is an integer from 0 to 7.


Default

1

Format

mark-cos <0-7>

Mode

Policy-Class-Map Config

Incompatibilities

Drop, Mark IP DSCP, IP Precedence, Police


mark ip-dscp

This command marks all packets for the associated traffic stream with the specified IP DSCP value.

The <dscpval> value is specified as either an integer from 0 to 63, or symbolically through one of the following keywords: af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, be, cs0, cs1, cs2, cs3, cs4, cs5, cs6, cs7, ef.


Format

mark ip-dscp <dscpval>

Mode

Policy-Class-Map Config

Incompatibilities

Drop, Mark CoS, Mark IP Precedence, Police


mark ip-precedence

This command marks all packets for the associated traffic stream with the specified IP Precedence value. The IP Precedence value is an integer from 0 to 7.


Format

mark ip-precedence <0-7>

Mode

Policy-Class-Map Config

Policy Type

In

Incompatibilities

Drop, Mark CoS, Mark IP DSCP, Police


police-simple

This command is used to establish the traffic policing style for the specified class. The simple form of the police command uses a single data rate and burst size, resulting in two outcomes: conform and violate. The conforming data rate is specified in kilobits-per-second (Kbps) and is an integer from 1 to 4294967295. The conforming burst size is specified in kilobytes (KB) and is an integer from 1 to 128.

For each outcome, the only possible actions are drop, set-cos-transmit, set-dscp-transmit, set-prec-transmit, or transmit. In this simple form of the police command, the conform action defaults to transmit and the violate action defaults to drop.

For set-dscp-transmit, a <dscpval> value is required and is specified as either an integer from 0 to 63, or symbolically through one of the following keywords: af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, be, cs0, cs1, cs2, cs3, cs4, cs5, cs6, cs7, ef.

For set-prec-transmit, an IP Precedence value is required and is specified as an integer from 0-7.

For set-cos-transmit an 802.1p priority value is required and is specified as an integer from 0-7.


Format

police-simple {<1-4294967295> <1-128> conform-action {drop | set-prec-transmit <0-7> | set-dscp-transmit <0-63> | set-cos-transmit <0-7> | transmit} [violate-action {drop | set-prec-transmit <0-7> | set-dscp-transmit <0-63> | set-cos-transmit <0-7> | transmit}]}

Mode

Policy-Class-Map Config

Incompatibilities

Drop, Mark (all forms)


policy-map

This command establishes a new DiffServ policy. The <policyname> parameter is a case-sensitive alphanumeric string from 1 to 31 characters uniquely identifying the policy. The type of policy is specific to the inbound traffic direction as indicated by the in parameter.



Note - The CLI mode is changed to Policy-Map Config when this command is successfully executed.



Format

policy-map <policyname> in

Mode

Global Config


no policy-map

This command eliminates an existing DiffServ policy. The <policyname> parameter is the name of an existing DiffServ policy. This command may be issued at any time. If the policy is currently referenced by one or more interface service attachments, this delete attempt fails.


Format

no policy-map <policyname>

Mode

Global Config


policy-map rename

This command changes the name of a DiffServ policy. The <policyname> is the name of an existing DiffServ class. The <newpolicyname> parameter is a case-sensitive alphanumeric string from 1 to 31 characters uniquely identifying the policy.


Format

policy-map rename <policyname> <newpolicyname>

Mode

Global Config



DiffServ Service Commands

Use the DiffServ service commands to assign a DiffServ traffic conditioning policy, which you specified by using the policy commands, to an interface in the incoming direction

The service commands attach a defined policy to a directional interface. You can assign only one policy at any one time to an interface in the inbound direction. DiffServ is not used in the outbound direction.

This set of commands consists of service addition/removal.

The CLI command root is service-policy.

service-policy

This command attaches a policy to an interface in the inbound direction. The <policyname> parameter is the name of an existing DiffServ policy. This command causes a service to create a reference to the policy.



Note - This command effectively enables DiffServ on an interface in the inbound direction. There is no separate interface administrative 'mode' command for DiffServ.




Note - This command fails if any attributes within the policy definition exceed the capabilities of the interface. Once a policy is successfully attached to an interface, any attempt to change the policy definition, that would result in a violation of the interface capabilities, causes the policy change attempt to fail.



Format

service-policy in <policymapname>

Modes

Global Config, Interface Config




Note - Each interface can have one policy attached.


no service-policy

This command detaches a policy from an interface in the inbound direction. The <policyname> parameter is the name of an existing DiffServ policy.



Note - This command causes a service to remove its reference to the policy. This command effectively disables DiffServ on an interface in the inbound direction. There is no separate interface administrative 'mode' command for DiffServ.



Format

no service-policy in <policymapname>

Modes

Global Config
Interface Config



DiffServ Show Commands

Use the DiffServ show commands to display configuration and status information for classes, policies, and services. You can display DiffServ information in summary or detailed formats. The status information is only shown when the DiffServ administrative mode is enabled.

show class-map

This command displays all configuration information for the specified class. The <class-name> is the name of an existing DiffServ class.


Format

show class-map <class-name>

Modes

Privileged EXEC
User EXEC


If the class-name is specified the following fields are displayed.


TABLE 7-5 Entry Definitions for show class-map

Entry

Definition

Class Name

The name of this class. If you do not specify the Class Name, this command displays a list of all defined DiffServ classes. See next table for definitions.

Class Type

A class type of ‘all’ means every match criterion defined for the class is evaluated simultaneously and must all be true to indicate a class match.

Match Criteria

The Match Criteria fields are only displayed if they have been configured. Not all platforms support all match criteria values. They are displayed in the order entered by the user. The fields are evaluated in accordance with the class type. The possible Match Criteria fields are: Destination IP Address, Destination Layer 4 Port, Destination MAC Address, Ethertype, Source MAC Address, VLAN, Class of Service, Every, IP DSCP, IP Precedence, IP TOS, Protocol Keyword, Reference Class, Source IP Address, and Source Layer 4 Port.

Values

This field displays the values of the Match Criteria. :



TABLE 7-6 Entry Definitions for show class-map (All)

Entry

Definition

Class Name

The name of this class. (Note that the order in which classes are displayed is not necessarily the same order in which they were created.)

Class Type

A class type of ‘all’ means every match criterion defined for the class is evaluated simultaneously and must all be true to indicate a class match.

Ref Class Name

The name of an existing DiffServ class whose match conditions are being referenced by the specified class definition.


show diffserv

This command displays the DiffServ General Status Group information, which includes the current administrative mode setting as well as the current and maximum number of rows in each of the main DiffServ private MIB tables. This command takes no options.


Format

show diffserv

Mode

Privileged EXEC



TABLE 7-7 Entry Definitions for show diffserv

Entry

Definition

DiffServ Admin mode

The current value of the DiffServ administrative mode.

Class Table Size

The current number of entries (rows) in the Class Table.

Class Table Max

The maximum allowed entries (rows) for the Class Table.

Class Rule Table Size

The current number of entries (rows) in the Class Rule Table.

Class Rule Table Max

The maximum allowed entries (rows) for the Class Rule Table.

Policy Table Size

The current number of entries (rows) in the Policy Table.

Policy Table Max

The maximum allowed entries (rows) for the Policy Table.

Policy Instance Table Size

Current number of entries (rows) in the Policy Instance Table.

Policy Instance Table Max

Maximum allowed entries (rows) for the Policy Instance Table.

Policy Attribute Table Size

Current number of entries (rows) in the Policy Attribute Table.

Policy Attribute Table Max

Maximum allowed entries (rows) for the Policy Attribute Table.

Service Table Size

The current number of entries (rows) in the Service Table.

Service Table Max

The maximum allowed entries (rows) for the Service Table.


show policy-map

This command displays all configuration information for the specified policy. The <policyname> is the name of an existing DiffServ policy.


Format

show policy-map [policyname]

Mode

Privileged EXEC


If the Policy Name is specified the following fields are displayed.


TABLE 7-8

Entry

Definition

Policy Name

The name of this policy.

Type

The policy type (Only inbound policy definitions are supported for this platform.)


The following information is repeated for each class associated with this policy (only those policy attributes actually configured are displayed).


TABLE 7-9 Entry Definitions for show policy-map

Entry

Definition

Assign Queue

Directs traffic stream to the specified QoS queue. This allows a traffic classifier to specify which one of the supported hardware queues are used for handling packets belonging to the class.

Class Name

The name of this class.

Committed Burst Size (KB)

This field displays the committed burst size, used in simple policing.

Committed Rate (Kbps)

This field displays the committed rate, used in simple policing,

Conform Action

The current setting for the action taken on a packet considered to conform to the policing parameters. This is not displayed if policing is not in use for the class under this policy.

Conform COS

This field shows the CoS mark value if the conform action is set-cos-transmit.

Conform DSCP Value

This field shows the DSCP mark value if the conform action is set-dscp-transmit.

Conform IP Precedence Value

This field shows the IP Precedence mark value if the conform action is set-prec-transmit.

Drop

Drop a packet upon arrival. This is useful for emulating access control list operation using DiffServ, especially when DiffServ and ACL cannot co-exist on the same interface.

Mark CoS

Denotes the class of service value that is set in the 802.1p header of inbound packets. This is not displayed if the mark cos was not specified.

Mark IP DSCP

Denotes the mark/re-mark value used as the DSCP for traffic matching this class. This is not displayed if mark ip description is not specified.

Mark IP Precedence

Denotes the mark/re-mark value used as the IP Precedence for traffic matching this class. This is not displayed if mark ip precedence is not specified.

Mirror

Copies a classified traffic stream to a specified egress port (physical port or LAG). This can occur in addition to any marking or policing action. It may also be specified along with a QoS queue assignment. This field does not display on Broadcom 5630x platforms.

Non-Conform Action

The current setting for the action taken on a packet considered to not conform to the policing parameters. This is not displayed if policing not in use for the class under this policy.

Non-Conform COS

This field displays the CoS mark value if the non-conform action is set-cos-transmit.

Non-Conform DSCP Value

This field displays the DSCP mark value if the non-conform action is set-dscp-transmit.

Non-Conform IP Precedence Value

This field displays the IP Precedence mark value if the non-conform action is set-prec-transmit.

Policing Style

This field denotes the style of policing, if any, used (simple).

Redirect

Forces a classified traffic stream to a specified egress port (physical port or LAG). This can occur in addition to any marking or policing action. It may also be specified along with a QoS queue assignment. This field does not display on Broadcom 5630x platforms.


If the Policy Name is not specified this command displays a list of all defined DiffServ policies. The following fields are displayed.


TABLE 7-10 Entry Definitions for show policy-map Without Specifying Policy Name

Entry

Definition

Policy Name

The name of this policy. (The order in which the policies are displayed is not necessarily the same order in which they were created.)

Policy Type

The policy type (Only inbound is supported).

Class Members

List of all class names associated with this policy.


show diffserv service

This command displays policy service information for the specified interface and direction. The <slot/port> parameter specifies a valid slot/port number for the system.


Format

show diffserv service <slot/port> in

Mode

Privileged EXEC



TABLE 7-11 Entry Definitions for show diffserv service

Entry

Definition

DiffServ Admin Mode

The current setting of the DiffServ administrative mode. An attached policy is only in effect on an interface while DiffServ is in an enabled mode.

Interface

Valid slot and port number separated by forward slashes.

Direction

The traffic direction of this interface service.

Operational Status

The current operational status of this DiffServ service interface.

Policy Name

The name of the policy attached to the interface in the indicated direction.

Policy Details

Attached policy details, whose content is identical to that described for the show policy-map <policymapname> command (content not repeated here for brevity).


show diffserv service brief

This command displays all interfaces in the system to which a DiffServ policy has been attached. The inbound direction parameter is optional.


Format

show diffserv service brief [in]

Mode

Privileged EXEC



TABLE 7-12 Entry Definitions for show diffserv service brief

Entry

Definition

DiffServ Mode

The current setting of the DiffServ administrative mode. An attached policy is only active on an interface while DiffServ is in an enabled mode.

The following information is repeated for interface and direction (only those interfaces configured with an attached policy are shown):.

Interface

Valid slot and port number separated by forward slashes.

Direction

The traffic direction of this interface service.

OperStatus

The current operational status of this DiffServ service interface.

Policy Name

The name of the policy attached to the interface in the indicated direction.


show policy-map interface

This command displays policy-oriented statistics information for the specified interface and direction. The <slot/port> parameter specifies a valid interface for the system.



Note - This command is only allowed while the DiffServ administrative mode is enabled.



Format

show policy-map interface <slot/port> [in]

Mode

Privileged EXEC



TABLE 7-13 Entry Definitions for show policy-map interface

Entry

Definition

Interface

Valid slot and port number separated by forward slashes.

Direction

The traffic direction of this interface service.

Operational Status

The current operational status of this DiffServ service interface.

Policy Name

The name of the policy attached to the interface in the indicated direction.

The following information is repeated for each class instance within this policy.

Class Name

The name of this class instance.

In Discarded Packets

A count of the packets discarded for this class instance for any reason due to DiffServ treatment of the traffic class.


show service-policy

This command displays a summary of policy-oriented statistics information for all interfaces in the specified direction.


Format

show service-policy in

Mode

Privileged EXEC


The following information is repeated for each interface and direction (only those interfaces configured with an attached policy are shown).


TABLE 7-14 Entry Definitions for show service-policy

Entry

Definition

Interface

Valid slot and port number separated by forward slashes.

Operational Status

The current operational status of this DiffServ service interface.

Policy Name

The name of the policy attached to the interface.



MAC Access Control List (ACL) Commands

This section describes the commands you use to configure MAC ACL settings. MAC ACLs ensure that only authorized users have access to specific resources and block any unwarranted attempts to reach network resources.

The following rules apply+-to MAC ACLs:

mac access-list extended

This command creates a MAC Access Control List (ACL) identified by <name>, consisting of classification fields defined for the Layer 2 header of an Ethernet frame. The <name> parameter is a case-sensitive alphanumeric string from 1 to 31 characters uniquely identifying the MAC access list.

If a MAC ACL by this name already exists, this command enters Mac-Access-List config mode to allow updating the existing MAC ACL.



Note - The CLI mode changes to Mac-Access-List Config mode when you successfully execute this command.



Format

mac access-list extended <name>

Mode

Global Config


no mac access-list extended

This command deletes a MAC ACL identified by <name> from the system.


Format

no mac access-list extended <name>

Mode

Global Config


mac access-list extended rename

This command changes the name of a MAC Access Control List (ACL). The <name> parameter is the name of an existing MAC ACL. The <newname> parameter is a case-sensitive alphanumeric string from 1 to 31 characters uniquely identifying the MAC access list.

This command fails if a MAC ACL by the name <newname> already exists.


Format

mac access-list extended rename <name> <newname>

Mode

Global Config


{deny | permit}

This command creates a new rule for the current MAC access list. Each rule is appended to the list of configured rules for the list.



Note - The 'no' form of this command is not supported, since the rules within a MAC ACL cannot be deleted individually. Rather, the entire MAC ACL must be deleted and re-specified.




Note - An implicit 'deny all' MAC rule always terminates the access list.




Note - For BCM5630x and BCM5650x based systems, assign-queue, redirect, and mirror attributes are configurable for a deny rule, but they have no operational effect.


A rule may either deny or permit traffic according to the specified classification fields. At a minimum, the source and destination MAC value must be specified, each of which may be substituted using the keyword any to indicate a match on any value in that field. The remaining command parameters are all optional, but the most frequently used parameters appear in the same relative order as shown in the command format.

The Ethertype may be specified as either a keyword or a four-digit hexadecimal value from 0x0600-0xFFFF. The currently supported <ethertypekey> values are: appletalk, arp, ibmsna, ipv4, ipv6, ipx, mplsmcast, mplsucast, netbios, novell, pppoe, rarp. Each of these translates into its equivalent Ethertype value(s).

 


TABLE 7-15 Ethertype Keyword and 4-digit Hexadecimal Value

Ethertype Keyword

Corresponding Value

appletalk

0x809B

arp

0x0806

ibmsna

0x80D5

ipv4

0x0800

ipv6

0x86DD

ipx

0x8037

mplsmcast

0x8848

mplsucast

0x8847

netbios

0x8191

novell

0x8137, 0x8138

pppoe

0x8863, 0x8864

rarp

0x8035


The vlan and cos parameters refer to the VLAN identifier and 802.1p user priority fields, respectively, of the VLAN tag. For packets containing a double VLAN tag, this is the first (or outer) tag.

The assign-queue parameter allows specification of a particular hardware queue for handling traffic that matches this rule. The allowed <queue-id> value is 0-(n-1), where n is the number of user configurable queues available for the hardware platform. The assign-queue parameter is valid only for a permit rule.

For the Broadcom 5650x platform, the mirror parameter allows the traffic matching this rule to be copied to the specified <slot/port>, while the redirect parameter allows the traffic matching this rule to be forwarded to the specified <slot/port>. The assign-queue and redirect parameters are only valid for a permit rule.



Note - The mirror and redirect parameters are not available on the Broadcom 5630x platform.




Note - The special command form {deny | permit} any any is used to match all Ethernet layer 2 packets, and is the equivalent of the IP access list “match every” rule.



Format

{deny|permit} {<srcmac> | any} {<dstmac> | any} [<ethertypekey> | <0x0600-0xFFFF>] [vlan {eq <0-4095>}] [cos <0-7>] [[log] [assign-queue <queue-id>]] [{mirror | redirect} <slot/port>]

Mode

Mac-Access-List Config


mac access-group

This command attaches a specific MAC Access Control List (ACL) identified by <name> to an interface in a given direction. The <name> parameter must be the name of an existing MAC ACL.

An optional sequence number may be specified to indicate the order of this mac access list relative to other mac access lists already assigned to this interface and direction. A lower number indicates higher precedence order. If a sequence number is already in use for this interface and direction, the specified mac access list replaces the currently attached mac access list using that sequence number. If the sequence number is not specified for this command, a sequence number that is one greater than the highest sequence number currently in use for this interface and direction is used.

This command specified in 'Interface Config' mode only affects a single interface, whereas the 'Global Config' mode setting is applied to all interfaces. The 'Interface Config' mode command is only available on platforms that support independent per-port class of service queue configuration.


Format

mac access-group <name> in [sequence <1-4294967295>]

Modes

Global Config
Interface Config


no mac access-group

This command removes a MAC ACL identified by <name> from the interface in a given direction.


Format

no mac access-list <name> in

Modes

Global Config
Interface Config


show mac access-lists

This command displays a MAC access list and all of the rules that are defined for the MAC ACL. Use the [name] parameter to identify a specific MAC ACL to display.


Format

show mac access-lists [name]

Mode

Privileged EXEC



TABLE 7-16 Entry Definitions for show mac access-lists

Entry

Definition

Rule Number

The ordered rule number identifier defined within the MAC ACL.

Action

Displays the action associated with each rule. The possible values are Permit or Deny.

Source MAC Address

Displays the source MAC address for this rule.

Destination MAC Address

Displays the destination MAC address for this rule.

Ethertype

Displays the Ethertype keyword or custom value for this rule.

VLAN ID

Displays the VLAN identifier value or range for this rule.

COS

Displays the COS (802.1p) value for this rule.

Log

Displays when you enable logging for the rule.

Assign Queue

Displays the queue identifier to which packets matching this rule are assigned.

Mirror Interface

On Broadcom 5650x platforms, displays the unit/slot/port to which packets matching this rule are copied.

Redirect Interface

On Broadcom 5650x platforms, displays the slot/port to which packets matching this rule are forwarded.



IP Access Control List (ACL) Commands

This section describes the commands you use to configure IP ACL settings. IP ACLs ensure that only authorized users have access to specific resources and block any unwarranted attempts to reach network resources.

The following rules apply to IP ACLs:

access-list

This command creates an IP Access Control List (ACL) that is identified by the access list number, which is 1-99 for standard ACLs or 100-199 for extended ACLs. ACL Command Parameters describes the parameters for the access-list command.

IP Standard ACL:


Format

access-list <1-99> {deny | permit} {every | <srcip> <srcmask>} [log] [assign-queue <queue-id>] [{mirror | redirect} <unit/slot/port>]

Mode

Global Config


IP Extended ACL:


Format

access-list <100-199> {deny | permit} {every | {{icmp | igmp | ip | tcp | udp | <number>} <srcip> <srcmask> [{eq {<portkey> | <0-65535>} <dstip> <dstmask> [{eq {<portkey>| <0-65535>}] [precedence <precedence> | tos <tos> <tosmask> | dscp <dscp>] [log] [assign-queue <queue-id>] [{mirror | redirect} <unit/slot/port>]

Mode

Global Config


 


TABLE 7-17 ACL Command Parameters

Parameter

Description

<1-99> or <100-199>

Range 1 to 99 is the access list number for an IP standard ACL. Range 100 to 199 is the access list number for an IP extended ACL.

{deny | permit}

Specifies whether the IP ACL rule permits or denies an action.

Note - For 5630x and 5650x-based systems, assign-queue, redirect, and mirror attributes are configurable for a deny rule, but they have no operational effect.

every

Match every packet

{icmp | igmp | ip | tcp | udp | <number>}

Specifies the protocol to filter for an extended IP ACL rule.

<srcip> <srcmask>

Specifies a source IP address and source netmask for match condition of the IP ACL rule.

[{eq {<portkey> |
<0-65535>}]

Specifies the source layer 4 port match condition for the IP ACL rule. You can use the port number, which ranges from 0-65535, or you specify the <portkey>, which can be one of the following keywords: domain, echo, ftp, ftpdata, http, smtp, snmp, telnet, tftp, and www. Each of these keywords translates into its equivalent port number, which is used as both the start and end of a port range.

<dstip> <dstmask>

Specifies a destination IP address and netmask for match condition of the IP ACL rule.

[precedence <precedence> | tos <tos> <tosmask> | dscp <dscp>]

Specifies the TOS for an IP ACL rule depending on a match of precedence or DSCP values using the parameters dscp, precedence, tos/tosmask.

[log]

Specifies that this rule is to be logged.

[assign-queue <queue-id>]

Specifies the assign-queue, which is the queue identifier to which packets matching this rule are assigned.

[{mirror | redirect} <slot/port>]

For Broadcom 5650x platforms, specifies the mirror or redirect interface which is the slot/port to which packets matching this rule are copied or forwarded, respectively. The mirror and redirect parameters are not available on the Broadcom 5630x platform.


no access-list

This command deletes an IP ACL that is identified by the parameter <accesslistnumber> from the system. The range for <accesslistnumber> 1-99 for standard access lists and 100-199 for extended access lists.


Format

no access-list <accesslistnumber>

Mode

Global Config


ip access-group

This command attaches a specified IP ACL to one interface or to all interfaces.

An optional sequence number may be specified to indicate the order of this IP access list relative to other IP access lists already assigned to this interface and direction. A lower number indicates higher precedence order. If a sequence number is already in use for this interface and direction, the specified access list replaces the currently attached IP access list using that sequence number. If the sequence number is not specified for this command, a sequence number that is one greater than the highest sequence number currently in use for this interface and direction is used.


Default

none

Format

ip access-group <accesslistnumber> in [sequence <1-4294967295>]

Modes

Interface Config
Global Config


no ip access-group

This command removes a specified IP ACL from an interface.


Default

none

Format

no ip access-group <accesslistnumber> in

Mode

Interface Config


acl-trapflags

This command enables the ACL trap mode.


Default

disabled

Format

acl-trapflags

Mode

Global Config


no acl-trapflags

This command disables the ACL trap mode.


Format

no acl-trapflags

Mode

Global Config


show ip access-lists

This command displays an IP ACL <accesslistnumber> is the number used to identify the IP ACL.


Format

show ip access-lists <accesslistnumber>

Mode

Privileged EXEC




Note - Only the access list fields that you configure are displayed.



TABLE 7-18 Entry Definitions for show ip access-lists

Entry

Definition

Rule Number

This displays the number identifier for each rule that is defined for the IP ACL.

Action

This displays the action associated with each rule. The possible values are Permit or Deny.

Match All

Indicates whether this access list applies to every packet. Possible values are True or False.

Protocol

This displays the protocol to filter for this rule.

Source IP Address

This displays the source IP address for this rule.

Source IP Mask

This field displays the source IP Mask for this rule.

Source L4 Port Keyword

This field displays the source port for this rule.

Destination IP Address

This displays the destination IP address for this rule.

Destination IP Mask

This field displays the destination IP Mask for this rule.

Destination L4 Port Keyword

This field displays the destination port for this rule.

IP DSCP

This field indicates the value specified for IP DSCP.

IP Precedence

This field indicates the value specified IP Precedence.

IP TOS

This field indicates the value specified for IP TOS.

Log

Displays when you enable logging for the rule.

Assign Queue

Displays the queue identifier to which packets matching this rule are assigned.

Mirror Interface

Displays the unit/slot/port to which packets matching this rule are copied.

Redirect Interface

Displays the unit/slot/port to which packets matching this rule are forwarded.


show access-lists

This command displays IP ACLs and MAC access control lists information for a designated interface and direction.


Format

show access-lists interface <slot/port> in

Mode

Privileged EXEC



TABLE 7-19 Entry Definitions for show access-lists

Entry

Definition

ACL Type

Type of access list (IP or MAC).

ACL ID

Access List name for a MAC access list or the numeric identifier for an IP access list.

Sequence Number

An optional sequence number may be specified to indicate the order of this access list relative to other access lists already assigned to this interface and direction. A lower number indicates higher precedence order. If a sequence number is already in use for this interface and direction, the specified access list replaces the currently attached access list using that sequence number. If the sequence number is not specified by the user, a sequence number that is one greater than the highest sequence number currently in use for this interface and direction is used. Valid range is (1 to 4294967295).