Configure vlan on CentOS 5

  • first install vconfig
    yum -y install vconfig
  • check if module loaded
    lsmod | grep 8021q

    If not loaded try to load with

    modprobe 8021q

    If you get a error message, than try a other kernel with vlan support

  • copy /etc/sysconfig/network-scripts/ifcfg-eth0 to /etc/sysconfig/network-scripts/ifcfg-eth0.<vlan>
  • add .<vlan> to DEVICE line
  • add vlan=yes
  • Example:
    DEVICE=eth0.201
    BOOTPROTO=none
    BROADCAST=172.16.201.255
    IPADDR=172.16.201.13
    NETMASK=255.255.255.0
    NETWORK=172.16.201.0
    ONBOOT=yes


    Authors:
    • Jochen Schnuerle