Unsolved
This post is more than 5 years old
12 Posts
0
92532
February 7th, 2009 21:00
Setting VLAN via SNMP on PowerConnect 3348/3448/3548
Is there any way to assign a VLAN to a port via SNMP? I found the OID that holds the VLAN ID for each port ( .1.3.6.1.2.1.17.7.1.4.5.1.1.X where X is the port number) but I am unable to set it to any value but the one it has.
All my ports are set 'switchport mode access' so they can only have one ID per port.
I found an earlier post of someone trying to do this, but it was back from fall 2007, so I'm wondering if there is any current solution to achieve this. It would be much appreciated.
Thanks!
JoseQ
No Events found!


DELL-Victor
98 Posts
0
February 9th, 2009 12:00
The oid described (.1.3.6.1.2.1.17.7.1.4.5.1.1.x) is the PVID, which is the VLAN ID assigned to untagged frames received on that port. I tested this on a 3524 with firmware 2.0.0.29 and it seems to work fine. After making the change thru SNMP I was able to verify it in the web UI > Switch > VLAN > Port Settings > Show All.
Assigning ports to the VLAN requires a different oid. If you assign a port to a vlan in the web UI under Switch > VLAN > VLAN Membership, you can see that it changes the following oid(s) when walking the mib:
JoseQ
12 Posts
0
February 9th, 2009 12:00
Which tool did you use to set the value and what variable type did you use?
Here's the command I'm using from a Linux box:
snmpset -c private -v2c -On switcho .1.3.6.1.2.1.17.7.1.4.5.1.1.20 u 145
And the result:
Error in packet.
Reason: (genError) A general failure occured
Failed object: .1.3.6.1.2.1.17.7.1.4.5.1.1.20
I have verified that the private community has permissions from this IP (I use it to switch ports on and off via snmp without issues).
I also looked at the 'all untagged ports assigned' to each VLAN, but got unable to write to that one...
I feel I'm getting closer to a solution, but no cigar just yet...
JoseQ
12 Posts
0
February 9th, 2009 13:00
To add some info, I have about three dozen PowerConnects ranging from 3348s to 3548. It seems 2.0.0.29 was released recently so I dont have any switches with that yet, and I can't upgrade them right away as they are in production. I do have some with 2.0.0.21 which may be the previous version, and I get the same result.
DELL-Victor
98 Posts
0
February 9th, 2009 14:00
To set the PVID the port VLAN mode has to be set to General if Tagged. Or, can use Access mode or General mode if an untagged member of that VLAN. Anything else will fail as is also shown in the VLAN Port Settings screen in the Web User Interface.
I am using Adventnet mib browser to read and write the dot1qPvid value, setting it to any number between 1 and 4095.
JoseQ
12 Posts
0
February 9th, 2009 14:00
Can you elaborate on the first paragraph? I am using 'switchport mode access' on all our ports (except the uplink, which is trunk).
This 'general' mode is new to me, so I'm not sure if we can revert everything to it, or if there is a way to set the VLAN ID via snmp in access mode.
JoseQ
12 Posts
0
February 9th, 2009 14:00
Ok I figured out how to use the general mode as untagged which is how our ports are anyways (in access mode). So I can set the pvid as long as the switchport is set to general... However, all of our switches are currently in access mode. Is there any way to change the Vlan ID via snmp in that case?
DELL-Victor
98 Posts
0
February 9th, 2009 15:00
You can use Access mode if the port is an untagged member of the VLAN. You can also use OID .1.3.6.1.4.1.89.48.22.1.1.x to set x port to general (1), access (2), or trunk (3).
JoseQ
12 Posts
0
February 13th, 2009 14:00
Ok, I have setting the PVID down... now, how can I set the equivalent of this: "switchport general allowed vlan add X" via snmp?
DELL-Victor
98 Posts
0
February 16th, 2009 08:00
JoseQ
12 Posts
0
February 20th, 2009 11:00
Thanks a lot. Do you know if these changes go into the startup_config automatically or just into the running_config?
If the latter, how can I save the current config into the startup one via snmp?
DELL-Victor
98 Posts
0
February 20th, 2009 14:00
The above changes only go to the running-config. To copy running to startup you will need the rlCopyTable entries
You can also download the running-config file from the switch to a remote TFTP server and then copy the active image to a remote server using SNMP using a single SNMP set request using the "rowstatus" create&go method. For example the following parameters could be scripted...
* set rlCopySourceLocation = set this to the source type (e.g. I set source to local for my testing - see MIB for more info).
* set rlCopySourceUnitNumber = set this to the unit # of the switch in the stack or set to 1 if you are not running stacking.
* set rlCopySourceFileType = set this to the type of file to copy (e.g. running-config or image - see MIB for more info).
* set rlCopyDestinationLocation = set this to the destination type (e.g. I set destination to tftp).
* set rlCopyDestinationIpAddress = set this to the IP address of the TFTP server if you are doing TFTP copy.
* set rlCopyDestinationFileName = set this to the name of the destination file.
* set rlCopyHistoryIndex = set this if you want the history of the copy to be retained (you need a unique history index so use the next free index variable - see MIB).
* set rlCopyRowStatus = set this to "create&go" (value = 4) to create the row in the table and start the copy.
Note that the copy succeed really fast when copying a configuration file and when it completes the row is removed so if you want history save it in the history table. If you copy an image then the row may stay around awhile so you can poll status while the copy executes.
dsaasd46
8 Posts
0
May 3rd, 2010 05:00
What is the SNMP string to set a vlan for the 54XX series?
DELL-Victor
98 Posts
0
May 5th, 2010 08:00
The exact string will depend on the SNMP tool you are using and therefore you will need to check its documentation for proper syntax. The oids used to create the vlan and add ports to it are under dot1qVlanStaticEntry in the Q-BRIDGE-MIB.
dsaasd46
8 Posts
0
May 31st, 2010 03:00
Hello,
Ive tried this above and checked the Qbridge, unfortunately i cant get it working.
The oids i am using are HEXdecimal, but i dont have any clue how to set them.
Tagged: 1.3.6.1.2.1.17.7.1.4.3.1.2
Untagged: 1.3.6.1.2.1.17.7.1.4.5.1.1
Can you please help me?
vt1012
212 Posts
0
June 1st, 2010 11:00
It took me some time to figure this out as well on my Powerconnect 3548, but here are some examples of the hex numbers I used in SNMP.
Port you want to set: binary number representation: hex number to use in SNMP"
g1 1000 0000 '80:'
g2 0100 0000 '40:'
g3-g5 0011 1000 '38:'
g1, g2, g21 1100 0000 0000 0000 0000 1000 'c0:00:08:'
Hope this helps!