First decide which address you want to change. Your local (private) IP is your device's address on your home or office network. Your public IP is the one websites see. They're changed in different ways. Not sure which is which? See Public vs private IP.
Get a new local IP: renew your DHCP lease
If your device is set to get an IP address automatically, it gets it with DHCP (Dynamic Host Configuration Protocol) (Apple Support; Microsoft Support). With DHCP's dynamic allocation, an address that a client no longer needs can be reused automatically (RFC 2131). A device may give up its address (its lease) by sending a DHCPRELEASE message to the DHCP server (RFC 2131). Then it asks for an address again.
Releasing is optional. DHCP works correctly even if a device never sends a release (RFC 2131).
Windows
Open Command Prompt and run:
ipconfig /release
ipconfig /renew
/release sends a DHCPRELEASE message to the DHCP server and discards the adapter's IP configuration. /renew renews the DHCP configuration, but only works on adapters set to obtain an IP address automatically (Microsoft Learn). For IPv6 addresses handed out by DHCPv6, use ipconfig /release6 and ipconfig /renew6 (Microsoft Learn).
Watch out: between /release and /renew, TCP/IP is disabled on the adapter, so you're offline (Microsoft Learn). Run both commands on the computer itself, not over a remote connection.
Mac
If your Mac gets its address with DHCP, you can force it to renew. Apple notes this can also fix some connection problems (Apple Support).
- Open Apple menu → System Settings → Network.
- Click the network service that needs a new address, then click Details.
- Click TCP/IP, then Renew DHCP Lease.
- Click OK.
Linux (NetworkManager)
On distributions that use NetworkManager, take the connection down and bring it back up:
nmcli connection show # list connection names
nmcli connection down "Home Wi-Fi"
nmcli connection up "Home Wi-Fi"
nmcli connection down deactivates a connection, and nmcli connection up activates one by its name, UUID or D-Bus path (nmcli manual). Replace Home Wi-Fi with your connection's name.
iPhone and Android
We didn't find official instructions for renewing a lease on phones. On Android you can forget a saved Wi‑Fi network and join it again: Settings → Network & internet → Internet, touch and hold the network, then tap Forget (Android Help). Android's help doesn't say this gives you a different address, so don't count on it.
Why you often get the same address back
Renewing or restarting often gives you the same IP back, by design. When a device asks for an address, a DHCP server SHOULD offer the device's current address first. If there isn't one, it SHOULD offer the device's previous address, if it's still free. Only after that does it pick a new one (RFC 2131, §4.3.1). A device can also ask to reuse an address it remembers (RFC 2131, §3.2).
The same applies one level up. If your internet provider gives your router its public address with DHCP, restarting the router follows the same rule (RFC 2131), so you will often get the same public IP back.
Choose a specific local IP
If you want a particular local address rather than just a different one, you can set it manually. Microsoft recommends DHCP because it makes TCP/IP settings easier to manage (Microsoft Support), so only do this if you need to.
Windows (Microsoft Support):
- Open Settings → Network & internet, then Wi‑Fi → Manage known networks (pick the network) or Ethernet.
- Next to IP assignment, select Edit.
- Choose Manual and turn on IPv4.
- Fill in IP address, Subnet mask and Gateway, then select Save.
To go back, choose Automatic (DHCP) in the same place.
Mac (Apple Support): in System Settings → Network → (your service) → Details → TCP/IP, set Configure IPv4 to Manually, then enter the IP address (and subnet mask and router, if you were given them).
Tip: if you set an address by hand, make sure no other device uses that address. Another option is a DHCP reservation in your router: in DHCP's “manual allocation”, the administrator chooses a client's address and DHCP delivers it to that client (RFC 2131, §1). See Static vs dynamic IP.
Change the public IP websites see
If your router uses NAT (Network Address Translation) to swap your device's private address for its own public one (RFC 3022), renewing your device's lease doesn't change the public IP websites see. To show websites a different address, send your traffic through something else:
- VPN — the site you connect to sees the VPN's IP address as the source of your traffic, not your own, and you can use an IP from a different location (Mozilla).
- Tor Browser — sites see a connection coming from the Tor network instead of your real IP address (Tor Project).
- iCloud Private Relay — part of an iCloud+ subscription, it covers browsing in Safari (Apple Support). A second relay, run by a third-party provider, gives you a temporary IP address and connects you to the site. Your real IP is still visible to your network provider and to the first relay, which Apple runs. It isn't available in all countries or regions, and some sites may ask for extra steps to sign in (Apple Support).
- Ask your provider — if you need a new or fixed public IP, ask your internet provider what it offers.
For what each option does and doesn't hide, see What does my IP address reveal?
IPv6: temporary addresses change by themselves
If you have IPv6, your device may already change its address regularly. Temporary addresses are made by adding a random part (the interface ID) to the prefix your network handed out (RFC 8981). So the prefix from your provider stays the same, and only the last part changes.
- By default, a temporary address is preferred for one day and valid for two days (RFC 8981).
- When one stops being preferred, a new one is generated. The old one can keep serving connections that are already open but isn't used for new ones (RFC 8981).
- Joining a different network replaces the temporary addresses, and devices must let you turn them on or off (RFC 8981).
On Linux, list your temporary IPv6 addresses with (ip-address(8)):
ip -6 address show temporary
Check that it worked
Reload forgotmyip.com and check both the IPv4 and IPv6 lines, since a change may affect only one of them. From a terminal:
curl https://forgotmyip.com
More options: Get your IP from the command line. To see your local address instead, follow How to find your IP address.