FreeNAS Jail DHCP Problem

phipac

Cadet
Joined
Jul 3, 2020
Messages
5
Good day, all! Thank you for taking the time to read this post. I have been reading the forums for a couple of hours trying to find a solution to my issue. It seems there are various issues with DHCP and Jails, but I have not been able to find one directly related to my issue. The main problem is, my jails are no longer receiving an IPv4 address (though they are receiving IPv6 addresses). If I put in a static IPv4 address in the network settings for the jail, I can ping the IP address of the FreeNAS server itself, but I cannot get out any further. Two things have changed from the original working setup, and unfortunately I didn't notice the problem in time to be able to narrow down which change might be the culprit. A little about my setup:

Host is an esxi 6.7U2 setup. FreeNAS is a VM on this setup.
FreeNAS 11.3-U3.2 is getting an address from DHCP (set as a static dhcp on my pfsense router)
All native FreeNAS functions work just fine. It's just the jails that are not getting an IPv4 address nor are able to route with a static address.

I have tried creating fresh jails with the minimum basic settings, and still I am unable to receive an address or route via IPv4. For Example:

"Fresh" Jail
1. Initial Settings
Name: Test
Type: Clone
Release: 11.3

2. Network Settings
DHCP Box Checked
NAT Box Unchecked
VNET Box Checked
Autoconfigure IPv6 Box Checked

Jail Summary
  • Release : 11.3-RELEASE
  • Jail Name : Test
  • DHCP Autoconfigure IPv4 : Yes
  • VNET Virtual Networking : Yes
  • NAT Autoconfigure IPv4 : No
  • IPv6 Address : Auto configure IPv6
  • Default Router For IPv6 : auto
Attempt to start this jail yields the following error:

Error: [EFAULT] + Acquiring DHCP address: FAILED, address received: 0.0.0.0/8 Stopped Test due to DHCP failure

I *DID* enable promiscuous mode on the esxi virtual interface that is used for the FreeNAS server. It is also on an untagged (default) vlan (1). I'm sure there are a hundred other pieces of information you might need to help, and I will be happy to provide whatever other logs or settings are necessary. I very much appreciate your time and help!
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
How did you define the virtual networking to the FreeNAS VM in vmWare?
 

phipac

Cadet
Joined
Jul 3, 2020
Messages
5
Let me see if I can fully answer this question for you. The esxi physical server has a 4-port NIC that is teamed as a single virtual switch. This virtual switch contains a few vlans, including VLAN ID 0, or the untagged vlan. This "vlan" is connected to the FreeNAS virtual server as a virtual single-port nic.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Did you change pfSense to only serve static DHCP? Did you then remember to create address reservations for the jail MACs?
 

phipac

Cadet
Joined
Jul 3, 2020
Messages
5
No, pfSense distributes both static and dynamic pooled addresses. All other clients on the network are getting their addresses just fine.

I just noticed that there is no bridge interface defined in FreeNAS Networking Interfaces. That might be a problem? All I see is the physical interface em0.

freenas1.jpg
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
No need to create the bridge interface manually. You should see the bridge interface in a ifconfig -a from shell outside the jail.
 

phipac

Cadet
Joined
Jul 3, 2020
Messages
5
I do see that, yes. Still no luck. Here are the rest of the network settings for the jail:

freenas2.jpg
freenas3.jpg
freenas4.jpg
 

bundlepax

Cadet
Joined
Nov 25, 2020
Messages
3
Any ideas? Thank you!

I wasn't able to get a DHCP IP from the Router.
OR us a Static IP. Probably because of how I have my Nic interfaces setup (Round Robin)
in the Jail Deluge config.

uncheck DHCP, check NAT then at the bottom

port forward 8112 TCP --> 8112 TCP
port forward 55555 TCP ---> 55555 TCP

8112 will get you connected to the webportal
55555 is to allow incoming ports from that port.
 

John E.

Cadet
Joined
Mar 19, 2017
Messages
4
...issues with DHCP and Jails....
Error: [EFAULT] + Acquiring DHCP address: FAILED, address received: 0.0.0.0/8 Stopped Test due to DHCP failure

I *DID* enable promiscuous mode on the esxi virtual interface that is used for the FreeNAS server....

I had this same problem, in a virtualized TrueNAS-12.0-U2.1 under ESXi 7.0 Update 2.

I set all the security options in the vSwitch port group containing the TrueNAS vm to "Accept" (not just promiscuous mode), and the problem went away:

