Syntax
display qos car interface [ interface-type interface-number ]
View
Any view
Parameter
interface-type: Interface type.
interface-number: Interface number.
Description
Use the display qos car interface
command to view parameter configuration and running statistics of CAR at each
or all interfaces.
If no interface is specified, CAR configuration
and running statistics of all interfaces will be displayed.
Example
# Display the CAR parameter configuration
information and running statistic information on each interface.
[H3C] display qos car interface
Interface: Ethernet6/0/0
Direction: Inbound
Rule(s): If-match CARL 1
CIR 8000(Bps), CBS 15000(Bit),
EBS 0(Bit)
Conform Action: remark ip-precedence
3 and pass
Exceed Action: remark ip-precedence
4 and continue
Conformed: 0/0 (Packets/Bytes)
Exceeded: 0/0 (Packets/Bytes)
Direction: Outbound
Rule(s): If-match ACL 2001
CIR 8000(Bps), CBS 15000(Bit),
EBS 0(Bit)
Conform Action: pass
Exceed Action: discard
Conformed: 0/0(Packets/Bytes)
Exceeded: 0/0(Packets/Bytes)
Syntax
display qos carl [
carl-index ]
View
Any view
Parameter
carl-index:
Committed Access Rate List (CARL) number, in the range of 1 to 199.
Description
Use the display qos carl command to
view a certain rule or all the rules of CARL.
If carl-index is not specified, all
rules of CARL will be displayed.
Example
# Display the first rule of CAR list.
[H3C] display qos carl
Current CARL Configuration:
List Params
------------------------------------------------------
1 Precedence 1 2
2 MAC Address 0050-ba27-bed3
Syntax
qos car {
inbound | outbound } { any | acl acl-number | carl
carl-index } cir committed-information-rate cbs committed-burst-size
ebs excess-burst-size green action red action
undo qos car { inbound | outbound } { any | acl acl-number
| carl carl-index } cir committed-information-rate cbs
committed-burst-size ebs excess-burst-size
View
Interface view
Parameter
inbound: Limits rate for the packets received by the interface.
outbound: Limits rate for the packets sent by the interface.
any: Limits rates for all packets that match any rules.
acl acl-number: Limits the rate of packets
matching the ACL, with acl-number ranging 2000 to 3999.
carl carl-index:
Limits the rate of packets matching the CARL, with carl-index ranging 1
to 199.
cir committed-information-rate: Committed Information Rate(CIR), in the range of 8,000 to 1,000,000,000
bps. It should not exceed CBS x 20.
cbs committed-burst-size: Committed Burst Size (CBS), in the range of 15,000 to 1,000,000,000
bits.
ebs excess-burst-size:
Excess Burst Size (EBS), in the range of 0 to 1,000,000,000 bits.
green:
Action taken on the packets when the traffic rate conform to CIR.
red: Action
taken on the packets when the traffic rate does not conform to CIR..
action:
Action taken on a packet, which can be:
l
continue: Executes
the next CAR strategy to continue to process the packet.
l
discard: Discards
the packet.
l
pass: Sends the
packet.
l
remark-prec-continue new-precedence: Specifies a new IP
priority (new-precedence) and executes the next CAR strategy. The new-precedence
argument range from 0 to 7.
l
remark-prec-pass new-precedence: Specifies a new IP
priority (new-precedence) and sends the packet. The new-precedence
argument ranges from 0 to 7.
l
remark-mpls-exp-continue new-mpls-exp: Sets a new MPLS EXP value (new-mpls-exp)
and executes the next CAR strategy. The new-mpls-exp argument ranges
from 0 to 7.
l
remark-mpls-exp-pass new-mpls-exp: Sets a new MPLS EXP value (new-mpls-exp)
and sends the packet. The new-mpls-exp argument ranges from 0 to 7.
l
remark-dscp-continue new-dscp: Sets a new IP DSCP value (new-dscp)
and executes the next CAR strategy. The new-dscp argument ranges from 0
to 63.
l
remark-dscp-pass new-dscp:
Sets a new IP DSCP value (new-dscp) and sends the packet. The new-dscp
argument ranges from 0 to 63.
Description
Use the qos car command to implement
TP policy on an interface.
Use the undo qos car command
to remove a certain TP policy at the interface.
This command only applies to IP packets.
You can configure several CAR policies by
using the command for several times. And the executing order of the policies
depends on the configuration order.
Example
# Configure traffic policing for outbound
packets that conform to CARL rule 1 at the interface Ethernet6/0/0. The normal
traffic is 38400 bps. The burst size, twice of the normal traffic, is allowed
at the first time; then packets are normally transmitted when the rate is less
than or equal to 38400 bps. When the rate is larger than 38400 bps, packets
will be transmitted after their precedence is changed to 0.
[H3C-Ethernet6/0/0] qos car outbound
any carl 1 cir 38400 cbs 76800 ebs 0 green pass red remark-prec-pass 0
Syntax
qos carl carl-index
{ { precedence precedence-value | mac mac-address
| dscp dscp-value } | { source-ip-address | destination-ip-address
} { subnet ip-address mask-length | range start-ip-address
to end-ip-address } [ per-address ] }
undo qos carl carl-index
View
System view
Parameter
carl:
Committed access rate list.
carl-index:
CAR list number, in the range 1 to 199.
precedence-value: IP Precedence, in the range 0 to 7.
mac-address:
Hexadecimal MAC address. In the car inbound direction, it is a source
MAC address; in the car outbound direction, it is a destination MAC
address.
dscp-value:
DSCP value, in the range of 0 to 63. You can input one of the following
keywords in the position of this argument instead: ef, af11, af12, af13, af21, af22, af23,
af31, af32, af33, af41, af42, af43, cs1,
cs2, cs3, cs4, cs5, cs7 and default.
Table 1-1 DSCP keywords and
corresponding values
|
Keyword
|
DSCP value (binary)
|
DSCP value (decimal)
|
|
ef
|
101110
|
46
|
|
af11
|
001010
|
10
|
|
af12
|
001100
|
12
|
|
af13
|
001110
|
14
|
|
af21
|
010010
|
18
|
|
af22
|
010100
|
20
|
|
af23
|
010110
|
22
|
|
af31
|
011010
|
26
|
|
af32
|
011100
|
28
|
|
af33
|
011110
|
30
|
|
af41
|
100010
|
34
|
|
af42
|
100100
|
36
|
|
af43
|
100110
|
38
|
|
cs1
|
001000
|
8
|
|
cs2
|
010000
|
16
|
|
cs3
|
011000
|
24
|
|
cs4
|
100000
|
32
|
|
cs5
|
101000
|
40
|
|
cs6
|
110000
|
48
|
|
cs7
|
111000
|
56
|
|
default
|
000000
|
0
|
source-ip-address: Specifies to match packets based on source IP addresses.
destination-ip-address: Specifies to match packets based on destination IP addresses.
subnet ip-address:
Specifies a subnet address.
mask-length:
Mask length, in the range of 22 to 32.
start-ip-address: Start IP address.
end-ip-address: End IP address, which must be less than start-ip-address +
1024.
per-address:
Specifies to perform LR on per address basis.
Description
Use the qos carl command to
establish or modify a CARL.
Use the undo qos carl command to
delete a CARL.
You can establish a CARL based on IP
precedence, dscp or MAC address.
For different carl-index, the repeat
execution of this command will create multiple CARLs, and for the same carl-index,
such undertaking will modify the parameters of the CARL.
You can define eight precedence
values at most. If the same precedence is specified for several times, the
system by default regards that only one precedence value has been specified.
The precedence values are related to one another in the way of
“OR”.
Example
# Configure CARL 1 with packet precedence 1
and 7.
[H3C] qos carl 1 precedence 1 7
Syntax
display qos gts interface [ interface-type interface-number ]
View
Any view
Parameter
interface-type: Interface type.
interface-number: Interface number.
Description
Use the display qos gts interface
command to view GTS configuration and accounting information of certain
interface or all interfaces.
If no interface is specified, the GTS
configuration and running statistics of all interfaces will be displayed.
Example
# Display GTS configuration and accounting
information of all interfaces.
[H3C] display
qos gts interface
Interface: Ethernet6/0/0
Rule(s): If-match Any
CIR 64000 (bps), CBS 32000 (bit),
EBS 0 (bit)
Queue Length: 50 (Packet)
Queue Size : 13 (Packet)
Passed : 723/979860
(Packets/Bytes)
Discarded: 0/0 (Packets/Bytes)
Delayed : 723/979860
(Packets/Bytes)
Syntax
qos gts { any
| acl acl-number } cir committed-information-rate
[ cbs committed-burst-size [ ebs excess-burst-size
[ queue-length queue-length ] ] ]
undo qos gts
{ any | acl acl-number }
View
Interface view
Parameter
any:
Performs TS on all the IP packets.
acl acl-number: Performs traffic shaping of packets matching the ACL, with acl-number
being the ACL number in the range of 2000 to 3999.
cir committed-information-rate:
CIR, in the range 8,000 to 1,000,000,000 bps.
cbs
committed-burst-size: CBS, in the range 15,000 to 1,000,000,000
bits. When the CIR value is less than 30,000, the default CBS value is 15,000;
when the CIR value is greater than 30,000, the default CBS value is half of the
CIR value.
ebs excess-burst-size:
EBS, in the range 0 to 1,000,000,000 bits. It defaults to 0, that is, only one
token bucket is used for policing.
queue-length queue-length: The maximum length of the
buffer, in the range of 1 to 1024. By default, queue-length is 50.
Description
Use the qos gts command to set
shaping parameters for all or a specified type of traffic and perform traffic
shaping.
Use the undo qos gts command to
remove the shaping configuration for all or a specified type of traffic.
qos gts acl
is used to set shaping parameters for the packets that conforms to certain ACL.
Different ACLs can be used to set shaping parameters for different packets.
qos gts any is
used to set shaping parameters for all packets.
qos gts acl
cannot be used together with the qos gts any.
Repeated using qos gts will replace
configuration set earlier.
Example
# Configure traffic shaping for the packets
that conform to ACL rule 2001 at the Ethernet6/0/0 interface. The normal
traffic is 38400 bps. The burst size, twice of the normal traffic, is allowed
at the first time. Then packets are normally transmitted when the traffic is
less than or equal to 38400 bps. When the rate is larger than 38400 bps,
packets will be added to the buffer queue, which is 100 long.
[H3C-Ethernet6/0/0] qos gts acl 2001
cir 38400 cbs 76800 ebs 0 queue-length 100
Syntax
display qos lr interface [ interface-type interface-number ]
View
Any view
Parameter
interface-type: Interface type.
interface-number: Interface number.
Description
Use the display qos lr interface
command to view LR configuration and statistics of an interface.
If no interface is specified, the LR
configuration and running statistics of all interfaces will be displayed.
Example
# Display LR configuration and statistics
information of all interfaces.
[H3C] display qos lr interface
Interface: Ethernet6/0/0
CIR 10000 (bps), CBS 15000 (bit), EBS
0 (bit)
Passed : 0/0 (Packets/Bytes)
Delayed: 0/0 (Packets/Bytes)
Active Shaping: NO
Syntax
qos lr cir committed-information-rate [ cbs committed-burst-size
[ ebs excess-burst-size ] ]
undo qos lr
View
Interface
(including the MFR interface) view
Parameter
cir
committed-information-rate: CIR, in the range of 8,000
to 1,000,000,000 bps.
cbs
committed-burst-size: CBS, in the range of 15,000
to 1,000,000,000 bits. When the CIR value is less than 30,000, the default CBS
value is 15,000; when the CIR value is greater than 30,000, the default CBS
value is half of the CIR value.
ebs excess-burst-size: EBS, in the range of 0 to 1,000,000,000 bits. By default, excess-burst-size
is 0. There is only one token bucket is used to police.
Description
Use the qos lr command to limit the
transmitting rate of the interface.
Use the undo qos lr command to
remove the limit.
You can use this command on a tunnel
interface to limit its interface rate and implement congestion management along
with other queue scheduling algorithms.
Before configuring queuing on the tunnel
interface, you must configure the qos lr command. Before deleting the qos lr command on the
interface, however, you must delete the queuing configuration.
You can use the qos lr command on a
virtual-template interface. If the virtual-template is bound with the MP
protocol, LR configuration can be distributed to the virtual-access interface created
by the virtual-template and takes effect in this way. If the virtual-template
is bound with other protocols such as PPPoE, PPPoA, and PPPoEoA, the LR
configuration is not distributed and does not take effect.
You can also use the qos lr command
on a dialer interface. If the protocol on a dialer interface is PPP and it is
also bound to the MP protocol, the LR configuration can be distributed to the
virtual-access interface created by the dialer interface and the LR configuration
takes effect. If the dialer interface is bound to other protocols such as
PPPoE, PPPoA, and PPPoEoA, the LR configuration is not distributed and does not
take effect.
Example
# Limit packet-forwarding rate of interface
Ethernet6/0/0.
[H3C-Ethernet6/0/0]
qos lr cir 38400 cbs 76800 ebs 0
Syntax
dar max-session-count count
undo dar
max-session-count
View
System view
Parameter
count: The
maximum number of connections recognizable by DAR. The value range varies with
devices. Refer to your specific device model.
Description
Use the dar max-session-count
command to configure the maximum number of connections recognizable by DAR.
Use the undo dar max-session-count
command to restore the default value.
When a large amount of data traffic passes
the device, a large amount of system resources will be consumed if DAR
recognizes them one by one, which affects the normal operation of other
modules.
To avoid this, you can limit the maximum
number of connections that can be recognized by DAR in order to save system
resources. When the number of connections exceeds the upper threshold, DAR
stops recognizing the connections exceeding the upper limit and directly marks
them as unidentifiable packets.
Example
# Set the maximum number of connections
recognizable by DAR to 1000.
<H3C>
system-view
[H3C] dar max-session-count 1000
Syntax
dar protocol
protocol-name { tcp | udp } port { port-value
| range port-min port-max } *
undo dar protocol protocol-name { tcp | udp } port
View
System view
Parameter
protocol-name: Name of application protocol, with an effective range the same as
that of protocol-name in the if-match protocol command, including
user-defined01, user-defined02, …, and user-defined10.
No port number is specified for a user-defined protocol at the initial state.
It will take effect only after a port number is specified. At the same time,
you can use the dar protocol-rename command to rename a user-defined
protocol.
tcp: Based
on TCP.
udp: Based
on UDP.
port-value:
Port number of the protocol, in the range 1 to 65535, which cannot be the same
with the configured port number of any other protocol in the DAR. Up to 16 port
numbers can be set for each protocol, which are separated with spaces.
range
port-min port-max: Sets the range of port
number, port-min for the minimum port number, and port-max for
the maximum port number . The difference value between the maximum number and
minimum number shall be smaller than or equal to 1000, i.e. port-max –
port-min ≤ 1000. The port number range must not include the port
numbers of any other application protocol in DAR.
Description
Use the dar protocol command to
configure the port number of DAR application protocol.
Use the undo dar protocol command to
restore the port number to the default value.
You can use this command to set the port
number and port range of a DAR application protocol at the same time.
By default, all protocols, except the ten
user-defined protocols, have their default port numbers.
Example
# Set the port numbers of RTP to 36000,
36001, and 40000 through 41000.
<H3C>
system-view
[H3C] dar protocol rtp udp port 36000
36001 range 40000 41000
Syntax
dar protocol-rename old-name user-defined-name
undo dar protocol-rename user-defined-name
View
System view
Parameter
old-name:
Initial name of the user-defined protocol, which can be any of
“user-defined01”, “user-defined02”, …,
“user-defined10”.
user-defined-name: New name of the user-defined protocol, in the length of 1 to 14
characters. The new name cannot be the same with any existing name, and cannot
be “all”, “total”, “tcp”,
“udp”, “ip” or “user-defined01”,
“user-defined02”, …, “user-defined10”.
Description
Use the dar protocol-rename command
to rename a user-defined protocol.
Use the undo dar protocol-rename
command to restore the default name of a user-defined protocol.
By default, the initial names of the tem
user-defined protocols are “user-defined01”,
“user-defined02”, …, “user-defined10”.
Example
# Rename the protocol “user-defined01”
to “hello”.
<H3C> system-view
[H3C] dar protocol-rename
user-defined01 hello
# Restore the default name of the protocol
“hello”.
<H3C>
system-view
[H3C] undo dar protocol-rename hello
Syntax
dar protocol-statistic [ flow-interval time ]
undo dar protocol-statistic
View
Interface
view supporting IP
Parameter
flow-interval time: Sets the interval of history mean
rate and maximum rate statistics, in the range 1 to 30 in minutes. The system
default is 5 minutes.
Description
Use the dar protocol-statistic
command to enable DAR packet statistics function.
Use the undo dar protocol-statistic
command to disable the function.
With DAR packet statistics function, you
can timely monitor the number of packets, data traffic, historical mean rate
and maximum rate of data traffic on each interface, thus to implement
corresponding policies for the data traffic.
By default, the function is disabled.
Example
# Enable DAR packet statistics function on
the interface Ethernet0/0/0, and set the interval to 7 minutes.
<H3C>
system-view
[H3C] interface Ethernet 0/0/0
[H3C-Ethernet0/0/0] dar
protocol-statistic flow-interval 7
Syntax
debugging dar { packet | event | error | all }
undo debugging
dar { packet | event | error | all }
View
User view
Parameter
packet: DAR
packet debugging.
event: DAR
event debugging.
error: DAR error
debugging.
all: DAR all
debugging.
Description
Use the debugging dar command to
enable DAR debugging.
Use the
undo debugging dar command to disable DAR debugging.
By default, DAR debugging is disabled.
Example
# Enable DAR packet debugging.
<H3C>
debugging dar packet
Syntax
display dar information
View
Any view
Parameter
None
Description
Use the display dar information command
to view information about the DAR module.
Example
# Display information about the DAR module.
<H3C> display dar information
Max session count : 8192
Watched session count : 1000
Syntax
display dar protocol
{ all | protocol-name }
View
Any view
Parameter
all:
Displays information about all protocols.<