0% found this document useful (0 votes)
26 views5 pages

Understanding DHCP

Uploaded by

ailsono
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views5 pages

Understanding DHCP

Uploaded by

ailsono
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

W

ith the growth of the In-


ternet, TCP/IP has now be-
come a must-have protocol
for most computer networks. It pro-
vides a single network protocol that is
supported by almost every type of
computer system, a plethora of appli-
cations that use it, and it is well suited
to both large and small networks. Its
also essential if you wish to set up an
intranet.
The downside of TCP/IP is that,
unlike protocols such as IPX, it needs
addresses and configuration settings
to be defined on each computer or pe-
ripheral onthe network. This canentail
animmense amount of systemadmini-
stration work.
DHCP stands for Dynamic Host
Configuration Protocol, and is used to
centrally allocate and manage TCP/IP
configurations of client nodes. If
youve got more than a handful of
computers to manage, then DHCP can
help to save a great deal of time and
trouble in setting up and administer-
ing a TCP/IP network. DHCP offers
the following features:
G It allows you to define pools of
TCP/IP addresses, which are then
allocatedto client PCs bythe server.
These pools are called scopes in
DHCP terminology.
G Not only are the TCP/IP addresses
handed out, so are all the related
configuration settings like the sub-
net mask, default router, DNS serv-
er, that are required to make
TCP/IP work correctly.
G DHCP works across most TCP/IP
routers and allocates IPs according
tothe subnet the request camefrom.
This means you wont need to re-
configure a PC that is moved from
one subnet to another.
G Addresses can be leasedfor periods
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-
dresses that are no longer used.
What Do I Need?
To use DHCP you need a DHCP
server (to allocate the addresses and
maintain a database) and DHCP cli-
ents, which will be discussed later.
A DHCP server is included in Win-
dows NTServer 3.51 and4.0. Although
this article is concentrating on NT
Server, DHCP isnt a Microsoft stand-
ard and is available from other ven-
dors for NT (such as MetaInfo), and on
other platforms. For more information
see the DHCPFAQ, whichis discussed
below.
How Does DHCP Work?
When a DHCP client is first
switched on, it sends a broadcast
packet on the network with a DHCP
request. This is picked up by a DHCP
server, whichallocates anIPaddress to
the PC, from one of the scopes (the
pools of addresses) it has available.
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
the request by the router to tell the
server which network the request
came from. The DHCP server uses this
information to pick an address from
the correct scope. The server replies to
the client, allocating it the TCP/IP ad-
dress and settings required.
However, DHCP doesnt allocate
the address permanently. It tells the
client that it has leased the address
to it for a specific time period, which
you as administrator can control. By
default DHCP is installedwith a three-
day lease period. When the lease ex-
pires, the client can ask the server to
renew the lease. If the DHCP server
doesnt hear fromthe client beyondthe
expiry of the lease period, it will put
that address back in the pool ready to
be re-used.
When the DHCP client obtains a
lease on an address, it knows howlong
the lease period is. So it knows that it
can use the address without reference
to the DHCP server until the lease ex-
pires. When it does expire, it can re-
quest a renewal. The implicationof this
Issue 87 (September 1997) Page 11 File: C04102.1
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
The downside of TCP/IP is that, unlike
protocols such as IPX, it needs addresses
and configuration settings to be defined
on each computer or peripheral on the
network. This can entail an immense
amount of system administration work.
Understanding DHCP
PC Network Advisor
Connectivity:Overview
is that changing DHCP settings on the
server wont instantly change all your
DHCP client PCs, as they wont find
out about the changes until they ask
the server to renew their lease. This is
one factor you need to consider when
you decide your lease period.
BeforeYouI nstall
Tempting as it might be to install
DHCPright nowandstart settingit up,
there are a few things youll need to
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
following are known to support
DHCP:
G Windows NT and Windows 95
(built-in).
G Windows for Workgroups (using
Microsofts 32-bit TCP/IP stack).
G HPs JetDirect range of network
printer cards.
G Some other third-party TCP/IP
stacks.
G Some versions of Unix, such as So-
laris 2.6.
There is a DHCP FAQ at http://-
web.syr.edu/~jmwobus/comfaqs/-
dhcp.faq.html that includes a more
comprehensive list of DHCP-sup-
ported clients. If a particular client
doesnt support DHCP, youll need to
manually allocate a TCP/IP address
and ensure that your DHCP server
doesnt try to hand that address out by
excluding it from the relevant scope.
The second item to check is router
support for DHCP if you have a wide-
area network. DHCP clients use a
broadcast packet to find a DHCP serv-
er, so if a client is on one side of a
router, and the server on the other, it is
possible the router will filter out those
broadcasts. The recent software revi-
sions on many routers include support
for DHCP-forwarding (see the list be-
low), but it isnt normally enabled by
default, so youll need to get this fea-
ture switched on. Routers that do sup-
port DHCP are:
G Cisco revisions 9.21 and 10.0 (and
above).
G 3Com: version 8.0 includes support
for DHCP.
G Wellfleet/Bay networks: Enabling
BOOTPon version 9.00 (andabove)
of BayRs.
Search your router documentation
for more details of DHCP support and
how to enable the service. Note that if
youre connected to the Internet, your
firewall and router should be config-
ured to block all DHCP-related traffic.
DHCP uses the same TCP/IP port as
BOOTP, so blocking port 67 for the
UDP protocol will allow this.
Finally youll need to consider the
impact of DHCP on any domain name
servers (DNS) you have. The dynamic
allocation of TCP/IP addresses under
DHCP means that clients can change
their TCP/IP addresses. If you have a
domain name server with a static text
file of IP addresses and host names,
this will require maintenance to keepit
in sync with DHCP. A more efficient
methodis to use the domain name serv-
er service that is built into NT Server
version 4.0, as this can be linked to
DHCP, so that it automatically knows
about DHCP changes of TCP/IP ad-
dresses. Such a service is known as
DDNS (Dynamic Domain Name Serv-
er).
If you are still using NT server 3.5
and you dont want to upgrade to NTS
4.0 for this feature, you might consider
a third-party solution such as Meta-
Infos TCP/IP suite which incorpo-
rates linked DHCP and DDNS servers.
AnExample
Lets follow an example to see this
inaction. I have twonetworksegments
(Marketing and Finance) linked by a
TCP/IP router. The Marketing seg-
ment is a class B network (130.1.0.0),
and the Finance segment is a class C
network (192.2.2.0). My router con-
nects these together, and uses the ad-
dresses 130.1.0.1 and 192.2.2.1. My NT
server that IminstallingDHCPonwas
installed as 130.1.0.32, and Ive got a
Unix server that doesnt support
DHCP at address 130.1.0.33.
File: C04102.2 Issue 87 (September 1997) Page 12
Tips
G A recommendation to anyone who is converting an existing TCP/IP
network to use DHCP is to start small, with just one or two clients, and
restrict the DHCP scopes to two or three verified unused addresses for
testing purposes. This helps avoid the possible problem of DHCP allo-
catingthe IPaddresses of existingnetworknodes. Once youve got DHCP
working for the test clients, youcan alter the scopes to cover the full range
of addresses, and convert the remaining clients to use DHCP.
G The DHCP Manager utility can be run remotely on NT workstations, so
you dont have to work at the NT Server when managing DHCP servers.
Youcaninstall it fromthe NTServer CD-ROMfromthe\SUPPORT\CLI-
ENTS\SRVTOOLS\WINNT\i386 directory.
When a DHCP client is first switched
on, it sends a broadcast packet on the
network with a DHCP request. This
is picked up by a DHCP server, which
allocates an IP address to the PC,
from one of the scopes.
PC Network Advisor
Connectivity:Overview
Step1
The first step is to document all the
network addresses already in use, es-
tablish what ranges DHCP will use,
and check you knowwhat TCP/IPset-
tings each network requires. Ive de-
cided that I want to keep a few
addresses (241-254) spare in each net-
work that I can allocate to other clients
which dont support DHCP in future.
So, for Marketing, the range of ad-
dresses I can use is 130.1.0.2 to
130.1.0.240 (excluding 130.1.0.32 and
130.1.0.33). For Finance, its 192.2.2.2 to
192.2.2.240.
As you can see, Ive avoided the
addresses used by the router, and the
non-DHCP hosts. Ive excluded the
router because that shouldhave a fixed
TCP/IP address. The DHCP server
cannot also be a DHCP client, so I have
to manually configure this NTServers
TCP/IP address. NT servers that are
not running DHCP or WINS services
can be configured using DHCP.
Step2
Now, we install the DHCP server
software on the NT Server. Its under
the Networks control panel, by select-
ing the Add Software button, under
the TCP/IP and related components
heading. After rebooting the server,
you can administer it from the DHCP
Manager tool (see Figure 1), which
should be available on either the Start
Menu or the Program Manager. The
left-hand pane shows DHCP servers
and the scopes that are defined. The
right-hand pane shows the DHCP op-
tions set for the selected scope.
Step3
Now, Create one scope for each net-
work segment. Ive got two segments,
so I create two scopes (Marketing and
Finance) using the Scope/Create
menu option. To define a scope you fill
in the dialog box as shown in Figure 2.
The start and end addresses for the
Marketing scope are 130.1.0.2 and
130.1.0.240. As this is a class Bnetwork,
the subnet mask is 255.255.0.0. In this
scope, I also have to define the exclu-
sion of the two servers, so a DHCP
client wont get allocated those ad-
dresses. You can have single-address
exclusions or ranges, as shown here.
Next I have to define the lease dura-
tion - in this example the default of
three days is used. The name and com-
ment are just for descriptive purposes.
Once youve defined the scope and
clicked OK, youll be prompted to
make the scope active.
The length of the lease period de-
pends on your environment. If its not
rapidly changing you can set longer
lease periods (more than three days),
so that leases are re-assigned only if
computers leave the network. If your
environment is continually changing
you might consider using shorter lease
periods, so that changes to the DHCP
options (discussed below) are distrib-
uted quickly. When you first start to
use DHCP its best to stick to short
leases of a few hours, so any problems
in your DHCP settings are changed
without needing to visit all the DHCP
clients to force renewals. Once things
are stable, you can gradually increase
the lease periods on the server.
Step4
Define the TCP/IP options for
DHCP - options can be set globally for
DHCP, individually for each scope, or
as a default. Aglobal option will apply
to any DHCP scope, whereas the
scope-level option is defined differ-
ently for each scope. An example here
is the router address, which will differ
for the Marketing and Finance scopes.
Default options can be used to define
something globally that can be over-
ridden by a scope setting for excep-
tions. In this example, all the DHCP
options except the Router address are
the same for both scopes, so Ill use the
Global settings. DHCP supports a
large range of options that can be de-
fined, but most installations will only
require the following:
003 Router.
006 DNS Servers.
015 Domain Name.
044 WINS/NBNS servers.
046 WINS/NBT node type.
If you look again at Figure 1, you
can see (from the map of the world
icons) that all these settings have been
defined as Global for DHCP, except
for the router address, which is differ-
ent for each network. Youll only need
options 044 and 046 if youre using a
WINS server - if youre not using
WINS, you dont need to define either
of options 44 and 46.
When you set option 044, youll get
the following message:
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 howto 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 isnt available. This
means that it reduces the number of
Issue 87 (September 1997) Page 13 File: C04102.3
Figure 1 - The DHCP Manager tool.
PC Network Advisor
DHCP
Connectivity:Overview
broadcasts on your network, and
speeds up browsing shares, printers
and so forth. For more detail on node
types, see the NT Server documenta-
tion (the TCP/IP section, chapter 3), or
search the Microsoft TechNet database
online at www.microsoft.com for arti-
cle Q119493.
Step5
Test some DHCP clients by chang-
ing these to use DHCP. If youve al-
ready got manually configured
TCP/IP settings on existing comput-
ers, youll need to clear these first as
they can override the settings that
DHCP uses. Once youve changed the
PCtouse DHCP, reboot andthe DHCP
client should request and receive the
DHCP-allocated address and settings.
You can check that DHCP is working
on Windows 95 by using the
WINIPCFG.EXE utility (from the
Start/Run menu). This shows the
TCP/IP settings, and also has options
to force the PC to renew or release its
DHCP settings.
There is a similar utility available
for Windows NT, included in the NT
Resource Kit, or alternatively you can
use the built-in command-line utility
IPCONFIG.
Other I ssues
You can run more than one DHCP
server on a network. You must not,
however, define the overlapping or
identical scopes on different DHCP
servers, as NTs DHCP servers (unlike
WINS) dont communicate with each
other. This could result in two nodes
being allocated the same TCP/IP ad-
dress. MetaInfo produces a DHCP
server for NT which does support
communication between servers for
addedresilience shouldyoudesire this
feature - check their company web site
at www.metainfo.com for more infor-
mation.
If you have problems with getting
DHCP to work, dont forget to use the
Microsoft TechNet database available
for free at Microsofts web site, as well
as the books online on the NT Server
CD-ROM for reference.
DHCP is a very stable service, and
once youve set it up, it requires very
little maintenance. You shouldcheck it
at least once each month to see how
many free addresses are available, to
plan your network growth and pre-
vent the server from running out. Best
of all, you will rarely need to visit a
workstation ever again to configure its
TCP/IP settings.
File: C04102.4 Issue 87 (September 1997) Page 14
The Author
Howard Richards ([email protected])
runs an IT consultancy.
PCNA
Figure 2 - Defining a scope.
When the DHCP client obtains a lease
on an address, it knows how long the lease
period is. So it knows that it can use the
address without reference to the DHCP
server until the lease expires.
PC Network Advisor
Connectivity:Overview
New Reviews from Tech Support Alert


Anti-Trojan Software Reviews
A detailed review of six of the best anti trojan software programs. Two products
were impressive with a clear gap between these and other contenders in their
ability to detect and remove dangerous modern trojans.

Inkjet Printer Cartridge Suppliers
Everyone gets inundated by hundreds of ads for inkjet printer cartridges, all
claiming to be the cheapest or best. But which vendor do you believe? Our
editors decided to put them to the test by anonymously buying printer cartridges
and testing them in our office inkjet printers. Many suppliers disappointed but we
came up with several web sites that offer good quality cheap inkjet cartridges
with impressive customer service.

Windows Backup Software
In this review we looked at 18 different backup software products for home or
SOHO use. In the end we could only recommend six though only two were good
enough to get our Editors Choice award

The 46 Best Freeware Programs
There are many free utilities that perform as well or better than expensive
commercial products. Our Editor Ian Richards picks out his selection of the very
best freeware programs and he comes up with some real gems.



















Tech Support Alert
http://www.techsupportalert.com

You might also like