Truenas 12 DHCP issues

spgrvl

Dabbler
Joined
May 15, 2020
Messages
15
Hello. I'm having some weird network issues after upgrading from Freenas 11.3 to Truenas 12.

I have several jails, mostly for media management (Plex, Radarr, Sonarr, etc) and a couple Ubuntu Server VMs.
Most of them are set to run on boot, although after upgrading to Truenas 12, they are having trouble booting.

What happens after boot is that VMs start, and Jails that are set with NAT start too. Although jails that are set with DHCP, fail to boot.
If I try to boot them I get the following error after several minutes of attempting to start:
Code:
" Error: [EFAULT] + Acquiring DHCP address: FAILED, address received: ERROR, check jail logs Stopped jail_name_here due to DHCP failure "

That behavior leads to assumptions that something is wrong with my router's DHCP and it's failing to assign IPs to jails.
Although that does not seem to be the case, because (apart from the fact that I have not touched my router's settings in a while) if I have the autostart on my VMs disabled, all jails run properly after reboot and are assigned IPs via DHCP properly.

Seems to me like something that VMs' networking uses is breaking DHCP for jails...
I am not experienced in Truenas's networking so I'm doing "blind" attempts to tinker with settings but to no avail.
Does anyone know how to resolve this?
Thank you
 

spgrvl

Dabbler
Joined
May 15, 2020
Messages
15
I found a workaround by setting a static IP on jails that were previously getting IPs via DHCP and leaving every checkbox unchecked (DHCP, NAT, VNET, Berkeley Packet Filter).
When I did that, the re0 physical network adapter was having all the IPs assigned in above said jail along with the main IP for Truenas and things were broken again as the Truenas webui was showing up on all of them and jails that were set with NAT networking, were being assigned a random IP from those.

A workaround to that was to check the option of "Disable Hardware Offloading" in the re0 physical network adapter settings and boom, everything is working. There is a warning there saying that checking that option can severely reduce network performance, but I have not seen any decrease in network transfers for the few minutes I'm testing this, I'm still saturating my gigabit link between Truenas and my computer.

This is a weird workaround though, DHCP is still not working for jails (it does work for VMs somehow) and I would still like to find a way to fix this mess I created, lol.

PS: In thoughts that something in the system integrity could be the issue after the update, I did a few days ago reinstall Truenas from scratch and restored my config but it did change nothing in regards to the issue I'm facing. So it's either something in my Truenas configuration that occured after the update from Freenas (which until today was stock when it comes to networking) or a bug of some sort...
 

Skippy4302

Cadet
Joined
Mar 16, 2021
Messages
9
I have been having the same issues for 2 days straight, I tried tweaking a bunch of network settings but the installation would always stop at 50% due to DHCP failure. I then turned everything DHCP related off (network settings as well as when adding a plugin), and tried manually setting up the plex plugin by IP, then later with a preconfigured MAC address and IP in my router settings. I managed to verify a connection from the plex plugin in my router network settings but the installation would still fail at 75% because it couldn't resolve the hostname.

Now I just tried doing exactly what you did, and the plugin has been installed succesfully!!! I really couldn't be happier!!
Kind of strange how it takes this weird workaround to get it to work, but I'm not complaining.

I still need to setup the plugin, but hopefully no more errors from now on.

Once more, thank you. You really made my day.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,740
A workaround to that was to check the option of "Disable Hardware Offloading" in the re0 physical network adapter settings
This is not a workaround. You must activate this setting for every physical interface that you want to run as a member of a bridge interface, like for jails/plugins or VMs.

I cite from the documentation:
Turn off hardware offloading for network traffic processing. WARNING: disabling hardware offloading can reduce network performance and is only recommended when the interface is managing jails, plugins, or virtual machines (VMs).

So, recommended when ... should probably be changed to "mandatory, when ...".
 

Skippy4302

Cadet
Joined
Mar 16, 2021
Messages
9
I re-enabled it, would that be ok?
I am getting the feeling that I will be running into issues later on...
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,740
You won't run into any issues. This is the documented recommended setting if you run jails or VMs on that interface. You will run into issues if you don't enable the option.

Yes, running jails with VNET/bridge will put more load on your CPU, but who cares? The applications inside your jails will probably do that, too.
FreeBSD 13 comes with a greatly reworked and improved bridge interface. Looking forward to the next generation of CORE.
 
Top