Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Jun 2021 15:35:29 +0200
From:      Milan Obuch <freebsd-jail@dino.sk>
To:        freebsd-jail@freebsd.org
Subject:   jail.conf question (vnet.interface)
Message-ID:  <20210606153529.526c1675@zeta.dino.sk>

next in thread | raw e-mail | index | archive | help
Hi,

for vnet jails, one needs to move some interface into created virtual
stack. In jail.conf, this could be achieved using

jail0
 {vnet;
  vnet.interface = re2;
 }

and initialize moved interface using standard /etc/rc.conf configuration
file in jail jail0.

Adding small paragraph about this in jail.conf man page would be
useful. I know it is in jail man page in some form, but it deserves
mentioning this in example section in jail.conf man page. At least,
this makes it easier to find for first comers :) (Well, that's not me,
I am using vnet jails aka VIMAGE from the start as an experimental
feature in FreeBSD 4 or 5, almost 20 years ago.)

I need more interfaces moved this way. It is no problem issue manually

ifconfig re3 vnet jail0

but trying to write

jail0
 {vnet;
  vnet.interface = re2;
  vnet.interface = re3;
 }

in jail.conf means only re3 is moved and can be configured with
standard rc.conf config file. First instance (re2) is kind of
overwritten and forgotten.

Is it possible to move more interfaces this way at all? I'd like to
avoid any hacks if possible, and any workaround for this is ugly...

Regards,
Milan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20210606153529.526c1675>