Today I needed to add vlans on a suse11 box.
Following stuff I did:
In YAST you enter network devices and change the config of the Hardware Ethernet Adapter to its IP adress.
Then you add a new device of the catogory “VLAN” and after that you can configure its ip addresses.
When you restart the network (rcnetwork restart) you will find all the interfaces online, though the ping might take a bit to work (even if portfast is configured on the switch). So no panic if the first pings do not work 🙂
What you might need to add manually is the vlan tagging method. I used 802.1q and had to load the module on boot.
To achive this you have to edit /etc/sysconfig/kernel
In this configuration file you will find a a line with “MODULES_LOADED_ON_BOOT” and you just add “8021q” in this line.
So it will look like this:
After that you can (if you want) manually add the config for the VLAN.
The files under /etc/sysconfig/network will look like this (in the example eth1 is a trunked port):
That´s it. Have fun with VLANs on linux