ipconfig /release tells the DHCP server you're giving up your current IP address and removes it from the adapter; ipconfig /renew then asks the DHCP server for an address again. Run them one after the other in Command Prompt to get a fresh IP configuration when a Windows PC has no network access or a wrong address.
ipconfig /release
ipconfig /renew
If Windows refuses with an elevation or access error, open Command Prompt as administrator (Start, type cmd, press Ctrl+Shift+Enter) and run them again.
What /release and /renew actually do
Most devices get their IP address, subnet mask, gateway and DNS servers from a DHCP server, which on a home network is your router. The address is a lease with an expiry time. If you're new to that process, what is DHCP explains it step by step.
| Command | What it does (per Microsoft's reference) |
|---|---|
ipconfig /release | Sends a DHCPRELEASE message to the DHCP server and discards the IPv4 configuration, for all adapters or the one you name. The adapter has no IPv4 address afterwards. |
ipconfig /renew | Renews the DHCP configuration for all adapters or the one you name. Only works on adapters set to obtain an address automatically. |
ipconfig /release6, /renew6 | The same for IPv6 addresses from a DHCPv6 server. |
ipconfig /flushdns | Clears the DNS resolver cache. Unrelated to IP addresses, but often run alongside. |
Your PC renews its lease on its own anyway. RFC 2131, the DHCP standard, sets the default renewal time (T1) at half the lease duration, so on a 24-hour lease the client starts renewing after about 12 hours. The manual commands are for when you don't want to wait or the automatic process has gone wrong.
When release and renew helps
- You have a 169.254.x.x address. That's a link-local address Windows assigns itself when no DHCP server answered (see below). Renewing once the router is reachable again fixes it.
- You moved networks without the address updating, for example from a docking station to Wi-Fi, or the router was restarted or replaced.
- The router's DHCP settings changed: a new address range, a reservation for your PC, or new DNS servers you want to pick up now.
- An IP address conflict, where two devices on the network ended up with the same address.
It won't help with a slow connection, a DNS-only problem (try flushing the DNS cache), or anything upstream of your router.
Check what you have first: ipconfig /all
ipconfig /all
Look at the section for the adapter you use (for example Wireless LAN adapter Wi-Fi) and these lines:
DHCP Enabled: must sayYes, or /renew has nothing to do.IPv4 Address: a 169.254.x.x value here means DHCP failed.Lease ObtainedandLease Expires: when the current lease started and ends.DHCP Server: the address of the server that gave you the lease, usually your router.
Run ipconfig /all again after renewing to confirm that Lease Obtained shows the current time.
Release and renew only one adapter
Without an adapter name, both commands act on every adapter bound to TCP/IP. A typical laptop has more of those than you'd think. Example output from Get-NetAdapter in PowerShell on a Windows 11 laptop:
Name InterfaceDescription Status
---- -------------------- ------
Wi-Fi Intel(R) Wi-Fi 6 AX203 Up
Ethernet Intel(R) Ethernet Connection (23) I219-V Disconnected
Ethernet 2 VirtualBox Host-Only Ethernet Adapter Up
OpenVPN TAP-Windows6 TAP-Windows Adapter V9 Disconnected
Bluetooth Network Connection Bluetooth Device (Personal Area Network) Disconnected
Releasing everything also drops VPN and virtual-machine adapters. To act on one adapter, give its name exactly as ipconfig shows it, in quotes if it contains a space:
ipconfig /release "Wi-Fi"
ipconfig /renew "Wi-Fi"
Wildcards work too. The built-in help (ipconfig /?) gives these examples:
ipconfig /renew EL* ... renew any connection that has its name starting with EL
ipconfig /release *Con* ... release all matching connections
Running both commands safely
Between the two commands you have no IPv4 address, so you're offline. On your own PC that's harmless. Over Remote Desktop, SSH or any remote tool, /release cuts the connection before you can type /renew. If you must do it remotely, put both on one line so they run without you:
ipconfig /release && ipconfig /renew
In Command Prompt, && runs the second command only if the first succeeded; use a single & to run it regardless. Even then, if the renew fails, you'll need someone at the machine. A reboot also requests a new lease.
What a 169.254.x.x address means
If ipconfig shows an IPv4 address starting with 169.254, no DHCP server answered and Windows gave itself a link-local address. Microsoft calls this Automatic Private IP Addressing (APIPA); the mechanism is standardised in RFC 3927, which reserves 169.254.1.0 to 169.254.254.255 for it. Such an address works only for talking to other devices on the same local link, not the internet.
When ipconfig /renew keeps ending with a 169.254 address, the problem is between you and the DHCP server, not in Windows:
- Check the cable or Wi-Fi connection. A disconnected adapter can't renew at all.
- Restart the router, which also restarts its DHCP server.
- Check whether other devices get addresses. If none do, the router's DHCP server is off or its address pool is full.
- Check that the adapter isn't set to a static address:
DHCP Enabledmust beYes.
The equivalent on macOS and Linux
macOS has its own ipconfig command with different syntax, so the Windows switches don't apply. Apple's documented way is in the GUI: Apple menu > System Settings > Network, choose the service (for example Wi-Fi), click Details, then TCP/IP, and choose Renew DHCP Lease. That option appears only when the service uses DHCP.
On Linux it depends on which program manages the network:
- systemd-networkd:
sudo networkctl renew eth0, which the man page describes as renewing "dynamic configurations e.g. addresses received from DHCP server". - ISC dhclient (older Debian and Ubuntu setups):
sudo dhclient -r eth0releases the lease and stops the client, thensudo dhclient eth0requests a new one. - NetworkManager (most desktops):
nmcli device down wlan0and thennmcli device up wlan0disconnects and reconnects the device; for a connection set to automatic (DHCP) addressing, reconnecting requests an address again.
Replace eth0 or wlan0 with your interface name from ip link.
If it still fails
Note the exact message ipconfig /renew prints and which adapter it names; a timeout means no DHCP server replied, while a message saying the media is disconnected means the adapter has no link at all. If the address is fine but some sites still don't load, the issue is more likely DNS: see how to change your DNS server on Windows. If your address is in a private range like 192.168.x.x, that's normal; public vs private IP addresses explains why.
Frequently asked questions
- Will ipconfig /release and /renew change my public IP address?
- Usually not. On a home network the commands talk to your router, which hands out private addresses such as 192.168.1.x. Your public IP belongs to the router's connection to your ISP, so it stays the same. To get a new public address you would have to make the router itself request a new lease from the ISP, which depends on the ISP and often doesn't work.
- Is it safe to run ipconfig /release?
- It is safe in the sense that nothing is permanently changed, but it disconnects you until you run ipconfig /renew. Don't run it on a remote machine you reach over Remote Desktop or SSH, because the connection drops and you can't send the renew command. Without an adapter name it also releases every DHCP adapter, including VPN adapters.
- Do I need ipconfig /flushdns as well?
- Only for name-resolution problems. /release and /renew fix the IP address; /flushdns clears cached DNS answers. If websites fail to load by name but your IP configuration looks right, flushing DNS is the more likely fix. Running both does no harm.
- What does ipconfig /renew do if I have a static IP address?
- Nothing useful. Microsoft's documentation says /renew is available only on adapters configured to obtain an IP address automatically. An adapter with a manually set address doesn't use DHCP, so there is no lease to renew; change the address in the adapter's IP settings instead.