# yum install vconfig
# vi /etc/sysconfig/network
/etc/sysconfig/network
VLAN=yes
VLAN_NAME_TYPE=DEV_PLUS_VID_NO_PAD
設定内容 | 表記 |
---|---|
VLAN_PLUS_VID | vlan0010 |
VLAN_PLUS_VID_NO_PAD | vlan10 |
DEV_PLUS_VID | eth0.0010 |
DEV_PLUS_VID_NO_PAD | eth0.10 |
# vi /etc/sysconfig/network-scripts/ifcfg-{NIC name}
/etc/sysconfig/network-scripts/ifcfg-*
DEVICE={NIC name}
TYPE=Ethernet
HWADDR={MAC Address}
BOOTPROTO=none
ONBOOT=yes
IPV6INIT=no
# vi /etc/sysconfig/network-scripts/ifcfg-{NIC name}.{vlan id}
/etc/sysconfig/network-scripts/ifcfg-*
DEVICE={nic device name}
TYPE=Vlan
BOOTPROTO=none
ONBOOT=yes
IPV6INIT=no
IPADDR={IP address}
NETMASK={subnet mask}
# service network restart (または systemctl restart network)
# less /proc/net/vlan/config