How to Set Up a Static IP Address — Windows, Mac, Linux & Router Guide

Last Updated: October 2026

Key Takeaways

  • ✓ A static IP address never changes, making it essential for servers, printers, port forwarding, and smart-home devices.
  • ✓ DHCP reservation on your router is the preferred method — it keeps IP management centralized and avoids conflicts.
  • ✓ Always choose an IP address outside your router's DHCP pool range to prevent conflicts with dynamically assigned addresses.
  • ✓ This guide covers step-by-step instructions for Windows 10/11, macOS, Linux (Netplan, NetworkManager, /etc/network/interfaces), and router-based DHCP reservation.
  • ✓ Use our What Is My IP tool to verify your current public IP and confirm your network settings are correct.

What Is a Static IP Address?

Every device on a network needs an IP address to communicate. Most devices receive their IP automatically from a DHCP server (usually your router) every time they connect. This is called a dynamic IP address — it is convenient and requires no manual configuration, but the address can change each time the DHCP lease expires or the device reconnects.

A static IP address is the opposite: it is manually assigned to a device and remains the same regardless of reboots, lease expirations, or reconnections. You tell the device (or the router) “this device always gets this specific address,” and that address never changes unless you change it yourself.

Static IPs are critical in scenarios where other devices or services need to reliably find a device at a known address. If a port forwarding rule on your router points to 192.168.1.50, that device must always be at 192.168.1.50 — otherwise the rule breaks. The same applies to network printers, file servers, security cameras, and smart-home hubs.

When Do You Need a Static IP?

Most everyday devices — phones, laptops, tablets — work perfectly fine with DHCP. You need a static IP (or DHCP reservation) when:

  • Port forwarding: Router rules target a specific local IP. If the IP changes, the rule stops working. See our port forwarding troubleshooting guide for details.
  • Hosting a server: Web servers, game servers, media servers (Plex, Jellyfin), and file servers (NAS) need a consistent address so clients can always connect.
  • Network printers: If a printer's IP changes, every computer that prints to it loses the connection until the new address is discovered and reconfigured.
  • Smart-home devices: Hubs like Home Assistant, Hubitat, or Philips Hue bridges need stable IPs so automations and apps can reach them reliably.
  • Remote access: If you use RDP, SSH, or VNC to connect to a machine on your LAN, the target IP must not change.
  • DNS servers: Local DNS resolvers (Pi-hole, AdGuard Home) must have a fixed address because every device on the network points to them for name resolution.
  • Security cameras: IP cameras and NVR systems are configured to communicate on specific addresses. A changed IP means lost video feeds.

Static IP vs. DHCP: Understanding the Difference

DHCP (Dynamic Host Configuration Protocol) automatically assigns IP addresses, subnet masks, default gateways, and DNS servers to devices when they join the network. It is managed by a DHCP server — typically your router — and uses a pool (or “scope”) of available addresses. When a device connects, it requests an address from the pool, receives a lease for a set period (often 24 hours), and renews or releases the lease as needed.

A static IP, by contrast, is configured directly on the device (or reserved on the router). The device does not ask the DHCP server for an address — it announces its own. This guarantees the address stays the same but adds a management burden: you must manually track which addresses are in use and ensure no two devices share the same IP.

FeatureDHCP (Dynamic)Static IP
ConfigurationAutomaticManual
Address changes?Can change on renewalNever changes
Best forPhones, laptops, guestsServers, printers, IoT
Management overheadLowHigher (must track IPs)
Conflict riskLow (server tracks leases)Higher if not planned
Port forwardingBreaks when IP changesAlways works

How to Choose the Right Static IP Address

Before you assign a static IP, you need to know three things about your network:

  1. Your subnet: Most home networks use 192.168.1.0/24 or 192.168.0.0/24. Your router's admin page shows this under LAN or DHCP settings.
  2. Your router's DHCP pool range: This is the range of addresses the router hands out automatically. A typical default is 192.168.1.100 – 192.168.1.200.
  3. Your gateway (router) IP: Usually 192.168.1.1 or 192.168.0.1. You will need this as the default gateway for the static configuration.

Pick an address outside the DHCP pool. If the pool is 192.168.1.100–200, choose an address like 192.168.1.10, 192.168.1.20, or 192.168.1.50. This guarantees the DHCP server will never hand that address to another device. Keep a simple record (even a spreadsheet) of your static assignments to avoid giving two devices the same address.

Use our Subnet Calculator to verify that your chosen address falls within the correct subnet and to confirm the network address, broadcast address, and usable host range.

Set a Static IP on Windows 10 & Windows 11

Method 1: Settings App (Recommended)

  1. Open Settings (press Win + I).
  2. Go to Network & Internet.
  3. Select Ethernet (for wired) or Wi-Fi (for wireless).
  4. Click the name of your active network connection.
  5. Scroll down to IP assignment and click Edit.
  6. Change the dropdown from Automatic (DHCP) to Manual.
  7. Toggle on IPv4.
  8. Enter the following:
    • IP address: Your chosen static IP (e.g., 192.168.1.50)
    • Subnet prefix length: 24 (equivalent to 255.255.255.0)
    • Gateway: Your router's IP (e.g., 192.168.1.1)
    • Preferred DNS: Your DNS server (e.g., 1.1.1.1 or 192.168.1.1)
    • Alternate DNS: A backup DNS (e.g., 8.8.8.8)
  9. Click Save.

The change takes effect immediately. Open Command Prompt and run ipconfig to verify the new address is active. If you lose internet connectivity, double-check the gateway and DNS values — a typo in either will prevent browsing.

Method 2: Control Panel (Classic)

  1. Open Control Panel → Network and Sharing Center → Change adapter settings.
  2. Right-click your network adapter and select Properties.
  3. Select Internet Protocol Version 4 (TCP/IPv4) and click Properties.
  4. Select Use the following IP address and fill in the IP address, subnet mask (255.255.255.0), and default gateway.
  5. Select Use the following DNS server addresses and enter your preferred and alternate DNS servers.
  6. Click OK, then Close.

Method 3: PowerShell

For advanced users or automation, use PowerShell (run as Administrator):

  • Get-NetAdapter — lists network adapters and their interface indexes.
  • New-NetIPAddress -InterfaceIndex 12 -IPAddress 192.168.1.50 -PrefixLength 24 -DefaultGateway 192.168.1.1 — assigns the static IP.
  • Set-DnsClientServerAddress -InterfaceIndex 12 -ServerAddresses 1.1.1.1, 8.8.8.8 — sets DNS servers.

Replace 12 with your adapter's actual interface index from the first command. To revert to DHCP later, run Set-NetIPInterface -InterfaceIndex 12 -Dhcp Enabled followed by Set-DnsClientServerAddress -InterfaceIndex 12 -ResetServerAddresses.

Set a Static IP on macOS

  1. Open System Settings (or System Preferences on older macOS versions).
  2. Click Network in the sidebar.
  3. Select your active connection (Wi-Fi or Ethernet).
  4. Click Details (or Advanced on older versions).
  5. Go to the TCP/IP tab.
  6. Change Configure IPv4 from Using DHCP to Manually.
  7. Enter your desired IP address (e.g., 192.168.1.50), subnet mask (255.255.255.0), and router/gateway IP (192.168.1.1).
  8. Go to the DNS tab and add your DNS servers (e.g., 1.1.1.1 and 8.8.8.8).
  9. Click OK, then Apply.

To verify, open Terminal and run ifconfig en0 (for Wi-Fi) or ifconfig en1 (for Ethernet). Look for the inet line to confirm your new address. You can also run networksetup -setmanual "Wi-Fi" 192.168.1.50 255.255.255.0 192.168.1.1 from the command line for a scriptable approach.

Set a Static IP on Linux

Linux networking configuration varies by distribution and init system. Here are the three most common methods:

Method 1: Netplan (Ubuntu 18.04+ / Ubuntu Server)

Netplan is the default network configuration tool on modern Ubuntu and Ubuntu Server. Configuration files are stored in /etc/netplan/.

  1. Identify your network interface name by running ip link (e.g., eth0, enp0s3, ens33).
  2. Edit the Netplan configuration file (common names include 01-netcfg.yaml, 50-cloud-init.yaml, or 00-installer-config.yaml):
    • sudo nano /etc/netplan/01-netcfg.yaml
  3. Replace the contents with a configuration like this (adjust the interface name, IP, gateway, and DNS to match your network):
    network:
      version: 2
      renderer: networkd
      ethernets:
        enp0s3:
          dhcp4: false
          addresses:
            - 192.168.1.50/24
          routes:
            - to: default
              via: 192.168.1.1
          nameservers:
            addresses:
              - 1.1.1.1
              - 8.8.8.8
  4. Save the file and apply: sudo netplan apply

Netplan validates the YAML syntax before applying. If you make an error, it will report the problem and leave the previous configuration in place. Use sudo netplan try to test the configuration with an automatic rollback after 120 seconds if you lose connectivity.

Method 2: NetworkManager (Fedora, CentOS, RHEL, Desktop Ubuntu)

On distributions that use NetworkManager, you can configure a static IP using the nmcli command-line tool or the graphical network settings:

  • nmcli con show — lists your connections and their names.
  • nmcli con mod "Wired connection 1" ipv4.addresses 192.168.1.50/24
  • nmcli con mod "Wired connection 1" ipv4.gateway 192.168.1.1
  • nmcli con mod "Wired connection 1" ipv4.dns "1.1.1.1 8.8.8.8"
  • nmcli con mod "Wired connection 1" ipv4.method manual
  • nmcli con up "Wired connection 1" — activates the changes.

