05-System-Guard命令
本章节下载: 05-System-Guard命令 (92.41 KB)
本节中提到的三层以太网接口是指已经被配置为路由模式的以太网端口,有关以太网端口模式切换的操作,请参见接入分册的“以太网端口”部分。
【命令】
display system-guard
【视图】
任意视图
【参数】
无
【描述】
display system-guard命令用来查看当前System-Guard功能的相关配置。
【举例】
# 显示当前System-Guard功能的相关配置。
<Sysname> display system-guard
system-guard detect-threshold: 300pps
system-guard aging-time : 60s
system-guard rate-limit :
queue0 300 queue1 300 queue2 300 queue3 300
queue4 300 queue5 300 queue6 300 queue7 300
表1-1 display system-guard命令显示信息描述表
项目 |
描述 |
system-guard detect-threshold |
System-Guard功能判断报文属于攻击报文的速度阈值 |
system-guard aging-time |
System-Guard防攻击策略的老化时间 |
system-guard rate-limit |
System-Guard功能对各队列报文的限速值 |
【命令】
system-guard aging-time time
undo system-guard aging-time
【视图】
系统视图
【参数】
aging-time time:防攻击策略的老化时间,即下发的防攻击策略的持续时间。单位为秒,取值范围为30~600。
【描述】
system-guard aging-time命令用来配置检测到攻击后,下发的防攻击策略的老化时间。undo system-guard aging-time命令用来恢复缺省情况。
缺省情况下,防攻击策略的老化时间为60秒。
【举例】
# 配置老化时间为100秒。
<Sysname> system-view
[Sysname] system-guard aging-time 100
【命令】
system-guard control
undo system-guard control
【视图】
二层以太网端口视图、三层以太网接口视图
【参数】
无
【描述】
system-guard control命令用来使能端口的防攻击控制功能。undo system-guard control命令用来关闭对防攻击端口的控制。
端口防攻击策略对于某些攻击报文(比如IGMP报文)无法起作用。如果检测到防攻击策略无法起作用的攻击报文,系统会根据该端口是否打开控制功能来决定是否将端口关闭。如果使能了控制功能,系统会将该端口关闭。
缺省情况下,端口的防攻击控制处于关闭状态。
【举例】
# 在接口Ethernet1/0/1上使能防攻击控制功能。
<sysname> system-view
[sysname] interface Ethernet 1/0/1
[sysname-Ethernet1/0/1] system-guard control
【命令】
system-guard detect-threshold threshold-value
undo system-guard detect-threshold
【视图】
系统视图
【参数】
detect-threshold threshold-value:判断报文攻击的速度阈值。取值范围为50~1000,单位为pps(packets per second,每秒转发的报文数)。
【描述】
system-guard detect-threshold命令用来配置判断报文攻击的速度阈值。undo system-guard detect-threshold命令用来恢复缺省情况。
缺省情况下,判断报文攻击的速度阈值为300pps。
【举例】
# 配置速度阈值为200 pps。
<Sysname> system-view
[Sysname] system-guard detect-threshold 200
【命令】
system-guard enable
undo system-guard enable
【视图】
二层以太网端口视图、三层以太网接口视图
【参数】
无
【描述】
system-guard enable命令用来在接口上使能防攻击功能。undo system-guard enable命令用来在接口上关闭防攻击功能。
缺省情况下,接口上的防攻击功能处于关闭状态。
【举例】
# 在接口Ethernet1/0/1上使能防攻击功能。
<Sysname> system-view
[Sysname] interface Ethernet1/0/1
[Sysname-Ethernet1/0/1] system-guard enable
【命令】
system-guard rate-limit { queue queue-number rate }&<1-7>
undo system-guard rate-limit [ queue queue-number ]&<1-7>
【视图】
系统视图
【参数】
queue queue-number:对指定队列的报文进行限速,queue-number取值范围为0~7。&<1-7>表示前面的参数最多可以输入7次。
rate:为指定队列设置的限速值,取值范围为5~1000,取值范围为pps(packets per second,每秒转发的报文数)。
【描述】
system-guard rate-limit命令用来配置指定队列的报文限速值,如果某个队列每秒上送CPU的报文数量超过限速值,超出的报文将被丢弃。
undo system-guard rate-limit用来恢复缺省情况。
缺省情况下,防攻击功能对各队列报文的限速值为300pps。
【举例】
# 配置队列0的限速值为200 pps。
<Sysname> system-view
[Sysname] system-guard rate-limit queue 0 200
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!