1

When creating network interface files ifcfg-tttN (ttt in {eth,em,bond}) in /etc/sysconfig/network-scripts/ on RHEL/CentOS servers, what are the different values for VLAN_NAME_TYPE and what do they mean?

1 Answer 1

1

The parameter VLAN_NAME_TYPE defines the naming convention that you want to use for the VLAN device names, and thus for the file names.

Here are a few assumptions: - I'm using interface eth0. The configuration is the same for a bonding interface, where the physical device name would be bond0, or for the new Dell naming convention emN, pSpN see RedHat manual. - The VLAN id for the subnet 10.0.20.0/24 is 12.

Here is the content of my ifcfg- file, to which I will append the VLAN parameters.

VLAN=yes
ONBOOT=yes
BOOTPROTO=static
NM_CONTROLLED=no
IPADDR=10.0.20.2
NETMASK=255.255.255.0
TYPE=Ethernet
MTU=1500
IPV6INIT=no

VLAN_NAME_TYPE=<see below>
DEVICE=<see below>
PHYSDEV=<optional, see below>

Possible values for VLAN_NAME_TYPE and their associated parameters are below.

The name of the file has to match the content of the DEVICE parameter with the prefix ifcfg-.

Note that if the parameter DEVICE doesn't contain the physical device, the parameter PHYSDEV is mandatory.

  1. VLAN_NAME_TYPE_RAW_PLUS_VID

Name will look like: eth0.0012

File name /etc/sysconfig/network-scripts/ifcfg-eth0.0012

DEVICE=eth0.0012
VLAN_NAME_TYPE=VLAN_NAME_TYPE_RAW_PLUS_VID
  1. VLAN_NAME_TYPE_PLUS_VID_NO_PAD

Name will look like: vlan12

File name /etc/sysconfig/network-scripts/ifcfg-vlan12

PHYSDEV=eth0
DEVICE=vlan12
VLAN_NAME_TYPE=VLAN_PLUS_VID_NO_PAD
  1. VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD (this is the default)

Name will look like: eth0.12

File name /etc/sysconfig/network-scripts/ifcfg-eth0.12

DEVICE=eth0.12
VLAN_NAME_TYPE=VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD
  1. VLAN_NAME_TYPE_PLUS_VID

Name will look like: vlan0012

File name /etc/sysconfig/network-scripts/ifcfg-vlan0012

PHYSDEV=eth0
DEVICE=vlan0012
VLAN_NAME_TYPE=VLAN_NAME_TYPE_PLUS_VID

Source: Source of the 8021q module for the linux kernel 2.6.32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .