I've got an environment set up now where the host OS has a static IP
directly connected to the LAN. I'm bridging the containers to have their own
static LAN IP as well.
In my containers I've set:
lxc.network.type=veth
lxc.network.link=br0
lxc.network.name=eth0
lxc.network.ipv4 = 10.1.3.21/16
lxc.network.flags=up
When I start my container eth0 is *not* configured. If I manually add
`eth0=eth0` in /run/network/ifstate and `service restart networking`, it
gets configured properly.
davidparks21@Myrrix:~$ dmesg | grep eth0
[ 3.185536] igb 0000:01:00.0: >eth0: (PCIe:2.5Gb/s:Width x4)
00:a0:d1:ec:a5:60
[ 3.185617] igb 0000:01:00.0: >eth0: PBA No: 82576B-001
[ 7.763432] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[19343.087473] device veth0BuAGV entered promiscuous mode
[19343.089738] IPv6: ADDRCONF(NETDEV_UP): veth0BuAGV: link is not ready
[19343.378396] IPv6: ADDRCONF(NETDEV_CHANGE): veth0BuAGV: link becomes ready
[19343.378439] br0: port 4(veth0BuAGV) entered forwarding state
[19343.378444] br0: port 4(veth0BuAGV) entered forwarding state
[19361.054176] br0: port 4(veth0BuAGV) entered disabled state
[19361.062203] device veth0BuAGV left promiscuous mode
[19361.062207] br0: port 4(veth0BuAGV) entered disabled state
davidparks21@Myrrix:~$ dmesg | grep em1
[ 10.869348] device em1 entered promiscuous mode
[ 10.985440] IPv6: ADDRCONF(NETDEV_UP): em1: link is not ready
[ 13.985304] igb: em1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control:
RX
[ 13.987591] IPv6: ADDRCONF(NETDEV_CHANGE): em1: link becomes ready
[ 13.987626] br0: port 1(em1) entered forwarding state
[ 13.987632] br0: port 1(em1) entered forwarding state
After looking at dmesg output I noticed that there are (unexpected)
references to em1, which is the host's physical NIC.
The bridging all works, networking is fine, it's just when I start the
container, rebooting reproduces the problem, then manually updating ifstate
and rebooting resolves it.
I'm not sure how to configure it so it configure eth0 on reboot as I would
expect.
Thanks for any advice!
David
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users