UI "Enable DHCP server" is inactive forever #637

Closed
opened 2026-03-04 00:41:15 -05:00 by deekerman · 3 comments
Owner

Originally created by @mveplus on GitHub (Apr 4, 2019).

Originally assigned to: @IldarKamalov, @szolin on GitHub.

Done a quick search but could not find the issue, mentioned anywhere in the results.

Steps to reproduce

  1. Download and extract AdGuardHome_v0.94_linux_amd64.tar.gz, Proxmox LXC Ubuntu 18.04.2 LTS container running on a PC.
  2. Start and configure the DHCP, " DHCP server (experimental!) "
  3. "Enable DHCP server" is inactive, there is another active DHCP server on the network the default router.1, turning it off doe snot make any difference - "Enable DHCP server" is greyed out and inactive.
    01-AGH-DHCP
    02-AGH-DHCP-after-check-for DHCP is pressed
  4. The AGH DHCP can be enabled via changing the YML config!
    02-AGH-DHCP-enabled-via-yml

Another minor issue when there is another active DHCP server on the network - the info message below "Enable DHCP server" should change but it does not appear so.
04-AGH-DHCP-no-active-D-found
The message "No active DHCP servers, found on the network...." is not correct either.
It looks like click on the "Check for DHCP servers" button sends dhcpc broadcast message to discover active DHCP servers and the message is received back on the network adapter but does not seems to change the "No active DHCP servers..."

tcpdump port 68 or port 69
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
18:56:28.497586 IP x.mvend.loc.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 46:4f:f8:88:e1:19 (oui Unknown), length 280
18:56:47.184346 IP x.mvend.loc.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 46:4f:f8:88:e1:19 (oui Unknown), length 280

Expected behavior

"Enable DHCP server" should be greyed out and inactive only if another server is active, this needs to be revalidated each time "Save config" or "Check for DHCP servers" is pressed or AGH restarted.

Actual behavior

Restarting AGH does not make a difference. regardless of the secondary active DHCP server off or on.
"Enable DHCP server" is inactive.

Your environment

Description Value
Version of AdGuard Home server: v0.94_linux_amd64
How did you setup DNS configuration: System
device model: PC Proxmox 5.3.9
Operating system and version: (e.g. LXC Ubuntu 18.04.2
Originally created by @mveplus on GitHub (Apr 4, 2019). Originally assigned to: @IldarKamalov, @szolin on GitHub. Done a quick search but could not find the issue, mentioned anywhere in the results. ### Steps to reproduce 1. Download and extract AdGuardHome_v0.94_linux_amd64.tar.gz, Proxmox LXC Ubuntu 18.04.2 LTS container running on a PC. 2. Start and configure the DHCP, " DHCP server (experimental!) " 3. "Enable DHCP server" is inactive, there is another active DHCP server on the network the default router.1, turning it off doe snot make any difference - "Enable DHCP server" is greyed out and inactive. ![01-AGH-DHCP](https://user-images.githubusercontent.com/4037132/55582714-15ea0280-5718-11e9-8f16-5d5d178baac5.png) ![02-AGH-DHCP-after-check-for DHCP is pressed](https://user-images.githubusercontent.com/4037132/55582729-200c0100-5718-11e9-86ac-2b7296c0de9f.png) 5. The AGH DHCP can be enabled via changing the YML config! ![02-AGH-DHCP-enabled-via-yml](https://user-images.githubusercontent.com/4037132/55582805-4762ce00-5718-11e9-9fcf-dda950ec1f4e.png) Another minor issue when there is another active DHCP server on the network - the info message below "Enable DHCP server" should change but it does not appear so. ![04-AGH-DHCP-no-active-D-found](https://user-images.githubusercontent.com/4037132/55583616-39ae4800-571a-11e9-8fff-11318a71eb78.png) The message "No active DHCP servers, found on the network...." is not correct either. It looks like click on the "Check for DHCP servers" button sends dhcpc broadcast message to discover active DHCP servers and the message is received back on the network adapter but does not seems to change the "No active DHCP servers..." tcpdump port 68 or port 69 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes 18:56:28.497586 IP x.mvend.loc.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 46:4f:f8:88:e1:19 (oui Unknown), length 280 18:56:47.184346 IP x.mvend.loc.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 46:4f:f8:88:e1:19 (oui Unknown), length 280 ### Expected behavior "Enable DHCP server" should be greyed out and inactive only if another server is active, this needs to be revalidated each time "Save config" or "Check for DHCP servers" is pressed or AGH restarted. ### Actual behavior Restarting AGH does not make a difference. regardless of the secondary active DHCP server off or on. "Enable DHCP server" is inactive. </details> ### Your environment <!--- Please include all relevant details about the environment you experienced the bug in --> | Description | Value | | -------------- | ------------ | | Version of AdGuard Home server:| v0.94_linux_amd64 | How did you setup DNS configuration:| System | device model: | PC Proxmox 5.3.9 | Operating system and version:| (e.g. LXC Ubuntu 18.04.2
Author
Owner

@ameshkov commented on GitHub (Apr 6, 2019):

This seems to be a UI bug, @szolin plz confirm

@ameshkov commented on GitHub (Apr 6, 2019): This seems to be a UI bug, @szolin plz confirm
Author
Owner

@szolin commented on GitHub (Apr 15, 2019):

The issue with the button "Enable DHCP server" being always inactive will be resolved in #686.
But detection of another DHCP server doesn't work indeed - for some reason it doesn't receive the response from DHCP server.

@szolin commented on GitHub (Apr 15, 2019): The issue with the button "Enable DHCP server" being always inactive will be resolved in #686. But detection of another DHCP server doesn't work indeed - for some reason it doesn't receive the response from DHCP server.
Author
Owner

@mveplus commented on GitHub (Apr 21, 2019):

@szolin I've done some test on it, I'm not sure if this could be related but there are two issues with "Check for DHCP server" detection.

  1. The first one is that broadcast dhcpc request is sent on out via the selected interface i.e "eth0" in this case but expected to return on the loopback instead (see tcpdumps ).
  2. The second one is bad udp cksum [bad udp cksum 0xc2d4 -> 0xd88b!]:

tcpdump -i eth0 port 67 or port 68 -nvvve
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
06:42:02.126316 46:4f:f8:88:e1:19 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 322: (tos 0x0, ttl 64, id 30161, offset 0, flags [DF], proto UDP (17), length 308)
192.168.0.251.68 > 255.255.255.255.67: [bad udp cksum 0xc2d4 -> 0xd88b!] BOOTP/DHCP, Request from 46:4f:f8:88:e1:19, length 280, xid 0xaacd5cbe, Flags [none] (0x0000)
Client-Ethernet-Address 46:4f:f8:88:e1:19
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
Parameter-Request Option 55, length 10:
Subnet-Mask, Classless-Static-Route, Default-Gateway, Domain-Name-Server
Domain-Name, Option 119, Option 252, LDAP
Netbios-Name-Server, Netbios-Node
MSZ Option 57, length 2: 1500
Client-ID Option 61, length 7: ether 46:4f:f8:88:e1:19
Lease-Time Option 51, length 4: 7776000
Hostname Option 12, length 3: "mve"
END Option 255, length 0
^C
1 packet captured
1 packet received by filter
0 packets dropped by kernel

tcpdump -i lo port 67 or port 68 -nvvve
tcpdump: listening on lo, link-type EN10MB (Ethernet), capture size 262144 bytes
06:42:27.161509 00:00:00:00:00:00 > 00:00:00:00:00:00, ethertype IPv4 (0x0800), length 316: (tos 0x0, ttl 64, id 34654, offset 0, flags [DF], proto UDP (17), length 302)
192.168.0.251.67 > 192.168.0.251.68: [bad udp cksum 0x8472 -> 0x34c8!] BOOTP/DHCP, Reply, length 274, xid 0x86975efe, Flags [none] (0x0000)
Your-IP 192.168.0.5
Client-Ethernet-Address 46:4f:f8:88:e1:19
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Offer
Server-ID Option 54, length 4: 192.168.0.251
Lease-Time Option 51, length 4: 86400
Subnet-Mask Option 1, length 4: 255.255.255.0
Default-Gateway Option 3, length 4: 192.168.0.1
Domain-Name-Server Option 6, length 4: 192.168.0.251
END Option 255, length 0
^C
1 packet captured
2 packets received by filter
0 packets dropped by kernel

tcpdump -i any port 67 or port 68 -nvvve
tcpdump: listening on any, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes
06:42:47.248078 Out 46:4f:f8:88:e1:19 ethertype IPv4 (0x0800), length 324: (tos 0x0, ttl 64, id 33169, offset 0, flags [DF], proto UDP (17), length 308)
192.168.0.251.68 > 255.255.255.255.67: [bad udp cksum 0xc2d4 -> 0x92f6!] BOOTP/DHCP, Request from 46:4f:f8:88:e1:19, length 280, xid 0xaf3b9de5, Flags [none] (0x0000)
Client-Ethernet-Address 46:4f:f8:88:e1:19
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
Parameter-Request Option 55, length 10:
Subnet-Mask, Classless-Static-Route, Default-Gateway, Domain-Name-Server
Domain-Name, Option 119, Option 252, LDAP
Netbios-Name-Server, Netbios-Node
MSZ Option 57, length 2: 1500
Client-ID Option 61, length 7: ether 46:4f:f8:88:e1:19
Lease-Time Option 51, length 4: 7776000
Hostname Option 12, length 3: "mve"
END Option 255, length 0
06:42:47.248177 In 00:00:00:00:00:00 ethertype IPv4 (0x0800), length 318: (tos 0x0, ttl 64, id 35498, offset 0, flags [DF], proto UDP (17), length 302)
192.168.0.251.67 > 192.168.0.251.68: [bad udp cksum 0x8472 -> 0xcd3c!] BOOTP/DHCP, Reply, length 274, xid 0xaf3b9de5, Flags [none] (0x0000)
Your-IP 192.168.0.5
Client-Ethernet-Address 46:4f:f8:88:e1:19
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Offer
Server-ID Option 54, length 4: 192.168.0.251
Lease-Time Option 51, length 4: 86400
Subnet-Mask Option 1, length 4: 255.255.255.0
Default-Gateway Option 3, length 4: 192.168.0.1
Domain-Name-Server Option 6, length 4: 192.168.0.251
END Option 255, length 0
^C
2 packets captured
3 packets received by filter
0 packets dropped by kernel

The bad checksum can be related to my setup thou, it can be mitigated by turning off ethernet interface offloading:

ethtool -K eth0 tx off
Actual changes:
tx-checksumming: off
tx-checksum-ip-generic: off
tx-checksum-sctp: off
tcp-segmentation-offload: off
tx-tcp-segmentation: off [requested on]
tx-tcp-ecn-segmentation: off [requested on]
tx-tcp-mangleid-segmentation: off [requested on]
tx-tcp6-segmentation: off [requested on]

tcpdump -i eth0 port 67 or port 68 -nvvve
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
06:57:08.687567 46:4f:f8:88:e1:19 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 322: (tos 0x0, ttl 64, id 35534, offset 0, flags [DF], proto UDP (17), length 308)
192.168.0.251.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 46:4f:f8:88:e1:19, length 280, xid 0x29eda156, Flags [none] (0x0000)
Client-Ethernet-Address 46:4f:f8:88:e1:19
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
Parameter-Request Option 55, length 10:
Subnet-Mask, Classless-Static-Route, Default-Gateway, Domain-Name-Server
Domain-Name, Option 119, Option 252, LDAP
Netbios-Name-Server, Netbios-Node
MSZ Option 57, length 2: 1500
Client-ID Option 61, length 7: ether 46:4f:f8:88:e1:19
Lease-Time Option 51, length 4: 7776000
Hostname Option 12, length 3: "mve"
END Option 255, length 0

However, this is not an option for the "loopback" interface.

@mveplus commented on GitHub (Apr 21, 2019): @szolin I've done some test on it, I'm not sure if this could be related but there are two issues with "Check for DHCP server" detection. 1. The first one is that broadcast dhcpc request is sent on out via the selected interface i.e "eth0" in this case but expected to return on the loopback instead (see tcpdumps ). 2. The second one is bad udp cksum [bad udp cksum 0xc2d4 -> 0xd88b!]: > tcpdump -i eth0 port 67 or port 68 -nvvve tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes 06:42:02.126316 46:4f:f8:88:e1:19 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 322: (tos 0x0, ttl 64, id 30161, offset 0, flags [DF], proto UDP (17), length 308) 192.168.0.251.68 > 255.255.255.255.67: [bad udp cksum 0xc2d4 -> 0xd88b!] BOOTP/DHCP, Request from 46:4f:f8:88:e1:19, length 280, xid 0xaacd5cbe, Flags [none] (0x0000) Client-Ethernet-Address 46:4f:f8:88:e1:19 Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Discover Parameter-Request Option 55, length 10: Subnet-Mask, Classless-Static-Route, Default-Gateway, Domain-Name-Server Domain-Name, Option 119, Option 252, LDAP Netbios-Name-Server, Netbios-Node MSZ Option 57, length 2: 1500 Client-ID Option 61, length 7: ether 46:4f:f8:88:e1:19 Lease-Time Option 51, length 4: 7776000 Hostname Option 12, length 3: "mve" END Option 255, length 0 ^C 1 packet captured 1 packet received by filter 0 packets dropped by kernel > tcpdump -i lo port 67 or port 68 -nvvve tcpdump: listening on lo, link-type EN10MB (Ethernet), capture size 262144 bytes 06:42:27.161509 00:00:00:00:00:00 > 00:00:00:00:00:00, ethertype IPv4 (0x0800), length 316: (tos 0x0, ttl 64, id 34654, offset 0, flags [DF], proto UDP (17), length 302) 192.168.0.251.67 > 192.168.0.251.68: [bad udp cksum 0x8472 -> 0x34c8!] BOOTP/DHCP, Reply, length 274, xid 0x86975efe, Flags [none] (0x0000) Your-IP 192.168.0.5 Client-Ethernet-Address 46:4f:f8:88:e1:19 Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Server-ID Option 54, length 4: 192.168.0.251 Lease-Time Option 51, length 4: 86400 Subnet-Mask Option 1, length 4: 255.255.255.0 Default-Gateway Option 3, length 4: 192.168.0.1 Domain-Name-Server Option 6, length 4: 192.168.0.251 END Option 255, length 0 ^C 1 packet captured 2 packets received by filter 0 packets dropped by kernel > tcpdump -i any port 67 or port 68 -nvvve tcpdump: listening on any, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes 06:42:47.248078 Out 46:4f:f8:88:e1:19 ethertype IPv4 (0x0800), length 324: (tos 0x0, ttl 64, id 33169, offset 0, flags [DF], proto UDP (17), length 308) 192.168.0.251.68 > 255.255.255.255.67: [bad udp cksum 0xc2d4 -> 0x92f6!] BOOTP/DHCP, Request from 46:4f:f8:88:e1:19, length 280, xid 0xaf3b9de5, Flags [none] (0x0000) Client-Ethernet-Address 46:4f:f8:88:e1:19 Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Discover Parameter-Request Option 55, length 10: Subnet-Mask, Classless-Static-Route, Default-Gateway, Domain-Name-Server Domain-Name, Option 119, Option 252, LDAP Netbios-Name-Server, Netbios-Node MSZ Option 57, length 2: 1500 Client-ID Option 61, length 7: ether 46:4f:f8:88:e1:19 Lease-Time Option 51, length 4: 7776000 Hostname Option 12, length 3: "mve" END Option 255, length 0 06:42:47.248177 In 00:00:00:00:00:00 ethertype IPv4 (0x0800), length 318: (tos 0x0, ttl 64, id 35498, offset 0, flags [DF], proto UDP (17), length 302) 192.168.0.251.67 > 192.168.0.251.68: [bad udp cksum 0x8472 -> 0xcd3c!] BOOTP/DHCP, Reply, length 274, xid 0xaf3b9de5, Flags [none] (0x0000) Your-IP 192.168.0.5 Client-Ethernet-Address 46:4f:f8:88:e1:19 Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Server-ID Option 54, length 4: 192.168.0.251 Lease-Time Option 51, length 4: 86400 Subnet-Mask Option 1, length 4: 255.255.255.0 Default-Gateway Option 3, length 4: 192.168.0.1 Domain-Name-Server Option 6, length 4: 192.168.0.251 END Option 255, length 0 ^C 2 packets captured 3 packets received by filter 0 packets dropped by kernel The bad checksum can be related to my setup thou, it can be mitigated by turning off ethernet interface offloading: > ethtool -K eth0 tx off Actual changes: tx-checksumming: off tx-checksum-ip-generic: off tx-checksum-sctp: off tcp-segmentation-offload: off tx-tcp-segmentation: off [requested on] tx-tcp-ecn-segmentation: off [requested on] tx-tcp-mangleid-segmentation: off [requested on] tx-tcp6-segmentation: off [requested on] > tcpdump -i eth0 port 67 or port 68 -nvvve tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes 06:57:08.687567 46:4f:f8:88:e1:19 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 322: (tos 0x0, ttl 64, id 35534, offset 0, flags [DF], proto UDP (17), length 308) 192.168.0.251.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 46:4f:f8:88:e1:19, length 280, xid 0x29eda156, Flags [none] (0x0000) Client-Ethernet-Address 46:4f:f8:88:e1:19 Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Discover Parameter-Request Option 55, length 10: Subnet-Mask, Classless-Static-Route, Default-Gateway, Domain-Name-Server Domain-Name, Option 119, Option 252, LDAP Netbios-Name-Server, Netbios-Node MSZ Option 57, length 2: 1500 Client-ID Option 61, length 7: ether 46:4f:f8:88:e1:19 Lease-Time Option 51, length 4: 7776000 Hostname Option 12, length 3: "mve" END Option 255, length 0 However, this is not an option for the "loopback" interface.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/AdGuardHome#637
No description provided.