Specifications

113
4.10.4 CLICommandsoftheSNMP
CommandLinesoftheSNMPconfiguration
Feature CommandLine
SNMPCommunity
ReadOnlyCommunity Switch(config)#snmpservercommunitypublicro
communitystringaddok
ReadWriteCommunity Switch(config)#snmpservercommunityprivaterw
communitystringaddok
SNMPTrap
EnableTrap Swit ch(config)#snmpserverenabletrap
SetSNMPtrapenableok.
SNMPTrapServerIP
withoutspecific
communityname
Switch(config)#snmpserverhost192.168.2.33
SNMPtraphostaddOK.
SNMPTrapServerIPwith
version1andcommunity
Switch(config)#snmpserverhost192.168.2.33version1private
SNMPtraphostaddOK.
N
ote:privateisthecommunityname,version1istheSNMP
version
SNMPTrapServerIPwith
version2andcommunity
Switch(config)#snmpserverhost192.168.2.33version2private
SNMPtraphostaddOK.
DisableSNMPTrap Switch(config)#nosnmpserverenabletrap
SetSNMPtrapdisableok.
Display Switch#shsnmpservertrap
SNMPtrap:Enabled
SNMPtrapcommunity:public
Switch#showrunningconfig
.......
snmpservercommunitypublicro
snmpservercommunityprivaterw
snmpserverenabletrap
snmpserverhost192.168.2.33version2admin
snmpserverhost192.168.2.33version1admin
……..