Turning off a switch port using SNMP

Feb 26, 2009 1 Replies

Hi Folks,



I want to control a CISCO switch thru SNMP ( from a MIB browser at my desktop) by turning on/off certain ports. Please let me know whether this can be done and some example configuration to do this. Appreciate your help.



Thanks, syuga


You can set ifAdminStatus described here:

formatting link

$ snmpwalk -v2c -c private xx.195 ifDescr.17 IF-MIB::ifDescr.17 = STRING: Loopback0 $ snmpset -v2c -c private xx.195 ifAdminStatus.17 i 2 IF-MIB::ifAdminStatus.17 = INTEGER: down(2)

*Feb 26 19:26:42.286: %SYS-5-CONFIG_I: Configured from xx.203 by snmp (config)#do sh int lo0 | i pro Loopback0 is administratively down, line protocol is down

On the switch you just need a community configured with read-write access (don't use 'private' of course): snmp-server community private RW

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required