Cisco SG500X how to change port assigned VLAN via SNMP
I want to change the VLAN assigned to a port on a SG500X using SNMP. The running firmware version is 22.214.171.124 .
What I have done so far:
- definded some VLANs with the web interface - enabled SNMP and configured communitiy and password for SNMPv2c and configured engine-ID and security name for SNMPv3 - tried SNMPv2c and SNMPv3 requests (get, set, walk) fom the Windows 10 command line tool with the shell tools from snmpsoft.com - followed the instructions on this thread for vlan snmp management on a catalyst
When I send a snmpwalk request for the "ifDescr" OID (.126.96.36.199.188.8.131.52.1.2) to get the ifIndex referring to the Ports, the first shown ifIndex is 49 for gigabitethernet1/1/1. This works with SNMPv2c and SNMPv3 as well.
All gigabitethernet ports were assigned to a vlan by the web interface and is shown there correctly. When I send a snmpget request with the "vmVlan" OID with the ifIndex of any port (for example port 15 --> ifIndex63: .184.108.40.206.220.127.116.11.18.104.22.168.1.2.63 ) I just get: - with SNMPv2c: %Failed to get value of SNMP variable. Variable does not exist (noSuchName(2)) - with SNMPv3: OID=.22.214.171.124.126.96.36.199.188.8.131.52.1.2.63 Type=<Unknown> Value=
Same with snmpset and SNMPv2c, but with SNMPv3 I get: %Failed to set value to SNMP variable. Not Writable (notWritable(17))
I dont know where else to find a solution for this problem and moreover what exactly the problem is. May it because not Catalyst systems use another OID? And shouldnt I get an ifIndex starting from Zero or one from the snmpwalk request?
Re: Cisco SG500X how to change port assigned VLAN via SNMP
Thank you for your prompt reply!
In the MIB files you linked, I unfortunately found no way to connect a port/interface of the switch with an existing VLAN or rather change a VLAN of a port.
I just found an OID where the individual Indexes (mapped to the ports) return the Indexes of the assigned VLANs. It is <.iso.org.dod.internet.mgmt.mib-2.dot1dBridge.qBridgeMIB.qBridgeMIBObjects.dot1qVlan.dot1qPortVlanTable.dot1qPortVlanEntry.dot1qPvid> or as a number .184.108.40.206.220.127.116.11.18.104.22.168.1
This one is "readable and writable" so I simply tried to SNMPwrite another (existing) VLAN-Index to
.22.214.171.124.126.96.36.199.188.8.131.52.1.50 for example, which is gigabitethernet1/1/2. As type of the value I used uint (original value given from SNMPread is GAUGE32 ) The apperaring error message is: %Failed to set value to SNMP variable. General Error (genErr(5))
If I try to set the VLAN in the SNMPwrite command to the one the port actually has, the CLI shows: OK
At least something must be right I guess?!?
So further on my question persitsts. Any more ideas?
A consumer router may support a virtual private network (VPN) connection, but that's a far cry from the network and security capabilities that a business-class router can provide. All it takes is some IT talent and know-how to set one up. You're hear...
Cisco RV340 Series Secure Router
Security License Features and Performance
Today, secure networking is imperative for every business, even the smallest one. The RV340 series security routers provides business users with advanced connectivity and...
Recorded Live at SpiceWorld 2018!With the increasing complexity of technology lengthy configurations, dealing with multiple vendors, constant updates and maintenance –it can feel like you are navigating an unruly IT jungle. Join Cisco's Amy Blanchard as s...
Small Business Networking Products
Network and Smart Storage
FindIT Network Management
Voice and Conferencing
ATAs, Gateways,and Accessories
This document is attempt to recreate content of original document created by famous @Patrick Born. Cisco has considered to destroy such valuable document for an unknown reason.In order to capture debug and syslog messages from your SPA1x2 and SPA232D phon...