Specifications
113
4.10.4 CLICommandsoftheSNMP
CommandLinesoftheSNMPconfiguration
Feature CommandLine
SNMPCommunity
ReadOnlyCommunity Switch(config)#snmp‐servercommunitypublicro
communitystringaddok
ReadWriteCommunity Switch(config)#snmp‐servercommunityprivaterw
communitystringaddok
SNMPTrap
EnableTrap Swit ch(config)#snmp‐serverenabletrap
SetSNMPtrapenableok.
SNMPTrapServerIP
withoutspecific
communityname
Switch(config)#snmp‐serverhost192.168.2.33
SNMPtraphostaddOK.
SNMPTrapServerIPwith
version1andcommunity
Switch(config)#snmp‐serverhost192.168.2.33version1private
SNMPtraphostaddOK.
N
ote:privateisthecommunityname,version1istheSNMP
version
SNMPTrapServerIPwith
version2andcommunity
Switch(config)#snmp‐serverhost192.168.2.33version2private
SNMPtraphostaddOK.
DisableSNMPTrap Switch(config)#nosnmp‐serverenabletrap
SetSNMPtrapdisableok.
Display Switch#shsnmp‐servertrap
SNMPtrap:Enabled
SNMPtrapcommunity:public
Switch#showrunning‐config
.......
snmp‐servercommunitypublicro
snmp‐servercommunityprivaterw
snmp‐serverenabletrap
snmp‐serverhost192.168.2.33version2admin
snmp‐serverhost192.168.2.33version1admin
……..