|
Use the CLI MIB commands described in this chapter to display and modify the values of the MIB objects that are used to control a LightStream 2020 multiservice ATM switch (LS2020 switch). (See the chapter entitled "LightStream 2020 MIB Reference" for additional information about MIB objects.) The MIB commands are as follows:
Use the browse command to walk through the MIB tree and display the value of an object in the MIB tree.
Use the optional mib-address argument to specify the point in the MIB tree at which the browse display starts. If you do not specify any argument, the display starts at the top of the MIB tree (at the iso object).
The address can be specified as a path of dot-separated numbers, as a variable name, or as a combination (where only the first element is a variable name). Thus, 1.3.6.1.2.1, mgmt.1, and mib all refer to the same variable. (See the chapter entitled "LightStream 2020 MIB Reference" for a description of MIB addresses.)
The following example shows how to use the browse command to display objects in the mgmt subtree:
Because there is only one object under the mgmt object, you select it by entering the menu number 1:
There are 12 objects under the mib object. To select the object system, enter the menu number 1:
All of the objects under the system object are "leaves" with no further branches under them. If you select one of those objects from the menu, the program displays its value and returns to the mgmt.mib.system menu. In the following example, sysContact is the object chosen (menu item 4):
To explore a different branch of the mib subtree, you can enter u to go up a level and return to the mib object:
To exit to the cli> prompt, enter q (or e):
Use the getsnmp command to display the value of a specified MIB object. Given the addresses of one or more MIB objects, getsnmp displays the value of the MIB object at each address.
The mib-address argument specifies the address of a MIB object that you want to display. As an optional, repeated argument, it specifies the address of an additional MIB object or objects that you want to display.
The address of a MIB object has two dot-separated parts:
To display the value of more than one object, specify more than one object identifier. You can use the walksnmp command to identify MIB objects and their addresses.
The following examples illustrate different kinds of MIB addresses. The first example shows how to use the getsnmp command, specifying the leaf name (plus the object identifier 0) for each object:
The following example shows use of two other kinds of MIB addresses for the same pair of objects, a complete path of numbers from the top of the MIB, and a path beginning with the mgmt object:
Use the getnextsnmp command to display the value of the object that comes after the specified object in the MIB tree.
If you specify the last variable ("leaf" object) in a subtree, the command displays the first variable in the next subtree.
The mib-address argument specifies the address of the MIB object that is just before the object that you want to display. As an optional, repeated argument, the MIB-address argument specifies the address of an additional MIB object whose next-following neighbor in the MIB tree you want to display.
The address can be a path of dot-separated numbers, a variable name, or a combination of the two, where only the first element is a variable name. Thus, 1.3.6.1.2.1.1.1, mib.1.1, system.1, and sysDescr all refer to the same variable. See the description of the getsnmp command for additional information about MIB addresses, and see the chapter entitled "LightStream 2020 MIB Reference" for a detailed description.
To display the values of more than one object, specify more than one object identifier. You can use the walksnmp command to identify MIB objects and their addresses.
The following examples illustrate different kinds of MIB addresses. The first example shows how to use the getnextsnmp command, specifying the leaf name (plus the object identifier 0) for each object:
The following example shows use of two other kinds of MIB addresses for the same pair of objects, a complete path of numbers from the top of the MIB, and a path beginning with the mgmt object:
Use the setsnmp command to change the value of the specified MIB object.
Note The setsnmp command does not verify the values of its arguments. If there is a CLI set
command for the parameter that you want to set, use it instead of the setsnmp command.
The setsnmp command requires protected mode. See the protected command in the chapter entitled
"CLI Control Commands."
The setsnmp command requires that the read/write community name attribute be set first to a name
that has been assigned the value write in the mma.communities file. If the read/write community
name has not been set first, the setsnmp command fails, because the default community name
"public" is read only. See the description of the command set snmp community in the chapter
entitled "The Set Command" and see the
LightStream 2020 Network Operations Guide for information on setting the read/write community
name attribute.
Caution Do not manipulate MIB objects unless you are familiar with SNMP. |
The address can be a path of dot-separated numbers, a variable name, or a combination of the two, where only the first element is a variable name. Thus, 1.3.6.1.2.1.1.1.0, mib.1.1.0, system.1.0, and sysDescr.0 all refer to the same variable. See the preceding description of the getsnmp command for additional information about MIB addresses, and see the chapter entitled "LightStream 2020 MIB Reference" for a detailed description. You can use the walksnmp command, described in the following section, to identify MIB objects and their addresses. |
|
Specifies the new value for the MIB object at MIBaddress. If the value argument contains spaces, you must use quotation marks around it. The value may be a number, a string, or an object ID preceded by a colon, in the form :MIBaddress2. To determine the appropriate argument type for the specified MIB object, type ? after the first MIBaddress argument. |
The following example shows use of setsnmp to change the name of the contact person for the system (note quotation marks):
The following example shows how to type ? after a partial command to display online help for that command. In the example, ? is typed after a setsnmp command to determine what type of value can be assigned to the specified object, ifDescr.1000 (the interface description for port 0 on card 1):
Use the walksnmp command to display the values of all MIB objects in the MIB tree starting with the specified object.
The walksnmp command displays the names and values of all variables that are "leaves" of the MIB tree below the specified MIB object. If you specify the root of a particular subtree, the command displays all of the "leaf" variables at the ends of branches in that subtree. If you specify an object that has no branches under it, the command displays the value of that object.
Use the walksnmp command to survey a range of variables, to locate a variable quickly when you know only which part of the MIB it is in, or to identify the name of a MIB variable so that you can specify it as an argument of another SNMP command.
Use the mib-address argument to specify the starting point for the display. The address can be a path of dot-separated numbers, a variable name, or a combination of the two, where only the first element is a variable name. Thus, 1.3.6.1.2.1.1, mgmt.1.1, and system all refer to the same subtree. See the chapter entitled "LightStream 2020 MIB Reference" for a detailed description of MIB addresses. You can use the walksnmp command to identify MIB objects and their addresses.
The following example shows how to use the walksnmp command to display MIB objects in the system subtree:
Posted: Wed Jan 22 23:50:41 PST 2003
All contents are Copyright © 1992--2002 Cisco Systems, Inc. All rights reserved.
Important Notices and Privacy Statement.