Switch#configure terminal
Enter configuration commands, one per line.
Switch(config)#
Switch(config)#snmp-server community public RO
在这里public是RO(只读)的共同体的密码
Switch(config)#snmp-server community PRivate RW
在这里private是RW(读写)的共同体的密码
Switch(config)#exit
退出
Switch#write memory
Building configuration...存盘
出于网络安全的考虑,一是密码需要修改为较安全的密码,二是不建议设置RW(读写)的SNMP设置。
2.假如是Cisco 3550交换机的话,配置SNMP如下:
snmp-server community public RO
snmp-server community private RW
3.Cisco 7507路由器
snmp-server community public RO
4.Cisco PIX520防火墙
snmp-server community public
其实在Cisco设备上进行SNMP设置的命令基本上是一样的。
172switch#show snmp
Chassis: 0x10
52530 SNMP packets input
0 Bad SNMP version errors
0 Unknown community name
0 Illegal Operation for community name supplied
0 Encoding errors
0 Number of requested variables
0 Number of altered variables
51550 Get-request PDUs
980 Get-next PDUs
0 Set-request PDUs
52530 SNMP packets output
0 Too big errors (Maximum packet size 1500)
714 No sUCh name errors
0 Bad values errors
0 General errors
52530 Response PDUs
0 Trap PDUsSNMP logging: disabled
(2)Cisco 3550
3550#show snmp
Chassis: CAT0729X0KP
41669 SNMP packets input
0 Bad SNMP version errors
0 Unknown community name
0 Illegal operation for community name supplied
0 Encoding errors
56361 Number of requested variables
0 Number of altered variables
37800 Get-request PDUs
3869 Get-next PDUs
0 Set-request PDUs
41669 SNMP packets output
0 Too big errors (Maximum packet size 1500)
1 No such name errors
0 Bad values errors
0 General errors
41669 Response PDUs
0 Trap PDUs
SNMP global trap: disabledSNMP logging: disabled
SNMP agent enabled
6.SNMP Community字符串密码的修改
假如我们按照系统默认的密码(即只读的密码为public,读写的密码为private)的话,会带来非常大的安全隐患,所以我们要修改密码,在进行SNMP设置时,用自己定义的密码。
新闻热点
疑难解答