Introduction / Why This Is Needed
A static IP address is a fixed network address that does not change each time you reconnect to the network. Unlike a dynamic (DHCP) address, it is necessary for:
- Servers (web, file, game servers) so they are always accessible at the same address.
- Network printers and devices to make them easy to find on the network.
- Remote access (RDP, SSH) without needing to discover a new IP address each time.
- Port forwarding on your router, as port forwarding rules are typically tied to a specific internal IP.
This guide covers setting up a static IP on three major platforms: Windows 10/11, Ubuntu 22.04, and macOS Ventura+. The process consists of four common steps, detailed for each OS.
Prerequisites / Preparation
Before starting the configuration, ensure that:
- You have administrator privileges on the target computer.
- You know your network parameters. You can find them by running in Command Prompt/Terminal:
Or through the graphical interface (see steps below). Pay attention to:# Windows ipconfig /all # Linux/macOS ifconfig- IPv4 address (e.g.,
192.168.1.105) - Subnet mask (usually
255.255.255.0) - Default gateway (your router's IP, e.g.,
192.168.1.1) - DNS servers (often match the gateway or are public ones like
8.8.8.8)
- IPv4 address (e.g.,
- The static IP you choose must not conflict with other devices on the network and must not be in your router's DHCP range (it's recommended to use an address at the end of the subnet, e.g.,
.250). A recommended range:192.168.1.250–192.168.1.254(if your network is192.168.1.0/24).
Setting Up a Static IP in Windows 10/11
Step 1: Open Network Settings
- Press
Win + R, typencpa.cpl, and press Enter. The Network Connections window will open. - Find the correct adapter (usually Wi-Fi or Ethernet), right-click it, and select Properties.
Step 2: Navigate to IPv4 Settings
- In the properties window, select "Internet Protocol Version 4 (TCP/IPv4)" and click Properties.
- In the new window, switch the toggle to "Use the following IP address".
Step 3: Enter Parameters
Fill in the fields:
- IP address: your chosen static address (e.g.,
192.168.1.250). - Subnet mask: usually
255.255.255.0. - Default gateway: your router's IP (e.g.,
192.168.1.1). - Preferred DNS server: you can specify the gateway or a public DNS (e.g.,
8.8.8.8). - Alternate DNS server: you can specify a second public one (e.g.,
8.8.4.4).
Click OK, close all windows.
Setting Up a Static IP in Ubuntu 22.04 (with GNOME)
Step 1: Open Network Settings
- Click the network icon in the top panel (top-right corner) and select "Network Settings" (or "Wired Settings" / "Wi-Fi Settings").
- In the window that opens, find the relevant connection (e.g., "Wired" or "Wi-Fi") and click the gear ⚙️.
Step 2: Navigate to IPv4 Settings
- In the configuration window, go to the "IPv4" tab.
- In the "Method" dropdown, select "Manual".
Step 3: Enter Parameters
Click the "+" (Add) button in the "Addresses" section and enter the data in the format:
IP Address, Subnet Mask, Gateway
Example:
192.168.1.250/24, 192.168.1.1
- The IP address and subnet mask are specified together via
/(/24corresponds to255.255.255.0). - The gateway is specified separately in the "Gateway" field (you can also enter it in the same line, separated by a comma, but using the separate field is better).
For DNS, enter the addresses in the "DNS" field, separated by commas (e.g., 8.8.8.8, 8.8.4.4).
Click "Apply". Toggle the connection switch to apply the changes.
Setting Up a Static IP in macOS Ventura and Newer
Step 1: Open Network Settings
- Open System Settings.
- In the sidebar, select "Network".
Step 2: Select Interface and Configure
- On the left, select the active interface (e.g., Wi-Fi or Ethernet).
- In the main area, click "Details" next to the connection status.
- Go to the "TCP/IP" tab.
- In the "Configure IPv4" dropdown, select "Manually".
Step 3: Enter Parameters
Fill in the fields:
- IPv4 Address: the static IP (e.g.,
192.168.1.250). - Subnet Mask:
255.255.255.0. - Router: the gateway (e.g.,
192.168.1.1). - DNS Servers: add one or more addresses (e.g.,
8.8.8.8).
Click "OK", then "Apply".
Verifying the Result
After configuring on any OS, ensure the changes have taken effect:
- Refresh the network settings (reconnect the cable/network or run in terminal/command prompt):
- Windows:
ipconfig /releasethenipconfig /renew(may not work for static IP; better to simply disable and re-enable the adapter). - Linux/macOS:
sudo dhclient -r(release) andsudo dhclient(renew) — not needed for static IP; just check withip addrorifconfig.
- Windows:
- Run a command to view the current IP:
Ensure the static address you configured is displayed.# Windows ipconfig # Linux/macOS ip addr show - Check gateway and internet connectivity:
If the ping succeeds, the configuration was successful.ping <gateway> # e.g., ping 192.168.1.1 ping 8.8.8.8
Potential Issues
- IP address conflict: If another device on the network already has that IP, the connection will not be established. Choose a different address from a free range. You can check this via your router's settings (list of DHCP clients).
- Incorrect gateway/DNS settings: If an incorrect gateway is specified, you will not have access to other networks and the internet. Clarify the parameters with your network administrator or via your router's settings.
- No access to the local network: Check that the subnet mask matches your network (usually
255.255.255.0for home networks). Ensure the IP is in the same subnet as other devices (e.g., if a laptop has192.168.1.105, the static IP should be192.168.1.xxx). - "Access Denied" error during configuration: Run the settings as an administrator (Windows) or use
sudo(Linux/macOS).