How to configure VLANs in Linux


This link from the Redhat knowledge base talks all about it.

Here’s the list of steps and pointers I had to go through.

1. Make sure that the 8021q module is loaded

modprobe 8021q

2. This step is important as it defines the vlan that it listens on
Make a new interface file named “ifcfg-ethX.Y” where
X – the interface it will listen on.
Y – is the VLAN ID.

Add this to the config file

VLAN=yes

3. Create the neccessary IP configurations on the new interface file

4. Make sure that physical interface file looks like this. In my case it’s eth0

DEVICE=eth0
ONBOOT=yes

5. service network restart

6. Done!

Related Posts with Thumbnails

About the Author

Alfred Tong
Author and owner of this blog. A Networking enthusiast, full time networking and systems Engineer. Generally curious about all things IT.Certifications: GIAC GSEC, CCNP-S, CCNP, CCSP, CCDP, CCNA, RHCE, JNCIA - FWV