⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 introduction.texi

📁 this is sample about DHCP-agent
💻 TEXI
字号:
@c ***************** list ***********************@node Introduction@chapter Introduction@cindex Introductiondhcp-agent is a suite, or a set of tools, that allow a UNIX host tomake use of the Dynamic Host Configuration protocol.Currently the suite is packaged with the following tools:@itemize @bullet@item dhcp-client : A highly configurable and extendable DHCP client.@itemdhcp-sniff  : A command line DHCP sniffer.@end itemizeIn good time the suite will also be packaged with:@itemize @bullet@itemdhcp-server : A configurable and extendable DHCP server.@itemdhcp-relay : A DHCP relay agent.@end itemize@section Building and InstallingYou can download a copy of dhcp-agent from:@url{http://dhcp-agent.sourceforge.net/}You will also need libdnet, libpcap, and guile from the followinglocations:@itemize bullet@itemlibdnet version 1.7 or higher: @url{http://libdnet.sourceforge.net/}@itemlibpcap version 0.6.2 or higher: @url{http://www.tcpdump.org/}@itemguile version 1.6.4 or higher: @url{http://www.gnu.org/software/guile/guile.html}@end itemizeOnce these dependencies are installed use the @command{configure}script to configure the build of dhcp-agent. Then @command{make} and@command{make install} to install it on your system.The @command{configure} script accepts a number of flags andenvironment variables. You should use @command{configure --help} tolist these.@section Default SettingsThe @command{configure} script will allow you to set some defaultpaths including where dhcp-agent keeps its configuration and datafiles.These are the more prominent options:@itemize@item--prefix : the ``prefix'' is where all the directories arecreated. If you wish to install dhcp-agent in @file{/opt/dhcp-agent}then you will need to specify that directory prefix. By defaultdhcp-agent will use @file{/usr/local} as its prefix.@item--bindir: the directory where binaries are installed@item--sysconfdir: the directory where the configuration files areinstalled@item--localstatedir: the directory where data files are stored. leaseinformation is kept here.@end itemize@section System Specific Notes@subsection GNU/LinuxThe client under Linux may not be entirely happy when applied to analiased interface. You will see some error messages, however thingsshould proceed OK.@subsection SolarisNo major issues so far. Building the package may become``interesting'' if you have not setup your build environment properly.@subsection FreeBSDUnder FreeBSD the client will make use of two bpf devices. This isbecause of a limitation in dnet. If you run out of bpf devices you mayneed to compile a kernel with more bpf devices.@subsection NetBSDNetBSD ships with a pcap which does not come with @dfn{pcap_freecode}this results in a small mem leak when the client reinitializes its rawnetwork code. To avoid this upgrade to the latest version of pcap andnuke your old pcap library.@subsection OpenBSDOpenBSD has some brain damage with its bpf structure. Unlike the otherBSD flavors it insists on using unsigned instead of signed integersfor the number of seconds in its timestamp. This results in someinaccuracy when calculating timeouts. Lobby your OpenBSD developers tostop the brain damage.@section Overview of DHCPDHCP (Dynamic Host Configuration Protocol) is a protocol designed toassign host configuration parameters from a DHCP server to a DHCPclient. The parameters are passed as a lease to the client.  The termlease is used because the parameters usually have a finitelifetime. This allows the network administrator to update theconfiguration parameters, and later propogate the configurationchanges to the client hosts.DHCP is a convenient method of maintaining configuration acrossmultiple machines from a central configuration repository.@subsection Lease AcquisitionThe client begins by broadcasting a DHCP DISCOVER message, whichsolicits DHCP leases from servers. DHCP OFFER messages are sent from DHCP servers to the client. The client picks one of the lease offers and responds with a DHCPREQUEST. The server responds with a DHCP ACK to acknowledge, orDHCP NACK to refuse assigning the lease.Once the client receives the acknowledgement it checks to see if theIP address is currently active. If no address collision is detected,the client performs its configuration based on the address passed fromthe server and additional options provided in the lease.If address collision is detected, the client transmits a DHCP DECLINEmessage informing the server that the lease is no good.@subsection Lease RenewalEach lease comes with three timers, a rebind, renew, and an expirytimer. If no rebind or renew time is specified the client can createdefault rebind and renew timers from the expiry time.When these timers are reached the client attempts to renew the leaseby transmitting a DHCP REQUEST and awaiting an acknowledgement. If thetimer expires and the lease is not renewed, the client undoes thesystem configuration and revers to its lease acquisition stage.@subsection Lease ReleaseWhen the client is shut down it sends a DHCP RELEASE message to theserver notifying it that the lease is no longer in use. The client,also, unconfigures the host system its running on.@section Other Information Worth Noting.@subsection  On Timeout Thresholds And RetriesThe dhcp-agent suite never allows the user to specify exact timeoutand retries for any of its operations. This is intentional. Instead,the user can specify an upper timeout period called a threshold and aretry counter which is decremented per amount of times the thresholdis reached.For example, in the client configuration you can specify the@var{arp-retries} and @var{arp-timeout-threshold}. If you set theretries to two, and the threshold to fifteen the client, whenperforming an ARP operation will begin by transmitting the firstdatagram, and then wait up to four seconds (default hard codedsetting: see dhcp-libutil.h). Then if this timeout is reached it willdouble the timeout, add a small random amount to it, and tryagain. When the timeout has reached fifteen seconds, it will considerthe operation to have timed out completely, and decrement its retrycounter. Then it starts again.A setting of one for retries, and ten for a timeout threshold will notcause the client to just try once, but keep trying for up to tenseconds using the back-off algorithm mentioned above. This algorithmis mentioned in RFC2131 and implemented for compliance. It also makesgood sense for ethernet networks that have high collisions or arecongested enough to have heavy packet loss.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -