RE: find SNMP ifIndex value if hostname and SNMP ifDescr are known

2015-05-12 Thread Jurkiewicz Jean-Marc
Hi, "gsed -r "s/IF-MIB::ifDescr.([0-9]+) .*/\1/"" part is to make sure that I get the ifIndex of the physical interface and not the sub-interface like "GigabitEthernet5/26.123". Isn't that achieved by the "$" in grep -E "GigabitEthernet5/26$" Some further information would be welcome in or

find SNMP ifIndex value if hostname and SNMP ifDescr are known

2015-05-12 Thread Martin T
Hi, Is there a clever method to find out the SNMP ifIndex value if I know the hostname of the network device and ifDescr for this particular interface? At the moment I do it like this: snmpwalk -v 2c -c public router ifDescr | grep -E "GigabitEthernet5/26$" | gsed -r "s/IF-MIB::ifDescr.([0-9]+) .