Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Oct 2020 14:42:24 +0200
From:      "Kristof Provost" <kp@FreeBSD.org>
To:        "Arsenij Solovjev" <xeper000@gmail.com>
Cc:        freebsd-jail@freebsd.org
Subject:   Re: vnet Jail on a non-dedicated network interface
Message-ID:  <3F8DAE0C-0EA1-40C5-9825-262F547E1954@FreeBSD.org>
In-Reply-To: <CA%2BRQ_Fd7Z7ynky8iB5h=cV30oRk5mPw0Out-2c=RF_e-AZVo2A@mail.gmail.com>
References:  <CA%2BRQ_Fd7Z7ynky8iB5h=cV30oRk5mPw0Out-2c=RF_e-AZVo2A@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 14 Oct 2020, at 14:18, Arsenij Solovjev wrote:
> Hi all!
> Does anybody know if it's possible to run a vnet jail on a 
> non-dedicated
> interface? I have the Lucas book on jails. In it he says that for vnet 
> you
> need to pick a dedicated interface, remove all networking IP 
> configuration
> and only bring it up. Afterwards you set up jib and whatnot.
>
> All works well if I use a dedicated secondary interface (let's call it
> em1). If I use em0 however I cannot ping the jail.
>
> I would like to have a host with that has a single network interface 
> which
> is used for both normal networking stuff as well as having the vnet 
> jail
> run on it.
>
> Maybe I could create some sort of virtual interface and run vnet on 
> it?
>
> Any ideas here? Thanks in advance!
>
Look at epair interfaces.

You can put em0 and epair0a in a bridge together and add epair0b to the 
vnet jail.
That gets the vnet jail connected to your LAN.

Or you can skip the bridge, assign an IP to epair0a and route between 
the jail and your LAN.

Regards,
Kristof



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F8DAE0C-0EA1-40C5-9825-262F547E1954>