08-28-2007 10:42 PM - edited 02-21-2020 01:39 AM
Dear All,
i am looking for a command which can tell me all the ifindex assigned to interface in router. i know that there is one command in catos show ifindex but i couldn't find the similar command in router.
please help.
thanks
08-29-2007 08:20 AM
Hi.
show ifindex and show port ifindex only exists on CAT code.
For CAT 6k running IOS (native IOS), there is no command for this info. So if you want to check what snmp index is associated with what port/interface, you can do this as you would do on any router (IOS):
You need to poll ifName and ifIndex from a host machine and then correlate the two output to see what snmp index is assigned to what port. It's easiest to do from a UNIX server, but if you load any of the freeware polling software on to a PC you can also do it. Here's an example of the poll, and what to look for:
% snmpwalk -c public 172.16.100.30 ifName
IF-MIB::ifName.1 = STRING: Gi1/1
IF-MIB::ifName.2 = STRING: Gi1/2
IF-MIB::ifName.3 = STRING: Gi5/1
IF-MIB::ifName.4 = STRING: Gi5/2
IF-MIB::ifName.5 = STRING: Gi5/3
IF-MIB::ifName.6 = STRING: Gi5/4
IF-MIB::ifName.7 = STRING: Gi5/5
IF-MIB::ifName.8 = STRING: Gi5/6
IF-MIB::ifName.9 = STRING: Gi5/7
% snmpwalk -c public 172.16.100.30 ifIndex
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifIndex.3 = INTEGER: 3
IF-MIB::ifIndex.4 = INTEGER: 4
IF-MIB::ifIndex.5 = INTEGER: 5
IF-MIB::ifIndex.6 = INTEGER: 6
IF-MIB::ifIndex.7 = INTEGER: 7
IF-MIB::ifIndex.8 = INTEGER: 8
IF-MIB::ifIndex.9 = INTEGER: 9
From the above 2 outputs, Gi5/7 is snmp index 9.
ifName is Oid .1.3.6.1.2.1.31.1.1.1.1 and ifIndex is oid .1.3.6.1.2.1.2.2.1.1
Hope this helps.
-J
08-31-2007 02:51 AM
Hi,
Thanks a lot for your immediate response.
Arumugam M
07-18-2019 08:09 PM
how to check ifindex of the interface in SG500X-24P series Switch
08-14-2012 03:18 AM
show snmp mib ifmib ifindex
Swap
CCIE # 19804
09-10-2014 06:07 AM
is there a similar command for n5k?
Thanks.
-Greg
09-10-2014 01:38 PM
Try
show interface snmp-ifindex
HTH
09-10-2014 06:16 PM
thanks - that worked...
_ Greg
09-28-2016 01:59 PM
perfect worked like a charm
07-18-2019 07:51 PM
Please let me know the cmd to check the ifIndex for SG500X-24P-K9. Switch
Thanks in advance
09-10-2019 06:16 AM
Thanks that worked
09-25-2014 12:48 AM
is there a similar command on IOS XR?
Thanks,
Adrian
01-08-2015 05:30 AM
In IOS XR, show snmp interface
ifName : TenGigE0/3/0/0 ifIndex : 1581
ifName : TenGigE0/3/0/1 ifIndex : 1582
ifName : TenGigE0/3/0/2 ifIndex : 1583
ifName : TenGigE0/3/0/3 ifIndex : 1584
ifName : TenGigE0/3/1/0 ifIndex : 1579
ifName : TenGigE0/3/1/1 ifIndex : 1580
ifName : Bundle-Ether100 ifIndex : 11105
ifName : Bundle-Ether101 ifIndex : 11106
...
12-01-2018 05:38 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide