Thanks for the response but how do I get subinterface information? Please
see explanation below.
When I run the command:
snmpget $NODE .1.3.6.1.2.1.2.2.1.2.$INDEX
I received error:
snmpget: This variable does not exist:
.iso.org.dod.internet.mgmt.mib2.interface.ifTable.ifEntry.ifDesc.
When I do an "snmpwalk nodename" I receive:
interfaces.ifTable.ifEntry.ifDesc.1: Ethernet
interfaces.ifTable.ifEntry.ifDesc.2: Serial 0
interfaces.ifTable.ifEntry.ifDesc.3: Serial 1
interfaces.ifTable.ifEntry.ifDesc.4: Token Ring
interfaces.ifTable.ifEntry.ifDesc.5: Serial 1.1
interfaces.ifTable.ifEntry.ifDesc.6: Serial 1.2
This gives me the instance number that relates to an interface. However,
when I access MIB Data Collection window and select show data only instances
1 through 4 display. How do I obtain collection data for only Serial 1.1 or
Serial 1.2?
-----Original Message-----
From: Ray Schafer [mailto:schafer@tkg.com]
Sent: Tuesday, March 21, 2000 7:38 AM
To: IBM NetView Discussion
Subject: Re: [NV-L] Instances
Jean.M.SCHMIDT@odot.state.or.us wrote:
> How do I know which instance relates to which interface?
Here is a way to do it:
If the INDEX variable is set to the index of the interface, and NODE is the
IP address or hostname of the node, this will return the name of the
interface:
snmpget $NODE .1.3.6.1.2.1.2.2.1.2.$INDEX
It used the interface description MIB.
If you want to get the IP address of the interface (assuming there is one -
there doesn't have to be!)
snmpwalk $NODE .1.3.6.1.2.1.4.20.1.2 | grep "INTEGER: $INDEX"\
| cut -d. -f5-8 | cut -f1 -d:
Hope that helps..
--
Ray Schafer | schafer@tkg.com
The Kernel Group | Distributed Systems Management
http://www.tkg.com
_________________________________________________________________________
NV-L List information (unsubscribing, policies, posting, digest version,
searchable archives): http://www.tkg.com/nv-l
|