Replace "Wired connection 1" with your actual connection name from the first command. To revert to DHCP, run nmcli con mod "Wired connection 1" ipv4.method auto and bring the connection up again.

Method 3: /etc/network/interfaces (Debian, older Ubuntu)

On Debian-based systems that do not use Netplan or NetworkManager, static IPs are configured in /etc/network/interfaces:

auto eth0
iface eth0 inet static
    address 192.168.1.50
    netmask 255.255.255.0
    gateway 192.168.1.1
    dns-nameservers 1.1.1.1 8.8.8.8

After saving, restart networking with sudo systemctl restart networking or sudo ifdown eth0 && sudo ifup eth0. Replace eth0 with your actual interface name.

DHCP Reservation on Your Router (Preferred Method)

DHCP reservation (also called a “static lease” or “address reservation”) is the recommended approach for most users. Instead of configuring the IP on the device, you tell the router: “whenever a device with this MAC address requests an IP, always give it this specific address.” The device still uses DHCP, which means it automatically receives the correct subnet mask, gateway, and DNS servers — but the IP address never changes.

Why DHCP Reservation Is Preferred

  • Centralized management: All IP assignments are visible in one place — the router's admin panel.
  • No device-side changes: The device still uses DHCP, so you do not need to touch its network settings.
  • Automatic gateway and DNS: The device receives these from the DHCP server, so if you change your DNS provider or router IP, the device updates automatically.
  • Portability: If the device moves to a different network, it simply falls back to regular DHCP — no broken static configuration.
  • Less conflict risk: The router is aware of the reservation and will not hand the same address to another device.

How to Set Up a DHCP Reservation

  1. Find the device's MAC address. Check your router's connected devices list, or run ipconfig /all on Windows (look for “Physical Address”), ifconfig or ip link on Linux/macOS.
  2. Log in to your router's admin page. Open a browser and go to 192.168.1.1 (or your router's gateway IP). Log in with the admin credentials.
  3. Navigate to DHCP settings. Look for sections labeled “DHCP,” “LAN,” “Address Reservation,” or “Static Leases.” The location varies by manufacturer:
    • Netgear: Advanced > Setup > LAN Setup > Address Reservation
    • TP-Link: Advanced > Network > DHCP Server > Address Reservation
    • ASUS: LAN > DHCP Server > Manually Assigned IP
    • Linksys: Connectivity > Local Network > DHCP Reservations
  4. Add a new reservation. Enter the device's MAC address and your chosen IP address. Some routers let you pick from the list of currently connected devices.
  5. Save and reboot. Apply the changes. The device may need to release and renew its DHCP lease (run ipconfig /release then ipconfig /renew on Windows, or disconnect and reconnect) to pick up the new address.

Static IP for Servers, Printers, and Smart-Home Devices

Servers and NAS Devices

If you run a home server (Plex, Nextcloud, Home Assistant, a Minecraft server), a stable IP is non-negotiable. Other devices on the network and any port forwarding rules depend on the server being reachable at a known address. For headless servers (no monitor), use DHCP reservation so you can always SSH in at the same IP. If you prefer a device-side static IP, configure it during OS installation or via the command line as shown in the Linux section above.

Network Printers

