Write/set MIB variables on Juniper EX switches
Juniper EX switches support the SNMP set command for a predefined set of MIB variables.
In 12.3 JUNOS, you can set these variables:
- snmpCommunityTable
- eventTable
- alarmTable
- snmpTargetAddrExtTable
- jnxPingCtlTable
- pingCtlTable
- traceRouteCtlTable
- jnxTraceRouteCtlTable
- sysContact.0
- sysName.0
- sysLocation.0
- pingMaxConcurrentRequests.0
- traceRouteMaxConcurrentRequests.0
- usmUserSpinLock
- usmUserOwnAuthKeyChange
- usmUserPublic
- vacmSecurityToGroupTable (vacmGroupName, vacmSecurityToGroupStorageType, and vacmSecurityToGroupStatus)
- vacmAccessTable (vacmAccessContextMatch, vacmAccessReadViewName, vacmAccessWriteViewName, vacmAccessNotifyViewName, vacmAccessStorageType, and vacmAccessStatus)
- vacmViewSpinLock
- vacmViewTreeFamilyTable (vacmViewTreeFamilyMask, vacmViewTreeFamilyType, vacmViewTreeFamilyStorageType, and vacmViewTreeFamilyStatus)
In order to set a variable, you must assign a view with that community.
Otherwise, even if the community has the read/write authorization, it will not work.
Below is an example of setting a view for 1.3.6 MIB and everything below it:
{master:0}[edit] root@EX-SW# show snmp view OID-ALL { oid 1.3.6 include; } community comm-view-all { view OID-ALL; authorization read-write; } {master:0}[edit] root@EX-SW#
Let’s set sysLocation.0 to any value using SNMP set command:
test@linux:~$ snmpset -c comm-view-all -v 2c 10.30.10.14 1.3.6.1.2.1.1.6.0 s "NOC lab" iso.3.6.1.2.1.1.6.0 = STRING: "NOC lab" test@linux:~$
The SNMP configuration from the EX has changed accordingly:
{master:0}[edit] root@EX-SW# show snmp location "NOC lab"; view OID-ALL { oid 1.3.6 include; } community comm-view-all { view OID-ALL; authorization read-write; } {master:0}[edit] root@EX-SW#
Of course you can set a more restrictive view just for what you need exactly. For instance, you can use a community associated with a view only for sysLocation.
The following two tabs change content below.
Paris ARAU
Paris ARAU is a networking professional with strong background on routing and switching technologies. He is a holder of CCIE R&S and dual JNCIE(SP and ENT). The day to day work allows him to dive deeply in networking technologies. Part of the continuously training, he is focusing on Software Defined Network and cloud computing.
Latest posts by Paris ARAU (see all)
- Junos Fusion – Part IV – Satellite policies and uplink failure detection - 30 July 2018
- Junos Fusion – Part III – Satellite commands and traffic forwarding - 16 July 2018
- Junos Fusion – Part II – Configuration, Administration and Operation - 16 July 2018
- Junos Fusion – Part I – Overview, Components, Ports and Software - 11 July 2018
- Vagrant – Part IV – Network topology using Juniper and Cumulus - 26 April 2018
Comments
So empty here ... leave a comment!