What a static IP address does and why you might need one

A static IP address is one that stays the same every time your device connects to your network, instead of changing automatically like it normally does. Your router usually hands out temporary addresses (called dynamic addresses) that shift around — this works fine for most people browsing the web or checking email. But if you run a home server, set up remote access to your computer, host a game server, or need your printer to always be reachable at the same address, a static IP keeps things stable.

You have two places where you can set this up: on your device itself, or on your router. Setting it on your device is simpler and works on any network. Setting it on your router (called a DHCP reservation) is more reliable if you share the network with other people, because your router remembers the rule even if you restart. This guide covers both methods so you can pick the one that fits your situation.

Key Takeaways

  • Static IP addresses stay the same instead of changing, which matters if you need consistent access to a device like a server or printer.
  • You can set a static IP on your device itself or reserve one on your router — device-level is simpler, router-level is more reliable on shared networks.
  • You need your device's current IP address, your router's address, and your network's subnet mask and gateway before you start.
  • On Windows, you change settings in Network Settings or Control Panel; on Mac, you use System Settings; on Linux, you edit network configuration files.
  • After you set a static IP, test the connection and write down the address somewhere so you remember it later.

Gather the information you need before starting

Before you change anything, write down four pieces of information about your current network setup. You need your device's current IP address, your router's IP address (usually 192.168.1.1 or 192.168.0.1), your subnet mask, and your default gateway. On Windows, open Command Prompt and type ipconfig, then press Enter — you will see all four numbers listed. On Mac or Linux, open Terminal and type ifconfig (Mac) or ip addr (Linux), then look for the lines labeled "inet" or "inet addr".

You also need to pick an IP address that will not conflict with other devices. If your router is handing out addresses between 192.168.1.100 and 192.168.1.254, pick something outside that range — usually 192.168.1.50 or lower works well. Ask yourself: will this device stay on this network, or might it move to a different one? If it might move, write down these numbers so you can adjust them later.

Setting a static IP on Windows

On Windows 10 or 11, open Settings and go to Network & Internet, then select your connection type (Ethernet or Wi-Fi). Scroll down and click "IP settings," then click the "Edit" button next to "IP assignment." Change the dropdown from "Automatic (DHCP)" to "Manual," then turn on the IPv4 toggle if it is not already on.

Now enter the static address you chose in the "IP address" field. In the "Subnet mask" field, enter the subnet mask you wrote down earlier (usually 255.255.255.0). In the "Gateway" field, enter your router's IP address. Leave the DNS fields alone unless you have a reason to change them — your router's default DNS usually works fine. Click "Save" when you are done.

If you are using an older version of Windows or prefer the classic Control Panel, you can also set this through Network Connections. Right-click your network connection, select Properties, double-click "Internet Protocol Version 4 (TCP/IPv4)," select "Use the following IP address," and enter the same information in the same fields. Click OK twice to save.

Setting a static IP on Mac

On Mac, open System Settings and go to Network. Select your connection (Ethernet or Wi-Fi) from the list on the left, then click "Details." Click the "TCP/IP" tab at the top. In the "Configure IPv4" dropdown, change it from "Automatic (DHCP)" to "Manual."

Enter your chosen static IP address in the "IPv4 Address" field. In the "Subnet Mask" field, enter the subnet mask you noted earlier. In the "Router" field, enter your router's IP address. Click OK to save, then close System Settings. Your Mac will use this address the next time it connects to the network.

Setting a static IP on Linux

On Linux, the method depends on which distribution you are running and which network manager it uses. On Ubuntu and most Debian-based systems, open the Settings application, go to Network, click the gear icon next to your connection, and select the "IPv4" tab. Change "Automatic (DHCP)" to "Manual," then enter your static IP address, subnet mask, and gateway in the fields provided. Click "Apply" to save.

If you are using a system without a graphical network manager, or if you prefer the command line, you can edit the network configuration files directly. On Ubuntu 18.04 and later, edit /etc/netplan/01-netcfg.yaml (the filename may vary) and add your static IP information under the appropriate interface. After editing, run sudo netplan apply to activate the changes. If you are unsure which file to edit, check your distribution's documentation.

Using your router to reserve a static IP instead

If you want the router to hand out the same address every time without changing your device's settings, you can create a DHCP reservation on the router itself. Log into your router's admin panel by typing its IP address into a web browser (usually 192.168.1.1 or 192.168.0.1). You will need the router's username and password — check the sticker on the back of the router if you have not changed them.

Look for a section called "DHCP Reservation," "Reserved Addresses," "Static DHCP," or "Address Reservation" — the exact name varies by router brand. Select your device from the list of connected devices, and the router will remember to always give it the same address. This method is more reliable on shared networks because the rule stays on the router even if someone restarts your device or changes its settings.

Testing your connection and troubleshooting

After you set the static IP, restart your device or reconnect to the network. Open Command Prompt (Windows) or Terminal (Mac/Linux) and type ipconfig (Windows) or ifconfig (Mac/Linux) to confirm your device now shows the static address you set. If it still shows a different address, restart your device again — sometimes the change takes a moment to take effect.

If you cannot reach other devices or the internet, double-check that your subnet mask and gateway are correct — they should match what you wrote down earlier. If you set the static IP on your device but your router is also trying to hand out a different address, the router's address will usually win. In that case, create a DHCP reservation on the router instead. If you are on Wi-Fi and the connection keeps dropping, try moving closer to the router — static IPs sometimes expose weak signal problems that dynamic addressing masked.

Frequently Asked Questions

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

You need to stay within your network's range and avoid addresses your router is already handing out. If your router uses 192.168.1.0 to 192.168.1.255, pick something in that range but outside the DHCP pool (usually 192.168.1.1 through 192.168.1.100). Never use 192.168.1.1 itself — that is your router. If you pick an address that conflicts with another device, both devices will have connection problems.

What happens if I set a static IP and then move to a different network?

Your device will try to use that address on the new network, which probably will not work. You will need to either change the static IP to match the new network's range, or switch back to automatic (DHCP) addressing. Write down the static address you chose so you can adjust it if you move the device later.

Is a static IP on my device the same as a static IP from my internet provider?

No — they are completely different. A static IP on your device is just a fixed address within your home or office network. A static IP from your internet provider is a fixed address for your entire network as seen from the outside internet. You can have both, either one, or neither, depending on what you need.

Do I need a static IP for gaming or streaming?

For local gaming on your home network, a static IP helps other devices find your computer reliably. For streaming to the internet or online gaming, you usually need a static IP from your internet provider, not just a local one. Check your game or streaming software's documentation to see what it actually requires.

What if I forget which address I set as static?

Open Command Prompt or Terminal and run ipconfig or ifconfig to see your current address. If you set it on your device, check your network settings to see what you entered. If you set it on your router, log into the router and look at the DHCP reservation list. Write the address down somewhere you will remember it next time.