[Lxc-users] Routing issues

Papp Tamas tompos at martos.bme.hu
Mon Jun 3 22:26:11 UTC 2013


On 06/03/2013 06:55 PM, Rory Campbell-Lange wrote:
>
> I have (with Rob van der Hoeven's help) setup a Debian Wheezy container on a
> Wheezy host. This worked well.
>
> I can ssh into the main host from the lxc host. However I cannot hit the
> internet from the lxc host. I'd be grateful for some pointers.
>
> At present I have the following configuration on the host:
>
>      auto br0
>      iface br0 inet static
>              bridge_ports eth0
>              bridge_fd 0
>              address aa.bb.cc.103
>              netmask 255.255.255.192
>              gateway aa.bb.cc.65
>
> and the following in the container config:
>
>      lxc.utsname = wheezy05
>      lxc.network.type = veth
>      lxc.network.flags = up
>      lxc.network.link = br0
>      lxc.network.ipv4 = aa.bb.cc.87/26
>      lxc.network.hwaddr = 00:1E:83:8D:7C:25
>
> with the following in wheezy05's /etc/network/interfaces file:
>
>      auto eth0
>      # iface eth0 inet dhcp
>      iface eth0 inet static
>          address aa.bb.cc.87
>          netmask 255.255.255.192
>          gateway aa.bb.cc.65
>
> One specific issue I found:
>
>      * it looks like the container address is assigned at startup and the
>        'interfaces' network stanza is not run -- I have to assign the
>        gateway by hand

So you can or can not hit the internet? It's not clear, what your problem is exactly
It's also not clear, which one you mean by 'lxc host'.

Do you really mean the machine, where containers are running, or lxc host is actually the guest?

You don't need to use lxc.network.ipv4, if you setup the network from the container.


tamas




More information about the lxc-users mailing list