You are on page 1of 5

Connectivity:Overview

Understanding DHCP
Setting up TCP/IP on a network is essential if you wish to build an intranet. However, defining
an addressing system and setting up the correct address on each workstation and server is far
from trivial. Dynamic Host Configuration Protocol can be a great help.

By Howard Richards

W ith the growth of the In-


ternet, TCP/IP has now be-
come a must-have protocol
for most computer networks. It pro-
of time - so an IP address that is not
used for the duration of the lease is
put back into the unallocated pool.
This helps recover TCP/IP ad-
Each DHCP scope is used for a differ-
ent TCP/IP network segment. On net-
works with routers that support
DHCP, extra information is added to
vides a single network protocol that is dresses that are no longer used. the request by the router to tell the
supported by almost every type of server which network the request
computer system, a plethora of appli- What Do I Need? came from. The DHCP server uses this
cations that use it, and it is well suited information to pick an address from
to both large and small networks. It’s To use DHCP you need a DHCP the correct scope. The server replies to
also essential if you wish to set up an server (to allocate the addresses and the client, allocating it the TCP/IP ad-
intranet. maintain a database) and DHCP cli- dress and settings required.
The downside of TCP/IP is that, ents, which will be discussed later. However, DHCP doesn’t allocate
unlike protocols such as IPX, it needs A DHCP server is included in Win- the address permanently. It tells the
addresses and configuration settings dows NT Server 3.51 and 4.0. Although client that it has “leased” the address
to be defined on each computer or pe- this article is concentrating on NT to it for a specific time period, which
ripheral on the network. This can entail Server, DHCP isn’t a Microsoft stand- you as administrator can control. By
an immense amount of system admini- ard and is available from other ven- default DHCP is installed with a three-
stration work. dors for NT (such as MetaInfo), and on day lease period. When the lease ex-
DHCP stands for Dynamic Host other platforms. For more information pires, the client can ask the server to
Configuration Protocol, and is used to see the DHCP FAQ, which is discussed renew the lease. If the DHCP server
centrally allocate and manage TCP/IP below. doesn’t hear from the client beyond the
configurations of client nodes. If expiry of the lease period, it will put
you’ve got more than a handful of How Does DHCP Work? that address back in the pool ready to
computers to manage, then DHCP can be re-used.
help to save a great deal of time and When a DHCP client is first When the DHCP client obtains a
trouble in setting up and administer- switched on, it sends a broadcast lease on an address, it knows how long
ing a TCP/IP network. DHCP offers packet on the network with a DHCP the lease period is. So it knows that it
the following features: request. This is picked up by a DHCP can use the address without reference
server, which allocates an IP address to to the DHCP server until the lease ex-
● It allows you to define “pools” of the PC, from one of the scopes (the pires. When it does expire, it can re-
TCP/IP addresses, which are then pools of addresses) it has available. quest a renewal. The implication of this
allocated to client PCs by the server.
These pools are called scopes in
DHCP terminology.
● Not only are the TCP/IP addresses “The downside of TCP/IP is that, unlike
handed out, so are all the related
configuration settings like the sub- protocols such as IPX, it needs addresses
net mask, default router, DNS serv-
er, that are required to make and configuration settings to be defined
TCP/IP work correctly.
● DHCP works across most TCP/IP on each computer or peripheral on the
routers and allocates IPs according
to the subnet the request came from. network. This can entail an immense
This means you won’t need to re-
configure a PC that is moved from amount of system administration work.”
one subnet to another.
● Addresses can be leased for periods

Issue 87 (September 1997) Page 11


PC Network Advisor File: C04102.1
Connectivity:Overview

is that changing DHCP settings on the


