Password: Sw02>en Sw02#configure Configuring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CNTL/Z. Sw02(config)#cdp run 开启cdp协议 Sw02(config)#interface vlan 6 Sw02(config-if)#ip address 192.68.98.159 255.255.255.0 Sw02(config-if)#no shu Sw02(config-if)#end Sw02# 6w4d: %SYS-5-CONFIG_I: Configured from console by sw02 on consoleconf Sw02#configure Configuring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CNTL/Z. Sw02(config)#snmp-server community public ro设置只读字符串,public为字符串值,ro为只读 Sw02(config)#snmp-server enable traps 启用snmp陷井,允许路由器将所有类型SNMP Trap发送出去 Sw02(config)#snmp-server enable traps snmp authentication snmp trap 验证 Sw02(config)#snmp-server host 192.68.98.166 version 2c public SNMP采用版本2,public作为字串 Sw02(config)#snmp-server host 192.68.98.166 traps public 指定路由器SNMP Trap的接收者为192.68.98.166,发送Trap时采用public作为字串 Sw02(config)#snmp-server trap-source vlan 6 设置vlan6口IP地址做为为snmp trap信息的发布地址 Sw02(config)#end Sw02#ping 192.68.98.166 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.68.98.166, timeout is 2 seconds: !!!!! Sw02#copy running-config startup-config Destination filename [startup-config]? Building configuration... [OK] Cisco设备日志SYSLOG传送配置 Sw02(config)logging on Sw02(config)#logging host 192.68.98.166 Sw02(config)#service timestamps debug datetime localtime show-timezone msec Sw02(config)#service timestamps log datetime localtime show-timezone msec Sw02(config)#clock set Sw02(config)#set clock 16:48:00 25 aug 2010 Sw02(config)#logging facility local5 Sw02(config)#logging trap 5 Sw02(config)#do wr Destination filename [startup-config]? Building configuration... [OK] |
|