Promiscuous mode
Accept
MAC address changes
Accept
Forged transmits
Accept
 

YujiTFD

Dabbler
Joined
May 5, 2021
Messages
22
I had this same problem, in a virtualized TrueNAS-12.0-U2.1 under ESXi 7.0 Update 2.

I set all the security options in the vSwitch port group containing the TrueNAS vm to "Accept" (not just promiscuous mode), and the problem went away:

Promiscuous mode
Accept
MAC address changes
Accept
Forged transmits
Accept
That totally did it, cheers mate!
 

Pyro2677

Cadet
Joined
Jul 26, 2021
Messages
6
That totally did it, cheers mate!
Did you have to restart ESXi after you made the changes? I have changed all 3 to Accept and Truenas still wont get a dhcp ip for the jail. I did restart Truenas I just haven't restarted ESXi.
 

YujiTFD

Dabbler
Joined
May 5, 2021
Messages
22
Did you have to restart ESXi after you made the changes? I have changed all 3 to Accept and Truenas still wont get a dhcp ip for the jail. I did restart Truenas I just haven't restarted ESXi.
No, I didn't have to. I powered off TrueNAS VM, corrected vSwitch0 security accordingly and powered VM back on, done.
Make sure you edit settings for right vSwitch, the LAN one, not WAN.

1627358221520.png
 

Pyro2677

Cadet
Joined
Jul 26, 2021
Messages
6
No, I didn't have to. I powered off TrueNAS VM, corrected vSwitch0 security accordingly and powered VM back on, done.
Make sure you edit settings for right vSwitch, the LAN one, not WAN.

View attachment 48537

Ok I will have a look when i get home, I have a 10Gbe port and 4 x 1Gbe, I have the 10G as the main and the 4 others as failover.
Could this be the problem?

I don't have any issue getting DHCP addresses for any other VM's and the TrueNAS got a DHCP address ok.

I do have the TrueNAS as DHCP with UDM Pro assigning a fixed address to the TrueNAS install.
 

YujiTFD

Dabbler
Joined
May 5, 2021
Messages
22
Ok I will have a look when i get home, I have a 10Gbe port and 4 x 1Gbe, I have the 10G as the main and the 4 others as failover.
Could this be the problem?
My settings are identical to yours expect I have no standby NICs. I'm not an expert in networking and I doubt failover would cause such a problem, so I would test it out, if possible: disable failover and look if it helps, but, again, I doubt it's the problem.

I don't have any issue getting DHCP addresses for any other VM's and the TrueNAS got a DHCP address ok.
I do have the TrueNAS as DHCP with UDM Pro assigning a fixed address to the TrueNAS install.
Same again: UDM Pro, fixed IP for TrueNAS via DHCP, so nothing to add here. My jails's settings are:
1627382607418.png
 

Pyro2677

Cadet
Joined
Jul 26, 2021
Messages
6
My settings are identical to yours expect I have no standby NICs. I'm not an expert in networking and I doubt failover would cause such a problem, so I would test it out, if possible: disable failover and look if it helps, but, again, I doubt it's the problem.


Same again: UDM Pro, fixed IP for TrueNAS via DHCP, so nothing to add here. My jails's settings are:
View attachment 48541

Thanks, yeah i can use a static ip for the Jails, it's just the DHCP. I was trying to create a Jail for Syncthing but when i use a static IP Syncthing keeps looking for localhost and I can't get into it.
 

Pyro2677

Cadet
Joined
Jul 26, 2021
Messages
6
My settings are identical to yours expect I have no standby NICs. I'm not an expert in networking and I doubt failover would cause such a problem, so I would test it out, if possible: disable failover and look if it helps, but, again, I doubt it's the problem.


Same again: UDM Pro, fixed IP for TrueNAS via DHCP, so nothing to add here. My jails's settings are:
View attachment 48541
I have spent Months and Months installing and reinstalling TrueNAS etc and YES it does not like the Failover. I disabled them all and just left the 10Gbe and it got a DHCP address.
 

YujiTFD

Dabbler
Joined
May 5, 2021
Messages
22
Thanks, yeah i can use a static ip for the Jails, it's just the DHCP. I was trying to create a Jail for Syncthing but when i use a static IP Syncthing keeps looking for localhost and I can't get into it.
I went for static IP as a personal choice, but before I did that, as I said earlier, I had Jails to have an IP from DHCP pool.
As for localhost situation, off the top of my head, try to disable VNET in Jail's Basic Properties and enable "assing_localhost" in Custom Properties section and test it out.
 
Top