server won’t instantly change all your
DHCP client PCs, as they won’t find “When a DHCP client is first switched
out about the changes until they ask
the server to renew their lease. This is on, it sends a broadcast packet on the
one factor you need to consider when
you decide your lease period. network with a DHCP request. This
Before You Install is picked up by a DHCP server, which
Tempting as it might be to install allocates an IP address to the PC,
DHCP right now and start setting it up,
there are a few things you’ll need to from one of the scopes.”
investigate to make sure it will work.
The first is to check whether DHCP is
supported on the network clients you
have on your network. At present, the area network. DHCP clients use a DHCP uses the same TCP/IP port as
following are known to support broadcast packet to find a DHCP serv- BOOTP, so blocking port 67 for the
DHCP: er, so if a client is on one side of a UDP protocol will allow this.
router, and the server on the other, it is Finally you’ll need to consider the
● Windows NT and Windows 95 possible the router will filter out those impact of DHCP on any domain name
(built-in). broadcasts. The recent software revi- servers (DNS) you have. The dynamic
● Windows for Workgroups (using sions on many routers include support allocation of TCP/IP addresses under
Microsoft’s 32-bit TCP/IP stack). for DHCP-forwarding (see the list be- DHCP means that clients can change
● HP’s JetDirect range of network low), but it isn’t normally enabled by their TCP/IP addresses. If you have a
printer cards. default, so you’ll need to get this fea- domain name server with a static text
● Some other third-party TCP/IP ture switched on. Routers that do sup- file of IP addresses and host names,
stacks. port DHCP are: this will require maintenance to keep it
● Some versions of Unix, such as So- in sync with DHCP. A more efficient
laris 2.6. ● Cisco revisions 9.21 and 10.0 (and method is to use the domain name serv-
above). er service that is built into NT Server
There is a DHCP FAQ at http://- ● 3Com: version 8.0 includes support version 4.0, as this can be linked to
web.syr.edu/~jmwobus/comfaqs/- for DHCP. DHCP, so that it automatically knows
dhcp.faq.html that includes a more ● Wellfleet/Bay networks: Enabling about DHCP changes of TCP/IP ad-
comprehensive list of DHCP-sup- BOOTP on version 9.00 (and above) dresses. Such a service is known as
ported clients. If a particular client of BayRs. DDNS (Dynamic Domain Name Serv-
doesn’t support DHCP, you’ll need to er).
manually allocate a TCP/IP address Search your router documentation If you are still using NT server 3.5
and ensure that your DHCP server for more details of DHCP support and and you don’t want to upgrade to NTS
doesn’t try to hand that address out by how to enable the service. Note that if 4.0 for this feature, you might consider
excluding it from the relevant scope. you’re connected to the Internet, your a third-party solution such as Meta-
The second item to check is router firewall and router should be config- Info’s TCP/IP suite which incorpo-
support for DHCP if you have a wide- ured to block all DHCP-related traffic. rates linked DHCP and DDNS servers.

An Example
Tips
Let’s follow an example to see this
● A recommendation to anyone who is converting an existing TCP/IP in action. I have two network segments
network to use DHCP is to start small, with just one or two clients, and (Marketing and Finance) linked by a
restrict the DHCP scopes to two or three verified unused addresses for TCP/IP router. The Marketing seg-
testing purposes. This helps avoid the possible problem of DHCP allo- ment is a class B network (130.1.0.0),
cating the IP addresses of existing network nodes. Once you’ve got DHCP and the Finance segment is a class C
working for the test clients, you can alter the scopes to cover the full range network (192.2.2.0). My router con-
of addresses, and convert the remaining clients to use DHCP. nects these together, and uses the ad-
● The DHCP Manager utility can be run remotely on NT workstations, so dresses 130.1.0.1 and 192.2.2.1. My NT
you don’t have to work at the NT Server when managing DHCP servers. server that I’m installing DHCP on was
You can install it from the NT Server CD-ROM from the \SUPPORT\CLI- installed as 130.1.0.32, and I’ve got a
ENTS\SRVTOOLS\WINNT\i386 directory. Unix server that doesn’t support
DHCP at address 130.1.0.33.

