cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
97868
Views
57
Helpful
13
Replies

how to check a ifindex of the interface in router

arumugam006
Level 1
Level 1

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

13 Replies 13

jreekers
Level 4
Level 4

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

Hi,

Thanks a lot for your immediate response.

Arumugam M

how to check ifindex of the interface in SG500X-24P series Switch

swapnendum
Level 1
Level 1

show snmp mib ifmib ifindex

Swap

CCIE # 19804

is there a similar command for n5k?

Thanks.

-Greg

 

 

Try

 show interface snmp-ifindex


HTH

thanks - that worked...

 

_ Greg

perfect worked like a charm

Please let me know the cmd to check the ifIndex for SG500X-24P-K9. Switch

Thanks in advance

Thanks that worked 

is there a similar command on IOS XR?

 

Thanks,

Adrian

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


...

This worked, thanks!
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: