TESTING NEEDED: Multiple DHCP pools within a subnet
-
I just did a quick test in a VM:
option domain-name "example.com"; option ldap-server code 95 = text; option domain-search-list code 119 = text; default-lease-time 7200; max-lease-time 86400; log-facility local7; ddns-update-style none; one-lease-per-client true; deny duplicates; ping-check true; authoritative; class "000C29DBA30B" { match if substring (hardware, 1, 6) = 00:0C:29:DB:A3:0B; } subnet 192.168.27.0 netmask 255.255.255.0 { pool { deny members of "000C29DBA30B"; range 192.168.27.100 192.168.27.199; } pool { option domain-name-servers 208.67.222.222; allow members of "000C29DBA30B"; range 192.168.27.50 192.168.27.60; } option routers 192.168.27.1; option domain-name-servers 192.168.27.1; }
That one MAC address is my test client.
And the Windows client received:
Ethernet adapter Local Area Connection: Connection-specific DNS Suffix . : example.com Description . . . . . . . . . . . : VMware Accelerated AMD PCNet Adapter Physical Address. . . . . . . . . : 00-0C-29-DB-A3-0B Dhcp Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes IP Address. . . . . . . . . . . . : 192.168.27.50 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.27.1 DHCP Server . . . . . . . . . . . : 192.168.27.1 DNS Servers . . . . . . . . . . . : 208.67.222.222 Lease Obtained. . . . . . . . . . : Wednesday, December 26, 2012 3:02:35 PM Lease Expires . . . . . . . . . . : Wednesday, December 26, 2012 5:02:35 PM
So it did receive the expected IP and DNS server from the secondary pool.
-
the client here runs debian wheezy .
there is a fixed dhcp lease in /var/dhcpd/etc/dhcpd.conf on pfsense.
all the rest of settings here look the same.
when i get a chance, I'll try removing the fixed lease , clearing caches , restating network on client…
maybe you could try adding the test client to fixed leases ..
-
after deleting the fixed lease the client got the correct sub pool nameserver.
on our current dhcp server we use 'group' to assign some dhcp options:
group { option ntp-servers 10.100.100.17; next-server 10.100.100.17; host phone30 { hardware ethernet 00:0E:08:19:.....; fixed-address 10.100.199.30; } host phone31 { hardware ethernet 70:81:05:-----; fixed-address 10.100.199.30; } # we have about 20 more devices... }
the isc-dhcp-server server runs on Debian wheezy . here is version info:
fbc123 /etc/dhcp # aptitude show isc-dhcp-server Package: isc-dhcp-server State: installed Automatically installed: no Version: 4.2.2.dfsg.1-5+deb70u2
I think
maybe fixed leases could be assigned to a group? -
With some more coding changes, perhaps.
Fixed leases do not belong to a pool so no pool-specific settings will apply to them.
Eventually someone could take the pool type settings and apply that to static leases as well, since most all of those settings are also valid for static leases.
But doing the groups thing, though interesting, would greatly increase the complexity of the code on the page, and it's already pretty complicated.
Possible, yes, but unless someone pumps some funding into it, not likely to happen anytime soon.
-
FYI- Input validation was added last week to prevent overlapping pools from being saved. Testing would be helpful there also.
-
I tested multiple DHCP pool for a subnet (LAN) and I noticed that the fixed lease were not anymore handle properly. Only the last one inserted was show in the fixed lease table in the bottom of services_dhcp.php.
Every new insertion made the previous record to be delete.
-
I tested multiple DHCP pool for a subnet (LAN) and I noticed that the fixed lease were not anymore handle properly. Only the last one inserted was show in the fixed lease table in the bottom of services_dhcp.php.
Every new insertion made the previous record to be delete.
On 2.1 or with a 2.0.x patch? (I would expect issues with the 2.0.x patch, it wasn't meant to be used, use 2.1 instead)
-
I tested multiple DHCP pool for a subnet (LAN) and I noticed that the fixed lease were not anymore handle properly. Only the last one inserted was show in the fixed lease table in the bottom of services_dhcp.php.
Every new insertion made the previous record to be delete.
On 2.1 or with a 2.0.x patch? (I would expect issues with the 2.0.x patch, it wasn't meant to be used, use 2.1 instead)
Seems to be fixed by this:
https://github.com/pfsense/pfsense/commit/37c922a6faff0e55db04fb66e43b76180e1c1449 -
Is "Multiple DHCP pools outside of subnet"
Anywhere on the roadmap?
Or is there any smooth way to a DHCP-range outside of LAN interface subnet?
-
Is "Multiple DHCP pools outside of subnet"
Anywhere on the roadmap?
Or is there any smooth way to a DHCP-range outside of LAN interface subnet?
It's closer to being possible, but not going to happen any time soon (maybe 2.2, if someone has the time or funding for it).
There is no way to do DHCP for another subnet on an interface currently. That's a question for another thread, though.