File: C04102.2
PC Network Advisor Issue 87 (September 1997) Page 12
Connectivity:Overview

DHCP

Step 1 Step 3 Step 4


The first step is to document all the Now, Create one scope for each net- Define the TCP/IP options for
network addresses already in use, es- work segment. I’ve got two segments, DHCP - options can be set globally for
tablish what ranges DHCP will use, so I create two scopes (Marketing and DHCP, individually for each scope, or
and check you know what TCP/IP set- Finance) using the Scope/Create as a default. A global option will apply
tings each network requires. I’ve de- menu option. To define a scope you fill to any DHCP scope, whereas the
cided that I want to keep a few in the dialog box as shown in Figure 2. scope-level option is defined differ-
addresses (241-254) spare in each net- The start and end addresses for the ently for each scope. An example here
work that I can allocate to other clients Marketing scope are 130.1.0.2 and is the router address, which will differ
which don’t support DHCP in future. 130.1.0.240. As this is a class B network, for the Marketing and Finance scopes.
So, for Marketing, the range of ad- the subnet mask is 255.255.0.0. In this Default options can be used to define
dresses I can use is 130.1.0.2 to scope, I also have to define the exclu- something globally that can be over-
130.1.0.240 (excluding 130.1.0.32 and sion of the two servers, so a DHCP ridden by a scope setting for excep-
130.1.0.33). For Finance, it’s 192.2.2.2 to client won’t get allocated those ad- tions. In this example, all the DHCP
192.2.2.240. dresses. You can have single-address options except the Router address are
As you can see, I’ve avoided the exclusions or ranges, as shown here. the same for both scopes, so I’ll use the
addresses used by the router, and the Next I have to define the lease dura- Global settings. DHCP supports a
non-DHCP hosts. I’ve excluded the tion - in this example the default of large range of options that can be de-
router because that should have a fixed three days is used. The name and com- fined, but most installations will only
TCP/IP address. The DHCP server ment are just for descriptive purposes. require the following:
cannot also be a DHCP client, so I have Once you’ve defined the scope and
to manually configure this NT Server’s clicked OK, you’ll be prompted to 003 Router.
TCP/IP address. NT servers that are make the scope active. 006 DNS Servers.
not running DHCP or WINS services The length of the lease period de- 015 Domain Name.
can be configured using DHCP. pends on your environment. If it’s not 044 WINS/NBNS servers.
rapidly changing you can set longer 046 WINS/NBT node type.
Step 2 lease periods (more than three days),
Now, we install the DHCP server so that leases are re-assigned only if If you look again at Figure 1, you
software on the NT Server. It’s under computers leave the network. If your can see (from the “map of the world”
the Networks control panel, by select- environment is continually changing icons) that all these settings have been
ing the Add Software button, under you might consider using shorter lease defined as “Global” for DHCP, except
the “TCP/IP and related components” periods, so that changes to the DHCP for the router address, which is differ-
heading. After rebooting the server, options (discussed below) are distrib- ent for each network. You’ll only need
you can administer it from the DHCP uted quickly. When you first start to options 044 and 046 if you’re using a
Manager tool (see Figure 1), which use DHCP it’s best to stick to short WINS server - if you’re not using
should be available on either the Start leases of a few hours, so any problems WINS, you don’t need to define either
Menu or the Program Manager. The in your DHCP settings are changed of options 44 and 46.
left-hand pane shows DHCP servers without needing to visit all the DHCP When you set option 044, you’ll get
and the scopes that are defined. The clients to force renewals. Once things the following message:
right-hand pane shows the DHCP op- are stable, you can gradually increase
tions set for the selected scope. the lease periods on the server. Warning : In order for WINS
to function properly, you
must now set option 46
(WINS/NBT Node Type), and set
it to either 0x02 (P-Node),
0x04 (M-Node) or 0x08 (H-
Node)

