Linux: Release and Renew a DHCP Lease
A dhclient-managed host kept an old lease. Inspect the live configuration, release the lease, request a new one, and verify. Work through it yourself in the live host terminal below.
Symptom
A dhclient-managed host kept an old lease. Inspect the live configuration, release the lease, request a new one, and verify.
Your mission
Inspect, recover, then verify
Format
Linux shell
Investigate before you configure.
Use the CLI evidence to isolate the fault, make the smallest safe correction, then verify the network state changed.
Observe the symptom and link state.
Diagnose by comparing the protocol evidence.
Verify the expected device state and confirm the original symptom is resolved.
Console access: Linux
This workspace stacks for portrait phones. Rotate to landscape for the full split-screen console.
Need a hint?
Reveal the root cause when you're ready.
Try the investigation first, then use this as your escape hatch, not a dead end.
Lab debrief
Turn the session into a repeatable troubleshooting pattern.
Use this reference after your attempt: first explain the symptom, then verify the evidence, then confirm the repair.
The problem
Ethernet enp0s3 still has 192.168.40.87/24 after moving to a LAN that leases 10.20.30.0/24.
What you'll practice
- Read live addresses and routes before changing them
- Release a lease with dhclient -r
- Request a current lease with dhclient
- Scope both operations to one interface
- Verify the new address and gateway
The topology
One Ubuntu host uses ISC dhclient on enp0s3 and receives its IPv4 address, route, and DNS configuration from DHCP.
Commands to run yourself
The real diagnostic commands for this lab, copy-paste ready. Run these in the same order to reproduce the investigation on your own session.
ip -4 address show dev enp0s3ip route showTopology diagram
Fact-checked references
The commands and behaviour in this lab were checked against these primary references.
Frequently asked
Is dhclient installed on every Linux system?
No. Modern distributions may use NetworkManager's internal DHCP client, systemd-networkd, dhcpcd, or another client. Identify the network manager before choosing a lease command.
Should I release a lease over SSH?
Usually not. Releasing the address on the interface carrying your SSH session can disconnect you before you can renew it. Use a local console or an independent management path.
Ready to run this lab yourself?
No setup, no image sourcing. Book a session or ask for a live demo.