NOTE: You can use the entire OID rather than the object name. Use the form: OID.index.
Example of Getting a MIB Object Value (Using Object Name)
Example of Getting a MIB Object Value (Using OID)
The following examples show the snmpget command to obtain a MIB object value. These examples
assume that:
• the server OS is UNIX
• you are using SNMP version 2c
• the community name is public
• the file f10-copy-config.mib is in the current directory
NOTE: In UNIX, enter the snmpset command for help using this command.
The following examples show the command syntax using MIB object names and the same command
using the object OIDs. In both cases, the same index number used in the snmpset command follows the
object.
> snmpget -v 2c -c private -m ./f10-copy-config.mib 10.11.131.140
copyTimeCompleted.110
FORCE10-COPY-CONFIG-MIB::copyTimeCompleted.110 = Timeticks: (1179831) 3:16:38.31
> snmpget -v 2c -c private 10.11.131.140 .1.3.6.1.4.1.6027.3.5.1.1.1.1.13.110
SNMPv2-SMI::enterprises.6027.3.5.1.1.1.1.13.110 = Timeticks: (1179831)
3:16:38.31
Manage VLANs using SNMP
The qBridgeMIB managed objects in Q-BRIDGE-MIB, defined in RFC 2674, allows you to use SNMP to
manage VLANs.
Creating a VLAN
To create a VLAN, use the dot1qVlanStaticRowStatus object.
The snmpset operation shown in the following example creates VLAN 10 by specifying a value of 4 for
instance 10 of the dot1qVlanStaticRowStatus object.
Example of Creating a VLAN using SNMP
> snmpset -v2c -c mycommunity 123.45.6.78 .1.3.6.1.2.1.17.7.1.4.3.1.5.10 i 4
SNMPv2-SMI::mib-2.17.7.1.4.3.1.5.10 = INTEGER: 4
Assigning a VLAN Alias
Write a character string to the dot1qVlanStaticName object to assign a name to a VLAN.
Example of Assigning a VLAN Alias using SNMP
[Unix system output]
Simple Network Management Protocol (SNMP)
871