Can't get my head around jail and plugin networking.

TomWaller

Dabbler
Joined
Aug 15, 2013
Messages
24
Hey all.

I have a TrueNAS server with 4 gigabit NICs in a lagg (lagg0). I use LACP, untagged trunk for native VLAN. This works. I also have two additional VLANs, 20 and 50. They are tagged and configured on the switch.

I've configured the interfaces in TrueNAS like this:

Physical ports -> lagg0 -> vlan -> bridge.

I've assigned static IPs to the bridges, not the VLANs, as I've read that's the correct way to do this in BSD. Outside of plugins, it seems to work fine. I can ping the interface addresses and I can see when I was testing I could get DHCP addresses from the correct VLAN.

The problem I have is I'd like to use the interface address for my plugins. For instance, bridge20 (the bridge belonging to VLAN 20, with a static IP of 10.20.3.1) I'd like to use the IP as the IP for Plex (and ultimately others later on). I can't see a way to do this. I've tried editing the jail properties and under network properties specifying vnet0:bridge20 but I just can't get it to use the address.

If I stick the jail on DHCP, it works fine with an address from my DHCP pool. I (maybe wrongly) assumed I could use a single interface IP for many jails.
Any tips? Or am I going about this all wrong?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
You're probably looking for the NAT option in the jail...

Not something that I personally use, but it does what you're asking.
 

TomWaller

Dabbler
Joined
Aug 15, 2013
Messages
24
You're probably looking for the NAT option in the jail...

Not something that I personally use, but it does what you're asking.
I assumed that's what I'd need but I can't see any of my bridge interfaces in the vnet_default_interfaces dropdown when I have the options NAT and VNET checked. I can see None, Auto, lagg0, bxe0: STORAGE, bxe1. Ignore the bxe interfaces, they are my 10G interfaces I use for NFS. But no bridges...
 

TomWaller

Dabbler
Joined
Aug 15, 2013
Messages
24
Weirdly, if I set the vnet_default_interface to 'auto' and have VNET and NAT ticked, while specifying vnet0:bridge20 on the network properties screen, the plugin comes up with the IP address of the management vlan, connected on vlan1 through bridge1, so I'm not quite sure where it's getting that from!?
 

TomWaller

Dabbler
Joined
Aug 15, 2013
Messages
24
I'm going to summarise what I'm trying to acheive below just to be clear.

I want multiple jails to share the IP address of a specific interface - in this case, bridge20.
 
Top