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
On Fri, 22 Nov 2024 08:59:14 +0100
daggs <daggs@gmx.com> wrote:
> 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
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
Greetings Natanael,
> Sent: Friday, November 22, 2024 at 12:19 PM> From: "Natanael Copa" <ncopa@alpinelinux.org>> To: "daggs" <daggs@gmx.com>> Cc: ~alpine/users@lists.alpinelinux.org> Subject: Re: nic hotplug ip renewal>> On Fri, 22 Nov 2024 08:59:14 +0100> daggs <daggs@gmx.com> wrote:>> > 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>> 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>
Didn't thought of adding dhcpcd as boot service, will try it.
Thanks,
Dagg