How to create a VLAN interface with an custom name

环境

  • Red Hat Enterprise Linux 6
  • initscripts-9.03.46-1.el6 or higher

问题

  • Want to create a VLAN interface without using the standard naming scheme of eth0.10
  • Is it possible to make a VLAN or rename one so its name is not limited to {device}.{vlan}?

决议

  • Create an interface configuration file in the /etc/sysconfig/network-scripts/ directory with the name ifcfg-{name} where {name} is the custom name for the VLAN interface.
  • The ifcfg file must include: the DEVICE parameter which specifies the custom interface name, the PHYSDEV parameter which specifies the interface the VLAN will be on top of, VID which specifies the VLAN ID (number), and VLAN=yes must be set. PHYSDEV can be a bond.
  • In the following example, a VLAN interface named "outside-network" will be created over eth0 with a VLAN ID of 10:
Raw
DEVICE=outside-network
VLAN=yes
PHYSDEV=eth0
VID=10
BOOTPROTO=dhcp
ONBOOT=yes

 

上一篇:org.apache.jasper.JasperException: /interface/xxx.jsp (行.: [274], 列: [16]) 未终止的[<;s:elseif]标记。


下一篇:通用Mapper(二)创建具体Mapper接口与Mapper接口介绍