diff --git a/internal/app/machined/pkg/controllers/network/operator/dhcp4.go b/internal/app/machined/pkg/controllers/network/operator/dhcp4.go index ba26fc536b..634db0e04d 100644 --- a/internal/app/machined/pkg/controllers/network/operator/dhcp4.go +++ b/internal/app/machined/pkg/controllers/network/operator/dhcp4.go @@ -539,6 +539,14 @@ func (d *DHCP4) requestRenew(ctx context.Context, hostname network.HostnameStatu case d.lease != nil && d.lease.Offer != nil: d.logger.Debug("DHCP REQUEST FROM OFFER", zap.String("link", d.linkName)) d.lease, err = client.RequestFromOffer(ctx, d.lease.Offer, mods...) + case len(d.AddressSpecs()) >= 1: + d.logger.Debug("DHCP REQUEST WITH PREVIOUS IP", zap.String("link", d.linkName)) + + var firstIPAddress net.IP = d.AddressSpecs()[0].Address.Addr().AsSlice() + + d.lease, err = client.Request(ctx, dhcpv4.PrependModifiers(mods, + dhcpv4.WithOption(dhcpv4.OptRequestedIPAddress(firstIPAddress)), + )...) default: d.logger.Debug("DHCP REQUEST", zap.String("link", d.linkName)) d.lease, err = client.Request(ctx, mods...)