You are on page 1of 9

How to Set Static IP Addresses On Your Router

Routers both modern and antiquated allow users to set static IP addresses for devices on the network, but what’s the
practical use of static IP addresses for a home user? Read on as we explore when you should, and shouldn’t, assign a
static IP.

DHCP versus Static IP Assignment

To help you understand the application of static IP addresses, let’s start with the setup you (and most readers for
that matter) have. The vasty majority of modern computer networks, including the little network in your home
controlled by your router, use DHCP (Dynamic Host Configuration Protocol). DHCP is a protocol that
automatically assigns a new device an IP address from the pool of available IP addresses without any
interaction from the user or a system administrator. Let’s use an example to illustrate just how wonderful DHCP
is and how easy it makes all of our lives.

Imagine that a friend visits with their iPad. They want to get on your network and update some apps on the
iPad. Without DHCP, you would need to hop on a computer, log into your router’s admin panel, and manually
assign an available address to your friend’s device, say 10.0.0.99. That address would be permanently assigned
to your friend’s iPad unless you went in later and manually released the address.

With DHCP, however, life is so much easier. Your friend visits, they want to jump on your network, so you
give them the Wi-Fi password to login and you’re done. As soon as the iPad connected to the router, the
router’s DHCP server checks the available list of IP addresses, and assigns an address with an expiration date
built in. Your friend’s iPad is given an address, connected to the network, and then when your friend leaves and
is no longer using the network that address will return to the pool for available addresses ready to be assigned to
another device.

All that happens behind the scenes and, assuming there isn’t a critical error in the router’s software, you’ll never
even need to pay attention to the DHCP process as it will be completely invisible to you. For most applications,
like adding mobile devices to your network, general computer use, video game consoles, etc., this is a more
than satisfactory arrangement and we should all be happy to have DHCP and not be burdened with the hassle of
manually managing our IP assignment tables.

When To Use Static IP Addresses

Although DHCP is really great and makes our lives easier, there are situations where using a manually assigned
static IP address is quite handy. Let’s look at a few situations where you would want to assign a static IP
address in order to illustrate the benefits of doing so.
You need reliable name resolution on your network for computers that need to be consistently and
accurately found. Although networking protocols have advanced over the years, and the majority of the time
using a more abstract protocol like SMB (Server Message Block) to visit computers and shared folders on your
network using the familiar //officecomputer/shared_music/ style address works just fine, for some applications
it falls apart. For example, when setting up media syncing on XBMC it’s necessary to use the IP address of your
media source instead of the SMB name.

Any time you rely on a computer or a piece of software to accurately and immediately locate another computer
on your network (as is the case with our XBMC example – the client devices need to find the media server
hosting the material) with the least chance of error, assigning a static IP address is the way to go. Direct IP-
based resolution remains the most stable and error free method of communicating on a network.

You want to impose a human-friendly numbering scheme onto your network devices. For network
assignments like giving an address to your friend’s iPad or your laptop, you probably don’t care where in the
available address block the IP comes from because you don’t really need to know (or care). If you have devices
on your network that you regularly access using command line tools or other IP-oriented applications, it can be
really useful to assignment permanent addresses to those devices in a scheme that is friendly to the human
memory.

For example, if left to its own devices our router would assign any available address to our three Raspberry Pi
XBMC units. Because we frequently tinker with those units and access them by their IP addresses, it made
sense to permanently assign addresses to them that would be logical and easy to remember:

The .90 unit is in the basement, the .91 unit is on the first floor, and the .92 unit is on the second floor.

You have an application the expressly relies on IP addresses. Some applications will only allow you to
supple an IP address to refer to other computers on the network. In such cases it would be extremely annoying
to have to change the IP address in the application every time the IP address of the remote computer was
changed in the DHCP table. Assigning a permanent address to the remote computer prevents you from the
hassle of frequently updating your applications. This is why it’s quite useful to assign any computer that
functions as a server of any sort to a permanent address.

Assigning Static IP Addresses the Smart Way

Before you just start assigning static IP addresses left and right, let’s go over some basic network hygiene tips
that will save you from a headache down the road.

First, check what the IP pool available on your router is. Your router will have a total pool and a pool
specifically reserved for DHCP assignments. The total pool available to home routers is typically 10.0.0.0
through 10.255.255.255 or 192.168.0.0 through 192.168.255.255 . Then, within those ranges a smaller pool is
reserved for the DHCP server, typically around 252 addresses in a range like 10.0.0.2 through 10.0.0.254. Once
you know the general pool, you should use the following rules to assign static IP addresses:

