Subject: nic hotplug ip renewal

From: daggs <[email-masked]>
Date: Fri, 22 Nov 2024 08:59:14 +0100

Greetings,

I have this interface file:
auto lo
iface lo inet loopback

allow-hotplug vnet0
iface vnet0 inet dhcp

when vnet0 get visible, there is no ip assignment, so I wrote a script that tries to run ifup on the adapter and when it success, it bails out.
thing is, after the lease time is over (~10 hours of lease), the nic looses the ip, how can I configure the lease to be renewed when needed?
I'm using openrc and eudev on alpine 3.20.x

---

From: Natanael Copa <[email-masked]>
Date: Fri, 22 Nov 2024 11:19:39 +0100

On Fri, 22 Nov 2024 08:59:14 +0100

> I'm using openrc and eudev on alpine 3.20.x

I think for this the simplest solution would be to use dhcpcd. Let
interfaces file only have lo interface and

  apk add dhcpcd && rc-update add dhcpcd boot

-nc

---

From: daggs <[email-masked]>
Date: Fri, 22 Nov 2024 13:00:41 +0100

Greetings Natanael,

> Sent: Friday, November 22, 2024 at 12:19 PM
> From: "Natanael Copa" <[email-masked]>
> To: "daggs" <[email-masked]>
> Cc: ~alpine/[email-masked]
> Subject: Re: nic hotplug ip renewal
>

Didn't thought of adding dhcpcd as boot service, will try it.

Thanks,

Dagg