# サブインタフェースの追加をする
$ vconfig add eth1 100# 作った eth1.100 に IP address を割り振って
$ ip addr add 192.168.0.100/24 dev eth1.100# eth1 インターフェースを起こして
$ ip link set eth1 up# eth1.100 インタフェースを起こす
$ ip link set eth1.100 up
# eth1.100 インターフェースを作っておいて
$ vconfig add eth1 100
$ ip link set eth1 up
$ ip link set eth1.100 up# eth1.200 インターフェースも作っておいて
$ vconfig add eth1 200
$ ip link set eth1 up
$ ip link set eth1.200 up# br1 という名前で bridge インターフェースを作って
$ brctl addbr br1
# br1 に eth1.100 を論理的に接続
$ brctl addif br1 eth1.100# br1 に eth1.200 も論理的に接続
$ brctl addif br1 eth1.200# br1 インターフェースを起こす
$ ip link set br1 up
# サブインタフェースの追加をする
$ vconfig add eth1 100# 作った eth1.100 に IP address を割り振って
$ ip addr add 192.168.0.100/24 dev eth1.100# eth1 インターフェースを起こして
$ ip link set eth1 up# eth1.100 インタフェースを起こす
$ ip link set eth1.100 up
Node2
Node2 は Nested VLAN インターフェースを作っておきます。
$ vconfig add eth1 200
$ vconfig add eth1.200300
$ ip addr add 192.168.0.200/24 dev eth1.200.300
$ ip link set eth1 up
$ ip link set eth1.200 up
$ ip link set eth1.200.300 up
VLAN 変換サーバー
# eth1.100 インターフェースを作っておいて
$ vconfig add eth1 100
$ ip link set eth1 up
$ ip link set eth1.100 up# eth1.200.300 インターフェースも作っておいて
$ vconfig add eth1 200
$ vconfig add eth1.200300
$ ip link set eth1 up
$ ip link set eth1.200 up
$ ip link set eth1.200.300 up# br1 という名前で bridge インターフェースを作って
$ brctl addbr br1
# br1 に eth1.100 を論理的に接続
$ brctl addif br1 eth1.100# br1 に eth1.200.300 も論理的に接続
$ brctl addif br1 eth1.200.300# br1 インターフェースを起こす
$ ip link set br1 up
これで準備は整いました。
Node1 と Node2 でお互いの IP address に ping を送信してみましょう!