On 09/02/14 07:25, Kiazada Dany-GVN438 wrote:
Hi,

I’m using the program as a DHCP server for a Linux machine. The server
needs to toggle between two different subnets, with different GW (on the
same interface – ‘br0’), and assign an IP for a windows PC.

So for example upon power up the DHCP will assign an IP to the PC
(connected via Ethernet), with subnet ‘A’.

After a while, the DHCP will need to assign a different IP, on a
different subnet ‘B’.
The way I implemented it is running dnsmasq on the Linux machine :

  -C /etc/dnsmasq.conf/sbin/dnsmasq -d --clear-on-rel

With The following  dnsmask.conf file (subnet ‘A’) :

dhcp-range=27.187.20.14,27.187.20.14,255.255.255.0,3600

interface=br0

dhcp-option=3,27.187.20.1

dhcp-option=6,27.187.20.1

dhcp-leasefile=/etc/dnsmasq.leases

dhcp-lease-max=253

log-dhcp

After I receive an indication to change the subnet, I kill the dnsmasq
server, and run it again the same way only with the second subnet ‘B’.
I noticed that the dnsmasq.leases is empty, and there are no connected
clients after the second power up. The PC is sending DHCPINFORM messages
(with no response) and

In order to have the PC ask for a new IP, I cut the power to the
Ethernet Iface. This causing the PC to send DHCPREQUEST messages (with
no DISCOVER messages before).
The dnsmasq is not responding to the REQUEST messages although it’s a
broadcast message, and I can see at tcpdump that they arrive to the
Linux machine…

I can see in the app logs that the dnsmask is receiving the INFORM
messages, but I cannot see the REQUEST messages (in the app logs).

The thing is the PC remembers the first IP it was assigned (subnet ‘A’),
  and although the DHCP server has a different IP range configuration,
the PC is still showing the old IP.

So my goal is to have the PC assigned a new IP (without any PC
involvement, meaning no ipconfig renew\release commands). from a
different pool, different subnet and GW, after the dnsmasq is restarted.


Try adding

dhcp-authoritative

to your configuration.


Cheers,

Simon.



_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to