What setting an IP address means and when you need to do it

Setting an IP address means telling your device to use a specific number for its network identity instead of letting your router assign one automatically. Most of the time, you do not need to do this — your router hands out addresses automatically and everything works. But there are situations where you need to set one manually: your printer keeps losing its network connection, you need a device to stay at the same address for remote access, or your network administrator told you to use a specific address.

Your device can get an IP address two ways. Dynamic assignment means your router gives your device a temporary address that may change. Static assignment means you set the address yourself and it stays the same until you change it. A static address is useful when other devices on your network need to find yours reliably — like when you want to access your computer remotely or when a printer needs to stay reachable.

Before you start, write down three pieces of information from your router or network administrator: your desired IP address, your subnet mask (usually 255.255.255.0), and your gateway address (usually your router's address, like 192.168.1.1). If you do not have these, ask your network administrator or check your router's manual.

Key Takeaways

  • Static IP addresses stay the same until you change them, while dynamic addresses may change when your device reconnects to the network.
  • You need your subnet mask and gateway address from your router or network administrator before you start the process.
  • The steps differ significantly between Windows, Mac, and Linux, so follow the instructions for your specific operating system.
  • After setting a static IP address, restart your device and test your internet connection to make sure everything works.
  • If you set an address that conflicts with another device on your network, you will lose internet access and need to change it.

Setting a static IP address on Windows 10 and Windows 11

Open the Settings app by pressing the Windows key and typing "Settings", then press Enter. Click on "Network & Internet" in the left sidebar, then select "Ethernet" if you are using a wired connection or "Wi-Fi" if you are wireless. If you use Ethernet, you will see your connection listed — click on it. If you use Wi-Fi, click on your network name.

Look for a button or link that says "Edit" or "IP settings" and click it. A window will open showing your current network settings. Find the dropdown that currently says "Automatic (DHCP)" and change it to "Manual". Toggle on the IPv4 switch if it is not already on. Now you can type in your IP address, subnet mask, and gateway address in the fields that appear. Type your preferred DNS address (8.8.8.8 and 8.8.4.4 are Google's public DNS servers, or use your router's address) and click "Save".

Restart your computer to apply the changes. Open Command Prompt by pressing Windows key + R, typing "cmd", and pressing Enter. Type "ipconfig" and press Enter to see your new IP address listed under "IPv4 Address". If it matches what you entered, the change worked. If you cannot reach the internet, go back and check that your gateway address is correct — this is the most common mistake.

Setting a static IP address on Mac

Click the Apple menu in the top-left corner and select "System Settings" (or "System Preferences" on older versions). Click "Network" in the sidebar. Select your connection — "Ethernet" for wired or "Wi-Fi" for wireless — and click the "Details" button on the right side of the window.

Click the "TCP/IP" tab at the top. Find the dropdown that says "Configure IPv4" and change it from "Using DHCP" to "Manually". Now you can type your IP address in the "IPv4 Address" field, your subnet mask in the "Subnet Mask" field, and your gateway address in the "Router" field. Click "OK" to save these changes.

Go back to the Network window and click "Apply" to activate the new settings. Open Terminal (find it in Applications > Utilities) and type "ifconfig" to see your network settings. Look for "inet" followed by your IP address to confirm the change worked. If you lose internet access, return to Network settings and switch back to "Using DHCP" to restore automatic assignment while you troubleshoot.

Setting a static IP address on Linux

The process on Linux depends on your distribution and which network manager you use. For Ubuntu and Debian systems using the default network manager, right-click the network icon in the top-right corner of your screen and select "Edit Connections". Find your network connection in the list and click the gear icon next to it to open settings.

Click the "IPv4" tab. Change the dropdown from "Automatic (DHCP)" to "Manual". Click the "Add" button under the address section and type your IP address, subnet mask, and gateway address in the fields that appear. In the "DNS" field, type your DNS server addresses separated by commas (8.8.8.8, 8.8.4.4 works for most networks). Click "Apply" to save.

Disconnect from your network and reconnect to activate the new settings. Open a terminal and type "ip addr show" to see your network configuration and verify your new IP address is active. If you use a different Linux distribution or network manager, the steps may vary — check your distribution's documentation or contact your system administrator for specific instructions.

What to do if you lose internet after setting a static IP

The most common reason for losing internet after setting a static IP is using an address that conflicts with another device on your network, or entering the wrong gateway address. The fastest fix is to switch back to automatic (DHCP) assignment immediately so you can get online again and troubleshoot.

On Windows, go back to Settings > Network & Internet, click your connection, click "Edit", and change the dropdown back to "Automatic (DHCP)". On Mac, go to System Settings > Network, click "Details", change "Configure IPv4" back to "Using DHCP", and click "Apply". On Linux, open your network settings, change the IPv4 dropdown back to "Automatic (DHCP)", and reconnect to your network.

Once you are back online, check with your network administrator or router documentation to confirm you are using an IP address that is not already assigned to another device. Many routers have a range of addresses reserved for static assignment — using an address outside this range is a common mistake. Your administrator can tell you which addresses are safe to use.

Testing your connection after setting a static IP

After setting a static IP address and restarting your device, test your connection before assuming everything is working. Open a web browser and try to visit a website like google.com. If the page loads, your basic connection is working.

For a more thorough test, open Command Prompt (Windows), Terminal (Mac), or a terminal window (Linux) and type "ping 8.8.8.8" to test whether your device can reach an external server. If you see responses with times listed, your connection is working. If you see "request timed out" or "unreachable", your gateway address or DNS settings are wrong.

If you can reach some websites but not others, or if websites load slowly, your DNS settings may be the problem. Try changing your DNS addresses to 1.1.1.1 and 1.0.0.1 (Cloudflare's public DNS) or 8.8.8.8 and 8.8.4.4 (Google's public DNS) and test again. If that fixes the problem, your router's DNS server may be having issues.

When to use a static IP address versus automatic assignment

Use automatic (DHCP) assignment for most devices most of the time. It requires no setup, works reliably, and your router handles everything. Use a static IP address only when you have a specific reason: you need other devices to reach this one reliably (like a home server or network printer), you are setting up remote access, or your network administrator told you to use a specific address.

If you set a static address and later decide you do not need it, switching back to automatic is simple and safe. Your device will get a new address from your router the next time it connects. There is no penalty for switching back and forth — static addresses are just a tool for situations where you need a device to stay at the same address.

Frequently Asked Questions

Can I use any IP address I want, or are there restrictions?

You cannot use any address. Your network has a range of valid addresses, and you must pick one within that range. Most home networks use addresses starting with 192.168 or 10.0. Ask your network administrator or router documentation which addresses are reserved for static assignment — using an address outside this range will conflict with another device and break your connection.

What is the difference between IPv4 and IPv6?

IPv4 addresses look like 192.168.1.100 (four numbers separated by dots). IPv6 addresses look like 2001:db8::1 (letters and numbers separated by colons). Most home networks still use IPv4. Unless your network administrator specifically told you to set an IPv6 address, use IPv4.

Do I need to restart my device after setting a static IP?

Restarting is the safest way to make sure the change takes effect completely. Some systems apply the change immediately, but restarting ensures your device loads the new settings from the start and avoids connection problems. It takes only a few minutes and eliminates most troubleshooting questions.

What happens if two devices on my network have the same IP address?

Both devices will lose internet access or experience severe connection problems. This is called an IP conflict. If this happens, switch one of the devices back to automatic (DHCP) assignment immediately. Then contact your network administrator to find out which addresses are safe to use for static assignment.

Can I set a static IP address on my phone or tablet?

Most phones and tablets do not let you set a static IP address directly. Instead, you can usually set a static address on your router for your phone's MAC address (a unique identifier your device broadcasts). Your router will then always give that device the same IP address. Check your router's documentation for instructions on reserving an address for a specific device.