SNMP Examples

The following example assigns the SimonisCool string to SNMP, allowing read-only access, and specifies that IP access list 4 can use the community string:

R1(config)# snmp-server community SimonisCool ro 4 Rl(confiog)# access-list 4 permit 131.108.1.0 0.0.0.255

The hosts on network 131.108.1.0/24 are permitted SNMP access if the read-only string is set to SimonisCool. This enables an added feature to ensure that devices that source SNMP information are from a trusted or internal network.

The following example assigns the string SnR to SNMP, allowing read-write access to the objects in the restricted view (read only):

R1(config)# snmp-server community SnR view restricted ro

The following example disables all versions of SNMP:

R1(config)# no snmp-server

The following example enables the router to send all traps to the host, host.cisco.com, using the community string public:

R1(config)# snmp-server enable traps R1(config)# snmp-server host host.cisco.com public

In the following example, the BGP traps are enabled for all hosts, but only the ISDN traps are enabled to be sent to an actual host named simon:

R1(config)# snmp-server enable traps bgp R1(config)# snmp-server host simon public isdn

The following example enables the router to send all inform requests to the host test.cisco.com using the community string publiC:

R1(config)# snmp-server enable traps

R1(config)# snmp-server host test.cisco.com informs publiC

0 0

Post a comment