[Dnsmasq-discuss] dhcp doesn't work with dnsmasq in multi ip environment

Kolmann Philipp kolmann at zid.tuwien.ac.at
Tue Aug 9 08:23:15 BST 2016

I have checked the isc-dhcpd man page and found there a switch for dhcp-server-identifier. I have tested my power-socket with isc-dhcpd with the following setup:

shared-network eth1 {
  subnet netmask {

  subnet netmask {

host fh-tuck-1p {
  hardware ethernet 00:19:32:00:8f:90;
  option host-name "fh-tuck-1p";
  option dhcp-server-identifier;

Now I see in the DHCP-ACK Message the source-ip of the packet and the server identifier both set to

I suspect, that the power-socket dhcp client has a problem, if the packet source ip and the server-identifier are not set the same.

Would it be possible to set the packet-source ip and server-identifier to the same ip address?


-----Ursprüngliche Nachricht-----
Von: Kolmann Philipp 
Gesendet: Dienstag, 09. August 2016 09:05
An: 'Simon Kelley' <simon at thekelleys.org.uk>; dnsmasq-discuss at lists.thekelleys.org.uk
Betreff: AW: [Dnsmasq-discuss] dhcp doesn't work with dnsmasq in multi ip environment

Hi Simon,

thanks for your answer. The Default Gateway ( and the are on the same interface of one linux server. Strangely if I use isc-dhcp-server, it works, but with dnsmasq it doesn't work. That are the two wireshark protocols I attached to my first mail.

The only difference I could spot, was that with isc-dhcpd the server-identifier is set to the same IP as the source address of the package and with dnsmasq I see that the DHCP ACK Package comes from the primary interface address ( and the server-identifier is set to the Gateway IP (

So I was wondering, if I could specify the server-identifier via config file?


-----Ursprüngliche Nachricht-----
Von: Dnsmasq-discuss [mailto:dnsmasq-discuss-bounces at lists.thekelleys.org.uk] Im Auftrag von Simon Kelley
Gesendet: Freitag, 05. August 2016 17:35
An: dnsmasq-discuss at lists.thekelleys.org.uk
Betreff: Re: [Dnsmasq-discuss] dhcp doesn't work with dnsmasq in multi ip environment

Hash: SHA256

The DHCP client, once it establishes contact with the DHCP server will
need to be able to send packet to the address in the DHCP-identifier
option. This implies that once the client is set up and has an IP
address and default route, it can talk to the server-identifier
address (ie Is that the case? If not that would explain
what you're seeing.



On 04/08/16 08:45, Philipp Kolmann wrote:
> Hi,
> I have a special setup with two IP Subnets on one Interface:
> 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
> pfifo_fast state UP group default qlen 1000 inet
> brd scope global eth1 valid_lft forever preferred_lft
> forever inet brd scope global eth1:0 
> valid_lft forever preferred_lft forever
> primary IP is, secondary is
> I now want to use dnsmasq to supply clients identified by MAC
> Address an IP address in the secondary range:
> interface=eth1 dhcp-range = set:power,, static,
> dhcp-host = set:power, 00:19:32:00:8f:90, fh-tuck-1p,
>,12h dhcp-option = tag:power, option:ntp-server,
> dhcp-option = tag:power, option:dns-server,
> dhcp-option = tag:power, option:router,
> My issue is now, that the Network-enabled power distribution unit
> (GUDE EXPERT POWER CONTROL NET D4X 1200) seems to have an issue if
> dnsmasq is providing an IP address from the secondary range. If I
> turn primary and secondary IP, it works.
> I have now also tested with ISC DHCP server and there the PDU
> accepts the IP Address. The only difference that i found is the
> following:
> The Source IP of the packets is the primary of the interface:
> in ISC DHCP the option 54 IP (DHCP Server Identifier) is the
> primary,
> in dnsmasq the option 54 IP is the secondary:
> It seems that this is a discrepancy and therefore the PDU doesn't
> accept the IP address, since the IP source and the DHCP Server
> Identifier do not match.
> Find attached the wireshark logs.
> I tried to set
> dhcp-option = tag:power, 54,
> but this option is not used for the packet.
> Any help is appriciated. Thanks Philipp
> _______________________________________________ Dnsmasq-discuss
> mailing list Dnsmasq-discuss at lists.thekelleys.org.uk 
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Version: GnuPG v2.0.22 (GNU/Linux)


Dnsmasq-discuss mailing list
Dnsmasq-discuss at lists.thekelleys.org.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: isc-dhcp-ack-with-server-identifier.pcapng.pcap
Type: application/octet-stream
Size: 1456 bytes
Desc: isc-dhcp-ack-with-server-identifier.pcapng.pcap
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20160809/af5943fd/attachment.obj>

More information about the Dnsmasq-discuss mailing list