How to setup VLAN network on linux ?
Why VLAN : create a virual lan(grouping some computers from actual LAN with out using any switch/routers etc. Only needs software. Can also be done using hardware)
Required Packages :
#yum install vconfig
Next, go to the /etc/sysconfig/network-scripts directory and decide which eth# device you're going to add a VLAN to. Note that the VLAN device will run alongside (in parallel to, at the same time) as the original eth# device, so there is no need to change your existing configuration.
1. copy /etc/sysconfig/network-scripts/ifcfg-eth0 to etc/sysconfig/network-scripts/ifcfg-eth0.2 and edit : VLAN=yes like :
---
DEVICE=eth0.2
VLAN=yes
TYPE=Ethernet
HWADDR=##:##:##:##:##:##
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.1.24
GATEWAY=192.168.1.254
---
Note : VLAN id is here 2 for eth0
2. Do for other nic and increase VLAN ID and check like ifconfig
3. Restart network service. That's it.
Thursday, 30 June 2011
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment