Unsolved

This post is more than 5 years old

13 Posts

20660

September 8th, 2005 09:00

PowerConnect 5324 control via SNMP

I'm trying to use an SNMP Browser (MG-SOFT) to change the VLAN port assignments.  I keep getting errors stating I have entered a wrong value when I commit the changes.  The OID I'm using is 1.3.6.1.2.1.17.7.1.4.3.1.2.VLAN# (dot1qVlanStaticEgressPorts).  This same step does work with a different vendor's switch.  I can't find a more appropriate OID.  However the Open Management software is able to change the VLAN via SNMP, so apparently there is a way to do it.  What am I missing?  Does the PowerConnect require a fixed number of octets?
 
Ultimately I will be using my own software with the SNMP++ library to make this change.

September 8th, 2005 13:00

This parameter let's you basically add an interface (port or LAG) to a VLAN.  The VLAN must be created first (the index of this parameter is the VLAN number so the VLAN must already be created).  You then set the parameter to a "PortList" which is a bit mask of "interface" where the "interface number" is the ifIndex number of the port or LAG so it's not simply just the physical port number on the switch for example.  It's the ifNumber of the port because port & LAG may also be added.  For example on some switches physical port ifIndex maybe 1-24 and LAG ifIndex maybe 25-32 but this depends on number of ports and other factors such as if there is SFP ports etc.  You need to identify the ifIndex number to use not the physical port number.
 
As for the type of the parameter, when I use netsnmp to test I use the "x" (HEX STRING) syntax so its basically an octet string.
 
Also you must make sure that the port mode is properly (port mode is general, trunk, or access).  If the port mode is not properly configured you may not be able to add a port to some VLAN.  Port mode is configured via the MIB object - vlanPortModeState (.1.3.6.1.4.1.89.48.22.1.1) this parameter is a table parameter indexed by the ifIndex of the port and may have the values of general(1), access(2), or trunk(3).
 
So anyway at a minimum I would do this:
  • Dump the ifTable to identify the correct ifIndex for the port you want.
  • Set the vlanPortModeState.ifIndex = port mode (the correct port mode - general port mode is most flexible and always work but be carefull to make sure you understand what the port modes are for).
  • Set the dot1qVlanStaticEgressPorts.vlan# = PortList (where the port list is a bit mask of ports and bit mask is properly setup as per PortList definition).

Cuong.

13 Posts

September 10th, 2005 04:00

Thanks for the help. Your tip about setting the vlanPortModeState to General solved the problem.

1 Message

January 18th, 2006 22:00

I am trying to manipulate the dot1qPvid (1.3.6.1.2.1.17.7.1.4.5.1.1.PORT#) OID to assign a port to a different VLAN. I think RFC 2674 says I should be able to set a VLAN number for this OID (Gauge32) and that it will change the VLAN assignment of the port. The problem is that if the port is in Access mode I get "generic error" when attempting to do that. If I put the port in General mode as described above, I can set it, however I then don't seem to be able to take the port back out of General mode and into Access mode. I must be doing something wrong. Help appreciated!

Thanks
Karl

January 19th, 2006 12:00

You have to be careful how you configure the mode.  These modes force certain rules on the switch.  You normally can do everything in general mode that you can in access or trunk so you should not need to change it back to access mode.

In access mode the port can only belong to one VLAN and the PVID VLAN number is the same as the port VLAN membership and access mode enforce that ingress and egress packet must be untagged.  If you configure it properly it should allow you to set the mode to access and still configure the VLAN configuration but you have to know the rule and do it correctly.

If you set to general mode you can do anything without the system checking so you can also configure the port to be the member of a single VLAN with PVID equals to the VLAN and make sure you set it up to accept only untagged traffic on ingress and to egress only untag traffic - this is equivalent to the access mode.  There is no different in the behavior for the switch.  The access mode is just a convenient.  I would normally just use general mode and configure what I want.  I don't think you need to worry about access mode.

Cuong.

No Events found!

Top