| 328 | |
| 329 | == example == |
| 330 | * 通常のbridge(veth)ではなくmacvlanであるが、vethでも同じはず |
| 331 | |
| 332 | * /var/lib/lxc/test/config |
| 333 | {{{ |
| 334 | lxc.network.type=macvlan |
| 335 | lxc.network.macvlan.mode=bridge |
| 336 | lxc.network.link=em1 |
| 337 | lxc.network.flags=up |
| 338 | lxc.network.hwaddr = 00:16:3e:85:2e:da |
| 339 | lxc.network.type=macvlan |
| 340 | lxc.network.macvlan.mode=bridge |
| 341 | lxc.network.link=em1 |
| 342 | lxc.network.flags=up |
| 343 | lxc.network.hwaddr = 00:16:3e:85:2e:db |
| 344 | }}} |
| 345 | |
| 346 | * mitty@test:~$ ifconfig -a | egrep 'addr|Link' |
| 347 | {{{ |
| 348 | eth0 Link encap:Ethernet HWaddr 00:16:3e:85:2e:da |
| 349 | inet addr:192.168.83.207 Bcast:192.168.83.255 Mask:255.255.255.0 |
| 350 | inet6 addr: fe80::216:3eff:fe85:2eda/64 Scope:Link |
| 351 | eth1 Link encap:Ethernet HWaddr 00:16:3e:85:2e:db |
| 352 | inet addr:192.168.83.212 Bcast:192.168.83.255 Mask:255.255.255.0 |
| 353 | inet6 addr: fe80::216:3eff:fe85:2edb/64 Scope:Link |
| 354 | lo Link encap:Local Loopback |
| 355 | inet addr:127.0.0.1 Mask:255.0.0.0 |
| 356 | inet6 addr: ::1/128 Scope:Host |
| 357 | }}} |
| 358 | mitty@test:~$ ip route |
| 359 | {{{ |
| 360 | default via 192.168.83.243 dev eth0 |
| 361 | 192.168.83.0/24 dev eth0 proto kernel scope link src 192.168.83.207 |
| 362 | 192.168.83.0/24 dev eth1 proto kernel scope link src 192.168.83.212 |
| 363 | }}} |