Jail with multiple NICs each on different VLANs

BitsAndBytes

Cadet
Joined
May 15, 2021
Messages
6
Is it possible to add multiple NICs from separate tagged VLANs to a jail?
Ie one jail that that can have one NIC on an internal VLAN and one NIC on a IOT VLAN.

Cheers.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Yes.

You need to create your VLAN interfaces and your bridge interfaces in advance. If the host needs an IP address in that VLAN you must put it on the bridge interface and not on the VLAN.

Then e.g.
Code:
iocage set vnet_default_interface=none <jailname>
iocage set interfaces=vnet0:bridge0,vnet1:bridge1 <jailname>


HTH,
Patrick
 

BitsAndBytes

Cadet
Joined
May 15, 2021
Messages
6
Yes.

You need to create your VLAN interfaces and your bridge interfaces in advance. If the host needs an IP address in that VLAN you must put it on the bridge interface and not on the VLAN.

Then e.g.
Code:
iocage set vnet_default_interface=none <jailname>
iocage set interfaces=vnet0:bridge0,vnet1:bridge1 <jailname>


HTH,
Patrick
Thanks - how “safe” are iocage comnand line changes outside the middleware/GUI?

Are they persistent across host upgrades etc?

Cheers,
Stephen
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Thanks - how “safe” are iocage comnand line changes outside the middleware/GUI?

Are they persistent across host upgrades etc?
Perfectly safe. Iocage is the same subsystem the UI uses. And you can do exactly the same in the UI, actually you can view or edit the changes I suggested in the UI afterwards. It was just easier than producing a load of screenshots.

This is what the IP configuration section looks like after you created the interfaces - iocage or UI doesn't matter.

Bildschirm­foto 2023-01-24 um 00.46.51.png

HTH,
Patrick
 
Top