10.6.1 Using vconfig to Create VLAN Devices

The vconfig command provides an alternate method of creating VLAN devices.

To create a VLAN device by using the vconfig command:

  1. Add a VLAN interface definition, eth0.5, for eth0 on PVID 5:

    # vconfig add eth0 5
  2. Configure the network settings for the VLAN interface:

    # ip addr add dev eth0.5
  3. Bring up the VLAN interface:

    # ip link set eth0.5 up

    If you subsequently need to delete the interface, use the following commands to bring it down and remove its definition:

    # ip link set eth0.5 down
    # vconfig rem eth0.5

For more information, see the vconfig(8) manual page.