The various node types tell Mi-


crosoft network clients how to register
and look up computer names on Mi-
crosoft networks. The best option to
use is 0x08 (H-Node). This mode tells
the client PC to use the WINS server
when finding the address of another
computer or a share, but that it should
fall back to using broadcasts if the
WINS server isn’t available. This
Figure 1 - The DHCP Manager tool. means that it reduces the number of

Issue 87 (September 1997) Page 13


PC Network Advisor File: C04102.3
Connectivity:Overview

broadcasts on your network, and


speeds up browsing shares, printers
and so forth. For more detail on node “When the DHCP client obtains a lease
types, see the NT Server documenta-
tion (the TCP/IP section, chapter 3), or on an address, it knows how long the lease
search the Microsoft TechNet database
online at www.microsoft.com for arti- period is. So it knows that it can use the
cle Q119493.
Step 5
address without reference to the DHCP
Test some DHCP clients by chang- server until the lease expires.”
ing these to use DHCP. If you’ve al-
ready got manually configured
TCP/IP settings on existing comput-
ers, you’ll need to clear these first as Other Issues DHCP to work, don’t forget to use the
they can override the settings that Microsoft TechNet database available
DHCP uses. Once you’ve changed the You can run more than one DHCP for free at Microsoft’s web site, as well
PC to use DHCP, reboot and the DHCP server on a network. You must not, as the books online on the NT Server
client should request and receive the however, define the overlapping or CD-ROM for reference.
DHCP-allocated address and settings. identical scopes on different DHCP DHCP is a very stable service, and
You can check that DHCP is working servers, as NT’s DHCP servers (unlike once you’ve set it up, it requires very
on Windows 95 by using the WINS) don’t communicate with each little maintenance. You should check it
WINIPCFG.EXE utility (from the other. This could result in two nodes at least once each month to see how
Start/Run menu). This shows the being allocated the same TCP/IP ad- many free addresses are available, to
TCP/IP settings, and also has options dress. MetaInfo produces a DHCP plan your network growth and pre-
to force the PC to renew or release its server for NT which does support vent the server from running out. Best
DHCP settings. communication between servers for of all, you will rarely need to visit a
There is a similar utility available added resilience should you desire this workstation ever again to configure its
for Windows NT, included in the NT feature - check their company web site TCP/IP settings.
Resource Kit, or alternatively you can at www.metainfo.com for more infor-
use the built-in command-line utility mation.
IPCONFIG. If you have problems with getting

PCNA

The Author
Howard Richards (hir@cix.co.uk)
Figure 2 - Defining a scope. runs an IT consultancy.

File: C04102.4
PC Network Advisor Issue 87 (September 1997) Page 14
Recent Reviews from Tech Support Alert

Reviews of the Best Windows Backup Software


In this detailed comparative review, we checked out eighteen backup software
utilities designed for home or SOHO use. Many of the products reviewed
were disappointing. However 6 products passed our tests with flying colors
and 2 of these were so impressive, they were awarded our “Editor’s Choice.”

Suppliers of Cheap Inkjet Printer Cartridges Reviewed and Rated


With hundreds of companies all claiming to have the “cheapest and best inkjet
printer cartridges,” our editors decided to put their claims to the test. Not
unexpectedly, many suppliers flunked but we did manage to come up with a
number of web sites that sell good quality inkjet printer cartridges at heavily
discounted prices.

The Best Anti Trojan Software


Our editors took a close look at the 6 leading anti-trojan/trojan remover
software utilities. Unfortunately, they found only 2 products that were effective
in their ability to detect and remove dangerous modern polymorphic and
process injecting trojans.

The 46 Best Ever Freeware Utilities


This is our Editor, Ian “Gizmo” Richards, personal selection of the best
freeware utilities. He’s hunted down some real gems, many of which perform
better than expensive commercial products.

Tech Support Alert


http://www.techsupportalert.com

You might also like