Nexus – SNMP find Ifindex oid

sh interface snmp-ifindex
--------------------------------------------------------------------------------
 Port IFMIB Ifindex (hex)
 --------------------------------------------------------------------------------
 Eth1/1 436207616 (0x1a000000)
 Eth1/2 436211712 (0x1a001000)
 Eth1/3 436215808 (0x1a002000)
 Eth1/4 436219904 (0x1a003000)
 Eth1/5 436224000 (0x1a004000)
 ..
 Po10            369098761  (0x16000009)
 ..
 Eth100/1/1      526581760  (0x1f630000)

 

Cisco configuration over SNMP

Before configure your device over SNMP, you need to enable read-write and limit the access with an ACL.

snmp-server community <your_community> RW <Access-list>

Now you can configured your device with snmp-set command. The following example show how upload a new configuration on your running-config with a TFTP Server.

snmpset -v <version> -c <community> <your_router> \
.1.3.6.1.4.1.9.9.96.1.1.1.1.3.50 i 1 \
.1.3.6.1.4.1.9.9.96.1.1.1.1.4.50 i 4 \ 
.1.3.6.1.4.1.9.9.96.1.1.1.1.5.50 a "<IP TFTP Server>" \
.1.3.6.1.4.1.9.9.96.1.1.1.1.6.50 s "<filename>" \
.1.3.6.1.4.1.9.9.96.1.1.1.1.14.50 i 4

You also can use FTP, SCP, … You have more information about the mib here.