Recently I stumbled upon an apparently unsolvable network problem (at least unsolvable for me, I’m not an expert in “very very low level” networking) and the solution involved the creation of a vlan on my SuSE 10.1 server. The problem was very simple: I wanted my Grandstream HandyTone 286/386 to log to syslog on my server. I configured the devices (simply I put my server address in the correct field and choose the log level) but nothing appeared on syslog. After some unsuccessful Internet research (where I found that probably it was a bug of the devices), I noted that another strange thing was that the devices were pingable from my Windows box but not from my Linux and Mac OS X boxes.
So I ran Ethereal and observed that the devices’ log packets were there and contained an “802.1q” layer with a “0” (zero) label which is the ID of the vlan. So I researched again and found the Linux 802.1q VLAN package and, after some tweaking, I was up and running with the devices’ logging and pinging: then the mysterious network problem was due to the fact that the devices use always the vlan and there isn’t a way to tell them not to use it.
After a restart of my server, the vlan was not working again because the server “forgot” the vlan configuration because it was not permanent. Then I discovered that on SuSE you have a very simple way to create and make permanent a vlan configuration. For the explanation, type
follow the instruction and you’re done. If you want, here follows the simple steps:
and put the following lines in that file:
Save and than you can issue a
ifup vlan0 command to bring up the interface and also an
ifconfig if you want to see it working.
Note that the 0 (zero) in the file name is the ID of the vlan; in ETHERDEVICE put the name of the interface of the network where the vlan is (usually eth0); the IP address is not so important if you don’t have another IP network (i.e. the 192.168.2.x is not directly useful on my network) but it permits to the server to be seen on the vlan, either with its original IP or with the new one.