[Lxc-users] LXC Container: Network Configuration

C Anthony Risinger anthony at xtfx.me
Wed Nov 30 03:07:20 UTC 2011


On Tue, Nov 29, 2011 at 7:27 PM, Patrick Kevin McCaffrey <pkm at uwm.edu> wrote:
>
> The host machine also runs as my router, as it has a 4 port ethernet card (four subnets, DHCP running on each).  However, I cannot SSH into my container from another computer on the local network -- it is only accessible via the host machine.  If I try to SSH from another machine, it says "no route to host."  Additionally, the container does not have internet access.  If I try to ping, use wget or apt, I get connection errors.  I'm assuming these two problems are related.
>
> I've got my local network set up using Shorewall, and it works reasonably well for everything else (the entire local network is on the "local" zone, which is completely open).  The host's etc/network/interfaces file sets up the five ethernet interfaces (eth0-eth3 with static IPs and eth4 with DHCP from the cable modem) as well as the bridge for lxc.  The following is my bridge entry:

it sounds to me like there really is "no route to host" ... the bridge
is isolated from the other physical cards (ie, all other hosts), and
there is probably not a route in the kernel providing access between,
or access to the outside -- only the host can see the bridge
interface.

whats is output of `ip route` or `route -n`?  do you have dhcp running
on the bridge or is the LXC host assigned a static ip?

-- 

C Anthony




More information about the lxc-users mailing list