The one where we experiment with SNMP and port VLANs …

August 30, 2019

Sometimes there are network switches in a state that they still pass traffic, still respond to ping, but don’t allow a login (either remotely or locally on the console). This is often a low memory problem.

I encountered this recently where a VLAN change was required to a port, but it was not possible to schedule downtime to reboot the switch (which would then allow a login to the CLI to update the VLAN). Fortunately, SNMP still appeared to be functional.


In this case, a Cisco 2960-48TT switch.

$ snmpwalk -v 2c -c RO-COMMUNITY SWITCH ifDescr

IF-MIB::ifDescr.10011 = STRING: FastEthernet0/11
IF-MIB::ifDescr.10012 = STRING: FastEthernet0/12
IF-MIB::ifDescr.10013 = STRING: FastEthernet0/13

To change the access VLAN on FastEthernet0/12 from VLAN 10 to VLAN 20:

$ snmpget -v 2c -c RO-COMMUNITY SWITCH
SNMPv2-SMI::enterprises. = INTEGER: 10
$ snmpset -v 2c -c RW-COMMUNITY SWITCH integer 20
SNMPv2-SMI::enterprises. = INTEGER: 20
$ snmpget -v 2c -c RO-COMMUNITY SWITCH
SNMPv2-SMI::enterprises. = INTEGER: 20


Then to give these changes permanence (i.e. copy running-config startup-config), where X is a random indexing value (in this case, 99):

Set ccCopySourceFileType
snmpset -v 2c -c RW-COMMUNITY SWITCH integer 4
SNMPv2-SMI::enterprises. = INTEGER: 4

Set ccCopyDestFileType
snmpset -v 2c -c RW-COMMUNITY SWITCH integer 3
SNMPv2-SMI::enterprises. = INTEGER: 3

Possible values for ccCopySourceFileType and ccCopyDestFileType are:
1 – networkFile (file on another network device)
2 – iosFile (file on flash)
3 – startupConfig
4 – runningConfig
5 – terminal (file dumped to the console window)

Set ccCopyEntryRowStatus
snmpset -v 2c -c RW-COMMUNITY SWITCH integer 1
SNMPv2-SMI::enterprises. = INTEGER: 1

It’s possible to then monitor the state of the copy as follows:

Get ccCopyState
snmpget -v 2c -c RO-COMMUNITY SWITCH
SNMPv2-SMI::enterprises. = INTEGER: 3

Possible return values for ccCopyState are:
1 – waiting
2 – running
3 – successful (entry no longer write protected)
4 – failure (entry no longer write protected)

If the copy fails, you can check ccCopyFailCause ( which will return values as follows:
1 – unknown
2 – badFileName
3 – timeout
4 – noMem
5 – noConfig (possibly source non-existent)

(cf. and


There are probably similar ways to do this on the Aruba switches (in this case 2930F) – and this probably merits further investigation, but for now the following two OIDs may be of use: – a table of VLANs configured on the switch (dot1qVlanStaticName) – a table of ports showing the access VLAN configured on each port (dot1qPvid)

By Andrew

Previous Post Next Post

Leave a comment

Your email address will not be published. Required fields are marked *