Hi all, I'm running on OpenWRT (SNAPSHOT r23935+13-c1206675a4) which has installed dnsmasq 2.89 and my client is a macbook running MacOS 12.3.1 and I recently switched from a single dnsmasq instance to a multi-instance dnsmasq setup (because i wanted a different subdomain name given for the different networks i have dnsmasq listen on and that was the approach suggested in openwrt forum),
But when i performed this change, i found out (after many days of troubleshooting) that the dhcp response no longer contained a subnet-mask field (which was causing my client to use the default /16 for a classful CIDR of that address space, which caused connectivity issues that were hilariously baffling at first). Is there some bug here, or am I doing something wrong? Attaching both the single-instance dnsmasq.conf (working) and the DHCPOFFER response as well as the offending instance in the multi-instance dnsmasq.conf (broken) and the DHCPOFFER response, where the subnet-mask option is omitted (despite me attempting to add it as an extra DHCPOPTION #1 even!) Any advice or anything else to look at? Warm regards, Aleks
13:44:46.064691 60:38:e0:xx:xx:10 > 8c:ae:4c:xx:xx:20, ethertype IPv4 (0x0800), length 373: (tos 0xc0, ttl 64, id 39706, offset 0, flags [none], proto UDP (17), length 359) 172.22.20.1.67 > 172.22.20.20.68: [udp sum ok] BOOTP/DHCP, Reply, length 331, xid 0x8d7469d9, Flags [none] (0x0000) Your-IP 172.22.20.20 Server-IP 172.22.20.1 Client-Ethernet-Address 8c:ae:4c:xx:xx:20 Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Server-ID Option 54, length 4: 172.22.20.1 Lease-Time Option 51, length 4: 120 RN Option 58, length 4: 60 RB Option 59, length 4: 105 BR Option 28, length 4: 172.22.20.255 Default-Gateway Option 3, length 4: 172.22.20.1 Domain-Name-Server Option 6, length 4: 172.22.20.1 T119 Option 119, length 25: 3.108.97.110.4.104.111.... Domain-Name Option 15, length 16: "lan.home.my.domain" END Option 255, length 0
root@router-main:/etc/config# ls -l /tmp/etc/dnsmasq.conf.* -rw-r--r-- 1 root root 1107 Sep 19 10:48 /tmp/etc/dnsmasq.conf.home_dns -rw-r--r-- 1 root root 1110 Sep 19 10:48 /tmp/etc/dnsmasq.conf.lan_dns -rw-r--r-- 1 root root 1004 Sep 19 10:48 /tmp/etc/dnsmasq.conf.mgmt_dns root@router-main:/etc/config# cat /tmp/etc/dnsmasq.conf.lan_dns # auto-generated config file from /etc/config/dhcp conf-file=/etc/dnsmasq.conf dhcp-authoritative domain-needed localise-queries read-ethers enable-ubus=dnsmasq.lan_dns expand-hosts bind-dynamic local-service cache-size=1000 domain=lan.home.my.domain local=/lan.home.my.domain/ server=208.67.222.222 server=208.67.220.220 interface=br-lan.2220 except-interface=lo addn-hosts=/tmp/hosts dhcp-leasefile=/tmp/dhcp.leases.lan resolv-file=/tmp/resolv.conf.d/resolv.conf.auto stop-dns-rebind rebind-localhost-ok rebind-domain-ok=/my.domain/ dhcp-broadcast=tag:needs-broadcast conf-dir=/tmp/dnsmasq.d user=dnsmasq group=dnsmasq dhcp-host=8C:AE:4C:xx:xx:20,172.22.20.20,aleksWorkMBP-docked,2m dhcp-ignore-names=tag:dhcp_bogus_hostname conf-file=/usr/share/dnsmasq/dhcpbogushostname.conf bogus-priv conf-file=/usr/share/dnsmasq/rfc6761.conf dhcp-range=set:lan,172.22.20.100,172.22.20.249,255.255.255.0,2m dhcp-option=lan,1,255.255.255.0 dhcp-option=lan,15,lan.home.my.domain dhcp-option=lan,119,lan.home.my.domain,mgmt.home.my.domain dhcp-option-force=lan,1 ## note the other two dnsmasq.conf look the same except lan.home.my.domain is ## replaced with wifi.home.my.domain and mgmt.home.my.domain ## and networks there are 172.20.20.0/23 and 172.22.22.20/30 respectively
13:47:22.335169 60:38:e0:xx:xx:10 > 8c:ae:4c:xx:xx:20, ethertype IPv4 (0x0800), length 342: (tos 0xc0, ttl 64, id 8592, offset 0, flags [none], proto UDP (17), length 328) 172.22.20.1.67 > 172.22.20.20.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0x8d7469db, secs 35, Flags [none] (0x0000) Your-IP 172.22.20.20 Server-IP 172.22.20.1 Client-Ethernet-Address 8c:ae:4c:xx:xx:20 Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Server-ID Option 54, length 4: 172.22.20.1 Lease-Time Option 51, length 4: 43200 RN Option 58, length 4: 21600 RB Option 59, length 4: 37800 Subnet-Mask Option 1, length 4: 255.255.255.0 BR Option 28, length 4: 172.22.20.255 Default-Gateway Option 3, length 4: 172.22.20.1 Domain-Name-Server Option 6, length 4: 172.22.20.1 Domain-Name Option 15, length 3: "lan" END Option 255, length 0 PAD Option 0, length 0, occurs 3
root@router-main:/tmp/etc# cat dnsmasq.conf.cfg01411c # auto-generated config file from /etc/config/dhcp conf-file=/etc/dnsmasq.conf dhcp-authoritative domain-needed localise-queries read-ethers enable-ubus=dnsmasq expand-hosts bind-dynamic local-service cache-size=1000 edns-packet-max=1232 domain=lan local=/lan/ interface=br-lan.2222 interface=br-lan.2220 interface=br-lan.2020 addn-hosts=/tmp/hosts dhcp-leasefile=/tmp/dhcp.leases resolv-file=/tmp/resolv.conf.d/resolv.conf.auto stop-dns-rebind rebind-localhost-ok dhcp-broadcast=tag:needs-broadcast conf-dir=/tmp/dnsmasq.d user=dnsmasq group=dnsmasq dhcp-host=8C:AE:4C:XX:XX:20,172.22.20.21,aleksWorkMBP-docked dhcp-ignore-names=tag:dhcp_bogus_hostname conf-file=/usr/share/dnsmasq/dhcpbogushostname.conf bogus-priv conf-file=/usr/share/dnsmasq/rfc6761.conf no-dhcp-interface=pppoe-wan dhcp-range=set:mgmt,172.22.22.21,172.22.22.21,255.255.255.252,12h dhcp-range=set:lan,172.22.20.100,172.22.20.249,255.255.255.0,12h dhcp-range=set:home,172.20.20.100,172.20.20.249,255.255.254.0,12h
_______________________________________________ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss