[lxc-users] LXD networking between guest, host, and KVM guest

Fajar A. Nugraha list at fajar.net
Thu Oct 8 07:27:10 UTC 2015

On Thu, Oct 8, 2015 at 4:47 AM, Sean McNamara <smcnam at gmail.com> wrote:
> Here's an example from LXD config, where the following placeholders
> are used to mask my specific information:

> ""
> ""
> "de:ad:be:ef"
> "MAIN"

all those obfuscation makes my head hurt.

>   raw.lxc: "lxc.network.ipv4=
>     \      \nlxc.network.mtu=1500\n"

/32 should not have a broadcast address. Doesn't matter if the
original /27 has a broadcast address, once you use /32, then the
original broadcast address doesn't apply anymore as everything has to
go thru the gateway.

On a normal lxc (not lxd), I simply use this

lxc.network.ipv4 =
lxc.network.ipv4.gateway =

and the result from inside the container:
# ip ad li eth0
96: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP qlen 1000
      link/ether 00:16:3e:c7:b9:d6 brd ff:ff:ff:ff:ff:ff
    inet brd scope global eth0
       valid_lft forever preferred_lft forever

# ip route
default via dev eth0 dev eth0  scope link

I'm guessing your broadcast setting caused the problem. Try removing
it on two containers first, and see if they can ping each other. A
"traceroute" between the two containers should also show that traffic
goes THRU the gateway instead of directly to the other container's IP.


More information about the lxc-users mailing list