Received: from ncopa-desktop.lan (unknown [IPv6:2001:4646:fb05:0:d6ce:f822:ef3b:f9a5]) (Authenticated sender: ncopa@alpinelinux.org) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPSA id 672E0225B7D; Fri, 22 Nov 2024 10:19:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alpinelinux.org; s=smtp; t=1732270783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cdt06pf8nbAD1T8bo4wWZdmi4ANl9ybflxJzHRKqCBU=; b=WQc5LPeqhvR/ocK1UcmqQK608ZN88XviaCcWFeGj0hceRifu+5jzpE/FB1fnlB4hdOjDWH JwRqFs/u2HzABloyyYJsZBmfq8+TjIH+vXu5Pe7leRjVx8gxsGRXWqD9h9ySMBIgIAU8rg 2iW3++RKACOVoO5wrI7nGTjhHBBb8lI= Date: Fri, 22 Nov 2024 11:19:39 +0100 From: Natanael Copa To: daggs Cc: ~alpine/users@lists.alpinelinux.org Subject: Re: nic hotplug ip renewal Message-ID: <20241122111939.4342e7fb@ncopa-desktop.lan> In-Reply-To: References: X-Mailer: Claws Mail 4.3.0 (GTK 3.24.43; x86_64-alpine-linux-musl) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 22 Nov 2024 08:59:14 +0100 daggs 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