目次
LinuxにてVLANを使用する手順。
| OS | CentOS 5.3 |
VLANの有効化設定とNICへのVLAN ID付与を行う。
設定の手順は以下となる。
VLAN=yes VLAN_NAME_TYPE=DEV_PLUS_VID_NO_PAD
| 設定値 | 表記 |
| VLAN_PLUS_VID | vlan0100 |
| VLAN_PLUS_VID_NO_PAD | vlan100 |
| DEV_PLUS_VID | eth0.0100 |
| DEV_PLUS_VID_NO_PAD | eth0.100 |
DEVICE=eth0 ONBOOT=yes BOOTPROTO=none
DEVICE=eth1.10 BOOTPROTO=static ONBOOT=yes IPADDR=192.168.100.200 NETMASK=255.255.255.0
/etc/init.d/network restart
eth0 Link encap:Ethernet HWaddr 00:04:23:D6:CA:3C
UP BROADCAST RUNNING SLAVE MULTICAST
MTU:1500 Metric:1
RX packets:67 errors:0 dropped:0
overruns:0 frame:0
TX packets:103200 errors:0 dropped:0
overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4266 (4.1 KiB)
TX bytes:6235233 (5.9 MiB)
Base address:0x9c00 Memory:fdde0000-fde00000
eth0.10 Link encap:Ethernet HWaddr 00:04:23:C6:B4:A4
inet addr:192.168.100.200 Bcast:192.168.1.255
Mask:255.255.255.0
inet6 addr: fe80::204:23ff:fec6:b4a4/64
Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST
MTU:1500 Metric:1
RX packets:41139981 errors:0 dropped:0
overruns:0 frame:0
TX packets:73872532 errors:0 dropped:0
overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:232665976 (221.8 MiB)
TX bytes:3337216009 (3.1 GiB)