class

Syntax

[<SEQ-NUM>] class { ipv4 | ipv6 } <CLASS-NAME>
                              { action meter 
                                commit-rate kbps <1-10000000> dscp-remark 
                                peak-rate kbps <1-10000000> {drop | dscp-remark}}
no [<SEQ-NUM>] class { ipv4 | ipv6 } <CLASS-NAME>
                              { action meter 
                                commit-rate kbps <1-10000000> dscp-remark 
                                peak-rate kbps <1-10000000> {drop | dscp-remark}}

Description

Allows you to configure the traffic as per two rate three color policy specified in RFC 2698.

The no form of this command removes the metered traffic rate entries from the running configuration output.

Command context

config, config-class, and policy-qos.

Parameters

commit-rate

Configures the commit-rate as per RFC 2698.

commit-rate kbps<1-10000000>

Configures the commit-rate in Kb/s. Range: 1-10000000.

dscp-remark

Remarks the DSCP for traffic that exceeds the commit or peak-rate.

peak-rate

Configures the peak-rate as per RFC 2698.

peak-rate kbps<1-10000000>

Configures the peak-rate in Kb/s. Range: 1-10000000.

drop

Drops the traffic which exceeds the peak-rate.

Usage

If the traffic on the interface on which the policy is applied exceeds:
  • For the commit-rate, its DSCP is remarked to the configured value.

  • For the peak-rate, traffic is either dropped or DSCP remarked again.

Examples

switch(config)# class
ipv4                  Classify traffic based on IPv4 information.
ipv6                  Classify traffic based on IPv6 information.
mac                   Classify traffic based on Ethernet header information.
resequence            Renumber the entries in the class.
switch(config)# class ipv4 class1 
switch(config-class)# 10
ignore                Create a rule to ignore specified packets.
match                 Create a rule to match specified packets.
remark                Add a comment to the class.
gre                   Match GRE packets.
esp                   Match ESP packets.
ah                    Match AH packets.
ospf                  Match OSPF packets.
pim                   Match PIM packets.
vrrp                  Match VRRP packets.
alias-src             Specify the netdestination to control incoming packets.
icmp                  Match ICMP packets.
igmp                  Match IGMP packets.
ip                    Match IP packets.
sctp                  Match SCTP packets.
tcp                   Match TCP packets.
udp                   Match UDP packets.
switch(config-class)# 10 match ip any any
ip-dscp               Match a specified IP DSCP value.
precedence            Match a specified IP precedence value.
tos                   Match a specified IP Type of Service value.
vlan                  Match a specified VLAN ID.
<cr>
switch(config-class)# 10 match ip any any
switch(config-class)#
switch(config)#
switch(config)# show run

Running configuration:

; JL557A Configuration Editor; Created on release #WC.16.06.0000x
; Ver #13:03.f8.1c.9b.3f.bf.bb.ef.7c.59.fc.6b.fb.9f.fc.ff.ff.37.ef:49
hostname "switch-name"
module 1 type jl557a
class ipv4 "class1"
     10 match ip 0.0.0.0 255.255.255.255 0.0.0.0 255.255.255.255
   exit
policy qos "qos-policy-1"
   exit
policy qos "qos-policy1"
   exit
interface 2
   speed-duplex auto-100
   exit
interface 48
   speed-duplex auto-100
   exit
snmp-server community "public" unrestricted
vlan 1
   name "DEFAULT_VLAN"
   untagged 1-52
   ip address dhcp-bootp
   ipv6 enable
   ipv6 address dhcp full
   exit
switch(policy-qos)# 10 class ipv4
ASCII-STR             Enter an ASCII string.
switch(policy-qos)# 10 class ipv4 class1 action
	dscp                  Specify an IP DSCP.
 ip-precedence         Specify the IP precedence.
 meter                 Configure a two-rate-three-color-marker as specified in
                       RFC 2698.
 priority              Specify the priority.
 rate-limit            Configure rate limiting for all traffic.
switch(policy-qos)# 10 class ipv4 class1 action meter
switch(policy-qos)# 10 class ipv4 class1 action meter commit-rate kb
switch(policy-qos)# 10 class ipv4 class1 action meter commit-rate kbps
<1-10000000>          Enter an integer number.
switch(policy-qos)# 10 class ipv4 class1 action meter commit-rate kbps 1000

dscp-remark           Remark the DSCP for traffic which exceeds the commit-rate.
switch(policy-qos)# 10 class ipv4 class1 action meter commit-rate kbps 1000

dscp-remark           Remark the DSCP for traffic which exceeds the commit-rate.
switch(policy-qos)# 10 class ipv4 class1 action meter commit-rate kbps 1000 dscp
switch(policy-qos)# 10 class ipv4 class1 action meter commit-rate kbps 1000 dscp-remark
af11                  Match DSCP AF11 (001010)
af12                  Match DSCP AF12 (001100)
af22                  Match DSCP AF22 (010100)
af23                  Match DSCP AF23 (010110)
af42                  Match DSCP AF42 (100100)
af43                  Match DSCP AF43 (100110)
cs5                   Match DSCP CS4 (101000)
cs6                   Match DSCP CS6 (110000)
ef                    Match DSCP EF (101110)
switch(policy-qos)# 10 class ipv4 class1 action meter commit-rate kbps 1000 dscp-remark cs7

switch(policy-qos)# 10 class ipv4 class1 action meter commit-rate kbps 1000 dscp-remark cs7 peak-rate
dscp-remark           Remark the DSCP for traffic which exceeds the peak-rate.
switch(policy-qos)# 10 class ipv4 class1 action meter commit-rate kbps 1000 dscp-remark cs7 peak-rate kbps 1000 drop
The commit rate must be less than the peak rate.
switch# 10 class ipv4 class1 action meter commit-rate kbps 1000 dscp-remark cs7 peak-rate kbps 2000

drop                  Drop the traffic which exceeds the peak-rate.
dscp-remark           Remark the DSCP for traffic which exceeds the peak-rate.
switch(policy-qos)# 10 class ipv4 class1 action meter commit-rate kbps 1000 dscp-remark cs7 peak-rate kbps 2000 drop

switch(config)#
switch(config)# show run

; JL557A Configuration Editor; Created on release #WC.16.06.0000x
; Ver #13:03.f8.1c.9b.3f.bf.bb.ef.7c.59.fc.6b.fb.9f.fc.ff.ff.37.ef:49
hostname "switch-name"
module 1 type jl557a
class ipv4 "class1"
     10 match ip 0.0.0.0 255.255.255.255 0.0.0.0 255.255.255.255
   exit
policy qos "qos-policy-1"
     10 class ipv4 "class1" action meter commit-rate kbps 1000 dscp-remark cs7
peak-rate kbps 2000 drop
   exit
policy qos "qos-policy1"
   exit
interface 2
   speed-duplex auto-100
   exit
interface 48
   speed-duplex auto-100
   exit
snmp-server community "public" unrestricted