TrueNAS Scale Networking: Bridge with static-DHCP

TL;DR: I want to verify the following is the right procedure for using DHCP on a network bridge, where DHCP is actually used to assign TrueNAS a static IP address (via MAC address to IP mapping in the DHCP config).

Having recently discovered Jailmaker, I wanted to experiment with nspawn jails that can get their own IP via DHCP and be fully routeable on my network. The first step in doing this is to have a bridge interface on the TrueNAS host.

I’m not currently using VLANs. The TrueNAS system has a single physical network interface. I have my router set as a DHCP server, though most devices on the network (including the TrueNAS server) have a static MAC address to IP mapping. (IOW, the router’s DHCP config allows for a single point to manage static IP addresses and DNS names on my local network.)

Prior setting up the bridge, this was a trivial network config (enable DHCP on the one connected interface, and everything just works). After some trial and error, the process to switch to a bridge with static-DHCP appears to look like this:

  1. Router: disable the DHCP static mapping for the TrueNAS NIC’s MAC address
  2. TrueNAS: disable DHCP for the existing interface
  3. TrueNAS: create the bridge device, select DHCP, add the device from previous step as a member
  4. TrueNAS: save and test config
  5. Router: watch the DHCP log for a new request and make note of the MAC address
  6. At this point, on first glance, it will appear that the TrueNAS device has lost connectivity, but it should be alive and well but under a new DHCP address (this will be a temporary IP address)
  7. TrueNAS: login to the GUI using this new (temporary) IP and save the network config so that it is persistent
  8. Router: recreate the DHCP static mapping for TrueNAS but use the MAC address from step 5
  9. TrueNAS: restart networking (or reboot), and it should now be using the desired IP address

I also have a Proxmox server, which also has a single physical interface, no VLANs, and a bridge device. However, with that server, I am able to use the MAC address of the physical NIC for its DHCP static mapping. I initially assumed TrueNAS would work similarly, and struggled a bit until I realized that under TrueNAS, the bridge will make its DHCP query with a new MAC address.

Everything appears to be working. But my main question is: the MAC address that TrueNAS generated (step 5 above): can I count on that being permanent? Or is there a chance it will arbitrarily change?

Assuming its permanent, and the process I outlined above is indeed valid for this use case, I hope it’s useful for others who might be struggling.

I do not know, but the MAC addresses generated for the jailmaker jails are based on the jail name, and thus only change if you change the jail’s name.

PS: the complexity in see switching DHCP from interface to bridge, is why I suggest manually assigning a static ip in my video on the subject

To me, there’s some amount of inescapable complexity, therefore it’s a matter of where you want to have the complexity. If indeed the bridge MAC address that TrueNAS generated is permanent, then I’m “paying” that complexity only once. And now, per my initial post, the instructions are plainly laid out in text, no need to sit through a video.

Compare that to the “recurring payment” complexity of having my static IP and DNS database no longer in a single central place. IOW, that would result in a “split brain” situation, where most of my devices IPs are managed in my router, but now I have to remember that TrueNAS is a special case.

Surely using DHCP to assign static IPs is a common practice, specifically for the benefit of having a single “source of truth”? Particularly at a smaller scale, e.g. SOHO/SMB, where the scale isn’t big enough to warrant using infrastructure-as-code/automation/orchestration tools.