Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Examples: Configuring the SNMP Community String

Grant read-only access to all clients. With the following configuration, the system responds to SNMP Get, GetNext, and GetBulk requests that contain the community string public:

[edit]snmp {community public {authorization read-only;}}

Grant all clients read-write access to the ping MIB and jnxPingMIB. With the following configuration, the system responds to SNMP Get, GetNext, GetBulk, and Set requests that contain the community string private and specify an OID contained in the ping MIB or jnxPingMIB hierarchy:

[edit]snmp {view ping-mib-view {oid pingMIB include;oid jnxPingMIB include;community private {authorization read-write;view ping-mib-view;}}}

The following configuration allows read-only access to clients with IP addresses in the range 1.2.3.4/24, and denies access to systems in the range fe80::1:2:3:4/64:

[edit]snmp {community field-service {authorization read-only;clients {default restrict; # Restrict access to all SNMP clients not explicitly # listed on the following lines.1.2.3.4/24; # Allow access by all clients in 1.2.3.4/24 exceptfe80::1:2:3:4/64 restrict;# fe80::1:2:3:4/64.}}}

Published: 2012-12-08