Updated: February 23, 2002
If you have a broadband
connection and are reading this website, you most likely already have a
home network setup with a few computers to play games, share files, and
host a webserver. In this article, I'll talk about running a mixed
static/dynamic internal LAN IP network so that you can run a server at
home AND get the benefits of a dynamic IP network.
For reference, this is a
diagram of what a mixed static/dynamic network looks like.

In order for your network
to use the Internet, each computer must have the TCP/IP protocol installed
and configured. Each computer requires a unique IP address and other
information such as default gateway, subnet mask, and DNS servers.
First of all, let me clarify
that we are talking about IP addresses on the internal
LAN side of the network (red side of the dotted line), not the external
WAN IP address given to you by your DSL or Cable company (denoted
by blue in the diagram).
There are two ways to assign
this IP information to each computer. You can do it manually and
give each computer a static IP number that never changes or you can have
a DHCP server assign each computer an IP address for a dynamic network.
The DHCP server for most home networks is the router itself.
1. Static IP addresses:
In this setup, you
must manually enter all the information by hand for each computer on the
network. This can be tedious if you have a lot of computers and is
also prone to mistakes since you could accidentally enter the wrong information,
or you might repeat IP addresses that are already in use thus cause a conflict.
However, if you have a small network, this isn't a big problem. If
you have 20-30 computers, you can see that this could be a big pain.
However, if you run a webserver on your network, the server MUST have a
static LAN IP address to work.
This screenshot shows some
sample information you need to fill out to assign each computer a static
IP address:
2. Dynamic IP addresses:
In a dynamic network,
a DHCP (Dynamic Host Configuration Protocol) server assigns each computer
the required information. All you have to do is tell your client
computer to get the info from the DHCP server. (Screenshot below)
Very convenient setup since you don't have to enter TCP/IP information
for each computer. Good for most networks, especially if you are
constantly removing and adding computers to the network or if you have
a lot of computers. The downside of a dynamic network is that a computer's
IP address might change if you reboot your computer or add more computers
to the network. This is not a big deal if your computer is a workstation,
but if you are doing something that requires your computer to have a static
IP address such as webserving and port forwarding, then a dynamic network
is not going to work. Like I said before, you server computer must
have a static IP address. But what about the rest of your computers
on the network? Can they still have dynamic IP addresses even if
the server has a static IP address? Yes.
If you are running a webserver
from home through a router, you must forward the ports from the WAN side
to the LAN side to your webserver. This means your webserver must
have a static IP address since if it were assigned a dynamic IP address,
the IP number could potentially change. However, you would like to
keep using dynamic IP addresses for the rest of your computers. This is
easily done by creating a mixed static/dynamic network.
Note:
Many routers state in their documentation that in order for port forwarding
to work, you must have the DHCP server disabled. This is not true.
The reason they say that is because they don't want to get into the details
of creating a mixed static/dynamic network. That's all.
First of all, you need to
configure your router (Linksys is shown here, but any brand will work)
to start handing out IP addresses at a certain starting number as show
in this screenshot:
In this example the DHCP
server will start at 192.168.1.100 (I'll call this the "DHCP starting point")
and progressively hand out numbers to computers on the network 192.168.1.101,
192.168.1.102, 192.168.1.103, etc... The DHCP starting point doesn't
have to start at 192.168.1.100, it can be whatever you choose. However,
it should be high enough that there is room for you to assign IP address
from BELOW the starting number.
Dynamic
IP Computers (workstations)
On each computer that you
want to have a dynamic IP address, set the TCP/IP settings to "Obtain an
IP address automatically" like the gray screenshot above. Now the
dynamic part of your network is done.
Static
IP Computers (servers)
Now let's work on the static
part of your network. All you have to do is assign the computers
that you would like to have static IP addresses (namely your servers) IP
address that are BELOW the DHCP starting point. For example, 192.168.1.20
would work. On each computer you will have to enter all the information
including IP address, default gateway, subnet mask, and the DNS servers.
The best way to do this is
to go to a computer that gets its IP address dynamically and copy down
the settings, and then change the IP address to something below the DHCP
starting point. On Windows 95, 98, and 98 SE, you can get the network
settings by typing in "winipcfg" at the "Run" prompt. In Windows
2000, go the the command prompt and type in "ipconfig /all". Then
copy all the settings down and enter it onto your computer which needs
a static IP address except for the IP address. Remember, you have
to assign an IP address that starts BELOW the DHCP starting point you chose.
There you have it.
ABOVE your DHCP starting point you have dynamically assigned IP address
and BELOW the DHCP starting point, you have a static IP network.
Your server has a static IP address and the rest of your network gets dynamically
assigned IP addresses. You get the best of both worlds.
| Additional
Information |
Step-by-Step
|
|