dnsmasq dhcp server отвечает медленно (30 с) при большой нагрузке - PullRequest
0 голосов
/ 18 февраля 2020

Я запускаю dnsmasq с помощью следующей команды

dnsmasq --interface=br1 --bind-dynamic --dhcp-range=192.168.250.11,192.168.250.253,10m -h --dhcp-authoritative  --log-facility=/var/log/dnsmasq.log

С парой клиентов система работает нормально, с более чем 10 клиентами, новый из них пытается получить IP-адрес.

Используя tcpdump, я вижу входящие запросы DHCP, но только через 30 секунд dnsmasq примет во внимание следующие. В следующем захвате новый клиент «34: e6: 8a: 20: 17: 0b»

16:57:25.072183 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:6d:83:f2:01 (Unknown), length 300
16:57:32.900471 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:8a:20:17:0b (Unknown), length 300
16:57:33.052948 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:8a:20:17:0b (Unknown), length 300
16:57:36.055056 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:8a:20:17:0b (Unknown), length 300
16:57:44.091084 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:8a:20:17:0b (Unknown), length 300
16:57:52.173789 IP 192.168.250.110.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:a1:a6:c0:03 (Unknown), length 300
16:57:52.391871 IP 192.168.250.113.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:a1:a6:c0:06 (Unknown), length 300
16:57:52.758937 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:a1:a6:c0:03 (Unknown), length 300
16:57:52.759534 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:a1:a6:c0:03 (Unknown), length 308
16:57:52.813993 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:a1:a6:c0:06 (Unknown), length 300
16:57:52.814538 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:a1:a6:c0:06 (Unknown), length 308
16:57:55.921261 IP 192.168.250.113.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:a1:a6:c0:06 (Unknown), length 300
16:57:56.182680 IP 192.168.250.110.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:a1:a6:c0:03 (Unknown), length 300
16:57:56.522814 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:a1:a6:c0:06 (Unknown), length 300
16:57:56.523477 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:a1:a6:c0:06 (Unknown), length 308
16:57:56.829330 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:a1:a6:c0:03 (Unknown), length 300
16:57:56.829945 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:a1:a6:c0:03 (Unknown), length 308
16:57:58.846713 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:8a:20:17:0b (Unknown), length 300
16:57:59.910233 IP 192.168.250.113.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:a1:a6:c0:06 (Unknown), length 300
16:58:00.185107 IP 192.168.250.110.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:a1:a6:c0:03 (Unknown), length 300
16:58:00.488452 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:a1:a6:c0:06 (Unknown), length 300
16:58:00.705486 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:a1:a6:c0:03 (Unknown), length 300
############################################ The DHCP request if finally answered
16:58:01.850537 IP dhcp_server.lan.bootps > 192.168.250.193.bootpc: BOOTP/DHCP, Reply, length 300
16:58:01.850882 IP dhcp_server.lan.bootps > 192.168.250.166.bootpc: BOOTP/DHCP, Reply, length 300
16:58:01.851623 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:a1:a6:c0:06 (Unknown), length 308
16:58:01.852045 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:a1:a6:c0:03 (Unknown), length 308
16:58:01.853384 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:8a:20:17:0b (Unknown), length 308
16:58:01.884540 IP dhcp_server.lan.bootps > 192.168.250.193.bootpc: BOOTP/DHCP, Reply, length 300
16:58:01.909053 IP dhcp_server.lan.bootps > 192.168.250.193.bootpc: BOOTP/DHCP, Reply, length 303
16:58:05.184715 IP 192.168.250.110.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:a1:a6:c0:03 (Unknown), length 300
16:58:05.318049 IP 192.168.250.193.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:8a:20:17:0b (Unknown), length 300
16:58:05.318365 IP dhcp_server.lan.bootps > 192.168.250.193.bootpc: BOOTP/DHCP, Reply, length 300
16:58:05.318388 IP dhcp_server.lan.bootps > 192.168.250.193.bootpc: BOOTP/DHCP, Reply, length 300
16:58:05.386584 IP 192.168.250.113.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 34:e6:a1:a6:c0:06 (Unknown), length 300

В журналах dnsmasq не отображаются неотвеченные запросы dhcp:

Feb 18 16:58:01 dnsmasq-dhcp[21937]: DHCPDISCOVER(br1) 34:e6:8a:20:17:0b 
Feb 18 16:58:01 dnsmasq-dhcp[21937]: DHCPOFFER(br1) 192.168.250.166 34:e6:8a:20:17:0b 
Feb 18 16:58:01 dnsmasq-dhcp[21937]: DHCPREQUEST(br1) 192.168.250.193 34:e6:8a:20:17:0b 
Feb 18 16:58:01 dnsmasq-dhcp[21937]: DHCPACK(br1) 192.168.250.193 34:e6:8a:20:17:0b FAT-PC
Feb 18 16:58:05 dnsmasq-dhcp[21937]: DHCPINFORM(br1) 192.168.250.193 34:e6:8a:20:17:0b 
Feb 18 16:58:05 dnsmasq-dhcp[21937]: DHCPACK(br1) 192.168.250.193 34:e6:8a:20:17:0b FAT-PC
Feb 18 16:58:05 dnsmasq-dhcp[21937]: DHCPDISCOVER(br1) 192.168.250.193 34:e6:8a:20:17:0b 
Feb 18 16:58:05 dnsmasq-dhcp[21937]: DHCPOFFER(br1) 192.168.250.193 34:e6:8a:20:17:0b 
Feb 18 16:58:05 dnsmasq-dhcp[21937]: DHCPREQUEST(br1) 192.168.250.193 34:e6:8a:20:17:0b 
Feb 18 16:58:05 dnsmasq-dhcp[21937]: DHCPACK(br1) 192.168.250.193 34:e6:8a:20:17:0b FAT-PC
...