[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: goose DHCP clients to new address Was: DHCP Problem



On Sun, Dec 3, 2023 at 4:51 PM Charles Curley
<charlescurley@charlescurley.com> wrote:
>
> On Sun, 3 Dec 2023 22:14:51 +0100
> Geert Stappers <stappers@stappers.nl> wrote:
>
> > I assume that the previous router is disconnected from the LAN.
>
> No. Until I solve this problem (and a few others), I will have clients
> using the old router.
>
> > The DHCProtocol has "release" for such goosing.
> > At DHCPclient do "stop DHCP", over the wire goes DHCPRELEASE [0]
> > The DHCPclient should forget ( "release" ) previous settings.
> > At DHCPclient do "start DHCP", client should get fresh config,
> > including the setting for the fresh router.
>
> I'm not sure how to do this. I did run on a client
>
> dhclient -r
> dhclient
>
> I observed no changes.
>
> The -r causes dhclient to release its lease. Invoking dhclient again
> should then obtain a new lease.

I don't know about Linux clients, but in the past, Windows clients
used to try to connect to the previous DHCP server for its lease info.
If the old DHCP server is still available (on the old router?), then
the client may be getting the lease info from the old server. To avoid
the problem, we disconnected the old server from the network.

You should probably just perform a hard cut-over. Shutdown the old
router, stand up the new router. After the hard cutover, force clients
to renew their leases (or wait until they do it on their own). And if
things go sideways, undo the change.

> > If that is already done, provide information to enable further help.
> > Such as name of the DHCP client program  and DHCP lease time.
>
> I am using whatever is standard on Debian Bullseye and Bookworm.
>
> root@hawk:/etc# pre dhc
> isc-dhcp-client 4.4.1-2.3+deb11u2               amd64
> isc-dhcp-common 4.4.1-2.3+deb11u2               amd64
> root@hawk:/etc#
>
> root@tiassa:~# pre dhc
> isc-dhcp-client 4.4.3-P1-2              amd64
> isc-dhcp-common 4.4.3-P1-2              amd64
> root@tiassa:~#
>
> The client's name is dhclient.
>
> default-lease-time 86400; # 24 hours
> max-lease-time 172800;    # 48 hours
>
> I think for the purposes of experimentation I will shorten those to
> half an hour and one hours respectively.

Jeff


Reply to: