← All Articles

How to Set Up a Static IP Address on Any Device

Setting up a static IP address on your local network ensures a device always gets the same IP, which is essential for servers, printers, smart home devices, remote access, and port forwarding. This guide walks you through the process on every major platform. For a broader understanding of static vs. dynamic IPs, see our comparison guide.

Before You Start: Gather Your Network Information

You will need the following details before configuring a static IP. Find them by checking your current network settings:

  • Current IP address — Your device's current private IP (e.g., 192.168.1.100)
  • Subnet mask — Usually 255.255.255.0 (see our subnet mask guide)
  • Default gateway — Your router's IP address (usually 192.168.1.1 or 192.168.0.1)
  • DNS servers — Your ISP's DNS or a public DNS like 8.8.8.8 (learn about how DNS works)

Choosing a Static IP Address

Pick an address that is:

  • Within your network's range (e.g., 192.168.1.2 to 192.168.1.254 for a /24 network)
  • Outside your router's DHCP range — Check your router settings to find the DHCP range (e.g., 192.168.1.100 to 192.168.1.200) and pick an address outside it (e.g., 192.168.1.50)
  • Not already in use by another device

Method 1: Router DHCP Reservation (Recommended)

The best approach is to configure your router to always assign the same IP to a specific device. This way, the device still uses DHCP but always receives the same address.

  1. Open your router's admin panel (usually http://192.168.1.1 or http://192.168.0.1 in your browser)
  2. Log in with your router credentials
  3. Find the DHCP settings or Address Reservation section
  4. Add a new reservation with the device's MAC address and your chosen IP
  5. Save and restart the device's network connection

This method works for all devices (including those without manual IP configuration) and centralizes management in your router.

Method 2: Windows Static IP Configuration

Using Settings (Windows 10/11)

  1. Open Settings and go to Network & Internet
  2. Click on your active connection (Wi-Fi or Ethernet)
  3. Click Edit next to "IP assignment"
  4. Change from Automatic (DHCP) to Manual
  5. Toggle IPv4 on
  6. Enter:
    • IP address: 192.168.1.50 (your chosen address)
    • Subnet mask: 255.255.255.0
    • Gateway: 192.168.1.1 (your router's IP)
    • Preferred DNS: 8.8.8.8
    • Alternate DNS: 8.8.4.4
  7. Click Save

Using Command Prompt

netsh interface ip set address name="Wi-Fi" static 192.168.1.50 255.255.255.0 192.168.1.1
netsh interface ip set dns name="Wi-Fi" static 8.8.8.8

Using PowerShell

New-NetIPAddress -InterfaceAlias "Wi-Fi" -IPAddress 192.168.1.50 -PrefixLength 24 -DefaultGateway 192.168.1.1
Set-DnsClientServerAddress -InterfaceAlias "Wi-Fi" -ServerAddresses 8.8.8.8,8.8.4.4

Method 3: macOS Static IP Configuration

  1. Open System Settings (or System Preferences on older macOS)
  2. Click Network
  3. Select your active connection (Wi-Fi or Ethernet)
  4. Click Details (or Advanced on older macOS)
  5. Go to the TCP/IP tab
  6. Change "Configure IPv4" from Using DHCP to Manually
  7. Enter:
    • IP Address: 192.168.1.50
    • Subnet Mask: 255.255.255.0
    • Router: 192.168.1.1
  8. Go to the DNS tab and add DNS servers (e.g., 8.8.8.8)
  9. Click OK then Apply

Using Terminal

sudo networksetup -setmanual "Wi-Fi" 192.168.1.50 255.255.255.0 192.168.1.1
sudo networksetup -setdnsservers "Wi-Fi" 8.8.8.8 8.8.4.4

Method 4: Linux Static IP Configuration

Using Netplan (Ubuntu 18.04+)

Edit the Netplan configuration file:

sudo nano /etc/netplan/01-netcfg.yaml

Set the configuration:

network:
  version: 2
  ethernets:
    eth0:
      dhcp4: no
      addresses:
        - 192.168.1.50/24
      gateway4: 192.168.1.1
      nameservers:
        addresses: [8.8.8.8, 8.8.4.4]

Apply the changes:

sudo netplan apply

Using nmcli (NetworkManager)

sudo nmcli con mod "Wired connection 1" ipv4.addresses 192.168.1.50/24
sudo nmcli con mod "Wired connection 1" ipv4.gateway 192.168.1.1
sudo nmcli con mod "Wired connection 1" ipv4.dns "8.8.8.8 8.8.4.4"
sudo nmcli con mod "Wired connection 1" ipv4.method manual
sudo nmcli con up "Wired connection 1"

Method 5: Mobile Devices

iPhone/iPad

  1. Open Settings and tap Wi-Fi
  2. Tap the info icon next to your connected network
  3. Tap Configure IP
  4. Select Manual
  5. Enter the IP address, subnet mask, and router
  6. Tap Save

Android

  1. Open Settings and go to Network & Internet then Wi-Fi
  2. Long-press your connected network and tap Modify network
  3. Tap Advanced options
  4. Change "IP settings" from DHCP to Static
  5. Enter the IP address, gateway, and DNS servers
  6. Tap Save

Verifying Your Configuration

After setting a static IP, verify everything works:

  1. Check your private IP — Run ipconfig (Windows), ifconfig (Mac), or ip addr (Linux) to confirm the static IP is assigned
  2. Test internet connectivity — Open a browser and visit WheresThatIP.com to confirm you can reach the internet
  3. Check your public IP — Your public IP (shown at WheresThatIP.com) should be the same as before — setting a static private IP does not change your public IP
  4. Test DNS — Try visiting several websites to ensure DNS is working. Use our DNS lookup tool if you need to troubleshoot

Troubleshooting

ProblemLikely CauseSolution
No internet after setting static IPWrong gateway addressVerify your router's IP is correct
IP conflict warningAnother device has the same IPChoose a different address
Cannot access other devices on networkWrong subnet maskEnsure subnet mask matches (usually 255.255.255.0)
Websites not loading but ping worksDNS not configuredAdd DNS servers (8.8.8.8 and 8.8.4.4)
Works briefly then stopsDHCP conflictEnsure static IP is outside your router's DHCP range

Static IP vs. Public Static IP

This guide covers setting a static private IP on your local network. If you need a static public IP (visible to the internet), that must be arranged through your ISP — typically for an additional monthly fee. For more details, see our static vs. dynamic IP guide.

Frequently Asked Questions

Will a static IP make my internet faster?

No. Internet speed is determined by your ISP plan. A static private IP only ensures your device keeps the same local address.

Can I set a static IP for a device that does not support manual configuration?

Yes — use your router's DHCP reservation feature (Method 1). This assigns a consistent IP to the device based on its MAC address without requiring any configuration on the device itself.

How many static IPs can I have on my network?

On a typical /24 network (subnet mask 255.255.255.0), you can have up to 254 devices. You can assign static IPs to all of them if needed, as long as each address is unique and properly configured.