You do not need an accout to report a problem with the wiki.
-
TechInfoDepot:Network/How to Assign a Static IP Address
https://www.howtogeek.com/howto/19249/how-to-assign-a-static-ip-address-in-xp-vista-or-windows-7/
Sometimes, it’s better to assign a PC it’s own IP address rather than letting your router assign one automatically. Join us as we take a look at assigning a static IP address in Windows.
Static vs. Automatic IP Addressing
Right now, the IP addresses for your PCs and other devices are probably assigned automatically by your router using a procotol known as Dynamic Host Configuration Protocol (DHCP). It’s a handy way for devices to connect to your network more easily, because you don’t have to configure IP addressing for each new device yourself. The downside to automatic addressing is that it’s possible for a device’s IP address to change from time to time.
Mostly, that’s not a big deal, but there are times that you might want a device to have a static, unchanging IP address. For example:
- You have a device (like a home media server, say) that you want to be able to find reliably and you (or other devices) prefer to locate it by IP address. Using IP addresses is often much handier when troubleshooting your network, for example.
- You have certain apps that can only connect to network devices using their IP address. In particular, many older networking apps suffer this limitation.
- You forward ports through your router to devices on your network. Some routers play nice with port forwarding and dynamic IP addresses; others do not.
Whatever your reason, assigning static IP addresses to devices is not difficult, but you do have a choice to make—whether to do it from the router or on the device itself.
Assign Static IP Addresses Via Your Router
While this article covers assigning static IP addresses to PCs within Windows itself, there is another way to go about it. Many routers allow you to assign a pool of IP addresses that are handed out to specific devices (based on the device’s physical, or MAC address). This method offers a couple of significant advantages:
- IP addresses are still managed by the router, meaning that you won’t have to make (and keep up with) changes on each individual device.
- It’s easier to assign addresses within the same IP address pool your router uses.
RELATED: How to Set Static IP Addresses On Your Router
This article is about assigning static IP addresses directly to PCs running Windows. We’ve already got a great guide on How to Set Static IP Addresses On Your Router, so if that’s the way you want to go, be sure to give it a read.
With all that in mind, though, let’s take a look at how to assign static IP addresses within Windows XP, Vista, 7, 8, and 10.
Set a Static IP Address in Windows 7, 8, or 10
To change the computer’s IP address in Windows, you’ll need to open the “Network Connections” window. Hit Windows+R, type “ncpa.cpl” into the Run box, and then hit Enter.
In the “Network Connections” window, right-click the adapter for which you want to set a static IP address, and then select the “Properties” command.
In the properties window for the adapter, select “Internet Protocol Version 4 (TCP/IPv4)” and then click the “Properties” button.
Select the “Use the following IP address” option, and then type in the IP address, subnet mask, and default gateway that corresponds with your network setup. Next, type in your preferred and alternate DNS server addresses. Finally, select the “Validate settings upon exit” option so that Windows immediately checks your new IP address and corresponding information to ensure that it works. When you’re ready, click the “OK” button.
And then close out of the network adapter’s properties window.
Windows automatically runs network diagnostics to verify that the connection is good. If there are problems, Windows will give you the option of running the Network troubleshooting wizard. However, if you do run into trouble, the wizard likely won’t do you too much good. It’s better to check that your settings are valid and try again.
Set a Static IP Address in Windows Vista
Changing your IP from DHCP to a Static address in Vista is similar to other versions of Windows, but getting to the correct location is a bit different. Open the Start Menu, right-click on Network, and select Properties.
The Network and Sharing Center opens…click on Manage network connections.
Right-click on the network adapter you want to assign an IP address and click Properties.
Highlight Internet Protocol Version 4 (TCP/IPv4) then click the Properties button.
Now change the IP, Subnet mask, Default Gateway, and DNS Server Addresses. When you’re finished click OK.
You’ll need to close out of Local Area Connection Properties for the settings to go into effect.
Open the Command Prompt and use the ipconfig command to verify that the changes were successful.
Set a Static IP Address in Windows XP
To set a Static IP in Windows XP, right-click the “My Network Places” icon, and then select “Properties.”
Right-click the adapter for which you want to set the IP, and then select “Properties” from the context menu.
Select the “Internet Protocol (TCP/IP)” entry, and then click the “Properties” button.
Select the “Use the following IP address” option. Type in the IP address, subnet mask, default gateway, and DNS server addresses you want to use. When you’re finished, click the “OK” button.
You will need to close out of the adapter’s properties window before the changes go into effect.
And you can verify your new settings by using the ipconfig command at the command prompt.
By and large, it’s better to let most of your devices have their IP addresses assigned automatically by your router. Occasionally, though, you might want to set a static IP address for a particular device. While you can set static IP addresses directly on your devices (and this article has shown you how to do just that on Windows PCs), we still recommending setting up static IP addressing on your router if possible. It will just make life easier.
Linux
Use one of the following methods ("A" or "B"), depending on whether you are using Ubuntu 8.04 (Hardy) or a later version (Intrepid or Jaunty).
A (For Ubuntu 8.04 Hardy):
Turn off wireless networking.
- On Ubuntu, right-click on the networking icon in the upper right of the screen and uncheck "Enable Wireless."
Set wired networking to a static address of 192.168.1.2.
- On Ubuntu, left-click on the networking icon in the upper right of the screen and choose "Manual Configuration." Click "Unlock" and enter your password. Click on "Wired Connection," then "Properties." Uncheck the "Enable roaming mode" box. Under "Configuration," choose "Static IP address." Set "IP address" to 192.168.1.2. Set "Subnet mask" to 255.255.255.0. Set "Gateway address" to 192.168.1.1.
B (for Ubuntu 8.10 Intrepid or 9.04 Jaunty):
Disable Networking in the GUI.
- On Ubuntu, right-click on the networking icon in the upper right of the screen and uncheck "Enable Networking."
Set your wired networking to static address 192.168.1.2 with the following command, ensuring 'ethx' is replaced with the interface name of your wired network interface.
sudo ifconfig ethx 192.168.1.2 netmask 255.255.255.0 up