This is a discussion on Linux vlan configuration within the Networking, Firewalls and Security forums, part of the Mastering Servers category; 1. Connect the eth0 interface of your linux machine to the switch. 2. Remove the IP Address information on the ...
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
|||
|
1. Connect the eth0 interface of your linux machine to the switch.
2. Remove the IP Address information on the eth0 interface # ifconfig eth0 0.0.0.0 # ifconfig eth0 up 3. Configure 2 VLANs on the eth0 interface using vconfig as follows (100,200 are the VLAN id' . If the 8021q.o module is not loaded, the vconfig command (when invoked first time) will automatically load the module.# vconfig add eth0 100 # vconfig add eth0 200 4. Configure IP on the VLAN interfaces # ifconfig eth0.100 xxx.xxx.xxx.xxx netmask 255.255.252.0 up # ifconfig eth0.200 yyy.yyy.yyy.yyy netmask 255.255.255.0 up 5. Preserve the vlan configuration across reboots by adding it to configuration files. Create the appropriate ifcfg files for eth0, eth0.100 and eth0.200 in /etc/sysconfig/network-scripts/ # cd /etc/sysconfig/network-scripts/ Contents of ifcfg-eth0 DEVICE=eth0 ONBOOT=no TYPE=Ethernet Contents of ifcfg-eth0.100 DEVICE=eth0.100 IPADDR=xxx.xxx.xxx.xxx NETMASK=255.255.252.0 VLAN=yes ONBOOT=yes BOOTPROTO=none Contents of ifcfg-eth0.200 DEVICE=eth0.200 IPADDR=yyy.yyy.yyy.yyy NETMASK=255.255.0.0 VLAN=yes ONBOOT=yes BOOTPROTO=none Update /etc/sysconfig/network file to make the GATEWAYDEV use the public vlan interface. Contents of /etc/sysconfig/network NETWORKING=yes HOSTNAME=un1xf00 GATEWAY=xxx.xxx.xxx.1 DOMAINNAME=dev.un1xf00.com GATEWAYDEV=eth0.100 6. The VLAN configuration on the server can be verified in the file /proc/net/vlan/config. Sample contents are shown below. VLAN Dev name | VLAN ID Name-Type: VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD eth0.100 | 100 | eth0 eth0.200 | 200 | eth0 More at unix linux & storage |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Fedora Linux 7 wireless card configuration | adahan | Linux hardware | 3 | 12-08-2007 12:50 AM |
| DNS Configuration on Red Hat Linux AS4 | shilpigoel1 | Linux software | 2 | 07-06-2007 05:06 PM |
| eth0.1 vlan linux config command | chimu | Linux software | 1 | 07-19-2006 10:44 PM |
| Linux Change the time zone configuration after installation | raj | Linux software | 1 | 07-17-2006 02:11 AM |
| Linux Change the network configuration after installation | jerry | Linux software | 2 | 06-14-2006 03:58 PM |