Overview
Retrieve the interface index (ifIndex) for MACsec controlled ports using the snmpwalk commad on the IfMib or the show snmp interface CLI command. Identify the interface index (ifIndex) for MACsec controlled ports by using the snmpwalk command on the IfMib or the show snmp interface CLI command. These methods allow you to accurately locate and monitor your MACsec-enabled network interfaces for effective management.
This reference describes how to identify the interface index (ifindex) for a MACsec controlled port by using SNMP and CLI commands. It helps users manage and monitor MACsec-enabled interfaces on network devices.
Use these commands to obtain the ifindex of the MACsec controlled port:
-
snmpwalk command on IfMib [OID: 1.3.6.1.2.1.31.1.1.1]
rtr1.0/1/CPU0/ $ snmpwalk -v2c -c public 10.0.0.1 1.3.6.1.2.1.31.1.1.1.1 SNMPv2-SMI::mib-2.31.1.1.1.1.3 = STRING: "GigabitEthernet0/1/0/0" SNMPv2-SMI::mib-2.31.1.1.1.1.18 = STRING: "MACSecControlled0/1/0/0" SNMPv2-SMI::mib-2.31.1.1.1.1.19 = STRING: "MACSecUncontrolled0/1/0/0" -
show snmp interface command
Router# show snmp interface . . ifName : MACSecControlled0/0/0/0 ifIndex : 77 ifName : MACSecControlled0/0/0/4 ifIndex : 79 ifName : MACSecControlled0/0/0/21 ifIndex : 94 ifName : MACSecControlled0/0/0/30 ifIndex : 118 ifName : MACSecControlled0/0/0/34 ifIndex : 116 ifName : MACSecUncontrolled0/0/0/0 ifIndex : 78 ifName : MACSecUncontrolled0/0/0/4 ifIndex : 80 ifName : MACSecUncontrolled0/0/0/21 ifIndex : 95 ifName : MACSecUncontrolled0/0/0/30 ifIndex : 119 ifName : MACSecUncontrolled0/0/0/34 ifIndex : 117