Why you might want to change your IP address

Your IP address is how your device identifies itself on your network and the internet. Changing it can solve connection problems, help you test network setups, or let you move a device to a different part of your network without conflicts. Most of the time your router assigns addresses automatically, but sometimes you need to set one manually or request a new one from your internet provider.

The method depends on whether you want to change your local IP address (the one your router assigns inside your home network) or your public IP address (the one your internet provider assigns to your whole household). Local changes happen on your device. Public changes happen at your router or with your provider.

Key Takeaways

  • Local IP addresses are set in your device's network settings; public IP addresses are assigned by your internet provider and changed at the router level.
  • On Windows, go to Settings > Network & Internet > WiFi or Ethernet, select your connection, and choose "Edit" to set a static IP address.
  • On Mac, open System Settings > Network, select your connection, click "Details", and enter a static IP in the TCP/IP tab.
  • On Linux, edit your network configuration file or use the GUI tool depending on your distribution, then restart the network service.
  • To get a new public IP address, restart your modem and wait 2 to 5 minutes, or contact your provider if the address does not change.

Changing your local IP address on Windows

Open Settings and go to Network & Internet. If you are on WiFi, click WiFi and then the name of your network. If you are wired, click Ethernet and then your connection name. Scroll down and click Edit next to "IP assignment".

A window will open showing your current settings. Click the dropdown that says Automatic (DHCP) and change it to Manual. Toggle on IPv4 if it is not already on. Enter your new IP address in the first field — it should start with the same numbers as your router (usually 192.168.1.x or 192.168.0.x, where x is a number between 2 and 254). Enter your subnet mask (usually 255.255.255.0) and gateway (usually your router's address, like 192.168.1.1). Click Save.

Your device will disconnect and reconnect with the new address. If you cannot reach the internet, go back and check that the gateway matches your router's IP address — you can find this by opening Command Prompt and typing ipconfig, then looking for "Default Gateway".

Changing your local IP address on Mac

Open System Settings and click Network in the sidebar. Select the connection you want to change (WiFi or Ethernet) and click Details. Go to the TCP/IP tab.

Click the dropdown next to "Configure IPv4" and change it from Automatic (DHCP) to Manual. Enter your new IP address, subnet mask, and router address in the fields provided. The format is the same as Windows — your IP should be on the same subnet as your router, and your router address is usually 192.168.1.1 or 192.168.0.1. Click OK and then explore.

Your connection will drop briefly and reconnect. If you lose internet access, return to the TCP/IP tab and verify that the router address matches what you see when you open Terminal and type netstat -nr | grep default.

Changing your local IP address on Linux

The method varies by distribution. On Ubuntu and Debian systems using netplan, open a terminal and edit your network configuration file with sudo nano /etc/netplan/01-netcfg.yaml (the filename may differ). Find your interface name (usually eth0 for wired or wlan0 for WiFi) and change the configuration from dhcp4: true to dhcp4: false. Add your static IP, subnet mask, and gateway like this:

addresses: [192.168.1.50/24] gateway4: 192.168.1.1 nameservers:   addresses: [8.8.8.8, 8.8.4.4]

Save the file and run sudo netplan explore. On systems using /etc/network/interfaces instead, edit that file directly and add the same information under your interface, then run sudo systemctl restart networking. If you are unsure which system you have, type ls /etc/netplan — if it returns a file, you use netplan.

Getting a new public IP address from your internet provider

Your public IP address comes from your internet provider and is assigned to your modem. To get a new one, unplug your modem's power cable, wait 2 to 5 minutes, and plug it back in. The modem will restart and request a new address from your provider — this usually takes 1 to 3 minutes. You can check your public IP by opening a web browser and searching "what is my IP".

If the address does not change after restarting, contact your internet provider's support line. Some providers assign the same address to your account for months or years, and changing it requires a manual request. Others rotate addresses automatically but may not do so when ready. Your provider can tell you whether a change is possible and how long it takes.

Do not try to change your public IP by changing settings on your computer — that will not work. The public IP is assigned at the modem level, before any device on your network sees it.

When to use static vs. automatic IP addresses

Use a static IP address (one you set manually) when you need a device to always have the same address. This is useful for printers, network storage, security cameras, or computers you access remotely — if the address changes, the connection breaks. It is also useful for testing network problems, because you can rule out address conflicts.

Use automatic (DHCP) for most devices like laptops and phones that move between networks or connect and disconnect frequently. The router handles address assignment automatically, and you do not have to think about conflicts. If you set a static address, make sure it is outside the range your router uses for automatic assignment — most routers use 192.168.1.100 to 192.168.1.254, so pick something like 192.168.1.50 to be safe.

Troubleshooting after changing your IP address

If you lose internet access after setting a static IP, the most common cause is a wrong gateway address. Open your router's admin page (usually 192.168.1.1 or 192.168.0.1 in a web browser) and check what address it shows for itself. Make sure your device's gateway setting matches exactly. The second most common cause is picking an IP address that your router is already using for another device — check your router's DHCP client list to see what addresses are in use.

If you set a static address and later want to go back to automatic, reverse the process: on Windows, change "Manual" back to "Automatic (DHCP)". On Mac, change "Manual" back to "Automatic (DHCP)". On Linux, change dhcp4: false back to dhcp4: true and run the explore or restart command again. Your device will request an address from the router and reconnect within a few seconds.

Frequently Asked Questions

Will changing my IP address affect my internet speed?

No. Your IP address is just an identifier — changing it does not affect how fast data moves through your connection. If you are troubleshooting slow speeds, changing your IP address will not help. The problem is usually your router placement, WiFi interference, or your provider's network.

Can I pick any IP address I want?

For local addresses, no. You must pick one on the same subnet as your router and outside the range your router uses for automatic assignment. For public addresses, no — your internet provider assigns them. You can request a new one by restarting your modem, but you cannot choose which address you get.

What happens if two devices have the same IP address?

Both devices will have connection problems — they will not be able to reach the network reliably because the router will not know which device to send data to. This is called an IP conflict. If this happens, change one device's address to something unused, or switch it back to automatic (DHCP) and let the router assign a new one.

Do I need to change my IP address for security?

Changing your local IP address does not improve security — it is only visible inside your home network. Changing your public IP address also does not improve security on its own. Security comes from your router's firewall, strong WiFi passwords, and keeping devices updated. Changing your IP address is a troubleshooting step, not a security measure.

Why does my device keep getting a different IP address?

Your router is assigning addresses automatically (DHCP mode). This is normal and usually fine. If you need the address to stay the same, set a static IP address manually. If you want automatic assignment but the address keeps changing too often, check your router's DHCP lease time setting — increasing it from 24 hours to several days or longer will make addresses stick around longer.