On 1 August 2012 03:56, Dave Hsu <[email protected]> wrote:
> I have this:
>    1.3.6.1.2.1.31.1.1.1.1.603980290 => Ethernet0/0/1

> and I want to retrieve 603980290 by using Ethernet0/0/1 (that I already
> know).
> Is there a command/way to get just the port index (not a list) by using the
> port name?

The way (i.e. the algorithm) to get this information would be to
walk the IF-MIB::ifName column, and look for the name of interest.

One simple way to do this might be
     snmpwalk ... IF-MIB::ifName | grep Ethernet0/0/1

I don't know of any dedicated command to do this, although
it shouldn't be too difficult to write one (and would be a useful
exercise in learning how to use an SNMP toolkit).
    If you do develop such a tool - please consider feeding it
back to the project, so we can include it in future releases.

Dave

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to