[Lxc-users] Failed to setup networking within container
Derek Simkowiak
derek at simkowiak.net
Tue Jan 3 23:26:45 UTC 2012
I think this is the problem:
lxc.network.hwaddr = 00:24:1d:2f:d6:5f
You have that set to the hardware (MAC) address of your physical bridge
device. That is wrong.
Instead, that should be the MAC address you want the container to have.
It should be something "random" so it won't conflict with any other
device on your network. But it's not entirely random, as there are rules
about the prefix and format.
Check out the "configure_lxc" hook of my script, which will show you how
to generate a random-but-valid MAC address using shell script:
http://derek.simkowiak.net/lxc-ubuntu-x/
As a quick test, try setting it to this and see if it works:
lxc.network.hwaddr = 00:24:1d:2f:e6:6f
(I simply made a trivial change to the last two parts, just to resolve
the conflict with your physical device.)
Thanks,
Derek Simkowiak
On 01/03/2012 02:58 PM, Vedran Furač wrote:
> Hi all,
>
> I'm unable to reach anything from inside of container nor to reach its
> interface from outside. I've followed multiple howto's and documentation
> but without success.
>
> Host (Debian testing, lxc 0.7.5)
> =====
>
>
> iface br0 inet dhcp
> bridge_ports eth0
> bridge_fd 0
>
> br0 Link encap:Ethernet HWaddr 00:24:1d:2f:d6:5f
> inet addr:192.168.0.59 Bcast:192.168.0.255 Mask:255.255.255.0
>
> lxc.network.type = veth
> lxc.network.flags = up
> lxc.network.link = br0
> lxc.network.hwaddr = 00:24:1d:2f:d6:5f
> lxc.network.ipv4 = 192.168.0.66/24
>
> Container (Debian stable)
> =====
>
> auto eth0
> iface eth0 inet static
> address 192.168.0.66
> netmask 255.255.255.0
> network 192.168.0.0
> broadcast 192.168.0.255
> gateway 192.168.0.1
>
> eth0 Link encap:Ethernet HWaddr 00:24:1d:2f:d6:5f
> inet addr:192.168.0.66 Bcast:192.168.0.255 Mask:255.255.255.0
>
> Default route:
>
> Destination Gateway Genmask Flags Iface
> default 192.168.0.1 0.0.0.0 UG eth0
>
> Am I doing something wrong?
>
> TIA,
>
> Vedran
>
>
> ------------------------------------------------------------------------------
> Write once. Port to many.
> Get the SDK and tools to simplify cross-platform app development. Create
> new or port existing apps to sell to consumers worldwide. Explore the
> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
> http://p.sf.net/sfu/intel-appdev
> _______________________________________________
> Lxc-users mailing list
> Lxc-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-users
More information about the lxc-users
mailing list