Jean.M.SCHMIDT AT odot.state.or DOT 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
snmpget $NODE .18.104.22.168.22.214.171.124.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 .126.96.36.199.188.8.131.52.1.2 | grep "INTEGER: $INDEX"\
| cut -d. -f5-8 | cut -f1 -d:
Hope that helps..
Ray Schafer | schafer AT tkg DOT com
The Kernel Group | Distributed Systems Management