lease files
leases file is both written and read by dhclient
The client will try to use an existing lease from /var/db/dhclient.leases.xxx
Have you actually looked at the file and its manpage dhclient.leases(5)?If I change network, is dhclient able to over-write the file /var/db/dhclient.leases.xxx updating the info inside it and connecting the machine to the new network ?
The Internet Software Consortium DHCP client keeps a persistent database
of leases that it has acquired that are still valid. The database is a
free-form ASCII file containing one valid declaration per lease. If more
than one declaration appears for a given lease, the last one in the file
is used. The file is written as a log, so this is not an unusual
occurrence.
dhclient(8):Please, can you tell me which files are updated using dhclient ?
In order to keep track of leases across system reboots and server
restarts, dhclient keeps a list of leases it has been assigned in the
/var/db/dhclient.leases.IFNAME file.
Reading the manpages of the tools/files you want to understand. If this doesn't answer all your questions, go through the other manpages and RFCs mentioned in the "SEE ALSO" section.Or .... what can I do ?
The very first 4 sentences in the description already answer your question
If you change to another network dhclient will first try to use the old lease but the DHCP server in the new network will reject the request to use the old lease and the negotiation returns to the state where the client has no lease.