18-System-Guard命令
本章节下载: 18-System-Guard命令 (107.20 KB)
【命令】
display system-guard [ | { begin | exclude | include } regular-expression ]
【视图】
任意视图
【缺省级别】
1:监控级
【参数】
|:使用正则表达式对显示信息进行过滤。有关正则表达式的详细介绍,请参见“基础配置指导”中的“CLI”。
begin:从包含指定正则表达式的行开始显示。
exclude:只显示不包含指定正则表达式的行。
include:只显示包含指定正则表达式的行。
regular-expression:表示正则表达式,为1~256个字符的字符串,区分大小写。
【描述】
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 360 queue1 360 queue2 360 queue3 360
queue4 1500 queue5 360 queue6 360 queue7 360
表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
【视图】
系统视图
【缺省级别】
2:系统级
【参数】
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
【视图】
二层以太网端口视图
【缺省级别】
2:系统级
【参数】
无
【描述】
system-guard control命令用来使能端口的防攻击控制功能。undo system-guard control命令用来关闭对防攻击端口的控制。
设备自动下发ACL方式对于某些攻击报文(比如IGMP报文)无法起作用。如果检测到ACL无法起作用的攻击报文,系统会根据该端口是否打开控制功能来决定是否将端口关闭。如果使能了控制功能,系统会将该端口关闭。
缺省情况下,端口的防攻击控制处于关闭状态。
【举例】
# 在端口GigabitEthernet1/0/1上使能防攻击控制功能。
<sysname> system-view
[sysname] interface gigabitethernet 1/0/1
[sysname-GigabitEthernet1/0/1] system-guard control
【命令】
system-guard detect-threshold threshold-value
undo system-guard detect-threshold
【视图】
系统视图
【缺省级别】
2:系统级
【参数】
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
【视图】
二层以太网端口视图
【缺省级别】
2:系统级
【参数】
无
【描述】
system-guard enable命令用来在接口上使能防攻击功能。undo system-guard enable命令用来在接口上关闭防攻击功能。
缺省情况下,接口上的防攻击功能处于关闭状态。
【举例】
# 在端口GigabitEthernet1/0/1上使能防攻击功能。
<Sysname> system-view
[Sysname] interface gigabitethernet1/0/1
[Sysname-GigabitEthernet1/0/1] system-guard enable
【命令】
system-guard rate-limit queue queue-number rate&<1-8>
undo system-guard rate-limit [ queue queue-number &<1-8> ]
【视图】
系统视图
【缺省级别】
2:系统级
【参数】
queue queue-number:对指定队列的报文进行限速,queue-number取值范围为0~7。&<1-8>表示前面的参数最多可以输入8次。
rate:为指定队列设置的限速值,取值范围为5~1000,取值范围为pps(packets per second,每秒转发的报文数)。
【描述】
system-guard rate-limit命令用来配置指定队列的报文限速值,如果某个队列每秒上送CPU的报文数量超过限速值,超出的报文将被丢弃。
undo system-guard rate-limit用来恢复缺省情况。
缺省情况下,防攻击功能对队列4的报文限速值为1500pps,对其它队列的报文限制速值为360pps。
【举例】
# 配置队列0的限速值为200 pps。
<Sysname> system-view
[Sysname] system-guard rate-limit queue 0 200
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!