[Dnsmasq-discuss] Linux IP Address Labels Confusing Dnsmasq

Nicolas Cavallari Nicolas.Cavallari at green-communications.fr
Mon Nov 16 08:35:39 UTC 2026


Le 16/11/2026 à 04:54, Alasdair Muckart via Dnsmasq-discuss a écrit :
> Greetings,
> 
> 
> Does dnsmasq understand IP address labels on Linux?
> 
> 
> I'm having an issue where I have some servers that need address labels for other 
> parts of the config, but the labels seem to be confusing dnsmasq.
> 
> 
> Say I have an interface `br0` whose IP address has the label `my_lan_gw` 
> (everything here is IPv4 only, so there's no IPv6 link-local address).
> 
> 
> The output of 'ip link show dev br0' looks like this:
> 
> --- cut ---
> 
> 10: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group 
> 200 qlen 1000
> 
>      link/ether 02:ca:a5:e6:e8:23 brd ff:ff:ff:ff:ff:ff
> 
>      inet 192.168.152.1/24 brd 192.168.152.255 scope global my_lan_gw
> 
>         valid_lft forever preferred_lft forever
> 
> --- cut ---
> 
> 
> The problem I have is if I set 'interface=br0' in my interface configuration 
> dnsmasq will start but then complain it is receiving DHCP requests on br0 which 
> has no ip address.

dnsmasq uses SIOCGIFADDR to find out if an interface have an address. That thing 
will not work with address labels. Try adding a dummy address next to it without 
a label as a workaround ? Like 127.0.0.10/32.

> If I set 'interface=my_lan_gw' it complains the interface doesn't exist.
> 
> 
> Similarly if I set 'no-dhcp-interface=' to an interface name that has an IP 
> address with a label dnsmasq doesn't seem to complain, it simply doesn't bind to 
> that address at all.
> 
> 
> The interfaces portion of my configuration looks like this:
> 
> --- cut ---
> 
> bind-interfaces
> 
> except-interface=lo
> 
> interface=br0
> 
> interface=router-lo
> 
> no-dhcp-interface=wwan0
> 
> no-dhcp-interface=sfp1
> 
> --- cut ---
> 
> 
> My intent with this config is that I should have DHCP+DNS on interfaces br0 and 
> router-lo, and DNS but no DHCP on wwan0 and sfp1. Systemd-resolved provides 
> local resolution on the device, so I'm not binding all interfaces.
> 
> Unfortunately just deleting the IP address labels isn't an option because they 
> are required for other parts of the device's configuration.
> 
> 
> Using 'bind-address' instead of 'interface=' might work, but I can't see a 
> numeric equivalent of 'no-dhcp-interface='
> 
> 
> Can anyone give me pointers as to a way around this that doesn't involve 
> removing the IP address labels?



More information about the Dnsmasq-discuss mailing list