I’m having issues with DHCP server and Windows 10 clients. DHCP server is serving basic things, like IP, Gateway and DNS addresses. Mac OS X / phones works without problem. Windows 10 is not getting anything from DHCP server. From debug logs it looks like DHCP server is receiving request from Windows 10 machine but not giving any response. This issue is with v6.47.2 and few previous stable releases. Anyone else having similar issues?
Sounds like a config issue as it works partially. Please post your config so we can see how it is configured.
Config fragments
/ip address
add address=10.0.0.254/24 disabled=no interface=br_lan network=10.0.0.0
/ip pool
add name=pool1 ranges=10.0.0.30-10.0.0.100
/ip dhcp-server config
set accounting=yes interim-update=0s store-leases-disk=5m
/ip dhcp-server network
add address=10.0.0.0/24 caps-manager="" dhcp-option="" dns-server=10.0.0.254 \
gateway=10.0.0.254 ntp-server=10.0.0.254 wins-server=""
/ip dhcp-server
add add-arp=yes address-pool=pool1 delay-threshold=5m disabled=no interface=\
br_lan lease-script="" lease-time=10m name=server1 use-radius=no
Logs for Windows 10 device, no response
12:18:24 dhcp,debug,packet server1 received discover with id 2822046763 from 0.0.0.0
12:18:24 dhcp,debug,packet secs = 7168
12:18:24 dhcp,debug,packet ciaddr = 0.0.0.0
12:18:24 dhcp,debug,packet chaddr = xx:yy:zz:aa:bb:cc
12:18:24 dhcp,debug,packet Msg-Type = discover
12:18:24 dhcp,debug,packet Client-Id = 01-D4-D2-52-40-0B-EE
12:18:24 dhcp,debug,packet Host-Name = "DESKTOP-TEST"
12:18:24 dhcp,debug,packet Class-Id = "MSFT 5.0"
12:18:24 dhcp,debug,packet Parameter-List = Subnet-Mask,Router,Domain-Server,Domain-Name,Router-Discovery,Static-Route,Vendor-Specific,NETBIOS-Name-Server,NETBIOS-Node-Type,NETBIOS-Scope,Domain-Search,Classless-Route,MS-Classless-Route,Auto-Proxy-Config
Logs for Raspberry pi running aarm64 (same result with/without static IP allocation)
12:20:13 dhcp,debug,packet server1 received request with id 2913399079 from 10.0.0.4
12:20:13 dhcp,debug,packet secs = 2102
12:20:13 dhcp,debug,packet ciaddr = 10.0.0.4
12:20:13 dhcp,debug,packet chaddr = xx:yy:zz:aa:bb:dd
12:20:13 dhcp,debug,packet Msg-Type = request
12:20:13 dhcp,debug,packet Client-Id = FF-5D-1D-B6-2E-00-02-00-00-AB-11-D1-51-29-40-1A-4E-F3-EC
12:20:13 dhcp,debug,packet Parameter-List = Subnet-Mask,Router,Host-Name,Domain-Name,Domain-Server,Interface-MTU,Static-Route,Classless-Route,Domain-Search,NTP-Server,Unknown(120)
12:20:13 dhcp,debug,packet Max-DHCP-Message-Size = 576
12:20:13 dhcp,debug,packet Client-FQDN = 05-00-00-06-72-70-69-34-2D-32-04-6E-6B-74-73-02-6C-74-00
12:20:13 dhcp,debug,packet server1 sending ack with id 2913399079 to 10.0.0.4
12:20:13 dhcp,debug,packet ciaddr = 10.0.0.4
12:20:13 dhcp,debug,packet yiaddr = 10.0.0.4
12:20:13 dhcp,debug,packet siaddr = 10.0.0.254
12:20:13 dhcp,debug,packet chaddr = xx:yy:zz:aa:bb:dd
12:20:13 dhcp,debug,packet Msg-Type = ack
12:20:13 dhcp,debug,packet Server-Id = 10.0.0.254
12:20:13 dhcp,debug,packet Address-Time = 600
12:20:13 dhcp,debug,packet Subnet-Mask = 255.255.255.0
12:20:13 dhcp,debug,packet Router = 10.0.0.254
12:20:13 dhcp,debug,packet Domain-Server = 10.0.0.254
12:20:13 dhcp,debug,packet NTP-Server = 10.0.0.254
Update your dhcp server from
/ip dhcp-server
add add-arp=yes address-pool=pool1 delay-threshold=5m disabled=no interface=
br_lan lease-script=“” lease-time=10m name=server1 use-radius=no
to
/ip dhcp-server
add add-arp=yes address-pool=pool1 authoritative=yes disabled=no interface=
br_lan lease-script=“” lease-time=10m name=server1 use-radius=no
I removed the delay-threshold (which I am sure is your real issue) and also set authoritative=yes.
Thanks @biomesh, you were right about delay-threshold, I removed this and things seems behaving normally. I was not paying attention to secs bit. But now after looking at it (supposed to be seconds from dhcp client start), for some reason Windows multiplies this value by *256. Why? Is this known bug? Sadly can’t check mikrotik’s source code nor microsoft’s dhcp client. Is dhcp server ignoring packets with without secs header if delay-threshold is set?
But this is nuts, not following rfc
16:40:07 dhcp,debug,packet server1 received discover with id 1229905021 from 0.0.0.0
16:40:07 dhcp,debug,packet flags = broadcast
16:40:07 dhcp,debug,packet ciaddr = 0.0.0.0
16:40:07 dhcp,debug,packet chaddr = AA:BB:CC:DD:EE:FF
16:40:07 dhcp,debug,packet Msg-Type = discover
16:40:07 dhcp,debug,packet Client-Id = 01-AA-BB-CC-DD-EE-FF
16:40:07 dhcp,debug,packet Address-Request = 10.0.0.98
16:40:07 dhcp,debug,packet Host-Name = "DESKTOP-TEST"
16:40:07 dhcp,debug,packet Class-Id = "MSFT 5.0"
16:40:07 dhcp,debug,packet Parameter-List = Subnet-Mask,Router,Domain-Server,Domain-Name,Router-Discovery,Static-Route,Vendor-Specific,NETBIOS-Name-Server,NETBIOS-Node-Type,NETBIOS-Scope,Domain-Search,Classless-Route,MS-Classless-Route,Auto-Proxy-Config
16:40:10 dhcp,debug,packet server1 received discover with id 1229905021 from 0.0.0.0
16:40:10 dhcp,debug,packet secs = 768
16:40:10 dhcp,debug,packet flags = broadcast
16:40:10 dhcp,debug,packet ciaddr = 0.0.0.0
16:40:10 dhcp,debug,packet chaddr = AA:BB:CC:DD:EE:FF
16:40:10 dhcp,debug,packet Msg-Type = discover
16:40:10 dhcp,debug,packet Client-Id = 01-AA-BB-CC-DD-EE-FF
16:40:10 dhcp,debug,packet Address-Request = 10.0.0.98
16:40:10 dhcp,debug,packet Host-Name = "DESKTOP-TEST"
16:40:10 dhcp,debug,packet Class-Id = "MSFT 5.0"
16:40:10 dhcp,debug,packet Parameter-List = Subnet-Mask,Router,Domain-Server,Domain-Name,Router-Discovery,Static-Route,Vendor-Specific,NETBIOS-Name-Server,NETBIOS-Node-Type,NETBIOS-Scope,Domain-Search,Classless-Route,MS-Classless-Route,Auto-Proxy-Config
16:40:19 dhcp,debug,packet server1 received discover with id 1229905021 from 0.0.0.0
16:40:19 dhcp,debug,packet secs = 3072
16:40:19 dhcp,debug,packet flags = broadcast
16:40:19 dhcp,debug,packet ciaddr = 0.0.0.0
16:40:19 dhcp,debug,packet chaddr = AA:BB:CC:DD:EE:FF
16:40:19 dhcp,debug,packet Msg-Type = discover
16:40:19 dhcp,debug,packet Client-Id = 01-AA-BB-CC-DD-EE-FF
16:40:19 dhcp,debug,packet Address-Request = 10.0.0.98
16:40:19 dhcp,debug,packet Host-Name = "DESKTOP-TEST"
16:40:19 dhcp,debug,packet Class-Id = "MSFT 5.0"
16:40:19 dhcp,debug,packet Parameter-List = Subnet-Mask,Router,Domain-Server,Domain-Name,Router-Discovery,Static-Route,Vendor-Specific,NETBIOS-Name-Server,NETBIOS-Node-Type,NETBIOS-Scope,Domain-Search,Classless-Route,MS-Classless-Route,Auto-Proxy-Config
16:40:34 dhcp,debug,packet server1 received discover with id 1229905021 from 0.0.0.0
16:40:34 dhcp,debug,packet secs = 6912
16:40:34 dhcp,debug,packet flags = broadcast
16:40:34 dhcp,debug,packet ciaddr = 0.0.0.0
16:40:34 dhcp,debug,packet chaddr = AA:BB:CC:DD:EE:FF
16:40:34 dhcp,debug,packet Msg-Type = discover
16:40:34 dhcp,debug,packet Client-Id = 01-AA-BB-CC-DD-EE-FF
16:40:34 dhcp,debug,packet Address-Request = 10.0.0.98
16:40:34 dhcp,debug,packet Host-Name = "DESKTOP-TEST"
16:40:34 dhcp,debug,packet Class-Id = "MSFT 5.0"
16:40:34 dhcp,debug,packet Parameter-List = Subnet-Mask,Router,Domain-Server,Domain-Name,Router-Discovery,Static-Route,Vendor-Specific,NETBIOS-Name-Server,NETBIOS-Node-Type,NETBIOS-Scope,Domain-Search,Classless-Route,MS-Classless-Route,Auto-Proxy-Config