Cisco switch snmp setting command
Cisco switch snmp setting command (from Cisco switch command list)
94. set snmp Command Options: set snmp community {read-only | ready-write | read-write-all} [community_string]
95. set snmp trap Command Format:
Set snmp trap {enable | disable} [all | moudle | classis | bridge | repeater | auth | vtp | ippermit | vmps | config | entity | stpx]
Set snmp trap rvcr_addr rcvr_community
96. enable SNMP chassis trap: Console> (enable) set snmp trap enable chassis
97. enable all SNMP chassis traps: Console> (enable) set snmp trap enable
98. disable the SNMP chassis trap: Console> (enable) set snmp trap disable chassis
99. Add a record to the SNMP trap receiving table: Console> (enable) set snmp trap 192.122.173.42 public
100. show snmp output result.
The specific configuration command is as follows:
Switch (config) # snmp-server community public ro # Set the read-only string, public as the group name, and ro as the read-only
Switch (config) # snmp-server enable traps # enable snmp traps to allow routers to send all types of SNMP traps
Switch (config) # snmp-server enable traps snmp authentication # snmp trap Verification
Switch (config) # snmp-server host *. * version 2c public # SNMP uses version 2 and public as the group name.
Switch (config) # snmp-server host *. * traps public # specify the SNMP Trap receiver as 192.68.98.166. public is used as the group name when sending the Trap.
Switch (config) # snmp-server trap-source vlan 1 # Set vlan1 Virtual Interface IP address as the publish address of snmp trap Information
Switch (config) # end