| 82 | |
| 83 | = macvlan vs Linux Bridge = |
| 84 | * macvlanとbridgeは両立出来ない |
| 85 | |
| 86 | 1. root@Microknoppix:~# brctl addbr br0 |
| 87 | 1. root@Microknoppix:~# brctl addif br0 eth0 |
| 88 | 1. root@Microknoppix:~# ip link add dev macvlan0 link eth0 address 00:16:3e:xx:yy:zz type macvlan mode bridge |
| 89 | {{{ |
| 90 | RTNETLINK answers: Device or resource busy |
| 91 | }}} |
| 92 | |
| 93 | 1. root@Microknoppix:~# brctl delif br0 eth0 |
| 94 | 1. root@Microknoppix:~# ip link add dev macvlan0 link eth0 address 00:16:3e:xx:yy:zz type macvlan mode bridge |
| 95 | 1. root@Microknoppix:~# brctl addif br0 eth0 |
| 96 | {{{ |
| 97 | device eth0 is already a member of a bridge; can't enslave it to bridge br0. |
| 98 | }}} |
| 99 | 1. root@Microknoppix:~# brctl show |
| 100 | {{{ |
| 101 | bridge name bridge id STP enabled interfaces |
| 102 | br0 8000.000000000000 no |
| 103 | }}} |
| 104 | |
| 105 | * root@Microknoppix:~# ip link |
| 106 | {{{ |
| 107 | 6: macvlan0@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN |
| 108 | link/ether 00:16:3e:xx:yy:zz brd ff:ff:ff:ff:ff:ff |
| 109 | }}} |
| 110 | |
| 111 | == bridging macvlan == |
| 112 | * macvlanをブリッジすることは可能 |
| 113 | * macvlan0 at eth0 |
| 114 | * macvlan1 at eth1 |
| 115 | |
| 116 | * mitty@vlan-gw:~$ ifconfig | grep addr |
| 117 | {{{ |
| 118 | br-gw Link encap:Ethernet HWaddr 00:16:3e:18:8b:a0 |
| 119 | inet6 addr: fe80::216:3eff:fe18:8ba0/64 Scope:Link |
| 120 | eth0 Link encap:Ethernet HWaddr 00:16:3e:3d:4f:c9 |
| 121 | inet6 addr: fe80::216:3eff:fe3d:4fc9/64 Scope:Link |
| 122 | eth1 Link encap:Ethernet HWaddr 00:16:3e:3d:4f:ca |
| 123 | inet6 addr: fe80::216:3eff:fe3d:4fca/64 Scope:Link |
| 124 | macvlan0 Link encap:Ethernet HWaddr 00:16:3e:18:8b:a0 |
| 125 | inet6 addr: fe80::216:3eff:fe18:8ba0/64 Scope:Link |
| 126 | macvlan1 Link encap:Ethernet HWaddr 00:16:3e:32:30:c9 |
| 127 | inet6 addr: fe80::216:3eff:fe32:30c9/64 Scope:Link |
| 128 | }}} |
| 129 | * mitty@vlan-gw:~$ brctl show |
| 130 | {{{ |
| 131 | bridge name bridge id STP enabled interfaces |
| 132 | br-gw 8000.00163e188ba0 no macvlan0 |
| 133 | macvlan1 |
| 134 | }}} |
| 135 | |
| 136 | * ただし、このmacvlanのブリッジは期待通りには動かない(eth0<->eth1の、NICを超えての疎通不可) |
| 137 | * ARP request/replyは上流側の物理デバイス(eth0)に対しては正しく送信・受信されているが、replyがmacvlan0に正しく届かないため下流側のmacvlan1まで回ってこない模様 |