思科MDS9710光纤交换机snmp配置

1、ssh登录交换机
2、配置snmp、snmptrap

conf t //进入配置模式

(config)# snmp-server enable traps //启用snmptrap
(config)# snmp-server community public ro //配置snmp只读团体名为public
(config)# snmp-server host 192.168.1.1 traps version 2c trappublic udp-port 162 //配置snmptrap团体名(trappublic)、trap接收服务器地址(192.168.1.1)、trap接收服务器端口(162)
(config)# exit //退出配置模式

copy running-config startup-config //保存配置

SNMP测试结果
思科MDS9710光纤交换机snmp配置

配置trap前,先ssh登录进Trap接收服务器地址,输入udp信息监听命令:
tcpdump -nn "udp" and host 思科光交机IP
命令格式为:tcpdump -nn "udp" and host 设备IP
测试snmptrap,查看trap接收服务器上,可以看到带有‘Trap’字样的信息出现,表示成功
技术交流欢迎加入Q群:177428068

猜你喜欢

转载自blog.51cto.com/14483703/2546146