1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CentOS VLAN設定メモ

Last updated at Posted at 2016-01-09
# 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
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?