GNU/Linux Command – VCONFIG

vconfig — VLAN configuration tool

Using vconfig, we can create and remove VLAN devices on a VLAN enabled kernel. VLAN devices are Virtual Ethernet devices, which represents the Virtual LANs on the Physical LAN. VLAN is based IEEE 802.1Q standard. VLAN Tag size is 4 Bytes and it contain 4 values, Protocol Id(2 Bytes), COS (3 bits), CFI (1 bit) and VLAN Id (12 bits). VLAN Tag will be added to the packets, which are going out thru this VLAN interfaces. The packets with VLAN Id 100 will be accepted by the interface with VLAN Id 100 and VLAN Tag from the incoming packet will be removed.

# vconfig add eth0 100 -- Create VLAN 100 device on eth0. # vconfig set_egress_map eth0.100 0 3 -- COS in the out goingpackets will be set to 3. # vconfig set_ingress_map eth0.100 0 6 -- Incoming packets withCOS 6 mapped to default priority 0. # ifconfig eth0.100 up -- Bring up the VLAN 100interface with a IP. # cat /proc/net/vlan/config -- Show the currently available VLANdevices. # cat /proc/net/vlan/eth0.100 -- Show the status of VLAN 100interfaces. # ifconfig eth0.100 down -- Shutdown the VLAN 100 interface. # vconfig rem eth0.100 -- Remove the VLAN 100 device.
Read: man vconfig

Tagged with: ,
Posted in Uncategorized
2 comments on “GNU/Linux Command – VCONFIG
  1. Edgar says:

    Do you know if i can create vlans over vlans. Let me explain myself:I have a vmware linux virtual machine with 2 “virtual physical ” interfaces (eth0 and eth1) virtual eth0 is bridged to the laptop eth0 physical interface and virtual eth1 is bridged to a eth0.172 virtual interface in the vlan 172. All these connected to the switch port … untagged for VLAN 1 and tagged for VLAN 172. I need to create a VLAN 1010 over the virtual eth1 inside the virtual machine to communicate to the vlan 1010 in the switch.Can that be possible?

  2. Bharathi Subramanian says:

    VLAN over VLAN is called Double Tagging or QinQ. But from your explanation, I understood that, you need only an another VLAN interface, which you can create that on top of Virtual Eth1.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: