How to Assign Static IP Address to Your Devices.
By default, your router assigns a dynamic IP address to every device that connects to it. This is called DHCP (short for Dynamic Host Control Protocol). But sometimes we need our devices to have the same IP address (i.e. static IP address) every time they connect to the network. The reason is that
- is accessing your computer from the Internet.
- Data exchange between two devices on the same network.
- Quick access to a network printer or NAS.
- Use your computer as a media server.
- Or your work WiFi requires a static IP.
What IP address should you choose?
If two devices on the network have the same IP address, conflicts will occur. Internet will not work on either or both of them, depending on your router. So, it’s important to assign a unique IP address to your computer. There are several ways to select an unused IP address.
For example – first find the IP address of your device, say 192.168.1.7; then leave the first three values â€‹â€‹(for example 192.168.1) as they are and replace the last digit with some far number, for example 192.168.1.222. However, make sure the last digit must be between 0 and 255.
Assigning a static IP address to most devices is easy: just go to network settings, find the DHCP option and turn it off. After that, you will see a text area for entering a static IP address. Enter the new IP address, save the changes and that’s it.
So let’s see how to assign a static IP address to various operating systems.
1. Assign IP address on Windows 10/8/7
You can do this quickly through the command line. First, you will need to find the subnet mask, default gateway, and network adapter name. In my case, I am on a Wi-Fi network, so the adapter name is Wi-Fi. To find yours, just enter the following command. ipconfig
Once you get the result, find the network adapter under which the IP address is listed. The adapter name is a one-word name appended to the end of the network header. You will also need the subnet mask and default gateway address.
Once you have the adapter name, subnet mask and default gateway, run the following command. netsh interface ip set address name = “Wi-Fi” static 192.168.1.106 255.255.255.0 192.168.1.1
In this case, instead of Wi-Fi, you should specify the name of your adapter, IP address, subnet mask and gateway address in accordance with your configuration.
This will change your IP address from DHCP to manual with the static IP you provided.
If you find this overly confusing, you are not alone. You can do the same through the graphical interface, which is much more intuitive. You will need a subnet mask and a default gateway address. You can refer to the step above to find out how to find these details. After writing down the address, click “Start” and type “Network and Sharing Center”. Click when you see the Network and Sharing Center icon.
Alternatively, if you’re on Windows 10, you can right-click the Start menu and select Network Connections.
In the new window, click “Change adapter settings”.
Right click on your current network adapter (eg WiFi) and select Properties.
When a new window appears, select Internet Protocol Version 4 (TCP / IPv4) and click Properties.
After the pop-up window appears, select “Enter the desired IP address” and enter the IP address, for the subnet mask and the Default gateway address, enter the values â€‹â€‹you wrote down earlier. Then click OK to save your changes.
To switch to dynamic IP, click Obtain an IP address automatically. Once this is enabled, your system will start dynamically picking an IP address from the router.
2. How to set up static IP on Ubuntu
In Ubuntu, you can set a static IP address via terminal or GUI. First, let’s start with the command line. Right click anywhere on the desktop to open a terminal.
Once the terminal window opens, we need to run the command. We need the subnet mask and the name of the network adapter to set a static IP address, and to get it, run the following command on the terminal. ifconfig -a
Having written down the subnet mask, in my case it is 255.255.255.0, we can proceed.
It’s pretty straightforward and straightforward. We need to open the network adapter settings. To do this, click the network icon in the upper right corner of your desktop.
Now go to the active network and click the Expand button to see more options. Click Wired Network Settings to open the Network menu.
After you get the Wired Network Settings dialog box, make sure you are on the Network page. Click the Options icon next to the active network to open the adapter properties.
When you get a popup, go to the IPv4 tab to change your IP settings.
On the IPv4 tab, select the radio button labeled “Manual”. Some text boxes will appear, you need to enter the IP address, netmask and gateway respectively. After confirmation, you can click the “Apply” button to register the changes.
You will need to restart the network again for the changes to take effect. You can do this manually via the command line, or simply turn off and on the network adapter. Then run ifconfig on a terminal to check the IP address. This should be the same IP address you entered earlier.
3. How to set up static IP on Mac
If you are using macOS, setting up a static IP address is very similar to setting up Ubuntu. But here you don’t need the subnet mask or the default gateway address. Right click on the apple icon in the upper left corner of the desktop. Select System Preferences from the drop-down list.
When the System Preferences dialog box appears, go to Network and click on it to open the Network Settings.
Alternatively, you can also press Cmd + Space to launch Spotlight search. Enter “Network” in the search bar and click the icon when it appears. This will take you directly to the network settings.
In the pop-up window, select the active network interface. For example, I am connected to a Wi-Fi network, so my active network is Wi-Fi. Make sure you are on the active network tab and then click on Advanced.
A new window will open the configuration options for that adapter. Go to IP settings by clicking the TCP / IP tab.
From the Configure IPv4 menu, select Use DHCP with manual address . Enter a static IP address in the IPv4 address and leave the default Subnet Mask and Router fields. Click OK to save your changes.
Now, when you run ifconfig, the system should use the static IP address that you defined earlier. If the IP hasn’t changed, try restarting the Wi-Fi and that should fix it.
To return to dynamic IP, go back to Using DHCP in the Configure IPv4 menu.
4. How to set up static IP on Android
You can set a static IP address on Android. But the way to do this may be different on each phone due to the manufacturer’s skin. We’ll see how to do this on the Pixel3, and the process should be the same on other phones. So go to the Settings menu and click Network & Internet. You will see Wi-Fi at the top of the menu, click on it to go to Wi-Fi settings.
The network you are connected to should be at the top of the list. Click the settings icon next to the Wi-Fi network name.
When the pop-up window opens, you will see the IP settings at the bottom of the menu. The default is “DHCP”. Click on it to change the IP configuration.
Select “Static” from the drop-down menu provided. Enter the desired IP address and leave the other defaults. Make sure no other devices are using the same IP address. You can see the IP addresses of other devices on your network using the little Fing utility. For more details, check out our article on how to find the IP address of any device on your network. After you have entered the IP address, click Save to register the change. Your Android phone should now start using the desired IP address.
In almost all versions of Android, you can set a static IP address. For some rare older versions of Android, you can use a third party app like WiFi Static. It is free and does not require ROOT.
To switch to dynamic IP again, repeat the same procedure and select â€œDHCPâ€ in the IP settings instead.
5. How to set up static IP on iPhone and iPad
If you are using an iPhone or iPad, you can set a static IP address initially. You will need your network subnet mask. This can be obtained in the Wi-Fi settings, and we will take care of that in the next steps. To get started, click the Settings icon in the dock to go to the Settings menu.
Now on the settings menu page, tap Wi-Fi to go to Wi-Fi settings.
On the Wi-Fi page, you should see your connected Wi-Fi network at the top. Click on the “i” button next to it. This will open the Wi-Fi configuration window.
Once the Wi-Fi settings page appears, you will see the “Configure IP” option. By default, this will be installed automatically. Below this option you will see the “Subnet Mask”, write it down, as we will need it in the next steps. To set a static IP address, we need to change the “Configure IP” option to “Manual”. Click on it and the IPv4 settings page will open.
The Configure IPv4 page should have 3 options. Select “Manual” from it. As soon as the IP address is manually enabled, additional text fields will appear at the bottom for entering the IP address, subnet mask, router. We need to specify the IP address and subnet mask of our choice that we wrote down in the previous step. Now, when you fill in both fields, the save button in the upper right corner will become active. Click on it to save the static IP configuration.
Now when you return to the Wi-Fi settings page, you will see that your device is using a static IP address. This should be the same IP that we set in the IP configuration menu.
This static IP address will only apply to that specific Wi-Fi network. If you are connecting to any other Wi-Fi network, the IP address will change accordingly.
6. How to set up static IP for any router
Other network devices like wireless printer, PS4, NAS, IP camera, Raspberry Pi, etc. do not have an interface. Hence, to set up your network, you need to either connect remotely or use a router. If you have access to a router, setting a static IP address for network devices is the easiest and most convenient way. I would recommend this method over any other.
So, in order to assign a static IP address to any network device, you need to login to the router’s web portal. The web portal address, username and password are in most cases printed behind the router. If you don’t have physical access to your router, the web portal URL is basically the gateway address of your PC. To find this, open a command prompt and enter the following command. ipconfig | findstr “Default Gateway”
After loading the web portal, log in with your credentials. Now each router has a different web interface, but the overall structure remains the same. Basically, you will need to associate the IP address with the Mac address and hostname of the device. So, we need to find the MAC address and hostname of the network device. To do this, find a list of DHCP clients, which should look something like the following screenshot.
You can get your MAC address and hostname from the DHCP client list. Once you write down the MAC address and hostname, we can proceed. On most routers, you will have the option to set a static IP address under Bind IP to Mac or Static DHCP IP. If you are using a custom ROM like dd-wrt go to the Services tab and you will have a DHCP server. In the DHCP Server section, add an entry for the static lease by clicking the Add button.
When you click on the “Add” button, a new line will be created. You have to enter the MAC address, hostname, desired static IP and lease time. The lease time is a unit in minutes after which your IP will be renewed. Since we only add 1 entry for a specific host, the IP address will be the same even after the update. Once everything is ready, click Save Changes.
After successfully configuring the router, simply restart the Wi-Fi on the device. When it connects, it should start using a static IP. In case of problems, make sure you have the correct MAC address and hostname. To verify, simply run the ipconfig command or look again at the router’s DHCP clients list.
These changes are written to ROM, so restarting the router will not change the static IP configuration. To revert to dynamic IP, simply remove the entry from the IP lease.
Once you’ve started configuring the IP addresses on your router and network devices, you’re ready to set up telnet and SSH. Check out our short article How to Enable Telnet Server on Windows 10, Best SSH Clients for iOS for Managing Remote Servers, and 6 Best FTP Clients for Android. As a caveat, the static IP addresses assigned to the devices should be noted, as assigning the same IP address to two network devices would render them useless.
Also read: How to Change DNS in Windows | Mac | Android | iOS