There may be times when you need your PC to retain the same local IP address every time it boots up. Forwarding ports, sharing content on your network, and other things can all be made easier when your computer’s IP address never changes.
Photo by felixtriller.
DHCP stands for Dynamic Host Configuration Protocol and is the recommended method for forcing your computer to use and reuse the same local IP address. You probably already use DHCP a lot more than you realize. Every home router utilizes DHCP, and anytime you jump on to a Wi-Fi or wired network, you are more than likely obtaining an IP address through DHCP.
Since your router is already handing out IP addresses through DHCP, all we need to do is configure a DHCP reservation on it. DHCP reservations work by binding an IP address to your system’s MAC address.
After creating the reservation, your router knows to only hand out that particular IP address to the system with the corresponding MAC address. Even if it never sees that MAC address again, it will continue to reserve that IP address. Anytime the system with that MAC address comes on to the network, the router will automatically assign it the correct IP address.
The only problem is, not all routers support the configuration of DHCP reservations. On some routers (older ones, mainly), DHCP is used but you may not have any control over what IP addresses it hands out to each computer on your network. For those of you following this guide with routers that don’t support DHCP reservations, you can skip ahead to the section on configuring static IP’s.
Every router manufacturer is going to have a slightly different way to configure DHCP reservations, but it should go something like this:
First, we need to figure out the IP address of our router, so we can go in and configure it. Bring up a command prompt (type cmd into the Start menu) and type ipconfig.
You’ll need to look for the Default Gateway IP address.
If you have trouble with the command line or just prefer to find the information with the GUI, you can navigate to Control Panel > Network and Internet > Network and Sharing Center > Change adapter settings.
Once you’re in that menu, right-click on your network adapter > Status > Details.
In the details menu, you’ll see your default gateway listed.
Now that you know your router’s IP address, type it into a browser to get to the configuration menu.
Your router should prompt you for a password, like in the screenshot above. If you’ve previously configured a password for your router, enter it and click OK. If not, then it should still be at the default value. Linksys and a lot of other routers use a blank username and the password “admin” for authentication. If that doesn’t work, consult your manual or Google for the default password.
Depending on the type of router you’re using, you may have to fish around a bit for the DHCP settings. On Linksys, the DHCP settings are on the first page when you login. Regardless of the type of router you have, your DHCP page will look something similar to this:
As indicated in the screenshot above, click on DHCP Reservation. You’ll be brought to a screen like this:
This menu already has the MAC addresses, IP addresses, and hostnames populated. It makes things easier because all you have to do is select the desired system, pick an IP address, and click “Add Clients”. When the settings are finished, you’ll see them listed under “Clients Already Registered”, as seen in the screenshot above.
If your router doesn’t automatically populate the MAC addresses for you and makes you put it in yourself, you can get your MAC address the same way we got the default gateway address earlier.
Once you have your settings configured and saved, your system(s) should now start pulling the same local IP address all the time.
Static IP Addresses
If you don’t have the option to configure DHCP, or just need your PC to keep its IP for a limited amount of time, setting a static IP address will be the way to go. Open up the Control Panel and click on Network and Internet > Network and Sharing Center > Change adapter settings.
Right-click on your network adapter, and go to Properties.
In the Properties menu, highlight “Internet Protocol Version 4 (TCP/IPv4) and click Properties.
In this menu, you’ll be able to set your IP address. The subnet mask field should automatically populate once your address is entered, and you can use the methods above to find your default gateway address. Be sure to stay in the same subnet as your router (in most cases, 192.168.1.X). Pick an address high enough that your router won’t ever try to hand it out via DHCP.
You can find the DNS server settings in your router settings (see the screenshot below for an example) or use Google’s DNS servers – 22.214.171.124 and 126.96.36.199.
On a Linksys router, this information is located in the “Status” tab. All other routers should be similar.
- Published 01/15/14