Score:1

Release DHCP lease on Ubuntu Server 22.04

us flag

How can I send a DHCP release packet for an address acquired by netplan? I have configured dhcp for IPv4 in the installer (/etc/netplan/00-installer-config.yaml). I've tried dhclient -r -v <interface>, but it didn't seem to work. [The reaseon is that I can only get three DHCP leases from my ISP, and want to use it for something else now(rather than wait 2 days to expire)]

waltinator avatar
it flag
Since the association between your IP address and the timeout is kept on the DHCP **server**, you, on the client, cannot affect it. You can place a firewall on a cheap system, e.g. Raspberry Pi, between your ISP and your local network. The RPi will get ONE IP address from the ISP, and can act as a DHCP server for your LAN, and the RPi will do NAT (Network Address Translation).
Marius Bjørnstad avatar
us flag
To clarify I want to send DHCPRELEASE (https://datatracker.ietf.org/doc/html/rfc2131#section-3.1) "Client to server relinquishing network address and cancelling remaining lease.". Thanks for the suggestion of using NAT, and indeed I do use that for most hosts. OTOH it's nice to have some external IPs to isloate some hosts outside of my LAN and also not have to mess with port forwarding.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.