Account Links: Cart | Your Account | Logout

Skip to content

Red Hat Knowledgebase

Red Hat Knowledgebase Search:

Updated Within the Last:

New Solutions within the last day New Solutions within the last week New Solutions within the last month

Browse by topics:


Click to View a Topic
Red Hat Enterprise Linux > AS/ES/WS v. 3 > Issue <<  49 of 594 >>

Solution Tools:


Email a Solution Postcard Printer version Submit a comment on this answer Update notifications Request an answer Back

Article Reference

Article ID: 3684
Last update: 09-20-04
Issue:
How do I configure my Red Hat Enterprise Linux 3 system to use a mixture of 802.1q Virtual Local Area Network (VLAN) tagged and untagged frames for network communication?
Resolution:
When connected to a properly configured network device, your Red Hat Enterprise Linux 3 system can communicate over a network using both untagged and 802.1q Virtual Local Area Network (VLAN) tagged frames. The necessary kernel module, 8021q, is already available in the 2.4 kernel.

To use both tagged and untagged frames, create additional ifcfg-ethX.Y files, where X is the interface on which you will use the VLAN and Y is the VLAN ID. For example, on a system with one network card (eth0) that needs to use tagged network traffic only for VLAN ID 10, you'll need these two files:
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/network-scripts/ifcfg-eth0.10
These files will configure your system to have a regular Ethernet interface called eth0 that uses untagged frames and a virtual interface called eth0.10 that uses tagged frames. To create the configuration file for the virtual tagged interface, copy the contents of your original ifcfg-eth0 file to ifcfg-eth0.10. Your original ifcfg-eth0 file should remain unedited, as it will set up your interface to communicate using untagged frames. Next, edit the DEVICE= line in the ifcfg-eth0.10 file so that it reads eth0.10. Add the line VLAN=yes to the file. Finish configuring the virtual adapter with the correct IP address and subnet mask for the VLAN, or with a BOOTPROTO=dhcp line if addresses are given out via DHCP. Don't forget to include a default gateway in /etc/sysconfig/network. It's important to remember that you can only have one default gateway.

Issue the command:
# service network restart
to complete the process. The VLAN=yes entry causes the network startup scripts to automatically run the vconfig command to add the necessary VLAN entry in /proc/net/vlan for the VLAN tag.

Here are the completed files for a network set up to communicate using tagged and untagged frames and with both adapters set to use DHCP:

/etc/sysconfig/network-scripts/ifcfg-eth0
 
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=XX:XX:XX:XX:XX:XX
ONBOOT=yes
TYPE=Ethernet
      

/etc/sysconfig/network-scripts/ifcfg-eth0.10
 
DEVICE=eth0.10
BOOTPROTO=dhcp
HWADDR=XX:XX:XX:XX:XX:XX
ONBOOT=yes
TYPE=Ethernet
VLAN=yes
      

If you accidentally created a virtual adapter with the wrong VLAN ID, you may need to use the vconfig command to remove it from the /proc filesystem. Just restarting the network service won't do that for you. For example, if you accidentally created a virtual adapter called eth0.12, the following command will remove it from /proc/net/vlan:
# vconfig rem eth0.12


How well did this entry answer your question?


good wrong incomplete out of date
Red Hat Enterprise Linux > AS/ES/WS v. 3 > Issue <<   49  of  594  >>