Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 May 2016 14:11:51 +0000
From:      "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
To:        Grzegorz Junka <list1@gjunka.com>
Cc:        freebsd-jail@freebsd.org
Subject:   Re: jails in different private subnets on the same host
Message-ID:  <AF80A4F2-3605-43A0-81CD-B68659B694C4@lists.zabbadoz.net>
In-Reply-To: <faf9e698-baee-f988-df64-5bcda4b1c7c9@gjunka.com>
References:  <faf9e698-baee-f988-df64-5bcda4b1c7c9@gjunka.com>

next in thread | previous in thread | raw e-mail | index | archive | help

> On 18 May 2016, at 14:00 , Grzegorz Junka <list1@gjunka.com> wrote:
>=20
> Is it possible to have two jails on the same host each one in a =
different private subnet, e.g. 192.168.1.0 and 10.33.1.0, and have =
routing between them working without issues?
>=20
> I know it's possible to run jails with IPs in those two subnets but it =
seems there is no routing and I am not sure if it's because I can't =
configure my router properly or there is a more fundamental problem. One =
issue I see is that the jail can't have a different default gateway than =
the host, and that for now is 192.168.1.1, but I don't see a reason why =
10.33.1.0 wouldn't be able to use 192.168.1.1 as it's default gateway =
provided there is routing between those two subnets.

Given they are both on the same base system host,  both addresses are =
connected locally and thus the kernel knows where to deliver these =
packets.  If that doesn=E2=80=99t work, there is a bug somewhere.

If you want different default gateways then you may want to look into =
using different FIBs for different jails.  See route(8) and jail(8) for =
parameters to set and tune.

/bz




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AF80A4F2-3605-43A0-81CD-B68659B694C4>