1. Never assign an address that ends in .0 or .255 as these addresses are typically reserved for network
protocols. This is the reason the example IP address pool above ends at .254.
2. Never assign an address to the very start of the IP pool, e.g. 10.0.0.1 as the start address is always
reserved for the router. Even if you’ve changed the IP address of your router for security purposes, we’d
still suggest against assigning a computer.
3. Never assign an address outside of the total available pool of private IP addresses. This means if your
router’s pool is 10.0.0.0 through 10.255.255.255 every IP you assign (keeping in mind the prior two
rules) should fall within that range. Given that there are nearly 17 million addresses in that pool, we’re
sure you can find one you like.

Some people prefer to only use addresses outside of the DHCP range (e.g. they leave the 10.0.0.2 through
10.0.0.254 block completely untouched) but we don’t feel strongly enough about that to consider it an outright
rule. Given the improbability of a home user needing 252 device addresses simultaneously, it’s perfectly fine to
assign a device to one of those addresses if you’d prefer to keep everything in, say, the 10.0.0.x block.

How to Set Up Static DHCP So Your Computer’s IP Address Doesn’t Change


by YatriTrivedi on April 6th, 2016

How to Set Up Static DHCP So Your Computer’s IP


Address Doesn’t Change
by YatriTrivedi on April 6th, 2016

DHCP makes it simple to configure network access for your home network, and port forwarding makes it easy to those
computers from anywhere. By configuring static DHCP on your router, you can combine the best of both worlds.

The Problem with DHCP and Port Forwarding

DHCP is great. You configure your router to automatically assign IP addresses and the computers on your
network just plain work. Port forwarding is useful because you can access your router from outside of your
network and be redirected to the computer you need inside of your network. The problem is that these two
wonderful things rely on one premise: your internal IP addresses don’t change. If your router changes the IP
that is assigned to a machine by DHCP, then you have to reconfigure Port Forwarding. Many programs try to
get around this fact by offering Universal Plug and Play (UPnP) port forwarding features, but not everything
does.

Newer routers often have the ability to remember which IP address was assigned to which computer, so if they
disconnect and reconnect their IP doesn’t change. Often, though, a router reset will wipe this cache and start
assigning IPs on a first-come, first-served basis. Tons of older routers don’t even have this ability, and
immediately assign new IP addresses. With IP addresses changing, you have to reconfigure your port
forwarding settings often, otherwise you may lose the ability to connect to your home computers.

You can do this on plenty of modern routers, but we’re going to use DD-WRT for this guide. We’ve touted DD-
WRT’s ability many times before, and it’s not for nothing. This amazing custom router firmware has a solution
to this mess: static DHCP, also known as DHCP reservation. While configuring your router for DHCP, you
have the ability to enter the MAC addresses of your computers’ network cards and enter which IP address to
assign them. DD-WRT will automatically take care of the rest! If you have a different router, you can try
following along using your router’s own admin page–the instructions should be somewhat similar.
Finding Your MAC Address

The only real work you’ll have to do is find the MAC address of each computer’s attached networking card. If
you’re using wireless then you should find the MAC of your wireless card, and if you’re wired then use the
Ethernet card.

Just go down to the icon in your system tray for your connection and click it. Mine is wireless.

Right-click on your current active connection and click on Status.


Click on the “Details…” button.
Your MAC address for this device is listed as “Physical Address.”

OS X users can check under their System Settings and click on Network. If you click on the various tabs for
your connection, you should find a “Physical ID,” “Ethernet ID,” or “MAC Address.” Ubuntu users can type
“ifconfig” in Terminal. You’ll see various network adapters, each displaying its own hardware address. Do this
for all of the computers in your network that you need port forwarding for. The others will just get their IPs
assigned automatically by DHCP.

DD-WRT and Static DHCP

Now that you have a list of MAC addresses for each of your computers, open up a browser tab and head over to
your router’s DD-WRT interface. Click on Setup, and under Basic Setup, make sure DHCP is turned on.

Scroll down to “Network Address Server Settings (DHCP)” and make a note of the starting IP address and the
maximum number of users. The addresses you configure should fall within this range. Here, my range of IPs
would be 192.168.1.100 – 192.168.1.114.
Now, click on the Services tab up top.

Under the DHCP Server section, you can see that there’s a list of “Static Leases” click on the Add button to add
a new one.

Enter the MAC address of each computer, give each one a name so you know which is which, and then assign
them an IP address. You won’t be able to add the same IP address to two different MAC address, so make sure
each MAC has a unique IP. If your version of DD-WRT also has a space to enter the “Client Lease Time,” a
safe setting would 24 hours, or 1440 minutes.

That’s it! Be sure to click on both the Save button and the Apply Settings button, and wait for the changes to
take effect. The settings should automatically change when each computer’s lease expires, though you can
reconnect from each computer if you want the changes to take effect immediately.

Now, whether your computer loses its connect, the router gets power cycled, or the DHCP lease expires, each
computer you entered into the list will stick to its assigned IP. Furthermore, you won’t have to manually
configure static IPs on each machine! Port forwarding won’t have to be a pain ever again.

You might also like