- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
04-Data buffer commands | 108.08 KB |
buffer packet-drop alarm enable
buffer packet-drop alarm interval
display buffer usage interface
buffer transient-capture enable
display buffer transient-capture packet-drop
Data buffer commands
Inappropriate data buffer changes can cause system problems. Before manually changing data buffer settings, make sure you understand its impact on your device. As a best practice, use the burst-mode enable command if the system requires large buffer spaces. The burst-mode enable command and the buffer apply command are mutually exclusive. If you have configured the data buffer by using one command, you must execute the undo form of the command before using the other command.
buffer packet-drop alarm enable
Use buffer packet-drop alarm enable to enable packet-drop alarms.
Use undo buffer packet-drop alarm enable to disable packet-drop alarms.
Syntax
buffer packet-drop alarm enable
undo buffer packet-drop alarm enable
Default
Packet-drop alarms are disabled.
Views
System view
Predefined user roles
network-admin
Usage guidelines
The device generates and reports packet-drop alarms to a network management system (such as IMC) for displaying the data buffer usage.
This command does not take effect only on the Headroom buffer.
Examples
# Enable packet-drop alarms.
<Sysname> system-view
[Sysname] buffer packet-drop alarm enable
Related commands
buffer packet-drop alarm interval
buffer packet-drop alarm interval
Use buffer packet-drop alarm interval to set the interval for sending packet-drop alarms.
Use undo buffer packet-drop alarm interval to restore the default.
Syntax
buffer packet-drop alarm interval interval
undo buffer packet-drop alarm interval
Default
The interval for sending packet-drop alarms is 5 seconds.
Views
System view
Predefined user roles
network-admin
Parameters
interval: Specifies the interval for sending packet-drop alarms, in the range of 0 to 60 seconds. The value of 0 indicates that packet-drop alarms are sent immediately after they are generated.
Usage guidelines
This command takes effect only when packet-drop alarms are enabled.
Examples
# Set the interval for sending packet-drop alarms to 20 seconds.
<Sysname> system-view
[Sysname] buffer packet-drop alarm interval 20
Related commands
buffer packet-drop alarm enable
burst-mode enable
Use burst-mode enable to enable the Burst feature.
Use undo burst-mode enable to disable the Burst feature.
Syntax
burst-mode enable
undo burst-mode enable
Default
The Burst feature is disabled.
Views
System view
Predefined user roles
network-admin
Usage guidelines
The Burst feature is especially useful for reducing packet losses under the following circumstances:
· Broadcast or multicast traffic is intensive, resulting in bursts of traffic.
· Traffic enters a device from a high-speed interface and goes out of a low-speed interface.
· Traffic enters a device from multiple same-rate interfaces and goes out of an interface with the same rate.
The default data buffer settings will be changed after the Burst feature is enabled. You can display the data buffer settings by using the display buffer command.
Examples
# Enable the Burst feature.
<Sysname> system-view
[Sysname] burst-mode enable
display buffer usage
Use display buffer usage to display buffer usage.
Syntax
display buffer usage [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
slot slot-number: Specifies an IRF member device by its member ID (slot number). If you do not specify an IRF member device, this command displays buffer usage for all IRF member devices.
Examples
# Display buffer usage.
<Sysname> display buffer usage
Total cell resource usage on slot 1 :
Total: 23592 KB
Used : 0 KB
Free : 23592 KB
5sec 1min 5min
------------------------------------------------------------------
TW-FGE1/0/1 0% 0% 0%
TW-FGE1/0/2 0% 0% 0%
TW-FGE1/0/3 0% 0% 0%
TW-FGE1/0/4 0% 0% 0%
TW-FGE1/0/5 0% 0% 0%
TW-FGE1/0/6 0% 0% 0%
TW-FGE1/0/7 0% 0% 0%
TW-FGE1/0/8 0% 0% 0%
TW-FGE1/0/9 0% 0% 0%
TW-FGE1/0/10 0% 0% 0%
TW-FGE1/0/11 0% 0% 0%
TW-FGE1/0/12 0% 0% 0%
TW-FGE1/0/13 0% 0% 0%
TW-FGE1/0/14 0% 0% 0%
TW-FGE1/0/15 0% 0% 0%
TW-FGE1/0/16 0% 0% 0%
TW-FGE1/0/17 0% 0% 0%
TW-FGE1/0/18 0% 0% 0%
TW-FGE1/0/19 0% 0% 0%
TW-FGE1/0/20 0% 0% 0%
TW-FGE1/0/21 0% 0% 0%
TW-FGE1/0/22 0% 0% 0%
TW-FGE1/0/23 0% 0% 0%
TW-FGE1/0/24 0% 0% 0%
TW-FGE1/0/25 0% 0% 0%
TW-FGE1/0/26 0% 0% 0%
TW-FGE1/0/27 0% 0% 0%
TW-FGE1/0/28 0% 0% 0%
TW-FGE1/0/29 0% 0% 0%
TW-FGE1/0/30 0% 0% 0%
TW-FGE1/0/31 0% 0% 0%
TW-FGE1/0/32 0% 0% 0%
TW-FGE1/0/33 0% 0% 0%
TW-FGE1/0/34 0% 0% 0%
TW-FGE1/0/35 0% 0% 0%
TW-FGE1/0/36 0% 0% 0%
TW-FGE1/0/37 0% 0% 0%
TW-FGE1/0/38 0% 0% 0%
TW-FGE1/0/39 0% 0% 0%
TW-FGE1/0/40 0% 0% 0%
TW-FGE1/0/41 0% 0% 0%
TW-FGE1/0/42 0% 0% 0%
TW-FGE1/0/43 0% 0% 0%
TW-FGE1/0/44 0% 0% 0%
TW-FGE1/0/45 0% 0% 0%
TW-FGE1/0/46 0% 0% 0%
TW-FGE1/0/47 0% 0% 0%
TW-FGE1/0/48 0% 0% 0%
HGE1/0/49 0% 0% 0%
HGE1/0/50 0% 0% 0%
HGE1/0/51 0% 0% 0%
HGE1/0/52 0% 0% 0%
HGE1/0/53 0% 0% 0%
HGE1/0/54 0% 0% 0%
HGE1/0/55 0% 0% 0%
HGE1/0/56 0% 0% 0%
Table 1 Command output
Field |
Description |
Total |
Total size of the data buffer. |
Used |
Size of used data buffer. |
Free |
Size of free data buffer. |
5sec |
Percentage of the buffer that the port uses for the last 5 seconds. |
1min |
Percentage of the buffer that the port uses for the last 1 minute. |
5min |
Percentage of the buffer that the port uses for the last 5 minutes. |
display buffer usage interface
Use display buffer usage interface to display buffer usage statistics for interfaces.
Syntax
display buffer usage interface [ interface-type [ interface-number ] ] [ verbose ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface-type [ interface-number ]: Specifies an interface by its type and number. If you do not specify the interface-type argument, this command displays buffer usage statistics for all Ethernet interfaces. If you specify the interface-type argument without the interface-number argument, this command displays buffer usage statistics for all Ethernet interfaces of the specified type.
verbose: Displays detailed buffer usage statistics. If you do not specify this keyword, the command displays brief buffer usage statistics.
Examples
# Display brief buffer usage statistics for Twenty-FiveGigE 1/0/1.
<Sysname> display buffer usage interface twenty-fivegige 1/0/1
Interface QueueID Total Used Threshold(%) Violations
--------------------------------------------------------------------------------
25GE1/0/1 0 40 cell 800 bytes 1 cell 20 bytes 30 0
1 40 cell 800 bytes 1 cell 20 bytes 30 0
2 40 cell 800 bytes 1 cell 20 bytes 30 0
3 40 cell 800 bytes 1 cell 20 bytes 30 0
4 40 cell 800 bytes 1 cell 20 bytes 30 0
5 40 cell 800 bytes 1 cell 20 bytes 30 0
6 40 cell 800 bytes 1 cell 20 bytes 30 0
7 40 cell 800 bytes 1 cell 20 bytes 30 0
Table 2 Command output
Field |
Description |
Total |
Data buffer size in bytes allowed for a queue. |
Used |
Data buffer size in bytes that has been used by a queue. |
Threshold(%) |
Buffer usage threshold for a queue. The threshold value is the same as the per-interface threshold value. |
Violations |
Number of threshold violations for a queue. The value of this field is reset upon a switch reboot. |
# Display detailed buffer usage statistics for Twenty-FiveGigE 1/0/1.
[Sysname] display buffer usage interface twenty-fivegige 1/0/1 verbose
25GE1/0/1
Ingress:
QueueID: 0
Total: 36 cell 55000 bytes Used: 0 cell 0 bytes
Threshold(%): 3 Violations: 4
Shared: 1 cell 5 bytes Headroom: 6 cell 30 bytes
Xoff threshold: 36 cell 55000 bytes Is dynamic: 0
Used(%): 0 Free: 36 cell 55000 bytes
UsedPeak: 0 cell 0 bytes HeadroomUsed(%): 0
HeadroomFree: 0 cell 0 bytes HeadroomPeak: 0 cell 0 bytes
UsedPeakTime: 2022-04-19 20:20:43 HeadroomPeakTime: 2022-04-19 20:20:43
…
QueueID: 7
Total: 36 cell 55000 bytes Used: 0 cell 0 bytes
Threshold(%): 3 Violations: 4
Shared: 1 cell 5 bytes Headroom: 6 cell 30 bytes
Xoff threshold: 36 cell 55000 bytes Is dynamic: 0
Used(%): 0 Free: 36 cell 55000 bytes
UsedPeak: 0 cell 0 bytes HeadroomUsed(%): 0
HeadroomFree: 0 cell 0 bytes HeadroomPeak: 0 cell 0 bytes
UsedPeakTime: 2022-04-19 21:20:43 HeadroomPeakTime: 2022-04-19 21:20:43
Egress:
QueueID: 0
Total: 36 cell 55000 bytes Used: 0 cell 0 bytes
Threshold(%): 22 Violations: 12
TailDropThreshold: 1 cell 13 bytes Is dynamic: 0
DeadlockCount: 0 DeadlockRecover: 0
Used(%): 0 Free: 36 cell 55000 bytes
UsedPeak: 0 cell 0 bytes UsedPeakTime: -
…
QueueID: 7
Total: 36 cell 55000 bytes Used: 0 cell 0 bytes
Threshold(%): 22 Violations: 12
TailDropThreshold: 1 cell 13 bytes Is dynamic: 0
DeadlockCount: 0 DeadlockRecover: 0
Used(%): 0 Free: 36 cell 55000 bytes
UsedPeak: 0 cell 0 bytes UsedPeakTime: -
Table 3 Command output
Field |
Description |
Egress |
Usage statistics for the egress buffer. |
Total |
Data buffer size allowed for a queue, in bytes. |
Used |
Data buffer size that has been used by a queue, in bytes. |
Threshold(%) |
Buffer usage threshold for a queue. The threshold value is the same as the per-interface threshold value. |
Violations |
Number of threshold violations for a queue. The value of this field is reset upon a switch reboot. |
Shared |
Number of cell resources in the shared area used by a queue. |
Xoffthres |
Back pressure frame triggering threshold. If a dynamic back pressure frame triggering threshold is configured, this field displays a percentage value. If a static back pressure frame triggering threshold is configured, this field displays an absolute value. For commands to configure back pressure frame triggering thresholds, see PFC commands in Layer 2—LAN Switching Command Reference. |
TailDropThresh |
Tail drop threshold, in the number of cell resources calculated according to the ratio value set in the buffer queue shared command. |
IsDynamic |
For the inbound direction, this field can be one of the following values: · 0—Indicates a static back pressure frame triggering threshold. · 1—Indicates a dynamic back pressure frame triggering threshold. For the outbound direction, this field can only be 1, which indicates a dynamic tail drop threshold. |
Used(%) |
Buffer usage in percentage. |
Free |
Free buffer in bytes. |
UsedPeak |
Peak used buffer in bytes during the time between two executions of the display buffer usage interface command. |
UsedPeakTime |
Peak time for buffer use. This field displays a hyphen (-) if the buffer is not used. |
DeadlockCount |
Number of times the device entered the PFC deadlock state in the egress buffer. |
DeadlockRecover |
Number of times the device released the PFC deadlock state in the egress buffer. |
TCB commands
buffer transient-capture enable
Use buffer transient-capture enable to enable and configure TCB.
Use undo buffer transient-capture enable to disable TCB.
Syntax
System view:
buffer transient-capture global [ slot slot-number ] { egress | ingress } enable [ no-local-analysis ] [ acl { ipv4-acl-number | name ipv4-acl-name } ] [ start-threshold start-threshold-value stop-threshold stop-threshold-value ] [ frozen-number frozen-number frozen-timer timer-value ] [ pre-sample-rate pre-sample-rate post-sample-rate post-sample-rate ] [ poll-frequency frequency-value ]
undo buffer transient-capture global [ slot slot-number ] enable
Interface view:
buffer transient-capture { egress [ queue queue-id ] | ingress } enable [ no-local-analysis ] [ acl { ipv4-acl-number | name ipv4-acl-name } ] [ start-threshold start-threshold-value stop-threshold stop-threshold-value ] [ frozen-number frozen-number frozen-timer timer-value ] [ pre-sample-rate pre-sample-rate post-sample-rate post-sample-rate ] [ poll-frequency frequency-value ]
undo buffer transient-capture enable
Default
TCB is disabled.
Views
System view
Layer 2 Ethernet interface view
Layer 3 Ethernet interface view
Predefined user roles
network-admin
Parameters
global: Configures TCB globally. This keyword is supported only in system view.
slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command configures TCB for the master device.
egress: Specifies the egress buffer.
queue-id: Specifies a queue by its ID in the range of 0 to 7. If you do not specify a queue, this command enables TCB for all queues. This argument is supported only in interface view.
ingress: Specifies the ingress buffer.
no-local-analysis: Reports raw packet data and packet drop reason without performing local analysis. If you do not specify this parameter, local analysis is performed.
acl: Specifies an ACL. If you do not specify an ACL, this command enables TCB for all traffic.
· ipv4-acl-number: Specifies an advanced IPv4 ACL by its number in the range of 3000 to 3999.
· name ipv4-acl-name: Specifies an advanced IPv4 ACL by its name, a case-insensitive string of 1 to 63 characters. The ACL name must start with an English letter.
start-threshold start-threshold-value: Specifies the queue length in bytes above which packet capturing will be started. The value range for the start-threshold-value argument is 1 to 67108352. The default is 2500. The value for the start-threshold-value argument must be greater than the value for the stop-threshold-value argument.
stop-threshold stop-threshold-value: Specifies the queue length in bytes below which packet capturing will be stopped. The value range for the stop-threshold-value argument is 1 to 67108352. The default is 1500. The value for the stop-threshold-value argument must be smaller than the value for the start-threshold-value argument.
frozen-number frozen-number: Specifies the number of packets to be captured before the TCB state machine moves to the frozen state. The value range for the frozen-number argument is 3 to 1024. The default is 256.
frozen-timer timer-value: Specifies the capture timer for moving the TCB state machine to the frozen state. The value range for the timer-value argument is 1 to 500. The default is 500.
pre-sample-rate pre-sample-rate: Specifies the number of packets captured in the pre-trigger state. The value range for the pre-sample-rate argument is 1 to 16. The default is 16. The specified number of packets are sampled out of 16 packets. If you specify 16, all packets are captured.
post-sample-rate post-sample-rate: Specifies the number of packets captured in the post-trigger state. The value range for the post-sample-rate argument is 1 to 16. The default is 16. The specified number of packets are sampled out of 16 packets. If you specify 16, all packets are captured.
poll-frequency frequency-value: Specifies the number of times that data is reported per minute. The value range for the frequency-value argument is 1 to 600. The default is 20.
Usage guidelines
The TCB feature monitors packet drop events on queues. When a packet is dropped on a queue, the system collects the drop time, drop reason, packet metadata, and other information and reports them to an NMS through gRPC.
You can configure TCB in system view or interface view, but not in both views at the same time. For example, if you have configured TCB in system view, to configure TCB in interface view, you must first delete the TCB configuration in system view.
The TCB configuration in system view takes effect on all TCB-capable interfaces. The TCB configuration in interface view takes effect only on the specified interface.
Only one interface can be configured with TCB when you configure TCB in interface view.
Only the default values of the following options take effect:
· start-threshold start-threshold-value
· stop-threshold stop-threshold-value
· frozen-number frozen-number
· frozen-timer timer-value
· pre-sample-rate pre-sample-rate
· post-sample-rate post-sample-rate
· poll-frequency frequency-value
Examples
# Configure TCB for slot 1.
<Sysname> system-view
[Sysname] buffer transient-capture global slot 1 egress enable no-local-analysis acl 3000
# Configure TCB on Twenty-FiveGigE 1/0/1.
<Sysname> system-view
[Sysname] interface twenty-fivegige 1/0/1
[Sysname-Twenty-FiveGigE1/0/1] buffer transient-capture egress enable no-local-analysis acl 3000
display buffer transient-capture packet-drop
Use display buffer transient-capture packet-drop to display packet drop information.
Syntax
display buffer transient-capture packet-drop slot slot-number { ethernet | ipv4 | ipv6 }
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
ethernet: Displays packet drop information for Ethernet frames.
ipv4: Displays packet drop information for IPv4 packets.
ipv6: Displays packet drop information for IPv6 packets.
slot slot-number: Specifies an IRF member device by its member ID (slot number).
Examples
# Display packet drop information for slot 1.
<Sysname> display buffer transient-capture packet-drop slot 1 ipv4
TCB STATUS: EgressPort 25GE1/0/1
--------------------------------------------------------------------------------
No. Time SMAC DMAC VLAN SIP DIP SPort DPort Queue IfName Reason
--------------------------------------------------------------------------------
Total Drop Packets in Ring Buffer of XPE 0:2047
0 8a44900 0010-9400-0005 0010-9400-0002 100 192.168.1.2 192.168.0.1 0 0 0 25GE1/0/1 2
Total Drop Packets in Ring Buffer of XPE 1:2047
0 8a44800 0010-9400-0005 0010-9400-0002 100 192.168.1.2 192.168.0.1 0 0 0 25GE1/0/1 2
Total Drop Packets in Ring Buffer of XPE 2:2047
0 8a44800 0010-9400-0005 0010-9400-0002 100 192.168.1.2 192.168.0.1 0 0 0 25GE1/0/1 2
Total Drop Packets in Ring Buffer of XPE 3:2047
0 8a44800 0010-9400-0005 0010-9400-0002 100 192.168.1.2 192.168.0.1 0 0 0 25GE1/0/1 2
Table 4 Command output
Field |
Description |
TCB STATUS |
TCB status: · EgressPort 25GE1/0/1—TCB is configured in the outbound direction of the interface. · Global—TCB is configured globally. |
Time |
Time when packets were dropped, in the form of UNIX timestamps (time since 00:00:00 01/01/1970). |
Reason |
Packet drop reason: · 1—Dropped when enqueued. · 2—Dropped when dequeued. · 3—Dropped by WRED. · 4—Dropped due to insufficient cell resources. |
Total packets dropped on XPE0 |
Total number of packets dropped on XPE0. XPE is a data buffer type. |