Solved Putting instances of dhcpd into jails

I am looking to more centrally manage the IP assignments on my home network by using ISC's dhcpd to hand out fixed addresses. That way, I can still reliably run local DNS for the internal network and manage IP assignment by linking a MAC to a specific IP. However, I want to do this for both IPv4 and IPv6. It seems dhcpd is limited to only one fixed address per host, so I can't use a single 'host' entry to handle both a 'fixed-address' and 'fixed-address6'. It doesn't look like I can use two host declarations either, since host declarations are global.

So it seems the best option is to run two separate instances of isc-dhcpd by putting each into a jail (because I apparently can't run two copies on the host at the same time). I am running 12.1-RELEASE, so it seems from some Googling, using VNET is the modern way of doing networking in a jail. Most of the guides I've found thus far are all about using helper tools like ezjail or jng, but I'd rather lean the manual way of setting such a jail up so that using those helper tools gives me an idea of what their doing under the hood.

Is there anything out there that walks through this kind of setup? Is there a better way to accomplish what I am after (fixed IPv4/IPv6 central management)?

Am also wondering if for jails, is it possible to use a bridge to link cloned loopback interfaces (one per jail) w/ the host's interface and rely on something like NAT or some kind of network bridge to let the jails talk on the local network. This is probably me not being familiar with jail setup just yet, but pointers on jail networking w/o would be helpful.
 
I am looking to more centrally manage the IP assignments on my home network by using ISC's dhcpd to hand out fixed addresses. That way, I can still reliably run local DNS for the internal network and manage IP assignment by linking a MAC to a specific IP.
Set up dynamic DNS with ISC's DHCPd and BIND. Then your DHCP leases will get automatically registered in DNS. For IPv6 you need to run a second DHCPd instance specifically for IPv6, the rc(8) scripts are already in place for that.


Am also wondering if for jails, is it possible to use a bridge to link cloned loopback interfaces (one per jail) w/ the host's interface and rely on something like NAT or some kind of network bridge to let the jails talk on the local network.
You can bind the jail directly to the external interface, no need for complicated loopback interface, bridges and/or NAT.
 
Set up dynamic DNS with ISC's DHCPd and BIND. Then your DHCP leases will get automatically registered in DNS. For IPv6 you need to run a second DHCPd instance specifically for IPv6, the rc(8) scripts are already in place for that.

Info about the rc scripts already being setup for dhcp6 is exactly what I needed to know, thanks! It was not at all obvious until I looked closer in /usr/local/etc and saw 'dhcpd6.conf' I then worked out that the various rcvars were the same as for DHCPv4's rcvars, just using "dhcpd6_*" instead.

I am avoiding DDNS for now due to still having too many IP address hardcodes across a bunch of testing VMs and the like. Using DHCP to centrally manage fixed address assignment is a step towards untangling that mess. Also learned a thing or three about rtadvd...
 
Back
Top