Network printers are one of the most common victims of IP address changes. When a printer's IP moves, every computer that prints to it — whether using a TCP/IP port or LPR/LPD — loses the connection. Most printers have a built-in web interface where you can set a static IP: open a browser, go to the printer's current IP (check your router's device list), navigate to its network settings, and switch from DHCP to Manual/Static. Alternatively, use a DHCP reservation on the router.

Smart-Home Hubs and IoT Devices

Smart-home hubs (Home Assistant, Hubitat, SmartThings), Philips Hue bridges, smart speakers, and IP cameras all benefit from static IPs. Many IoT devices do not have a user-friendly interface for changing network settings, so DHCP reservation is usually the only practical option. Assign reservations to every critical IoT device to ensure automations, voice commands, and camera feeds remain stable.

Troubleshooting IP Address Conflicts

An IP address conflict occurs when two devices on the same network are assigned the same IP address. This causes intermittent connectivity problems for both devices — packets may be delivered to either one randomly, resulting in dropped connections, slow performance, and error messages.

Signs of an IP Conflict

  • Windows displays a notification: “Windows has detected an IP address conflict.”
  • macOS shows a warning: “Another device on the network is using your computer's IP address.”
  • Intermittent connectivity — the device works for a few seconds, then drops, then works again.
  • Two devices appear to “fight” for the same address in the router's ARP table or device list.

How to Resolve IP Conflicts

  1. Identify the conflicting devices. Check your router's ARP table or connected devices list. Look for two different MAC addresses assigned to the same IP.
  2. Change one device's IP. Assign a different static IP to one of the devices, or switch one back to DHCP.
  3. Release and renew DHCP leases. On the affected device, run ipconfig /release and ipconfig /renew (Windows) or sudo dhclient -r && sudo dhclient (Linux).
  4. Clear the ARP cache. On Windows: arp -d *. On Linux/macOS: sudo ip neigh flush all. This forces devices to re-learn MAC-to-IP mappings.
  5. Prevent future conflicts. Keep all static IPs outside the DHCP pool range. Use a spreadsheet or documentation to track assignments. Better yet, use DHCP reservations instead of device-side static IPs.

Static IP and Port Forwarding

Port forwarding and static IPs go hand in hand. A port forwarding rule on your router says: “forward incoming traffic on port X to internal IP Y.” If Y changes (because the device got a different address from DHCP), the rule points to nothing — or worse, to the wrong device. This is the #1 reason port forwarding stops working after initially being set up correctly.

Before creating any port forwarding rule, always assign a static IP or DHCP reservation to the target device first. Then, when configuring the port forward, use that guaranteed IP address. For a comprehensive walkthrough of port forwarding issues, see our How to Fix Port Forwarding Not Working guide.

After setting up the port forward, verify it is working by using our Port Checker tool from outside your network. Remember that testing from inside your own network may fail due to missing NAT loopback support on your router.

Best Practices for Static IP Management

  • Document everything. Keep a spreadsheet or network diagram listing every static IP assignment, the device name, MAC address, and purpose. This prevents conflicts and makes troubleshooting faster.
  • Reserve a block for static devices. For example, use .2–.49 for static IPs and let DHCP handle .100–.200. The gap prevents overlap even if you adjust the DHCP pool later.
  • Use DHCP reservation over device-side static IPs when possible. It is easier to manage, less error-prone, and keeps the device portable.
  • Always test connectivity after changes. Ping the gateway (ping 192.168.1.1) and an external address (ping 8.8.8.8) to confirm both LAN and WAN connectivity work with the new static IP.
  • Do not assign the gateway IP to a device. If your router is at 192.168.1.1, never assign that address to another device — it will cause a conflict that takes down the entire network's internet access.
  • Avoid .0 and .255 in a /24 network. These are the network address and broadcast address respectively and cannot be assigned to devices.

Frequently Asked Questions

What is a static IP address?

A static IP address is an IP address that is manually assigned to a device and does not change. Unlike a dynamic IP (assigned by DHCP), a static IP remains the same every time the device connects to the network, making it essential for servers, printers, port forwarding rules, and any service that needs to be reachable at a consistent address.

Should I use a static IP or DHCP reservation?

DHCP reservation is generally preferred because it is configured in one place (the router) and the device still uses DHCP for all other settings like DNS and gateway. A static IP configured on the device itself can cause conflicts if you change routers or network settings. Both achieve the same result — a consistent IP address — but DHCP reservation is easier to manage at scale.

How do I choose the right static IP address?

Choose an IP address within your subnet but outside your router's DHCP pool range. For example, if your router assigns DHCP addresses from 192.168.1.100 to 192.168.1.200, use an address like 192.168.1.10 or 192.168.1.50. Make sure no other device is already using the address, and keep the same subnet mask, gateway, and DNS servers as the rest of the network.

What happens if two devices have the same static IP address?

An IP address conflict occurs. Both devices will experience intermittent connectivity issues — packets may be delivered to either device randomly, causing dropped connections, timeouts, and errors. Most operating systems will detect the conflict and display a warning. To fix it, change one device to a different IP address.

Do I need a static IP for port forwarding?

Yes. Port forwarding rules on your router point to a specific local IP address. If the target device's IP changes (which happens with DHCP), the port forwarding rule will point to the wrong device or to nothing at all. Assigning a static IP or creating a DHCP reservation ensures the forwarding rule always reaches the correct device.

How do I set a static IP on Windows 11?

Open Settings → Network & Internet → Ethernet (or Wi-Fi) → click your connection → Edit next to IP assignment. Switch from Automatic (DHCP) to Manual, toggle on IPv4, and enter the IP address, subnet prefix length (24), gateway, and DNS servers. Click Save. The change takes effect immediately.

How do I set a static IP on Linux using Netplan?

Edit the Netplan configuration file (e.g., /etc/netplan/01-netcfg.yaml). Set dhcp4: false, add your IP under addresses in CIDR notation (e.g., 192.168.1.50/24), specify the gateway under routes with a to: default entry, and list DNS servers under nameservers. Save and run sudo netplan apply.

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

Yes. On Android, go to Settings → Network & Internet → tap your Wi-Fi network → Advanced → change IP settings to Static and fill in the details. On iPhone/iPad, go to Settings → Wi-Fi → tap the info button → Configure IP → Manual. However, DHCP reservation on the router is usually easier for mobile devices.