Turning off a switch port using SNMP

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

Reply to
syuga2012
Loading thread data ...

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

Reply to
Phil Harrison

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.