更新时间:2025-07-14
19.1PFC命令
19.1.1priority-flow-control mode
命令功能
使用此命令在端口上使能priority-based flowcontrol的功能。使用该命令的no形式去使能priority-based flowcontrol的功能。
命令语法
priority-flow-control mode ( on | auto )
no priority-flow-control
参数 |
参数说明 |
参数取值 |
on |
强制使能PFC,不关心peer状态 |
- |
auto |
根据Peer自协商状态使能PFC |
- |
命令模式
端口配置模式
默认配置
不启用
使用说明
该功能只在物理口有效,默认在priority 3上使能priority-based flowcontrol的功能。
举例说明
下面的例子表明如何在端口上强制启用priority-flow-control的功能(不与对端协商)
Switch# configure terminal
Switch(config)# interface eth-0-1
Switch(config-if)# priority-flow-control mode on
下面的例子表明如何在端口上启用priority-flow-control的功能(需要与对端协商)
Switch# configure terminal
Switch(config)# interface eth-0-1
Switch(config-if)# priority-flow-control mode auto
相关命令
无
19.1.2priority-flow-control enable priority
命令功能
使用此命令使能或去使能基于优先级的flowcontrol
命令语法
priority-flow-control enable priority { 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 }
no priority-flow-control enable priority { 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 }
命令模式
端口配置模式
默认配置
优先级3上的flowcontrol默认使能
使用说明
使用priority-flow-control命令配置端口是否发送pause帧。
该功能只在物理口有效。
举例说明
以下示例展示如何使用优先权2,3,5,7的flowcontrol
Switch# configure terminal
Switch(config-if)# Priority-flow-control enable priority 2 3 5 7
相关命令
priority-flow-control mode (on | auto)
lldp tlv 8021-org-specific dcbx
19.1.3show priority-flow-control
命令功能
使用此命令查看基于优先级的flowcontrol信息
命令语法
show priority-flow-control ( INTERFACE | )
参数 |
参数说明 |
参数取值 |
INTERFACE |
端口名 |
支持物理口 |
命令模式
特权模式
默认配置
无
使用说明
使用此命令查看基于优先级的flowcontrol信息
举例说明
以下示例展示如何查看基于优先级的flowcontrol信息
Switch# show priority-flow-control interface eth-0-1
Switch# show priority-flow-control
Port PFC-enable PFC-enable on priority
admin oper admin oper
---------------------------------------------------------------
eth-0-1 off off off off
相关命令
无
19.1.4show priority-flow-control statistics
命令功能
使用此命令查看基于优先级的flowcontrol统计信息
命令语法
show priority-flow-control statistics ( INTERFACE | )
参数 |
参数说明 |
参数取值 |
INTERFACE |
端口名 |
支持物理口 |
命令模式
特权模式
默认配置
无
使用说明
使用此命令查看基于优先级的flowcontrol统计信息
举例说明
以下示例展示如何查看基于优先级的flowcontrol统计信息
Switch# show priority-flow-control statistics interface eth-0-1
Switch# show priority-flow-control statistics
Port RxPause TxPause
--------------------------------------------------
eth-0-1 0 0
相关命令
无
19.1.5priority-flow-control deadlock precision
命令功能
使用此命令配置PFC deadlock侦测的时间精度
命令语法
priority-flow-control deadlock precision PRECISION
no priority-flow-control deadlock precision
参数 |
参数说明 |
参数取值 |
PRECISION |
时间精度,单位为毫秒 |
10-50 |
命令模式
全局配置模式
默认配置
10
使用说明
使用此命令配置PFC deadlock侦测的时间精度
举例说明
以下示例展示如何配置PFC deadlock侦测的时间精度为20
Switch# configure terminal
Switch(config)# priority-flow-control deadlock precision 20
以下示例展示如何将PFC deadlock侦测的时间精度恢复到默认的10
Switch# configure terminal
Switch(config)# no priority-flow-control deadlock precision
相关命令
无
19.1.6priority-flow-control deadlock priority
命令功能
使用此命令配置端口PFC deadlock侦测功能
命令语法
priority-flow-control deadlock priority PRI1 ( PRI2 | ) ( detect DETECT recover RECOVER | )
no priority-flow-control deadlock priority ( PRI1 | ) ( PRI2 | )
参数 |
参数说明 |
参数取值 |
PRI1 |
第一个需要被侦测的Traffic-priority的值 |
0-7 |
PRI2 |
第二个需要被侦测的Traffic-priority的值 |
0-7 |
DETECT |
发起侦测的时间片次数 |
1-30 |
RECOVER |
侦测恢复时间,单位为毫秒 |
0-3000 |
命令模式
端口配置模式
默认配置
默认没有配置端口PFC deadlock侦测功能
不指定Detect time时,默认为15
不指定Recover time时,默认为150
使用说明
使用此命令配置端口PFC deadlock侦测功能
举例说明
以下示例展示如何配置端口PFC deadlock侦测功能
Switch# configure terminal
Switch(config)# interface eth-0-1
Switch(config-if)# priority-flow-control deadlock priority 5 6 detect 20 recover 300
相关命令
无
19.1.7priority-flow-control deadlock limit priority
命令功能
使用此命令配置端口PFC deadlock门限功能
命令语法
priority-flow-control deadlock limit priority PRI1 ( PRI2 | ) ( frequency FREQUENCY period PERIOD | )
no priority-flow-control deadlock limit priority ( PRI1 | ) ( PRI2 | )
参数 |
参数说明 |
参数取值 |
PRI1 |
第一个需要被侦测的Traffic-priority的值 |
0-7 |
PRI2 |
第二个需要被侦测的Traffic-priority的值 |
0-7 |
FREQUENCY |
门限次数 |
10-100000 |
PERIOD |
侦测周期,单位为分钟 |
1-5 |
命令模式
端口配置模式
默认配置
默认没有配置端口PFC deadlock门限功能
不指定Frequency时,默认为10
不指定Period时,默认为1
使用说明
使用此命令配置端口PFC deadlock门限功能
举例说明
以下示例展示如何配置端口PFC deadlock门限功能
Switch# configure terminal
Switch(config)# interface eth-0-1
Switch(config-if)# priority-flow-control deadlock limit priority 7 frequency 100 period 5
相关命令
无
19.1.8show priority-flow-control deadlock status
命令功能
使用此命令显示PFC deadlock状态信息
命令语法
show priority-flow-control deadlock status
命令模式
特权模式
默认配置
无
使用说明
使用此命令查看PFC deadlock状态信息
举例说明
以下示例展示如何查看PFC deadlock状态信息
Switch# show priority-flow-control deadlock status
None
相关命令
无
19.1.9show priority-flow-control deadlock statistics
命令功能
使用此命令显示PFC deadlock统计信息
命令语法
show priority-flow-control deadlock statistics ( interface IFPHYSICAL | )
参数 |
参数说明 |
参数取值 |
IFPHYSICAL |
接口名 |
支持物理口 |
命令模式
特权模式
默认配置
无
使用说明
使用此命令查看PFC deadlock统计信息
举例说明
以下示例展示如何查看PFC deadlock统计信息
Switch# show priority-flow-control deadlock statistics interface eth-0-1
None
相关命令
无
19.1.10clear priority-flow-control deadlock statistics
命令功能
使用此命令清除PFC deadlock统计信息
命令语法
clear priority-flow-control deadlock statistics ( interface IFPHYSICAL | )
参数 |
参数说明 |
参数取值 |
IFPHYSICAL |
接口名 |
支持物理口 |
命令模式
特权模式
默认配置
无
使用说明
使用此命令清除PFC deadlock统计信息
举例说明
以下示例展示如何清除PFC deadlock统计信息
Switch# clear priority-flow-control deadlock statistics interface eth-0-1
相关命令
无
19.2EFD命令
19.2.1efd enable
命令功能
使用该命令在端口上启用EFD检测。使用该命令的no形式去使能端口的EFD检测功能
命令语法
efd enable
no efd enable
命令模式
端口配置模式
默认配置
默认不启用
使用说明
当一条流超过设置的EFD检测速率时会认为一条大象流。通过命令” efd detect speed <1-10000>” 可以设置EFD检测速率。
举例说明
下面的例子实现如何在端口上启用EFD检测
Switch# configure terminal
Switch(config-if)# efd enable
相关命令
无
19.2.2efd tcp-only enable
命令功能
使用该命令使能全局控制只对TCP流进行大象流检测。使用该命令的no形式去使能全局控制只对TCP流进行大象流检测。
命令语法
efd tcp-only enable
no efd tcp-only enable
命令模式
全局配置模式
默认配置
默认对所有流进行大象流检测
使用说明
无
举例说明
下面的例子实现只对TCP流进行大象流检测
Switch# configure terminal
Switch(config)# efd tcp-only enable
相关命令
无
19.2.3efd detect speed
命令功能
使用该命令设置EFD流量的检测阈值。
命令语法
efd detect speed SPEED
efd detect speed
参数 |
参数说明 |
参数取值 |
SPEED |
检测阈值,单位Mbps |
1-10000 |
命令模式
全局配置模式
默认配置
50Mbps
使用说明
无
举例说明
下面的例子实现如何将检测速率设置为60Mbps
Switch# configure terminal
Switch(config)# efd detect speed 60
相关命令
无
19.2.4efd detect granularity
命令功能
使用该命令设置计算EFD检测速率的粒度, 粒度越大, 量化误差越大, 粒度越小, 量化误差越小。
命令语法
efd detect granularity ( 4B | 8B | 16B | 32B )
参数 |
参数说明 |
参数取值 |
4B|8B|16B|32B |
检测速率的粒度 |
4B|8B|16B|32B |
命令模式
全局配置模式
默认配置
16B
使用说明
速率是Rate, 时间间隔是Interval, 粒度的类型是Granularity,那么这三者间的关系是(Rate*Interval)>> Granularity得出的值的位宽是固定的。
举例说明
下面的例子实现如何将检测粒度设置为32B
Switch# configure terminal
Switch(config)# efd detect granularity 32B
相关命令
无
19.2.5efd detect time-interval
命令功能
使用该命令设置计算EFD检测速率的时间间隔。 检测速率是检测时间间隔内的平均速率。
命令语法
efd detect time-interval INTERVAL
参数 |
参数说明 |
参数取值 |
INTERVAL |
检测速率的时间间隔,单位毫秒 |
10-100000 |
命令模式
全局配置模式
默认配置
30 ms
使用说明
无
举例说明
下面的例子实现如何将检测周期设置为100ms
Switch# configure terminal
Switch(config)# efd detect time-interval 100
相关命令
无
19.2.6efd detect min-pkt-size
命令功能
使用该命令设置大象流的最小报文长度。使用该命令的no形式删除设置大象流的最小报文长度。
命令语法
efd detect min-pkt-size SIZE
no efd detect min-pkt-size
参数 |
参数说明 |
参数取值 |
SIZE |
大象流的最小报文长度,单位字节 |
64-9216 |
命令模式
全局配置模式
默认配置
无
使用说明
单位是字节。
举例说明
下面的例子实现如何将大象流最小报文大小设置为300
Switch# configure terminal
Switch(config)# efd detect min-pkt-size 300
相关命令
show efd configuration
19.2.7efd aging-period
命令功能
使用该命令设置被检测为EFD流量的老化时间。
命令语法
efd aging-period PERIOD
参数 |
参数说明 |
参数取值 |
PERIOD |
大象流的老化时间倍数 |
2-7 |
命令模式
全局配置模式
默认配置
4倍时间
使用说明
老化时间是EFD检测速率的时间间隔的倍数
举例说明
下面的例子实现如何将老化时间设为检测速率的时间间隔的3倍
Switch# configure terminal
Switch(config)# efd aging-period 3
相关命令
无
19.2.8efd redirect to interface
命令功能
使用该命令将被识别为EFD的流量重定向到指定的端口上。
命令语法
efd redirect to interface IFNAME
参数 |
参数说明 |
参数取值 |
IFNAME |
重定向的端口名 |
支持 physical/aggregation 端口 |
命令模式
全局配置模式
默认配置
不启用重定向
使用说明
启用重定向后, 会改变报文原来的转发目的地, 按照配置的重定向端口转发。重定向端口可以是物理口或者的链路聚合口。
举例说明
下面的例子实现如何将EFD流量重定向到eth-0-2口
Switch# configure terminal
Switch(config)# efd redirect to interface eth-0-2
相关命令
无
19.2.9efd ipg enable
命令功能
通过该命令控制计算EFD检测速率的时候将报文IPG计算在内。通过该命令的no形式控制计算EFD检测速率的时候不将将报文IPG计算在内。
命令语法
efd ipg enable
no efd ipg enable
命令模式
全局配置模式
默认配置
不使能IPG
使用说明
无
举例说明
下面的例子实现使能EFD IPG
Switch# configure terminal
Switch(config)# efd ipg enable
相关命令
无
19.2.10efd notify enable
命令功能
使用该命令使能大象流的监测通知。使用该命令的no形式去使能大象流的监测通知。
命令语法
efd notify enable IP_ADDR ( PORT | )
no efd notify enable
参数 |
参数说明 |
参数取值 |
IP_ADDR |
配置服务器IP地址 |
IPv4 地址 |
PORT |
配置服务器监听的UDP端口, |
1-65535 |
命令模式
全局配置模式
默认配置
功能默认关闭。如不指定端口,默认UDP端口号为20007。
使用说明
大象流监测通知功能打开后,会将后续发现的大象流通知到服务器。通知的UDP报文中数据格式如下: |—-rsv—- | ver| code| |———length———–| |—type—-|——len—-| |———-value———–|
……
举例说明
下面的例子实现如何打大象流的监测通知功能
Switch# configure terminal
Switch(config)# efd notify enable 10.10.10.1
相关命令
efd enable
efd notify packet
19.2.11efd notify packet
命令功能
使用该命令使大象流的监测通知报文中携带原始packet。使用该命令的no形式使大象流的监测通知报文中不携带原始packet。
命令语法
efd notify packet
no efd notify packet
命令模式
全局配置模式
默认配置
关闭
使用说明
大象流监测通知功能打开后,会将后续发现的大象流通知到服务器。并携带原始报文信息,最大256字节。
举例说明
下面的例子实现如何使通知服务器的报文携带原始packet
Switch# configure terminal
Switch(config)# efd notify packet
相关命令
efd enable
efd notify enable
19.2.12efd black-hole-route gw
命令功能
使用该命令使能黑洞路由功能,并配置黑洞路由的网关地址以及该路由的tag值。使用该命令的no形式去使能黑洞路由功能,并删除配置黑洞路由的网关地址以及该路由的tag值。
命令语法
efd black-hole-route gw IP_ADDR ( | tag TAG_VALUE )
no efd black-hole-route
参数 |
参数说明 |
参数取值 |
IP_ADDR |
黑洞路由的网关地址 |
IPv4 地址 |
TAG_VALUE |
黑洞路由的tag |
0-4294967295 |
命令模式
全局配置模式
默认配置
无
使用说明
使能黑洞路由功能,检测到大象流后,会生成黑洞路由,将大象流的下一跳地址指向配置的网关地址。
举例说明
下面的例子配置了EFD 黑洞路由的网关地址及其tag
Switch# efd black-hole-route gw 1.2.3.4 tag 876
相关命令
show efd bhr information detail
19.2.13efd black-hole-route aging-timer
命令功能
使用该命令配置黑洞路由的老化时间。使用该命令的no形式删除配置黑洞路由的老化时间。
命令语法
efd black-hole-route aging-timer ( 0 | value )
no efd black-hole-route aging-timer ( 0 | VALUE )
参数 |
参数说明 |
参数取值 |
0 |
生成的黑洞路由不老化 |
- |
VALUE |
生成的黑洞路由老化时间 |
10-1000000 秒 |
命令模式
全局配置模式
默认配置
300s
使用说明
无
举例说明
下面的例子配置了EFD 黑洞路由的老化时间
Switch# efd black-hole-route aging-timer 1000
相关命令
无
19.2.14efd syslog enable
命令功能
使用该命令配置显示大象流检测信息.使用该命令的no形式删除显示大象流检测信息的配置
命令语法
efd syslog enable
no efd syslog enable
命令模式
全局配置模式
默认配置
启用
使用说明
无
举例说明
下面的例子配置显示大象流检测信息
Switch# efd syslog enable
相关命令
无
19.2.15show efd bhr information
命令功能
显示efd黑洞路由的配置信息和生成的黑洞路由信息。
命令语法
show efd bhr information ( detail | )
命令模式
特权模式
默认配置
无
使用说明
无
举例说明
下面的例子显示了黑洞路由的信息
Switch# show efd bhr information detail
Elephant flow detection BHR configuration information:
* BHR - Black Hole Route
--------------------------------------------------
Auto install BHR : Enabled
BHR gateway : 1.2.3.4
BHR count : 1
BHR aging timer : 300
BHR route tag : 876
--------------------------
BHR Prefix, Age Time :
--------------------------
12.12.12.2/32, 1 min
相关命令
efd black-hole-route gw
efd black-hole-route aging-timer
19.2.16show efd configuration
命令功能
使用大象流的配置。
命令语法
show efd configuration
命令模式
特权模式
默认配置
无
使用说明
无
举例说明
下面的例子表明如何查看大象流配置信息
Switch# show efd configuration
Elephant flow detection configuration information:
---------------------------------------------------
Detect rate : 50 Mbps
Detect granularity : 16B
Detect time interval : 30 ms
Black-hole-route gateway : 0.0.0.0
Black-hole-route tag : 0
Black-hole-route aging time: 0
EFD syslog : Enable
EFD aging period : 4 times
EFD aging time : 120 ms ~ 150 ms
EFD detect packet type : All IP packets
EFD IPG : disable
EFD redirect interface : N/A
EFD flow-traffic-class : N/A
EFD flow-color : N/A
EFD notify : 1.2.3.4 20007
EFD notify packet : disable
EFD min-pkt-size : disable
EFD flow hash fields : source-ip
destination-ip
ip-protocol
layer4-source-port
layer4-destination-port
EFD enabled interface :
--------------------------- ---------------------------
eth-0-1 eth-0-9
eth-0-10 agg5
相关命令
无
19.2.17show efd flow table
命令功能
使用该命令显示芯片大象流信息。
命令语法
show efd flow table
命令模式
特权模式
默认配置
无
使用说明
当芯片检测到大象流后会保存大象流信息
举例说明
下面的例子表明如何查看大象流表项
Switch# show efd flow table
Current elelphant flow number is 2, valid bit count is 2
Flow Entry Status: 'V' --- Valid, '.' --- Not Valid
FlowId - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(002)00064~00095 . . . . . . . . . . . . . . . . . . . V . . . . . . . . . . . .
(005)00160~00191 . . . . . . . . . . . . . . . . . . . . V . . . . . . . . . . .
相关命令
无
19.2.18show efd flow information
命令功能
使用该命令显示大象流信息。
命令语法
show efd flow information
命令模式
特权模式
默认配置
无
使用说明
当芯片检测到大象流后会将第一个报文和收到该报文的端口发送给软件保存,该命令会显示具体端口和报文信息。
举例说明
下面的例子表明如何查看大象流信息
Switch# show efd flow information
相关命令
无
19.2.19clear efd flow information
命令功能
使用该命令清除大象流信息。
命令语法
clear efd flow information
命令模式
特权模式
默认配置
不启用
使用说明
无
举例说明
下面的例子表明如何清除大象流信息
Switch# clear efd flow information
相关命令
无