Fixed/Static IP (Manual IP) Assignment
Fixed/Static IP (Manual IP) Assignment
Technically, you don't need a DHCP server anywhere on your network; it's just a convenience. You can manually assign the addresses of all the devices on the network. In the beginning of TCP/IP networking, there were no DHCP servers and no DHCP protocol. All device addresses were set manually. There's a bit of comfort in having complete, manual control over your network's configuration. Still, using fixed IP addresses can be a bit of a chore if you change your network very often. While that's less typical in most home networks (excluding at least my own home network), it's very typical in offices as employees move, projects add/remove hardware, etc.
If you are setting up a Local Area Network using only a switch (and no router) to connect the network together, your only option (short of installing a DHCP server on one of the networked computers) is using fixed IP addresses. It's also very typical, even if you are using DHCP, to reserve some portion of the IP address space on your network for devices that need a fixed IP address that will be reserved for that device "permanently." A very common reason you'll need this is to be able to set up firewall rules necessary to let some online games work. That is, you will set up a rule in your router's firewall to allow certain types of network traffic to pass through to a particular machine by specifying the IP address of that machine. It's desirable that the machine's IP address doesn't change over time so that you don't have to periodically edit the rule(s) to match. However, when a machine uses DHCP, there's no way to guarantee its IP address won't change; in fact, it's pretty certain that it will at some point. In this case, giving that machine a fixed IP address is the way to go. (I'll use the terms "static," "fixed," and "manual" interchangeably in this section.) Another common device to give a fixed IP address is a networked printer. Many of the printer drivers installed on computers will have trouble locating a printer if it's IP address changes. It's best to assign a fixed IP address to a networked printer.
In the section Changing the DHCP Server's IP Assignment Range, we configured the router to use only part of our internal LAN IP address space. In that example, 192.168.0.1 is reserved for the router itself to use, so that we have a fixed gateway address. The DHCP server hands out addresses from 192.168.0.2 through 192.168.0.49, inclusive. What happens to the rest of the network addresses - those from 192.168.0.50 through 192.168.0.254? (192.168.0.255 is reserved for network broadcast messages.) The answer is "Anything we want." Those addresses have been made available for fixed IP address assignment for those devices that need such a thing. All we need to do is make sure we don't reuse an IP address more than once and that the ones we choose to be fixed are outside of range of DHCP server, but still on the same network.
Setting a static IP address for an Ethernet adapter is a variation on setting up the DHCP configuration. On the machine that we wish to give a fixed address, we start by opening up the network properties by right-clicking on My Network Places (or Network Neighborhood) and choosing Properties from the pop-up menu.
Next, we pick our Ethernet adapter from the list. (Here, I've renamed my wireless adapter to "Netgear Wireless WG511T." By default, yours will probably be named "Local Area Connection.") Right-click on the adapter name and pick Properties from the pop-up menu. (Alternatively, you can double-click on the adapter's name and press the Properties button from the Local Area Connection Status dialog. [Not shown here.])
From the Properties dialog for your Ethernet adapter (as shown below), pick the Internet Protocol (TCP/IP) entry from the components list and click on the Properties button. (Double-clicking on the Internet Protocol (TCP/IP) component name yields the same result.)
If you have been using DHCP prior to this or the Ethernet adapter is still set at the default settings, your Internet Protocol (TCP/IP) Properties dialog will probably look like the one below.
What we want is to specify a particular IP address for our adapter. To do this, click on the Use the following IP address radio button. That will enable the IP address, Subnet mask, and Default gateway text fields. It will also enable the Preferred DNS server and Alternate DNS server text fields and disable the Obtain DNS server address automatically radio button. (See the following screen.)
Enter the IP address you've chosen for this Ethernet adapter into the IP address text area. In the example below, 192.168.0.100 was chosen. Place your cursor before the first period and type "192" into the first text area of the IP address. Because 192 fills up the area, the cursor automatically advances to the second text area. Type "168" into that text area and the cursor will automatically advance again. Next, type "0" into the third text area. This time, the cursor does not automatically advance because 0 does not fill the (three character) area. Press either the right arrow or press the period key to advance to the next and final IP address field. Finally, type "100" into the fourth IP address field.
Press the tab key to move to the Subnet mask text area. Without explanation, I'm just going to tell you to type "255," "255," "255" and "0" into the text fields. (The cursor will automatically advance on the first three.) Exactly what the subnet mask does is beyond the scope needed for setting up a small network. Search for subnet mask if you wish to know more.)
The Default gateway is set to the IP address that is reserved for the router on the network. The example below assumes we have not changed the default and "192.168.0.1" is entered using the same entry method as for the IP address.
The values for the Preferred DNS server and Alternate DNS server are generally given to you by your ISP provider if you are setting up a Broadband Connection Sharing network. These will be the IP addresses of the DNS servers they provide for your use. If your router uses DHCP to get an IP address from your ISP (in the same way that your DHCP clients get IP addresses on the internal LAN from your router), the DHCP response will include the preferred DNS servers. Therefore, you should be able to look at the basic network settings screen of your router to see what addresses to copy to the fields below. If you are setting up a LAN, you can leave these entries blank.
Once these entries are completed in a manner similar to the one above, click on the OK button. The typical response is that the Window takes a few several seconds or a minute to close. (On older Windows operating systems prior to XP, you will be asked to reboot. Do so if asked and continue from this spot.) If you see a warning message similar to the one below, it means you have accidentally assigned the same fixed address to two (or more) networked devices. Change one of the IP addresses so that each machine has a unique one. Typically, the other machine at that IP address will display a message that some other device is attempting to use its IP address.
That's it for setting a fixed IP address.