Jails - picking up DHCP from non-assigned vlan

gwaitsi

Patron
Joined
May 18, 2020
Messages
243
I have two jails, zoneminder and emby. They are both on different vlans with static assigned ip addresses.

the config is;
Basic Properties - emby
VNET - ticked
Berkeley - ticked
IPv4 Interface - vnet0
IP address - 192.168.20.20
Jail Properties
allow_set_hostname - ticked
allow_raw_sockets - ticket
Network Properties
ineterfaces
vnet0:bride0

Basic Properties - zn
VNET - ticked
Berkeley - ticked
IPv4 Interface - vnet0
IP address - 192.168.30.20
Jail Properties
allow_set_hostname - ticked
allow_raw_sockets - ticket
Network Properties
ineterfaces
vnet0:bride0

In addition to the static addresses above, both jails are obtaining a DHCP address from the x.x.30.0 network

why is this so?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
If they are both attached to bridge0, they are both on the same VLAN.

To make sure which jail goes onto which I recommend explicitly creating the bridgeN interfaces with vlanN as their member and assigning the host's IP address (if there is any) to the bridge instead of the VLAN. This is recommended best practice by the FreeBSD handbook, BTW ...
 

gwaitsi

Patron
Joined
May 18, 2020
Messages
243
If they are both attached to bridge0, they are both on the same VLAN.

To make sure which jail goes onto which I recommend explicitly creating the bridgeN interfaces with vlanN as their member and assigning the host's IP address (if there is any) to the bridge instead of the VLAN. This is recommended best practice by the FreeBSD handbook, BTW ...
i probably need the dummies guide, if you don't mind.

my network settings are;
igb0
igb1
lagg0 igb0, igb1
vlan x.x.20.10
vlan x.x.30.10

default route is x.x.20.1
name server is x.x.20.1

forgot to mention in the above config, the vnet_default_interface is
vlan24:VLAN_20 for emby
vlan30:VLAN_30 for zn

each jail shell can correctly, resolve and route over the net
traceroute from both shells goes via the x.x.30.1

DHCP Autoconfigure is NOT checked on either jail,
so there is no reason why these interfaces should be accepting a DHCP address.

does this not look more like bug?
** one thing i notice is, the Jail requires two MAC addresses in the network config,
but both IPs show to the 2nd MAC address on the DHCP server
 
Last edited:

gwaitsi

Patron
Joined
May 18, 2020
Messages
243
found the answer here
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Nice guide, but why would one have to create bridge0 with tunables instead of the UI? Works here with the UI and FreeNAS 11.3 just fine.
 

gwaitsi

Patron
Joined
May 18, 2020
Messages
243
Nice guide, but why would one have to create bridge0 with tunables instead of the UI? Works here with the UI and FreeNAS 11.3 just fine.
it doesn't work if you follow the instructions for the tunables. the bridge0 already exists with the vlans as members. if you add the tunables per the instructions, it doesn't save the bridges. once i removed the tunables, i could save the bridges and was up and running. thanks for the lead-in. i had everything fine. just needed to add the bridges to get the separation. the guide did help though. probably just needs to be updated to reflect the latest release
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Bridge0 is auto-created of you do not create it manually and have jails or VMs assigned to a non-bridge interface.
The reboot is necessary precisely for that reason. If you intend to create your bridges manually, you need a clean boot with all jails and VMs set to "do not autostart".
 
Top