DHCPOFFER is not sent out after a DCHPDISCOVER
I have had a couple of incidents where the DHCPOFFER is not sent byt the DCHP-server. I have made some troubleshooting for this.
The actual set-up is one computer (tablet) that is connecting using ethernet to a computer hosting a DCHP-server. The configuration is not anything special.
- Software: Internet Systems Consortium DHCP Server 4.4.1
- /etc/dhcp/dhcp-server
- /etc/dhcp/dhcpd.conf
- /lib/systemd/system/dhcpd.service
In this specific case the logs starts at 09:14:10. At this point the tablet did not have any ip-adress and after re-plugging the ethenet dongle for the tablet the tablet start sending out the DHCPDISCOVER package. I would expect that the DHCP sever then would respond with DHCPOFFER, but nothing seems to happens. At 09:15:50 i restart the DHCP-server and then the DCHP handshaking is successful.
Note: I changed the dhcpd.service After=network.target
to After=network-online.target
. This i made since this is an embedded system that want to start quickly. The After=network.target
does not guarantee that the network devices are actually online. So, before this change the DCHP-server sometimes was started befort the eth0
was up. [Running Services After the Network is up]
Note: The tcpdump was made on the same computer running the dhcpd.
TCPDUMP of the problem
# tcpdump -vnes0 -i eth0 -vvv -s 0 port 67 or port 68
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
09:14:10.072207 00:05:1b:d5:20:60 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 348: (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 334)
0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 00:05:1b:d5:20:60, length 306, xid 0xa57ed7f4, Flags [none] (0x0000)
Client-Ethernet-Address 00:05:1b:d5:20:60
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
Client-ID Option 61, length 7: ether 00:05:1b:d5:20:60
MSZ Option 57, length 2: 1500
Vendor-Class Option 60, length 15: "android-dhcp-10"
Hostname Option 12, length 18: "Galaxy-Tab-Active3"
Parameter-Request Option 55, length 10:
Subnet-Mask, Default-Gateway, Domain-Name-Server, Domain-Name
MTU, BR, Lease-Time, RN
RB, Vendor-Option
END Option 255, length 0
09:14:11.054104 00:05:1b:d5:20:60 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 348: (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 334)
0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 00:05:1b:d5:20:60, length 306, xid 0xa57ed7f4, Flags [none] (0x0000)
Client-Ethernet-Address 00:05:1b:d5:20:60
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
Client-ID Option 61, length 7: ether 00:05:1b:d5:20:60
MSZ Option 57, length 2: 1500
Vendor-Class Option 60, length 15: "android-dhcp-10"
Hostname Option 12, length 18: "Galaxy-Tab-Active3"
Parameter-Request Option 55, length 10:
Subnet-Mask, Default-Gateway, Domain-Name-Server, Domain-Name
MTU, BR, Lease-Time, RN
RB, Vendor-Option
END Option 255, length 0
09:14:13.167741 00:05:1b:d5:20:60 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 348: (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 334)
0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 00:05:1b:d5:20:60, length 306, xid 0xa57ed7f4, secs 3, Flags [none] (0x0000)
Client-Ethernet-Address 00:05:1b:d5:20:60
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
Client-ID Option 61, length 7: ether 00:05:1b:d5:20:60
MSZ Option 57, length 2: 1500
Vendor-Class Option 60, length 15: "android-dhcp-10"
Hostname Option 12, length 18: "Galaxy-Tab-Active3"
Parameter-Request Option 55, length 10:
Subnet-Mask, Default-Gateway, Domain-Name-Server, Domain-Name
MTU, BR, Lease-Time, RN
RB, Vendor-Option
END Option 255, length 0
09:14:17.271799 00:05:1b:d5:20:60 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 348: (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 334)
0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 00:05:1b:d5:20:60, length 306, xid 0xa57ed7f4, secs 7, Flags [none] (0x0000)
Client-Ethernet-Address 00:05:1b:d5:20:60
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
Client-ID Option 61, length 7: ether 00:05:1b:d5:20:60
MSZ Option 57, length 2: 1500
Vendor-Class Option 60, length 15: "android-dhcp-10"
Hostname Option 12, length 18: "Galaxy-Tab-Active3"
Parameter-Request Option 55, length 10:
Subnet-Mask, Default-Gateway, Domain-Name-Server, Domain-Name
MTU, BR, Lease-Time, RN
RB, Vendor-Option
END Option 255, length 0
09:14:24.978766 00:05:1b:d5:20:60 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 348: (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 334)
0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 00:05:1b:d5:20:60, length 306, xid 0xa57ed7f4, secs 14, Flags [none] (0x0000)
Client-Ethernet-Address 00:05:1b:d5:20:60
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
Client-ID Option 61, length 7: ether 00:05:1b:d5:20:60
MSZ Option 57, length 2: 1500
Vendor-Class Option 60, length 15: "android-dhcp-10"
Hostname Option 12, length 18: "Galaxy-Tab-Active3"
Parameter-Request Option 55, length 10:
Subnet-Mask, Default-Gateway, Domain-Name-Server, Domain-Name
MTU, BR, Lease-Time, RN
RB, Vendor-Option
END Option 255, length 0
09:14:39.545719 00:05:1b:d5:20:60 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 348: (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 334)
0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 00:05:1b:d5:20:60, length 306, xid 0xa57ed7f4, secs 29, Flags [none] (0x0000)
Client-Ethernet-Address 00:05:1b:d5:20:60
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
Client-ID Option 61, length 7: ether 00:05:1b:d5:20:60
MSZ Option 57, length 2: 1500
Vendor-Class Option 60, length 15: "android-dhcp-10"
Hostname Option 12, length 18: "Galaxy-Tab-Active3"
Parameter-Request Option 55, length 10:
Subnet-Mask, Default-Gateway, Domain-Name-Server, Domain-Name
MTU, BR, Lease-Time, RN
RB, Vendor-Option
END Option 255, length 0
09:15:08.884878 00:05:1b:d5:20:60 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 348: (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 334)
0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 00:05:1b:d5:20:60, length 306, xid 0xa57ed7f4, secs 58, Flags [none] (0x0000)
Client-Ethernet-Address 00:05:1b:d5:20:60
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
Client-ID Option 61, length 7: ether 00:05:1b:d5:20:60
MSZ Option 57, length 2: 1500
Vendor-Class Option 60, length 15: "android-dhcp-10"
Hostname Option 12, length 18: "Galaxy-Tab-Active3"
Parameter-Request Option 55, length 10:
Subnet-Mask, Default-Gateway, Domain-Name-Server, Domain-Name
MTU, BR, Lease-Time, RN
RB, Vendor-Option
END Option 255, length 0
TCPDUMP after the restart
09:16:10.107290 00:05:1b:d5:20:60 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 348: (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 334)
0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 00:05:1b:d5:20:60, length 306, xid 0xa57ed7f4, secs 119, Flags [none] (0x0000)
Client-Ethernet-Address 00:05:1b:d5:20:60
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
Client-ID Option 61, length 7: ether 00:05:1b:d5:20:60
MSZ Option 57, length 2: 1500
Vendor-Class Option 60, length 15: "android-dhcp-10"
Hostname Option 12, length 18: "Galaxy-Tab-Active3"
Parameter-Request Option 55, length 10:
Subnet-Mask, Default-Gateway, Domain-Name-Server, Domain-Name
MTU, BR, Lease-Time, RN
RB, Vendor-Option
END Option 255, length 0
09:16:11.108417 b8:27:eb:a7:92:ec > 00:05:1b:d5:20:60, ethertype IPv4 (0x0800), length 342: (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
10.42.102.2.67 > 10.42.102.150.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0xa57ed7f4, secs 119, Flags [none] (0x0000)
Your-IP 10.42.102.150
Client-Ethernet-Address 00:05:1b:d5:20:60
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Offer
Server-ID Option 54, length 4: 10.42.102.2
Lease-Time Option 51, length 4: 600
Subnet-Mask Option 1, length 4: 255.255.255.0
Default-Gateway Option 3, length 4: 10.42.102.2
Domain-Name-Server Option 6, length 8: 8.8.8.8,8.8.4.4
Domain-Name Option 15, length 17: "domain.thoreb.com"
END Option 255, length 0
PAD Option 0, length 0, occurs 3
09:16:11.156340 00:05:1b:d5:20:60 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 360: (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 346)
0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 00:05:1b:d5:20:60, length 318, xid 0xa57ed7f4, secs 121, Flags [none] (0x0000)
Client-Ethernet-Address 00:05:1b:d5:20:60
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Request
Client-ID Option 61, length 7: ether 00:05:1b:d5:20:60
Requested-IP Option 50, length 4: 10.42.102.150
Server-ID Option 54, length 4: 10.42.102.2
MSZ Option 57, length 2: 1500
Vendor-Class Option 60, length 15: "android-dhcp-10"
Hostname Option 12, length 18: "Galaxy-Tab-Active3"
Parameter-Request Option 55, length 10:
Subnet-Mask, Default-Gateway, Domain-Name-Server, Domain-Name
MTU, BR, Lease-Time, RN
RB, Vendor-Option
END Option 255, length 0
09:16:11.156993 b8:27:eb:a7:92:ec > 00:05:1b:d5:20:60, ethertype IPv4 (0x0800), length 342: (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
10.42.102.2.67 > 10.42.102.150.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0xa57ed7f4, secs 121, Flags [none] (0x0000)
Your-IP 10.42.102.150
Client-Ethernet-Address 00:05:1b:d5:20:60
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: ACK
Server-ID Option 54, length 4: 10.42.102.2
Lease-Time Option 51, length 4: 600
Subnet-Mask Option 1, length 4: 255.255.255.0
Default-Gateway Option 3, length 4: 10.42.102.2
Domain-Name-Server Option 6, length 8: 8.8.8.8,8.8.4.4
Domain-Name Option 15, length 17: "domain.thoreb.com"
END Option 255, length 0
PAD Option 0, length 0, occurs 3
Log from the dhcpd server
# journalctl -u dhcpd -f
-- Logs begin at Fri 2020-03-27 08:04:30 UTC. --
Mar 29 08:21:46 U1CB2-postbus systemd[1]: Starting DHCPv4 Server Daemon...
Mar 29 08:21:46 U1CB2-postbus systemd[1]: Started DHCPv4 Server Daemon.
Mar 29 08:21:46 U1CB2-postbus dhcpd[515]: Internet Systems Consortium DHCP Server 4.4.1
Mar 29 08:21:46 U1CB2-postbus dhcpd[515]: Copyright 2004-2018 Internet Systems Consortium.
Mar 29 08:21:46 U1CB2-postbus dhcpd[515]: All rights reserved.
Mar 29 08:21:46 U1CB2-postbus dhcpd[515]: For info, please visit https://www.isc.org/software/dhcp/
Mar 29 08:21:46 U1CB2-postbus dhcpd[515]: Wrote 0 leases to leases file.
Mar 29 08:21:46 U1CB2-postbus dhcpd[515]: Server starting service.
Mar 29 09:15:50 U1CB2-postbus dhcpd[515]: Received signal 15, initiating shutdown.
Mar 29 09:15:50 U1CB2-postbus systemd[1]: Stopping DHCPv4 Server Daemon...
Mar 29 09:15:50 U1CB2-postbus systemd[1]: dhcpd.service: Succeeded.
Mar 29 09:15:50 U1CB2-postbus systemd[1]: Stopped DHCPv4 Server Daemon.
Mar 29 09:15:50 U1CB2-postbus systemd[1]: Starting DHCPv4 Server Daemon...
Mar 29 09:15:50 U1CB2-postbus systemd[1]: Started DHCPv4 Server Daemon.
Mar 29 09:15:50 U1CB2-postbus dhcpd[5866]: Internet Systems Consortium DHCP Server 4.4.1
Mar 29 09:15:50 U1CB2-postbus dhcpd[5866]: Copyright 2004-2018 Internet Systems Consortium.
Mar 29 09:15:50 U1CB2-postbus dhcpd[5866]: All rights reserved.
Mar 29 09:15:50 U1CB2-postbus dhcpd[5866]: For info, please visit https://www.isc.org/software/dhcp/
Mar 29 09:15:50 U1CB2-postbus dhcpd[5866]: Wrote 0 leases to leases file.
Mar 29 09:15:50 U1CB2-postbus dhcpd[5866]: Server starting service.
Mar 29 09:16:10 U1CB2-postbus dhcpd[5866]: DHCPDISCOVER from 00:05:1b:d5:20:60 via eth0
Mar 29 09:16:11 U1CB2-postbus dhcpd[5866]: DHCPOFFER on 10.42.102.150 to 00:05:1b:d5:20:60 (Galaxy-Tab-Active3) via eth0
Mar 29 09:16:11 U1CB2-postbus dhcpd[5866]: DHCPREQUEST for 10.42.102.150 (10.42.102.2) from 00:05:1b:d5:20:60 (Galaxy-Tab-Active3) via eth0
Mar 29 09:16:11 U1CB2-postbus dhcpd[5866]: DHCPACK on 10.42.102.150 to 00:05:1b:d5:20:60 (Galaxy-Tab-Active3) via eth0