<Quidway> language-mode ?
chinese Chinese environment
english English environment
<Quidway> system-view
[Quidway] sysname ?
TEXT Host name(1 to 30 characters)
显示历史命令display history-command 显示用户键入的历史命令
# 进入系统视图。
<Quidway> system-view
返回到低级别命令视图quit
从任意的非用户视图返回到用户视图return
显示系统时钟display clock
显示当前配置信息display current-configuration
显示当前视图的运行配置display this
显示终端用户display users [ all ]
显示系统版本display version [ slot-id ]
锁定用户界面lock
3.2.2 设置S-switch 设备时间
请在用户视图下进行下列操作。
操作命令
设置UTC 标准时间clock datetime time
设置采用夏时制clock daylight-saving-time time-zone-name oneyear
start-time start-date end-time end-date offset
设置所在的时区clock timezone
切换语言模式
请在用户视图下进行下列操作。
操作命令
切换为中文模式language-mode chinese
切换为英文模式language-mode english
切换用户级别
操作命令
[tswitch]sysname switch for test
[switch for test]super password level 15 simple 111
user-interface vty 0 4
authentication-mode password
set authentication password simple 111
user privilege level 15
quit
切换用户级别super [ level ]
配置Console 用户界面属性
配置用户界面的显示属性
背景信息
要配置用户界面的显示属性,需执行以下步骤:
操作步骤
步骤1 执行命令system-view,进入系统视图。
步骤2 执行命令user-interface { 0 | console 0 },进入用户界面视图。
步骤3 执行命令screen-length screen-length,配置终端屏幕的行数;
步骤4 执行命令history-command max-size size,配置历史命令缓冲区大小。
配置用户界面的登录参数
背景信息
要配置用户界面的登录参数,需执行以下步骤:
操作步骤
步骤1 执行命令system-view,进入系统视图。
步骤2 执行命令user-interface { 0 | console 0 },进入用户界面视图。
步骤3 执行命令idle-timeout minutes [ seconds ],配置登录用户的超时断连时间。
缺省情况下,登录用户的超时断连时间为10 分钟,即如果登录用户10 分钟内没有任何
操作,则此终端线路自动断开。使用idle-timeout 0 0 命令可以设置为永不超时断连
配置Password 方式验证登录用户
背景信息
说明
配置Password 验证方式,必须设置验证密码,否则不能登录。
操作步骤
步骤1 执行命令system-view,进入系统视图。
步骤2 执行命令user-interface { 0 | console 0 },进入用户界面视图。
步骤3 执行命令authentication-mode password,配置采用Password 验证方式。
步骤4 执行命令
要配置AAA 本地方式验证登录用户,需执行以下步骤:
操作步骤
步骤1 执行命令system-view,进入系统视图。
步骤2 执行命令user-interface { 0 | console 0 },进入用户界面视图。
步骤3 执行命令authentication-mode aaa,进入AAA 视图。
步骤4 执行命令quit,退回到系统视图。
步骤5 执行命令aaa,进入AAA 视图。
步骤6 执行命令local-user user-name password { simple | cipher } password,配置本地用户名及
密码。
步骤7 执行命令local-user user-name service-type { ftp | ppp | ssh | telnet | terminal } *,配置用
4-11
此步骤可选。
步骤8 执行命令local-user user-name level level,配置用户的登录级别。
步骤9 执行命令authentication-scheme authentication-scheme-name,创建验证方案,并进入验
证方案视图。
步骤10 执行命令authentication-mode local,配置AAA 验证方式为本地。
在
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin level 15
local-user admin ftp-directory flash:
local-user admin service-type telnet
变更AAA模式密码
sys
aaa
local-user admin password simple 999
#执行命令local-user user-name password { simple | cipher } password,创建本地用户账
号。
local-user admin service-type terminal
# 执行命令local-user user-name service-type { ftp | ppp | ssh | telnet | terminal } *,配置本地用户的服务类型。
local-user admin level 15
#执行命令local-user user-name level level,配置本地用户的优先级。
local-user admin state active
#执行命令local-user user-name state { active | block },配置本地用户的状态。
配置登录验证模式
user-interface con 0
user-interface vty 0 4
authentication-mode aaa
#设置验证模式为aaa 模式
user-interface con 0
user-interface vty 0 4
user privilege level 3
set authentication password simple
5.3.2 使能FTP 服务
操作步骤
步骤1 执行system-view 命令,进入系统视图。
步骤2 执行ftp server enable 命令,使能FTP 服务。
步骤4 执行命令idle-timeout minutes [ seconds ],配置登录用户的超时断连时间。
缺省情况下,登录用户的超时断连时间为10 分钟,即如果登录用户10 分钟内没有任何
操作,则此终端线路自动断开。使用idle-timeout 0 0 命令可以设置为永不超时断连。
idle-timeout 0 0
tfpt 配置 备份
<tswitch>tftp 10.24.29.30 put vrpcfg.zip vrpcfg.cfg.zip
Transfer file in binary mode.
Now begin to copy file to remote tftp server, please wait for a while... |
TFTP: 856 bytes sent in 1 second.
File uploaded successfully.
<tswitch>tftp 10.24.29.30 put S5300EI-V100R003C00SPC301.cc S5300EI-V100R003C00S
PC301.cc
Transfer file in binary mode.
Now begin to copy file to remote tftp server, please wait for a while... |
TFTP: 9348204 bytes sent in 84 seconds.
File uploaded successfully.
配置基本SNMP Agent 功能
操作步骤
步骤1 执行命令system-view,进入系统视图。
步骤2 执行命令snmp-agent,启动SNMP Agent 服务。
步骤3 执行命令snmp-agent sys-info version { { v1 | v2c | v3 } *| all },配置SNMP 协议的相应
版本。
步骤4 执行命令snmp-agent local-engineid engineid,配置本地SNMP 实体的引擎ID。
步骤5 (可选)执行命令snmp-agent sys-info contact contact,配置管理员联络方法。
步骤6 (可选)执行命令snmp-agent sys-info location location,配置S-switch 位置。
snmp-agent
snmp-agent community read sgdupc110
snmp-agent sys-info version v1 v3
snmp-agent usm-user v3 admin sgdu
#
1.2.5 配置MIB 视图信息
操作步骤
步骤1 执行命令system-view,进入系统视图。
步骤2 执行命令snmp-agent mib-view { excluded | included } view-name oid-tree,配置MIB 视
图信息。
检查配置结果
背景信息
完成上述配置后,请执行下面的命令检查配置结果。
操作命令
显示SNMP 报文统计信息display snmp-agent statistics
显示当前设备的引擎ID display snmp-agent { local-engineid | remoteengineid
snmp-agent
snmp-agent local-engineid 000007DB7F0000010000037C
snmp-agent community read sgdupc110
snmp-agent sys-info version v1 v3
snmp-agent usm-user v3 admin sgdupc110
}
3.2.2 配置IP 欺骗攻击防范功能
背景信息
在需要配置IP 欺骗攻击防范的S-switch 上进行如下配置。
操作步骤
步骤1 执行命令system-view,进入系统视图。
步骤2 执行命令vlan vlan-id,创建VLAN 并进入VLAN 视图。
步骤3 执行命令quit,退回系统视图。
步骤4 执行命令firewall enable,打开攻击防范使能开关。
步骤5 执行命令interface vlanif vlan-id,进入VLANIF 接口视图。
步骤6 执行命令firewall defend enable,打开攻击防范使能开关。
步骤7 执行命令quit,退回系统视图。
步骤8 执行命令firewall defend ip-spoofing enable,使能IP 欺骗攻击防范功能。
缺省情况下,IP 欺骗攻击防范功能处于关闭状态。
Quidway S5300 系列以太网交换机
配置指南-安全3 攻击防范配置
使能IP 欺骗攻击防范功能的S-switchy 备在受到IP 欺骗攻击后,将被攻击信息记录下来
并通过日志输出。输出日志中可以显示最近30 秒内系统所记录的攻击源IP 地址、攻击
开始时间、攻击结束时间、攻击报文总数等信息。其中可以显示最多12 个不同的IP 地
址,如果显示“...”表示攻击源多于12 个。
----结束
3.2.3 检查配置结果
完成上述配置后,执行下面的命令检查配置结果。
操作命令
查看S-switch 设备配置的攻击防范信息display firewall defend flag
使用display firewall defend flag 命令查看S-switch 设备配置的攻击防范信息,显示“ipspoofing”
表示IP 欺骗攻击防范功能已经使能。
配置Land 攻击防范功能
land 攻击是一种使用相同的源和目的主机和端口发送数据包到某台机器的攻击。结果通常使存在漏洞的机器崩溃。
操作步骤
步骤1 执行命令system-view,进入系统视图。
步骤2 执行命令vlan vlan-id,创建VLAN 并进入VLAN 视图。
步骤3 执行命令quit,退回系统视图。
步骤4 执行命令firewall enable,打开攻击防范使能开关。
步骤5 执行命令interface vlanif vlan-id,进入VLANIF 接口视图。
步骤6 执行命令firewall defend enable,打开攻击防范使能开关。
步骤7 执行命令quit,退回系统视图。
步骤8 执行命令firewall defend land enable,使能Land 攻击防范功能。
缺省情况下,Land 攻击防范功能处于关闭状态。
----结束
3.3.3 检查配置结果
完成上述配置后,执行下面的命令检查配置结果。
操作命令
查看S-switch 设备配置的攻击防范信息display firewall defend flag
使用display firewall defend flag 命令查看S-switch 设备配置的攻击防范信息,显示
“land”表示Land 攻击防范功能已经使能。
<Quidway> display firewall defend flag
配置Land 攻击防范功能
背景信息
在需要配置Land 攻击防范的S-switch 上进行如下配置。
操作步骤
步骤1 执行命令system-view,进入系统视图。
步骤2 执行命令vlan vlan-id,创建VLAN 并进入VLAN 视图。
步骤3 执行命令quit,退回系统视图。
步骤4 执行命令firewall enable,打开攻击防范使能开关。
步骤5 执行命令interface vlanif vlan-id,进入VLANIF 接口视图。
步骤6 执行命令firewall defend enable,打开攻击防范使能开关。
步骤7 执行命令quit,退回系统视图。
步骤8 执行命令firewall defend land enable,使能Land 攻击防范功能。
缺省情况下,Land 攻击防范功能处于关闭状态。
----结束
3.3.3 检查配置结果
完成上述配置后,执行下面的命令检查配置结果。
操作命令
查看S-switch 设备配置的攻击防范信息display firewall defend flag
使用display firewall defend flag 命令查看S-switch 设备配置的攻击防范信息,显示
“land”表示Land 攻击防范功能已经使能。
<Quidway> display firewall defend flag
配置Smurf 攻击防范功能
背景信息
在需要配置Smurf 攻击防范的S-switch 上进行如下配置。
操作步骤
步骤1 执行命令system-view,进入系统视图。
步骤2 执行命令vlan vlan-id,创建VLAN 并进入VLAN 视图。
步骤3 执行命令quit,退回系统视图。
步骤4 执行命令firewall enable,打开攻击防范使能开关。
步骤5 执行命令interface vlanif vlan-id,进入VLANIF 接口视图。
步骤6 执行命令firewall defend enable,打开攻击防范使能开关。
步骤7 执行命令quit,退回系统视图。
步骤8 执行命令firewall defend smurf enable,使能Smurf 攻击防范功能。
缺省情况下,Smurf 攻击防范功能处于关闭状态。
检查配置结果
完成上述配置后,执行下面的命令检查配置结果。
操作命令
查看S-switch 设备配置的攻击防范信息display firewall defend flag
使用display firewall defend flag 命令查看S-switch 设备配置的攻击防范信息,显示
“smurf”表示Smurf 攻击防范功能已经使能。
<Quidway> display firewall defend flag
配置SYN Flood 攻击防范功能
背景信息
在需要配置SYN Flood 攻击防范的S-switch 上进行如下配置。
操作步骤
步骤1 执行命令system-view,进入系统视图。
步骤2 执行命令vlan vlan-id,创建VLAN 并进入VLAN 视图。
步骤3 执行命令quit,退回系统视图。
步骤4 执行命令firewall enable,打开攻击防范使能开关。
步骤5 执行命令firewall defend syn-flood enable,使能全局SYN Flood 攻击防范功能。
缺省情况下,SYN Flood 攻击防范功能处于关闭状态。
步骤6 执行命令interface vlanif vlan-id,进入VLANIF 接口视图。
步骤7 执行命令firewall defend enable,打开攻击防范使能开关。
步骤8 执行命令quit,退回系统视图。
步骤9 (可选)执行命令firewall defend syn-flood ip ip-address [ max-rate rate-number ],设置
启用SYN Flood 攻击防范功能的IP 地址和参数。
----结束
3.5.3 检查配置结果
完成上述配置后,执行下面的命令检查配置结果。
操作命令
查看S-switch 设备配置的攻击防范信息display firewall defend flag
使用display firewall defend flag 命令查看S-switch 设备配置的攻击防范信息,显示
“syn-flood”表示SYN Flood 防范功能已经使能。
<Quidway> display firewall defend flag
The attack defend flag is:
配置ICMP Flood 攻击防范功能
背景信息
在需要配置ICMP Flood 攻击防范的S-switch 上进行如下配置。
操作步骤
步骤1 执行命令system-view,进入系统视图。
步骤2 执行命令vlan vlan-id,创建VLAN 并进入VLAN 视图。
步骤3 执行命令quit,退回系统视图。
步骤4 执行命令firewall enable,打开攻击防范使能开关。
步骤5 执行命令interface vlanif vlan-id,进入VLANIF 接口视图。
步骤6 执行命令firewall defend enable,打开攻击防范使能开关。
步骤7 执行命令quit,退回系统视图。
步骤8 执行命令firewall defend icmp-flood enable,打开ICMP Flood 攻击防范功能全局开关。
缺省情况下,ICMP Flood 攻击防范功能处于关闭状态。
步骤9 (可选)执行命令firewall defend icmp-flood ip ip-address [ max-rate rate-number ],设置
对指定IP 设备的ICMP Flood 攻击防范功能参数。
----结束
3.6.3 检查配置结果
完成上述配置后,执行下面的命令检查配置结果。
操作命令
查看S-switch 设备配置的攻击防范信息display firewall defend flag
使用display firewall defend flag 命令查看S-switch 设备配置的攻击防范信息,显示
“icmp-flood”表示ICMP Flood 攻击防范功能已经使能。
<Quidway> display firewall defend flag
配置Ping of Death 攻击防范功能
背景信息
在需要配置Ping of Death 攻击防范的S-switch 上进行如下配置。
操作步骤
步骤1 执行命令system-view,进入系统视图。
步骤2 执行命令vlan vlan-id,创建VLAN 并进入VLAN 视图。
步骤3 执行命令quit,退回系统视图。
步骤4 执行命令firewall enable,打开攻击防范使能开关。
步骤5 执行命令interface vlanif vlan-id,进入VLANIF 接口视图。
步骤6 执行命令firewall defend enable,打开攻击防范使能开关。
步骤7 执行命令quit,退回系统视图。
步骤8 执行命令firewall defend ping-of-death enable,使能Ping of Death 攻击防范功能。
缺省情况下,Ping of Death 攻击防范功能处于关闭状态。
----结束
3.7.3 检查配置结果
完成上述配置后,执行下面的命令检查配置结果。
操作命令
查看S-switch 设备配置的攻击防范信息display firewall defend flag
使用display firewall defend flag 命令查看S-switch 设备配置的攻击防范信息,显示
配置TearDrop 攻击防范功能
背景信息
在需要配置TearDrop 攻击防范的S-switch 上进行如下配置。
操作步骤
步骤1 执行命令system-view,进入系统视图。
步骤2 执行命令vlan vlan-id,创建VLAN 并进入VLAN 视图。
步骤3 执行命令quit,退回系统视图。
步骤4 执行命令firewall enable,打开攻击防范使能开关。
步骤5 执行命令interface vlanif vlan-id,进入VLANIF 接口视图。
步骤6 执行命令firewall defend enable,打开攻击防范使能开关。
步骤7 执行命令quit,退回系统视图。
步骤8 执行命令firewall defend teardrop enable,使能TearDrop 攻击防范功能。
缺省情况下,TearDrop 攻击防范功能处于关闭状态。
----结束
3.8.3 检查配置结果
完成上述配置后,执行下面的命令检查配置结果。
检查配置结果
查看S-switch 设备配置的攻击防范信息display firewall defend flag
使用display firewall defend flag 命令查看S-switch 设备配置的攻击防范信息,显示
“teardrop”表示TearDrop 攻击防范功能已经使能。
<Quidway> display firewall defend flag
The attack defend flag is:
teardrop
使能全局DHCP Snooping 功能
操作步骤
步骤1 执行命令system-view,进入系统视图。
步骤2 执行命令dhcp snooping enable,使能全局DHCP Snooping 功能。
缺省情况下,DHCP Snooping 功能为禁止状态。
使能局部DHCP Snooping 功能
操作步骤
步骤1 执行命令system-view,进入系统视图。
步骤2 执行命令vlan vlan-id,进入VLAN 视图。
步骤3 执行命令dhcp snooping enable,使能VLAN 下的DHCP Snooping 功能。
缺省情况下,DHCP Snooping 功能为禁止状态
配置Trusted 接口
操作步骤
步骤1 执行命令system-view,进入系统视图。
步骤2 执行命令vlan vlan-id,进入VLAN 视图。该VLAN 应为网络侧接口(即连接DHCP
Server 的接口)所属VLAN。
步骤3 执行命令dhcp snooping trusted interface interface-type interface-number,配置DHCP
Server 所在的“VLAN+接口”为Trusted 状态。
执行display dhcp snooping global 命令,可以看到使能了全局DHCP Snooping 功能。
<Quidway> display dhcp snooping global
dhcp snooping enable
在相应的VLAN 视图下执行display this 命令,可以看到Trusted 接口信息。
<Quidway> system-view
[Quidway] vlan 10
[Quidway-vlan10] display this
#
vlan 10
dhcp snooping enable
dhcp snooping trusted interface GigabitEthernet0/0/2
#
return
介绍通过display 命令查看S-switch 设备的运行状态。
1.2.1 查看设备信息
display device [ unit unit-id ],查看设备信息。
1.2.2 查看版本信息
执行命令display version [ unit unit-id ],查看版本信息。
1.2.3 查看电子标签
显示信息包括:板卡型号、条码、BOM 编码、英文描述、生产日期、供应商名称、发
行号、CLEI 码、销售BOM 编码。
请在S-switch 上执行以下配置。
操作步骤
步骤1 执行命令display elabel [ unit unit-id ],查看电子标签。
1.2.4 查看温度
执行命令display environment [ unit unit-id ],查看设备温度。
执行命令display cpu-usage,查看CPU 占用率的统计信息。
1.2.5 查看CPU 占用率
执行命令display memory-usage [ unit unit-id ],查看内存占用率的统计信息。
在实际操作中,在任意视图下使用该命令查看S-switch 设备内存占用率的统计信息
1.2.6 查看内存占用率
执行命令display memory-usage [ unit unit-id ],查看内存占用率的统计信息。
在实际操作中,在任意视图下使用该命令查看S-switch 设备内存占用率的统计信息。
----结束S
1.2.7 查看告警信息
执行命令display alarm urgent [ unit unit-id | time interval ],查看设备运行中的告警信
息。
在实际操作中,在任意视图下使用该命令查看S-switch 设备上的各事件的告警信息。
1.2.8 查看接口状态信息
查看指定接口的状态信息
请在S-switch 上执行以下配置。
1. 执行命令display interface interface-type interface-number,查看指定接口的状态信
息。
接口状态信息包括接口当前运行状态、接口基本配置和发送接收报文的统计信息。
查看当前接口视图的状态信息
请在S-switch 上执行以下配置。
1. 执行命令system-view,进入系统视图。
2. 执行命令interface interface-type interface-number,进入接口视图。
3. 执行命令display this interface,查看当前接口的状态信息。
作者“康建华”