Thursday, June 10, 2010

Linux VLAN configuration

here is a small Howto configure VLAN on a linux system.

the required VLAN ID i have to configure is "15". copy the file
/etc/sysconfig/network-scripts/ifcfg-eth0 to /etc/sysconfig/network-scripts/ifcfg-eth0.15

cp  /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0.15

now we have to edit the new virtual interface  ifcfg-eth0.15

vi  /etc/sysconfig/network-scripts/ifcfg-eth0.15

replace DEVICE= with your VLAN ID


DEVICE=eth0.15

also add a line VLAN=yes


DEVICE=eth0.15
VLAN=yes


don't forget to set your IP address ;-) also remove gateway entries...
the gateway entries should be only at /etc/sysconfig/network


-- Yaniv

No comments: