VLAN設定
パーフェクトにメモ。
VLANでtag流すとき。これとbondingは忘れるよね。
cat <<'EOF' >>/etc/sysconfig/network VLAN_NAME_TYPE=DEV_PLUS_VID_NO_PAD VLAN=yes EOF
cat <<'EOF' >/etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 #BOOTPROTO=static #BROADCAST=192.168.0.255 #IPADDR=192.168.0.110 #NETMASK=255.255.255.0 #NETWORK=192.168.0.0 #ONBOOT=yes #TYPE=Ethernet ##BOOTPROTO=dhcp ONBOOT=yes BOOTPROTO=none HWADDR=00:1C:C0:CD:95:CD EOF
cat <<'EOF' > /etc/sysconfig/network-scripts/ifcfg-eth0.100 DEVICE=eth0.101 BOOTPROTO=static BROADCAST=192.168.0.255 IPADDR=192.168.0.110 NETMASK=255.255.255.0 NETWORK=192.168.0.0 ONBOOT=yes EOF
cat <<'EOF' >/etc/sysconfig/network-scripts/ifcfg-eth0.101 DEVICE=eth0.201 BOOTPROTO=static BROADCAST=192.168.1.255 IPADDR=192.168.1.110 NETMASK=255.255.255.0 NETWORK=192.168.1.0 ONBOOT=yes EOF
そういやdebianだと。
# apt-get install vlan
cat <<'EOF' >>/etc/network/interfaces # VLAN 100 iface vlan100 inet static address 192.168.100.3 netmask 255.255.255.0 vlan_raw_device eth0 EOF
ね。