[Lxc-users] Failed to setup networking within container

Vedran Furač vedran.furac at gmail.com
Thu Jan 5 04:03:41 UTC 2012


On 04.01.2012 00:26, Derek Simkowiak wrote:

> 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.

Thanks, that was it, it works now. However, this was my home computer
and everything is within 192.168, in reality I have host and container
on completely different subnets:

1.1.1.0/30 - host

(1.1.1.0 - network, 1.1.1.1 - gw/switchport,
1.1.1.2 - host, 1.1.1.3 - bcast)

2.2.2.0/30 - container
(2.2.2.0 - network, 2.2.2.1 - gw/switchoort,
2.2.2.2 - host, 2.2.2.3 - bcast)

Of course, in container one cannot add route to 1.1.1.0/30 since it
doesn't know anything about it (you get that stupid message: "siocaddrt:
no such process") and LXS is configured with:

lxc.network.ipv4 = 2.2.2.2/30

I was thinking to add dummy eth0:1 that would have /30 that's on hosts
bridge (1.1.1.0/30) and then adding default gateway to 1.1.1.2 (hosts
bridge IP) or 1.1.1.1 (host's gw/switchport), but this doesn't work.

Not only that I get "Destination Host Unreachable" when I try to ping
something outside the container, but hosts network dies completely then
and I can't access the server other than physically console it until LXC
is stopped. Any ideas?

Regards,
Vedran






More information about the lxc-users mailing list