entilza2
October 21st, 2018, 01:42 PM
Hi team,
This DHCP Server issue has me stumped - I'd appreciate any suggestions/insight.
I am migrating a DHCP server from an aged Smoothwall box to Ubuntu 16.04.5 LTS (fully patched) running on FreeNAS via bhyve. (I'd use Ubuntu 18, except there are issues with 18 on FreeNas+bhyve). Smoothwall appears to run isc-dhcp-server, as the .conf and lease files are identical to the latest isc-dhcp-server I installed via apt-get.
In this example, the following IPs are used:
10.0.2.0: Network
10.0.2.145: Windows 10 client, for testing
10.0.2.229: "prd-dhcp-01", the new DHCPD Ubuntu host, new DNS and new NTP server.
10.0.2.254: The old DHCPD and DNS. Also, current router (it will remain the router). Smoothwall host.
10.0.2.255: Network broadcast
First a review. The DHCP request cycle should go like this:
DHCPDISCOVER: from the client, asking for a lease
DHCPOFFER: from the DHCPD host, offering a lease
DHCPREQUEST: from the client, confirming it wants to take the OFFERed lease
DHCPACK: from the host, confirming is has now granted to REQUESTed lease.
The issue
After disabling the current (old) DHCP server, Clients never pick up leases from the new Ubuntu 16 server. They timeout.
Syslog shows endless DHCPDISCOVER and DHCPOFFER entries (MAC addresses changed to aaa, bbb):
Oct 21 18:34:28 prd-dhcp-01 dhcpd[1028]: DHCPDISCOVER from aaa via enp0s3
Oct 21 18:34:28 prd-dhcp-01 dhcpd[1028]: DHCPOFFER on 10.0.2.84 to aaa via enp0s3
Oct 21 18:34:32 prd-dhcp-01 dhcpd[1028]: DHCPDISCOVER from bbb via enp0s3
Oct 21 18:34:32 prd-dhcp-01 dhcpd[1028]: DHCPOFFER on 10.0.2.23 to bbb via enp0s3
Oct 21 18:34:52 prd-dhcp-01 dhcpd[1028]: DHCPDISCOVER from bbb via enp0s3
Oct 21 18:34:52 prd-dhcp-01 dhcpd[1028]: DHCPOFFER on 10.0.2.23 to bbb via enp0s3
Oct 21 18:35:12 prd-dhcp-01 dhcpd[1028]: DHCPDISCOVER from bbb via enp0s3
Oct 21 18:35:12 prd-dhcp-01 dhcpd[1028]: DHCPOFFER on 10.0.2.23 to bbb via enp0s3
The clients never progress to phase 3, DHCPREQUEST - that is, they never request the OFFER'ed lease.
I don't think its a network routing issue, because I am connecting to the Ubuntu host from one of the clients that won't pick up a lease.
This issue appears to impact all clients.
I am trying to avoid starting with a blank config in PRD, because it would ... be messy. And I don't have a test network. I am hoping to find some glaring hole before going down that path.
Migration process
I copied the existing dhcp.conf and dhcpd.leases files. The leases file could stay as-is (format hasn't changed and it would enable devices to pick up their same IPs), but I altered the .conf file to use "interim" for ddns-update-style, and changed the IP of the new local domain-name-servers and ntp-servers (an easy way to see if the client is using the right server). The file loads OK with no issues and everything is fine in syslog. dhcpd.conf file contents:
authoritative;
ddns-update-style interim;
subnet 10.0.2.0 netmask 255.255.255.0
{
option subnet-mask 255.255.255.0;
option domain-name "lan";
option routers 10.0.2.254;
option broadcast-address 10.0.2.255;
option domain-name-servers 10.0.2.229, 8.8.8.8;
option ntp-servers 10.0.2.229;
range dynamic-bootp 10.0.2.11 10.0.2.189;
default-lease-time 172800;
max-lease-time 345600;
host 1 { hardware ethernet xx:xx:xx:xx:xx; fixed-address 10.0.2.2; option host-name "vir"; }
(12 of these hosts, removed for reading ease)
}
log-facility local7;
Fault finding
Besides the syslog and evidence gathering from clients, I captured the DHCP ipconfig /release process on a Windows client. It showed the client trying to talk directly to the OLD DCHP server, which also happens to be the router, which I will admit I was not expecting:
102 7.382042 10.0.2.145 10.0.2.254 DHCP 358 DHCP Request - Transaction ID 0x5f33a84
103 7.382460 10.0.2.254 10.0.2.145 ICMP 386 Destination unreachable (Port unreachable)
I did expect the service not to answer however, as it is disabled. There are 4 of these pairs over time, before the renew fails. But right before/during the 4th and final attempt, the following occurs (in bold):
203 18.639981 0.0.0.0 255.255.255.255 DHCP 342 DHCP Discover - Transaction ID 0x582131ac
228 20.382489 10.0.2.145 10.0.2.254 DHCP 358 DHCP Request - Transaction ID 0x5f33a84
229 20.382867 10.0.2.254 10.0.2.145 ICMP 386 Destination unreachable (Port unreachable)
336 38.649423 0.0.0.0 255.255.255.255 DHCP 342 DHCP Discover - Transaction ID 0x582131ac
Those 2 Discover broadcasts do not end up in the syslog! I wonder why. Plenty other Discovers in the syslog.
I then did a full /release and /renew with better results in syslog, but still a failure:
Win 10 client capture:
5 1.159897 0.0.0.0 255.255.255.255 DHCP 326 DHCP Discover - Transaction ID 0xaa62a41f
38 3.760613 10.0.2.145 10.0.2.254 DHCP 342 DHCP Release - Transaction ID 0x99dfcf1
39 3.760969 10.0.2.254 10.0.2.145 ICMP 370 Destination unreachable (Port unreachable)
111 7.131078 0.0.0.0 255.255.255.255 DHCP 332 DHCP Discover - Transaction ID 0xb46c7c70
138 7.767436 0.0.0.0 255.255.255.255 DHCP 344 DHCP Discover - Transaction ID 0x3489e56c
(this Discover occurs 30 times in total)
DHCPD entry in syslog (mac address changed to ccc):
Oct 21 22:15:51 prd-dhcp-01 dhcpd[2072]: DHCPDISCOVER from ccc via enp0s3
Oct 21 22:15:52 prd-dhcp-01 dhcpd[2072]: DHCPOFFER on 10.0.2.145 to ccc (DESKTOP-9CRBAR3) via enp0s3
Oct 21 22:15:55 prd-dhcp-01 dhcpd[2072]: DHCPDISCOVER from ccc (DESKTOP-9CRBAR3) via enp0s3
Oct 21 22:15:55 prd-dhcp-01 dhcpd[2072]: DHCPOFFER on 10.0.2.145 to ccc (DESKTOP-9CRBAR3) via enp0s3
(message pair appears 10 times in total, not the 30 I would have expected from the capture above)
I also found the DHCP server pinged the old address of the Windows 10 client during all of this, which was unexpected:
139 7.768028 10.0.2.229 10.0.2.145 ICMP 62 Echo (ping) request id=0x68d8, seq=0/0, ttl=64 (no response found!)
Because the network is "somewhat busy" I cannot confidently say I have seen everything in the capture. There is likely to be something in there I have not found yet. But I did trace the BOOTP traffic which is how I got the DHCP content above.
I am stumped.
Any help/suggestions appreciated.
Kind regards,
Ent.
This DHCP Server issue has me stumped - I'd appreciate any suggestions/insight.
I am migrating a DHCP server from an aged Smoothwall box to Ubuntu 16.04.5 LTS (fully patched) running on FreeNAS via bhyve. (I'd use Ubuntu 18, except there are issues with 18 on FreeNas+bhyve). Smoothwall appears to run isc-dhcp-server, as the .conf and lease files are identical to the latest isc-dhcp-server I installed via apt-get.
In this example, the following IPs are used:
10.0.2.0: Network
10.0.2.145: Windows 10 client, for testing
10.0.2.229: "prd-dhcp-01", the new DHCPD Ubuntu host, new DNS and new NTP server.
10.0.2.254: The old DHCPD and DNS. Also, current router (it will remain the router). Smoothwall host.
10.0.2.255: Network broadcast
First a review. The DHCP request cycle should go like this:
DHCPDISCOVER: from the client, asking for a lease
DHCPOFFER: from the DHCPD host, offering a lease
DHCPREQUEST: from the client, confirming it wants to take the OFFERed lease
DHCPACK: from the host, confirming is has now granted to REQUESTed lease.
The issue
After disabling the current (old) DHCP server, Clients never pick up leases from the new Ubuntu 16 server. They timeout.
Syslog shows endless DHCPDISCOVER and DHCPOFFER entries (MAC addresses changed to aaa, bbb):
Oct 21 18:34:28 prd-dhcp-01 dhcpd[1028]: DHCPDISCOVER from aaa via enp0s3
Oct 21 18:34:28 prd-dhcp-01 dhcpd[1028]: DHCPOFFER on 10.0.2.84 to aaa via enp0s3
Oct 21 18:34:32 prd-dhcp-01 dhcpd[1028]: DHCPDISCOVER from bbb via enp0s3
Oct 21 18:34:32 prd-dhcp-01 dhcpd[1028]: DHCPOFFER on 10.0.2.23 to bbb via enp0s3
Oct 21 18:34:52 prd-dhcp-01 dhcpd[1028]: DHCPDISCOVER from bbb via enp0s3
Oct 21 18:34:52 prd-dhcp-01 dhcpd[1028]: DHCPOFFER on 10.0.2.23 to bbb via enp0s3
Oct 21 18:35:12 prd-dhcp-01 dhcpd[1028]: DHCPDISCOVER from bbb via enp0s3
Oct 21 18:35:12 prd-dhcp-01 dhcpd[1028]: DHCPOFFER on 10.0.2.23 to bbb via enp0s3
The clients never progress to phase 3, DHCPREQUEST - that is, they never request the OFFER'ed lease.
I don't think its a network routing issue, because I am connecting to the Ubuntu host from one of the clients that won't pick up a lease.
This issue appears to impact all clients.
I am trying to avoid starting with a blank config in PRD, because it would ... be messy. And I don't have a test network. I am hoping to find some glaring hole before going down that path.
Migration process
I copied the existing dhcp.conf and dhcpd.leases files. The leases file could stay as-is (format hasn't changed and it would enable devices to pick up their same IPs), but I altered the .conf file to use "interim" for ddns-update-style, and changed the IP of the new local domain-name-servers and ntp-servers (an easy way to see if the client is using the right server). The file loads OK with no issues and everything is fine in syslog. dhcpd.conf file contents:
authoritative;
ddns-update-style interim;
subnet 10.0.2.0 netmask 255.255.255.0
{
option subnet-mask 255.255.255.0;
option domain-name "lan";
option routers 10.0.2.254;
option broadcast-address 10.0.2.255;
option domain-name-servers 10.0.2.229, 8.8.8.8;
option ntp-servers 10.0.2.229;
range dynamic-bootp 10.0.2.11 10.0.2.189;
default-lease-time 172800;
max-lease-time 345600;
host 1 { hardware ethernet xx:xx:xx:xx:xx; fixed-address 10.0.2.2; option host-name "vir"; }
(12 of these hosts, removed for reading ease)
}
log-facility local7;
Fault finding
Besides the syslog and evidence gathering from clients, I captured the DHCP ipconfig /release process on a Windows client. It showed the client trying to talk directly to the OLD DCHP server, which also happens to be the router, which I will admit I was not expecting:
102 7.382042 10.0.2.145 10.0.2.254 DHCP 358 DHCP Request - Transaction ID 0x5f33a84
103 7.382460 10.0.2.254 10.0.2.145 ICMP 386 Destination unreachable (Port unreachable)
I did expect the service not to answer however, as it is disabled. There are 4 of these pairs over time, before the renew fails. But right before/during the 4th and final attempt, the following occurs (in bold):
203 18.639981 0.0.0.0 255.255.255.255 DHCP 342 DHCP Discover - Transaction ID 0x582131ac
228 20.382489 10.0.2.145 10.0.2.254 DHCP 358 DHCP Request - Transaction ID 0x5f33a84
229 20.382867 10.0.2.254 10.0.2.145 ICMP 386 Destination unreachable (Port unreachable)
336 38.649423 0.0.0.0 255.255.255.255 DHCP 342 DHCP Discover - Transaction ID 0x582131ac
Those 2 Discover broadcasts do not end up in the syslog! I wonder why. Plenty other Discovers in the syslog.
I then did a full /release and /renew with better results in syslog, but still a failure:
Win 10 client capture:
5 1.159897 0.0.0.0 255.255.255.255 DHCP 326 DHCP Discover - Transaction ID 0xaa62a41f
38 3.760613 10.0.2.145 10.0.2.254 DHCP 342 DHCP Release - Transaction ID 0x99dfcf1
39 3.760969 10.0.2.254 10.0.2.145 ICMP 370 Destination unreachable (Port unreachable)
111 7.131078 0.0.0.0 255.255.255.255 DHCP 332 DHCP Discover - Transaction ID 0xb46c7c70
138 7.767436 0.0.0.0 255.255.255.255 DHCP 344 DHCP Discover - Transaction ID 0x3489e56c
(this Discover occurs 30 times in total)
DHCPD entry in syslog (mac address changed to ccc):
Oct 21 22:15:51 prd-dhcp-01 dhcpd[2072]: DHCPDISCOVER from ccc via enp0s3
Oct 21 22:15:52 prd-dhcp-01 dhcpd[2072]: DHCPOFFER on 10.0.2.145 to ccc (DESKTOP-9CRBAR3) via enp0s3
Oct 21 22:15:55 prd-dhcp-01 dhcpd[2072]: DHCPDISCOVER from ccc (DESKTOP-9CRBAR3) via enp0s3
Oct 21 22:15:55 prd-dhcp-01 dhcpd[2072]: DHCPOFFER on 10.0.2.145 to ccc (DESKTOP-9CRBAR3) via enp0s3
(message pair appears 10 times in total, not the 30 I would have expected from the capture above)
I also found the DHCP server pinged the old address of the Windows 10 client during all of this, which was unexpected:
139 7.768028 10.0.2.229 10.0.2.145 ICMP 62 Echo (ping) request id=0x68d8, seq=0/0, ttl=64 (no response found!)
Because the network is "somewhat busy" I cannot confidently say I have seen everything in the capture. There is likely to be something in there I have not found yet. But I did trace the BOOTP traffic which is how I got the DHCP content above.
I am stumped.
Any help/suggestions appreciated.
Kind regards,
Ent.