[lxc-users] Route to Containers
Stephen Nelson-Smith
stephen at atalanta-systems.com
Tue Feb 16 19:24:14 UTC 2016
Hi,
So in the spirit of sharing. I've resolved this now... but for
reference, the simple fix is below.
On 16 February 2016 at 19:05, Stephen Nelson-Smith
<stephen at atalanta-systems.com> wrote:
> Hi,
>
> On 16 February 2016 at 18:31, Stephen Nelson-Smith
> <stephen at atalanta-systems.com> wrote:
>
>> [root at example ~]# ip r l
>> default via 10.1.1.1 dev eth0
>> 10.1.1.1 dev eth0 scope link
>
> ^^^^^^ this doesn't look right!!
>
> [root at example ~]# ip r l
> default via 10.1.1.1 dev eth0
> 10.1.1.1 dev eth0 scope link
> 169.254.0.0/16 dev eth0 scope link metric 1005
> [root at example ~]# ip r d 10.1.1.1 dev eth0
> [root at example ~]# ip r l
> default via 10.1.1.1 dev eth0
> 169.254.0.0/16 dev eth0 scope link metric 1005
> [root at example ~]# ip r a 10.1.1.0/24 dev eth0
> [root at example ~]#
>
> And now everything works.
>
> So I just need to find out why that route was set.
It is necessary to ensure that the subnet mask is set for lxc.network.ipv4:
# grep ipv4 /var/lib/lxc/example/config
lxc.network.ipv4 = 10.1.1.233/24 10.1.1.255
lxc.network.ipv4.gateway = 10.1.1.1
Hopefully this is useful to someone.
S.
More information about the lxc-users
mailing list