version 1.1, 2012/02/21 22:30:18
|
version 1.1.1.1, 2012/10/09 09:06:54
|
Line 1
|
Line 1
|
.\" $Id$ |
.\" $Id$ |
.\" |
.\" |
.\" Copyright (c) 2004,2007-2011 by Internet Systems Consortium, Inc. ("ISC") | .\" Copyright (c) 2004,2007-2012 by Internet Systems Consortium, Inc. ("ISC") |
.\" Copyright (c) 1996-2003 by Internet Software Consortium |
.\" Copyright (c) 1996-2003 by Internet Software Consortium |
.\" |
.\" |
.\" Permission to use, copy, modify, and distribute this software for any |
.\" Permission to use, copy, modify, and distribute this software for any |
Line 134 fail, by statically assigning an address.
|
Line 134 fail, by statically assigning an address.
|
.PP |
.PP |
The DHCP protocol allows a host to contact a central server which |
The DHCP protocol allows a host to contact a central server which |
maintains a list of IP addresses which may be assigned on one or more |
maintains a list of IP addresses which may be assigned on one or more |
subnets. A DHCP client may request an address from this pool, and | subnets. A DHCP client may request an address from this pool, and |
then use it on a temporary basis for communication on network. The | then use it on a temporary basis for communication on network. The |
DHCP protocol also provides a mechanism whereby a client can learn |
DHCP protocol also provides a mechanism whereby a client can learn |
important details about the network to which it is attached, such as |
important details about the network to which it is attached, such as |
the location of a default router, the location of a name server, and |
the location of a default router, the location of a name server, and |
Line 149 or
|
Line 149 or
|
options. |
options. |
.PP |
.PP |
On startup, \fBdhclient\fR reads the dhclient.conf |
On startup, \fBdhclient\fR reads the dhclient.conf |
.IR dhclient.conf | for configuration instructions. It then gets a list of all the |
for configuration instructions. It then gets a list of all the | network interfaces that are configured in the current system. For |
network interfaces that are configured in the current system. For | |
each interface, it attempts to configure the interface using the DHCP |
each interface, it attempts to configure the interface using the DHCP |
protocol. |
protocol. |
.PP |
.PP |
In order to keep track of leases across system reboots and server |
In order to keep track of leases across system reboots and server |
restarts, \fBdhclient\fR keeps a list of leases it has been assigned in the |
restarts, \fBdhclient\fR keeps a list of leases it has been assigned in the |
dhclient.leases file. On startup, after reading the dhclient.conf | dhclient.leases file. On startup, after reading the dhclient.conf |
file, \fBdhclient\fR reads the dhclient.leases file to refresh its memory |
file, \fBdhclient\fR reads the dhclient.leases file to refresh its memory |
about what leases it has been assigned. |
about what leases it has been assigned. |
.PP |
.PP |
When a new lease is acquired, it is appended to the end of the |
When a new lease is acquired, it is appended to the end of the |
dhclient.leases file. In order to prevent the file from becoming | dhclient.leases file. In order to prevent the file from becoming |
arbitrarily large, from time to time \fBdhclient\fR creates a new |
arbitrarily large, from time to time \fBdhclient\fR creates a new |
dhclient.leases file from its in-core lease database. The old version |
dhclient.leases file from its in-core lease database. The old version |
of the dhclient.leases file is retained under the name |
of the dhclient.leases file is retained under the name |
Line 171 until the next time \fBdhclient\fR rewrites the databa
|
Line 170 until the next time \fBdhclient\fR rewrites the databa
|
.PP |
.PP |
Old leases are kept around in case the DHCP server is unavailable when |
Old leases are kept around in case the DHCP server is unavailable when |
\fBdhclient\fR is first invoked (generally during the initial system boot |
\fBdhclient\fR is first invoked (generally during the initial system boot |
process). In that event, old leases from the dhclient.leases file | process). In that event, old leases from the dhclient.leases file |
which have not yet expired are tested, and if they are determined to |
which have not yet expired are tested, and if they are determined to |
be valid, they are used until either they expire or the DHCP server |
be valid, they are used until either they expire or the DHCP server |
becomes available. |
becomes available. |
.PP |
.PP |
A mobile host which may sometimes need to access a network on which no |
A mobile host which may sometimes need to access a network on which no |
DHCP server exists may be preloaded with a lease for a fixed |
DHCP server exists may be preloaded with a lease for a fixed |
address on that network. When all attempts to contact a DHCP server | address on that network. When all attempts to contact a DHCP server |
have failed, \fBdhclient\fR will try to validate the static lease, and if it |
have failed, \fBdhclient\fR will try to validate the static lease, and if it |
succeeds, will use that lease until it is restarted. |
succeeds, will use that lease until it is restarted. |
.PP |
.PP |
A mobile host may also travel to some networks on which DHCP is not |
A mobile host may also travel to some networks on which DHCP is not |
available but BOOTP is. In that case, it may be advantageous to | available but BOOTP is. In that case, it may be advantageous to |
arrange with the network administrator for an entry on the BOOTP |
arrange with the network administrator for an entry on the BOOTP |
database, so that the host can boot quickly on that network rather |
database, so that the host can boot quickly on that network rather |
than cycling through the list of old leases. |
than cycling through the list of old leases. |
Line 196 network interfaces, eliminating non-broadcast interfac
|
Line 195 network interfaces, eliminating non-broadcast interfac
|
possible, and attempt to configure each interface. |
possible, and attempt to configure each interface. |
.PP |
.PP |
It is also possible to specify interfaces by name in the dhclient.conf |
It is also possible to specify interfaces by name in the dhclient.conf |
file. If interfaces are specified in this way, then the client will | file. If interfaces are specified in this way, then the client will |
only configure interfaces that are either specified in the |
only configure interfaces that are either specified in the |
configuration file or on the command line, and will ignore all other |
configuration file or on the command line, and will ignore all other |
interfaces. |
interfaces. |
Line 259 DHCP client will exit if it isn't able to identify any
|
Line 258 DHCP client will exit if it isn't able to identify any
|
to configure. On laptop computers and other computers with |
to configure. On laptop computers and other computers with |
hot-swappable I/O buses, it is possible that a broadcast interface may |
hot-swappable I/O buses, it is possible that a broadcast interface may |
be added after system startup. This flag can be used to cause the client |
be added after system startup. This flag can be used to cause the client |
not to exit when it doesn't find any such interfaces. The | not to exit when it doesn't find any such interfaces. The |
.B omshell(1) |
.B omshell(1) |
program can then be used to notify the client when a network interface |
program can then be used to notify the client when a network interface |
has been added or removed, so that the client can attempt to configure an IP |
has been added or removed, so that the client can attempt to configure an IP |
Line 397 client using TCP/IP, authenticate, and can then examin
|
Line 396 client using TCP/IP, authenticate, and can then examin
|
current status and make changes to it. |
current status and make changes to it. |
.PP |
.PP |
Rather than implementing the underlying OMAPI protocol directly, user |
Rather than implementing the underlying OMAPI protocol directly, user |
programs should use the dhcpctl API or OMAPI itself. Dhcpctl is a | programs should use the dhcpctl API or OMAPI itself. Dhcpctl is a |
wrapper that handles some of the housekeeping chores that OMAPI does |
wrapper that handles some of the housekeeping chores that OMAPI does |
not do automatically. Dhcpctl and OMAPI are documented in | not do automatically. Dhcpctl and OMAPI are documented in |
\fBdhcpctl(3)\fR |
\fBdhcpctl(3)\fR |
and \fBomapi(3)\fR. Most things you'd want to do with the client can | and \fBomapi(3)\fR. Most things you'd want to do with the client can |
be done directly using the \fBomshell(1)\fR command, rather than |
be done directly using the \fBomshell(1)\fR command, rather than |
having to write a special program. |
having to write a special program. |
.SH THE CONTROL OBJECT |
.SH THE CONTROL OBJECT |
The control object allows you to shut the client down, releasing all |
The control object allows you to shut the client down, releasing all |
leases that it holds and deleting any DNS records it may have added. |
leases that it holds and deleting any DNS records it may have added. |
It also allows you to pause the client - this unconfigures any |
It also allows you to pause the client - this unconfigures any |
interfaces the client is using. You can then restart it, which | interfaces the client is using. You can then restart it, which |
causes it to reconfigure those interfaces. You would normally pause | causes it to reconfigure those interfaces. You would normally pause |
the client prior to going into hibernation or sleep on a laptop |
the client prior to going into hibernation or sleep on a laptop |
computer. You would then resume it after the power comes back. | computer. You would then resume it after the power comes back. |
This allows PC cards to be shut down while the computer is hibernating |
This allows PC cards to be shut down while the computer is hibernating |
or sleeping, and then reinitialized to their previous state once the |
or sleeping, and then reinitialized to their previous state once the |
computer comes out of hibernation or sleep. |
computer comes out of hibernation or sleep. |
.PP |
.PP |
The control object has one attribute - the state attribute. To shut | The control object has one attribute - the state attribute. To shut |
the client down, set its state attribute to 2. It will automatically | the client down, set its state attribute to 2. It will automatically |
do a DHCPRELEASE. To pause it, set its state attribute to 3. To | do a DHCPRELEASE. To pause it, set its state attribute to 3. To |
resume it, set its state attribute to 4. |
resume it, set its state attribute to 4. |
.PP |
.PP |
.SH ENVIRONMENT VARIABLES |
.SH ENVIRONMENT VARIABLES |
Line 465 Stanford.
|
Line 464 Stanford.
|
The current version owes much to Elliot's Linux enhancements, but |
The current version owes much to Elliot's Linux enhancements, but |
was substantially reorganized and partially rewritten by Ted Lemon |
was substantially reorganized and partially rewritten by Ted Lemon |
so as to use the same networking framework that the Internet Systems |
so as to use the same networking framework that the Internet Systems |
Consortium DHCP server uses. Much system-specific configuration code | Consortium DHCP server uses. Much system-specific configuration code |
was moved into a shell script so that as support for more operating |
was moved into a shell script so that as support for more operating |
systems is added, it will not be necessary to port and maintain |
systems is added, it will not be necessary to port and maintain |
system-specific configuration code to these operating systems - instead, |
system-specific configuration code to these operating systems - instead, |