Disabling an ethernet port via SNMP

Interacting with ethernet ports on an SNMP device is done primarily with two sections of the SNMP tree. IF-MIB::ifOperStatus is the current layer 1 status of the port (i.e. is the port linked or not) and IF-MIB::ifAdminStatus is whether the port is administratively shutdown.

If you want to shutdown an ethernet port on an SNMP enabled device you need to set IF-MIB::ifAdminStatus to integer 2 (down), and conversely setting it to integer 1 (up) will enable the port again.

snmpset -v 2c -c community 192.168.5.1 IF-MIB::ifAdminStatus.5 i 2


Note: Replies will be formatted with PHP Markdown Extra syntax.

Name: Email (Not Required):
 
Logged IP: 54.81.210.99
To prevent spam please submit by clicking the kitten: