\documentclass[letterpaper]{article}
\nonstopmode
\akai
\usepackage{linuxdoc-sgml}
\usepackage{qwertz}
\usepackage{url}
\usepackage[latin1]{inputenc}
\usepackage{t1enc}
\usepackage[english]{babel}
\usepackage{epsfig}
\usepackage{null}
\def\addbibtoc{
\addcontentsline{toc}{section}{\numberline{\mbox{}}\relax\bibname}
}%end-preamble
\setcounter{page}{1}
\title{DHCP mini-HOWTO (DHCPd/DHCPcd)}
\author{×÷Õß£ºVladimir Vuksan, {\ttfamily vuksan@veus.hr}
ÒëÕß£º ½¯´óÎ°£¬ {\ttfamily dawei@sinica.edu.tw}}
\date{°æ±¾/·¢ÐÐÈÕÆÚ£ºv4.2, 11 June 1999}
\abstract{Õâ·ÝÎÄ¼þÖ÷ÒªÔÚ½â´ð¸÷Î»£¬ÈçºÎ°ÑÄãµÄ Linux »úÆ÷Éè¶¨³É DHCP ËÅ·þÆ÷»ò DHCP ÓÃ»§¶Ë£¬Ò»Ð©»ù±¾µÄÎÊÌâ¡£}


\begin{document}
\maketitle
\tableofcontents





\section{½éÉÜ}

       




\subsection{ÃâÔðÉùÃ÷}

Õâ·ÝÎÄ¼þµÄÄÚÈÝ²»½ÓÊÜÈÎºÎÅâ³¥ÒªÇó¡£ÒýÓÃÕâ·ÝÎÄ¼þµÄ¸ÅÄî¡¢Àý×Ó¡¢ÒÔ¼°ÆäËûµÄÄÚÈÝ
Ê±£¬¸÷Î»Òª×Ô¼º³Ðµ£·çÏÕ¡£ÓÉì¶ÕâÊÇÒ»·ÝÐÂ³ö°æµÄÎÄ¼þ£¬ËùÒÔ¿ÉÄÜ»áÓÐÐ©´íÎóÒÔ¼°²»
ÕýÈ·µÄµØ·½£¬Òò´Ë£¬µ±È»¿ÉÄÜ¶ÔÄãµÄÏµÍ³Ôì³ÉÎ£º¦¡£ËäÈ»£¬ÔÖÄÑ²»Ì«¿ÉÄÜ·¢Éú£¬µ«»¹
ÊÇÇëÐ¡ÐÄÎªÉÏ£¬³öÁËÊÂÎÒÒ»¸Å²»¸ºÈÎºÎÔðÈÎ¡£

Í¬Ê±£¬Ò²ÇëÄãÃú¼ÇÔÚÐÄ£¬Õâ·ÝÎÄ¼þËùÌá¹©µÄÄÚÈÝ²¢ {\ttfamily ²»ÊÇ} ÕýÊ½µÄ×ÊÑ¶¡£Õâ·Ý
ÎÄ¼þµÄÄÚÈÝ£¬ÓÐÐí¶à¶¼ÊÇ¼ÙÉè³öÀ´µÄ£¬¿´ÆðÀ´ºÃÏñÄÜÔË×÷£¬µ«Î´±Ø¿ÉÒÔ¡£ÒýÓÃÊ±£¬¸÷Î»
Òª×Ô¼º³Ðµ£·çÏÕ¡£






\subsection{ÈçºÎÈ¡µÃÕâ·ÝÎÄ¼þµÄ×îÐÂ°æ±¾}

Õâ·ÝÎÄ¼þµÄ×îÐÂ°æ±¾»á¶¨ÆÚµØÕÅÌùÔÚ {\itshape comp.os.linux.answers\/} µÄÐÂÎÅÂÛÌ³ÉÏ¡£
ËüÒ²»á±»·ÅÖÃÔÚ¸÷¸ö´¢´æÕâÀà×ÊÑ¶µÄÄäÃû FTP Õ¾Ì¨ÉÏ£¬ÀýÈç£º

{\ttfamily \onlynameurl{ftp://metalab.unc.edu/pub/Linux/docs/HOWTO}}

´ËÍâ£¬ÄãÍ¨³£¿ÉÒÔÔÚ Linux ÎÄ¼þ¼Æ»®µÄÍøÒ³ÉÏÕÒµ½Õâ·ÝÎÄ¼þ£¬Çë²Î¿¼ÍøÖ·£º

{\ttfamily \onlynameurl{http://metalab.unc.edu/LDP/}}





Õâ·ÝÎÄ¼þµÄÖÐÎÄ°æ·­Òë£¬Çë²Î¿¼ÍøÖ·£º





\onlynameurl{http://www.linux.org.tw/CLDP/mini/DHCP.html}





ÎÒÔÚ´ËÕýÊ½ÊÚÓè·­ÒëÈ¨¸ø·²ÊÇÒª½«±¾ÎÄ¼þ·­Òë³É×Ô¼º±¾¹úÓïÑÔµÄÈÎºÎÈË¡£Ìõ¼þÊÇÄã±ØÐë½«
¸Ã·­Òë°æ±¾µÄÁ´½áÎ»Ö·Ìá¹©¸øÎÒ¡£






\subsection{»ØÀ¡}

·²ÊÇ¶ÔÕâ·ÝÎÄ¼þËù×÷µÄÈÎºÎ»ØÀ¡¶¼·Ç³£»¶Ó­¡£Ã»ÓÐÄúµÄ¸¶³öºÍ²ÎÓë£¬Õâ·ÝÎÄ¼þ½«²»»á
³ÊÏÖÔÚÖÚÈËµÄÃæÇ°¡£ËùÒÔ£¬Çë½«ÄúµÄ½¨Òé¡¢ÅúÆÀ¡¢ºÍÖ¸½Ì¼ÄÖÁ 
{\ttfamily vuksan@veus.hr}¡£






\subsection{¹©Ï×Õß}

Õâ·ÝÎÄ¼þ×î³õÊÇÐÞ¸Ä×Ô Paul Makeev Ëù×«Ð´µÄ°æ±¾¶øÀ´µÄ¡£

ÆäËû¶ÔÕâ·ÝÎÄ¼þÓÐ¹ý¹©Ï×µÄÅóÓÑ£¬ÁÐ¾ÙÈçÏÂ£º
\begin{itemize}
\item Heiko Schlittermann
\item Jonathan Smith
\item Dan Khabaza
\item Hal Sadofsky
\item Henrik Stoerner
\item Paul Rossington
\end{itemize}







\subsection{°æÈ¨ÉùÃ÷}

Õâ·ÝÎÄ¼þ×Ô 1998 ¿ªÊ¼µÄ°æÈ¨Êôì¶ Vladimir Vuksan ËùÓÐ£¬²¢Çë°´ÕÕÒÔÏÂ¹æ¶¨À´Á÷Í¨£º

 
\begin{itemize}
\item  Linux HOWTO ÎÄ¼þµÄÈ«²¿»ò²¿·Ö£¬¿ÉÒÔÊ¹ÓÃÈÎºÎÎïÀí»òµç×ÓµÄÃ½ÌåÐÎÊ½À´¸´ÖÆ
ÓëÁ÷Í¨£¬Ö»ÒªÕâ¸ö°æÈ¨ÉùÃ÷±»±£ÁôÔÚÃ¿·Ý¿½±´ÖÐ¡£ÉÌÒµÐÐÎªµÄÔÙÁ÷Í¨ÊÇ±»ÔÊÐí¶øÇÒÊÜ»¶
Ó­µÄ£»µ«ÊÇ£¬ÈÎºÎµÄÁ÷Í¨ÐÐÎª£¬×÷Õß¶¼Ï£ÍûÄÜ±»¸æÖª¡£
\item ËùÓÐ·­Òë¡¢ÑÜÉúµÄ¹¤×÷¡¢»òºÏ²¢ÈÎºÎ Linux HOWTO ÎÄ¼þµÄ¾Û¼¯¹¤×÷£¬¶¼±ØÐëÊÜ
µ½Õâ¸ö°æÈ¨ÉùÃ÷µÄ±£»¤¡£Ò²¾ÍÊÇËµ£¬Äã²»¿ÉÒÔ´Ó HOWTO ÑÜÉú³öÒ»·ÝÎÄ¼þ£¬È»áá¶ÔÕâ·Ý
ÑÜÉúÎÄ¼þµÄÁ÷Í¨Ç¿¼ÓÉÏÆäËûÏÞÖÆÌõ¼þ¡£³ý·ÇÔÚÒ»Ð©ÌØ¶¨µÄ×´¿öÏÂ£¬²Å»áÔÊÅµÕâÐ©ÏÞÖÆ
Ìõ¼þ£»ÇëÁªÂç Linux HOWTO µÄÐ­µ÷ÈË£¬ËûµÄµØÖ·ÈçÏÂ£º
\item  Èç¹ûÄãÓÐÈÎºÎÒÉÎÊ£¬ÇëÁªÂç Linux HOWTO µÄÐ­µ÷ÈË
\end{itemize}

{\ttfamily \onlynameurl{linux-howto@metalab.unc.edu}}








\section{DHCP Í¨Ñ¶Ð­¶¨}



DHCP ¾ÍÊÇ¡°¶¯Ì¬Ö÷»úÉè¶¨Ð­¶¨¡±(Dynamic Host Configuration Protocol)µÄ¼òÐ´¡£DHCP µÄ
Ö÷ÒªÓÃÍ¾ÊÇ£ºÍ¸¹ýËÅ·þÆ÷µÄÐ­ÖúÀ´¿Ø¹Ü¸÷¸öÖ÷»ú£¨Ö´ÐÐÖÐµÄÓÃ»§¶Ë£©ÉÏ²»¿ÉÈ±ÉÙµÄÍøÂ·
Á¬Ïß²ÎÊý¡£DHCP Ð­¶¨ÏòááÏàÈÝ BOOTP Õâ¸öÍ¨Ñ¶Ð­¶¨¡£¸ü½øÒ»²½µÄ×ÊÑ¶Çë²Î¿¼ RFC 2131 
µÄ±ê×¼£¨ RFC 1531 ÊÇ¾É±ê×¼£©ÒÔ¼°ÆäËüÏà¹Ø×ÊÁÏ¡££¨Çë²Î¿¼¸ÃÎÄ¼þÄ©Î²£¬²Î¿¼×ÊÁÏÀ´Ô´
µÄ²¿·Ö£©¡£ÄãÒ²¿ÉÒÔ²ÎÔÄ£º
\onlynameurl{DHCP FAQ}
(http://web.syr.edu/~jmwobus/comfaqs/dhcp.faq.html)¡£



Õâ·ÝÎÄ¼þ½«»áÎª¸÷Î»ËµÃ÷ DHCP ËÅ·þÆ÷¶ËµÄ¡°¼à¿Ø³ÌÊ½¡±(daemon)ºÍÓÃ»§¶ËµÄ¼à¿Ø³ÌÊ½¡£¶à
ÊýÈËÔÚ¹¤×÷Õ¾ÉÏ»áÐèÒªÓÃµ½»§¶ËµÄ¼à¿Ø³ÌÊ½£¬ÒÔ±ã´ÓÔ¶¶ËµÄËÅ·þÆ÷ÉÏÈ¡µÃÍøÂ·Éè¶¨×ÊÑ¶¡£¶ø
ÏµÍ³¹ÜÀíÔ±Ôò»áÊ¹ÓÃËÅ·þÆ÷¶ËµÄ¼à¿Ø³ÌÊ½£¬ÒÔ±ãÉ¢²¼ÍøÂ·Éè¶¨×ÊÑ¶¸øÓÃ»§¶ËÀ´È¡ÓÃ£¬ËùÒÔ£¬i
Èç¹ûÄãÖ»ÊÇ¸öÒ»°ãµÄÊ¹ÓÃÕß£¬ÄÇ÷áÄã½«»áÐèÒªÓÃ»§¶ËµÄ¼à¿Ø³ÌÊ½¡£




\section{Éè¶¨ÓÃ»§¶Ë}


\subsection{ÏÂÔØÓÃ»§¶ËµÄ¼à¿Ø³ÌÊ½}



{\bfseries ºËÐÄ 2.0.x }





²»ÂÛÄãÊ¹ÓÃµÄÊÇÄÄÒ»ÖÖ Linux µÄ·¢ÐÐ°æ±¾£¬Äã¶¼±ØÐèÏÂÔØÓÃ»§¶ËµÄ¼à¿Ø³ÌÊ½¡£ÄãËùÐèÒª
ÏÂÔØµÄ³ÌÊ½Ì×¼þ³ÆÎª dhcpcd £¬Ä¿Ç°µÄ°æ±¾±àºÅÊÇ 0.70¡£Äã¿ÉÔÚ
\onlynameurl{´Ë´¦} ÔÄ¶Áµ½Õâ¸öÌ×¼þµÄÄÚÈÝËµÃ÷¡£
(ftp://metalab.unc.edu/pub/Linux/system/network/daemons/dhcpcd-0.70.lsm)





{\bfseries ºËÐÄ 2.2.x }





ÓÉì¶ÔÚºËÐÄ 2.1.x ºÍ 2.2.x ÖÐ ipv4 µÄÍøÂ·³ÌÊ½Ì×¼þÔø±»ÐÞ¸Ä¹ý£¨ÀýÈç£¬Ëü»áÔÚÐí¶à
À¸Î»Éè¶¨Ô¤ÉèÖµ£©dhcpcd ÎÞ·¨Õý³£ÔË×÷¡£³ý·ÇÄãÊ¹ÓÃµÄÊÇ RedHat 6.x£¨ËüÄ¿Ç°Ìá¹©ÁË 
dhcpcd 1.3.x ºÍ 2.2.x µÄºËÐÄ£©·ñÔòÄã¾Í±ØÐëÏÂÔØÁíÒ»¸ö°æ±¾µÄ dhcpcd£¨¼´ 1.3.x£©
À´Ê¹ÓÃ£¬ÕâÊÇ Sergei Viznyuk {\ttfamily sergei@phystech.com} ÎªÁË±ÜÃâÉÏÊöÎÊÌâËù
ÐÞ¸ÄµÄ°æ±¾¡£Äã¿ÉÒÔÔÚÒÔÏÂ¼¸¸öµØ·½È¡µÃ£º





\begin{itemize}
\item \onlynameurl{ftp://phystech.dyn.ml.org/pub/}
\item \onlynameurl{http://www.cps.msu.edu/\~{}dunham/out/dhcpcd-1.3.6.tar.gz}
\end{itemize}






½ÓÏÂÀ´Ëù×öµÄËµÃ÷¶¼ÊÇÒÔ´ËÎª»ù±¾µÄÔ­Ôò¡£




\subsection{°²×°ÔÚ Slackware Ö®ÉÏ}



Äã¿ÉÒÔ´ÓÈÎºÎ Metalab µÄ¡°¾µÉä¡±(mirror£©Õ¾Ì¨»òÒÔÏÂ¼¸¸öµØ·½£¬ÏÂÔØ×îÐÂµÄ DHCPcd 
³ÌÊ½Ì×¼þ£º

\begin{itemize}
\item \onlynameurl{}
\item \onlynameurl{}
\item \onlynameurl{}
£¨Ö÷Õ¾Ì¨ÔÚÈÕ±¾£©
\end{itemize}






ÏÂÔØ×îÐÂ°æ±¾µÄ dhcpcd.tar.gz ×îÐÂ°æ±¾

\begin{itemize}
\item ½« dhcpcd.tar.gz ½â¿ª



{\ttfamily tar -zxvf dhcpcd-0.70.tar.gz}



\item ÇÐ»»ÖÁÌ×¼þ½â¿ªááµÄ×ÓÄ¿Â¼Àï£¬²¢±àÒë dhcpcd ³ÌÊ½ 

{\ttfamily cd dhcpcd-0.70}

{\ttfamily make}



\item °²×°Ì×¼þ (Äã±ØÐëÒÔ root µÄÉí·ÝÖ´ÐÐÒÔÏÂµÄÃüÁî)

{\ttfamily make install}



\end{itemize}


Õâ¸öÃüÁî»á½¨Á¢ /etc/dhcpc Õâ¸ö×ÓÄ¿Â¼£¬DHCPcd Ì×¼þ»á°Ñ DHCP µÄ×ÊÑ¶´¢´æÔÚ¸Ã´¦£¬
²¢ÇÒ½« dhcpcd ³ÌÊ½µµ¸´ÖÆµ½ /usr/sbin Õâ¸ö×ÓÄ¿Â¼Àï¡£

ÎªÄÜ¹»ÔÚ¿ª»úÊ±£¬ÏµÍ³Éè¶¨³õÖµÆÚ¼ä£¬Ê¹ÓÃ DHCP µÄ¹¦ÄÜ£¬Çë×öÈçÏÂµÄÉè¶¨£º

{\ttfamily cd /etc/rc.d}

{\ttfamily mv rc.inet1 rc.inet1.OLD}



ÉÏÃæµÄ¶¯×÷»á½«¾ÉÓÐµÄÍøÂ·³õÖµÉè¶¨¡°ÃüÁî¸å¡±(script£©ÒÆ×ªÖÁ rc.inet1.OLD¡£½ÓÏÂÀ´£¬
Äã±ØÐë½¨Á¢ÐÂµÄ rc.inet1 ÃüÁî¸å¡£ÏÂÃæµÄ³ÌÊ½Âë°üº¬ÁË±ØÐèµÄÉè¶¨ÄÚÈÝ£º

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
#!/bin/sh
#
# rc.inet1      Õâ¸ö shell µÄÃüÁî¸å»áÔÚ¿ª»úÊ±´¦Àí INET ÏµÍ³µÄ»ù±¾Éè¶¨¡£      

HOSTNAME=`cat /etc/HOSTNAME` # Õâ¸öÃüÁî»òÐí²»ÊÇ±ØÐèµÄ£¬µ«ÊÇÎÒ»¹ÊÇ
                             # ½«Ëü±£ÁôÁËÏÂÀ´¡£

# ¸½½ÓÉÏ loopback£¨ÈÆ»Ø£©×°ÖÃ¡£
/sbin/ifconfig lo 127.0.0.1
/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo

# ÈôÄãÓÐÒÒÌ«ÍøÂ·µÄÁ¬Ïß£¬ÔòÊ¹ÓÃÏÂÃæµÄÃüÁîÀ´Éè¶¨ eth0 ½çÃæ¡£
# ÈôÄãÖ»ÓÐ loopback »ò SLIP µÄÁ¬Ïß£¬Ôò²»ÒªÔÚÕâ¸öµµ°¸ÀïÊ¹ÓÃÏÂÃæµÄÃüÁî¡£ 

/usr/sbin/dhcpcd
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}


´æµµ°¸Ö®ááÇë½«µçÄÔÖØÐÂ¿ª»ú¡£





µ±ÄãÍê³ÉÒÔÉÏµÄ¶¯×÷áá£¬ÇëÌøÖÁ \ref{nameserver} {(×îááµÄ²½Öè)}




\subsection{°²×°ÔÚ RedHat 5.x ºÍ RedHat 6.x Ö®ÉÏ}



DHCPcd µÄÉè¶¨ÔÚ RedHat 5.0 ÓëÒÔÉÏµÄ°æ±¾ÆäÊµºÜÈÝÒ×¡£ÄãËùÒª×÷µÄÊÂÇé£¬¾ÍÊÇÆô¶¯
¡°¿ØÖÆÌ¨¡±(Control Panel)£¬ÇëÊäÈë





{\ttfamily control-panel}





\begin{itemize}
\item  Ñ¡È¡ Network Configuration µÄÍ¼Ïñ
\item  ÒÔ»¬Êóµ¥»÷ Interfaces À¸±ê
\item  ÒÔ»¬Êóµ¥»÷ Add °´Å¥
\item  Ñ¡ÓÃ Ethernet ÏîÄ¿
\item  ÔÚ Edit Ethernet/Bus Interface ¶Ô»°¿òÖÐ¹´Ñ¡ {\bfseries "Activate interface at boot time"}
ÏîÄ¿ÒÔ¼°Ñ¡È¡ {\bfseries DHCP} ×öÎª {\bfseries Interface configuration protocol} ÏîÄ¿µÄ
ÊäÈë¡£
\end{itemize}






µ±ÄãÍê³ÉÒÔÉÏµÄ¶¯×÷áá£¬ÇëÌøÖÁ \ref{nameserver} {(×îááµÄ²½Öè)}






\subsection{ÔÚ RedHat 4.x Óë Caldera OpenLinux 1.1 ÉÏµÄÉè¶¨}



DHCPcd ÔÚ±ê×¼µÄ RedHat °æ±¾ÖÐÊÇÒÔ RPM µÄ°ü×°·½Ê½À´·¢ÐÐµÄ£¬Äã¿ÉÒÔÔÚÆäËù·¢ÐÐµÄ 
CD-ROM ÉÏµÄ RPMS Ä¿Â¼ÖÐÕÒµ½Ëü£¬»òµ½ÏÂÃæµÄÍøÖ·ÏÂÔØ£º





\onlynameurl{}





È»áá°²×°Ëü£¬ÈçÏÂËùÊ¾£º

{\ttfamily rpm -i dhcpcd-0.6-2.i386.rpm}





»òÕß£¬Äã¿ÉÒÔ°´ÕÕ Slackware ÄÇ½ÚËùÃèÊöµÄ·½·¨£¬±àÒëÒ»¸öÊôì¶Äã×Ô¼ºµÄ°æ±¾¡£





{\ttfamily ¸ÐÐ» nothing nothing@cc.gatech.edu Ìá¹©ÒÔÏÂµÄ×ÊÑ¶¸øÎÒ}

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
ÎÒ°Ñ¾²Ì¬µÄ ip Î»Ö·»òÍøÓòÃû³Æ£¬´Óµµ°¸ /etc/resolv.conf ÖÐÒÆ³ý¡£µ«ÊÇ£¬ÎÒÁôÏÂÁË
search ºÍ nameserver µÄÉè¶¨ÐÐ£¨ÒòÎªÄ³Ð©Ô­ÒòÎÒµÄ dhcpcd ËÅ·þÆ÷²»»á²úÉúµµ°¸ 
/etc/dhcpc/resol.conf£¬ËùÒÔÎÒ±ØÐëÊ¹ÓÃ¾²Ì¬µÄ /etc/resolv.conf£©¡£

ÔÚµµ°¸ /etc/sysconfig/network Àï£¬ÎÒÒÆ³ýÁË HOSTNAME Óë GATEWAY µÄÉè¶¨ÐÐ¡£µ«ÊÇ£¬
ÎÒ±£ÁôÁËÆäËüµÄÉè¶¨ÐÐ£¨NETWORKING¡¢DOMAINNAME¡¢GATEWAYDEV£©¡£

ÔÚµµ°¸ /etc/sysconfig/network-scripts/ifcfg-eth0 Àï£¬ÎÒÒÆ³ýÁË IPADDR¡¢NETMASK¡¢
NETWORK¡¢ºÍ BROADCAST µÈÉè¶¨ÐÐ¡£µ«ÊÇ£¬ÎÒ±£ÁôÁË DEVICE ºÍ ONBOOT µÄÉè¶¨ÐÐ£¬²¢½«
BOOTPROTO µÄÉè¶¨ÐÐ£¬ÐÞ¸Ä³É BOOTPROTO=dhcp¡£

×îáá´¢´æµµ°¸£¬²¢½«µçÄÔÖØÐÂ¿ª»ú¡£
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}


µ±ÄãÍê³ÉÒÔÉÏµÄ¶¯×÷áá£¬ÇëÌøÖÁ \ref{nameserver} {(×îááµÄ²½Öè)}




\subsection{°²×°ÔÚ Debian Ö®ÉÏ}



Äã¿ÉÒÔÔÚÏÂÃæµÄÍøÖ·ÕÒµ½ÒÔ deb ·½Ê½°ü×°µÄ DHCPcd ³ÌÊ½Ì×¼þ£º





{\ttfamily \onlynameurl{}}

»òÕß£¬Äã¿ÉÒÔ°´ÕÕ Slackware ÄÇ½ÚËùÃèÊöµÄ·½·¨À´°²×°¡£

Òª°²×°Õâ¸ö deb °ü×°µÄ³ÌÊ½Ì×¼þ£¬ÇëÊäÈë£º

{\ttfamily dpkg -i /where/ever/your/debian/packages/are/dhcpd*deb}





Äã¼¸ºõ²»±Ø×öÈÎºÎµÄ DHCPcd Éè¶¨£¬ÒòÎª£º
{\ttfamily From: Heiko Schlittermann (heiko@os.inf.tu-dresden.de)}





Õâ¸ö dhcpcd µÄ³ÌÊ½Ì×¼þÈçÍ¬ÆäËüµÄ debian Ì×¼þÒ»Ñù£¬»á½«Æô¶¯ÃüÁî¸å°²×°ÔÚ
/etc/init.d/$<$package\_name$>$ Ö®ÉÏ£¬´Ë´¦Îª /etc/init.d/dhcpcd£¬²¢½«
Ö®Á´½áµ½¸÷¸ö /etc/rc?.d/ Ä¿Â¼ÖÐ¡£





ÔÚ /etc/rc?.d/ Ä¿Â¼ÖÐËù´æ·ÅµÄ¸÷Ààµµ°¸£¬ÊÇ¿ª»úÊ±ËùÖ´ÐÐµÄÃüÁî¸å¡£







Èç¹ûÄãÔÚ°²×°áá²»ÏëÖØÐÂ¿ª»ú£¬ÄãÓ¦¸Ã¿¼ÂÇÊ¹ÓÃÈË¹¤Æô¶¯¡°¼à¿Ø³ÌÊ½¡±(daemon) µÄ·½Ê½£º



{\ttfamily /etc/init.d/dhcpcd start}

µ±ÄãÍê³ÉÒÔÉÏµÄ¶¯×÷áá£¬ÇëÌøÖÁ \ref{nameserver} {(×îááµÄ²½Öè)}




\subsection{ÔÚ LinuxPPC Óë MkLinux ÉÏµÄÉè¶¨}



ÏÂÃæÕâ½ÚÊÇ R. Shapiro ×«Ð´µÄ¡£





ÓÉ Yoichi Hariguchi Ëù·¢Õ¹µÄ°æ±¾ 0.65 ºÍ 0.7 µÄ dhcpcd ³ÌÊ½Ó¦¸Ã¿ÉÒÔÔÚÊ¹ÓÃºËÐÄ
2.1.24 µÄ LinuxPPC Óë MkLinux ÉÏÕý³£Ö´ÐÐ£¬µ«ÊÇ£¬Äã±ØÐë×¢ÒâÒÔÏÂ¼¸¸öÒªµã£º





* Èç¹ûÄãÏëÒª»òÐèÒª£¬Í¸¹ýÔ­Ê¼³ÌÊ½ÂëÀ´½¨Á¢¿ÉÖ´ÐÐµÄµµ°¸£¬Çë×¢Òâ£¬ppc linux ÉÏµÄ
±àÒëÆ÷»á½« 'char' ¼Ù¶¨Îª 'unsigned char'£¬µ«ÊÇ£¬Hariguchi µÄÔ­Ê¼³ÌÊ½ÂëÈ·½«
'char' ¼Ù¶¨Îª 'signed char'¡£ËùÒÔ£¬ÒªÍ¸¹ýÔ­Ê¼³ÌÊ½ÂëÀ´²úÉúÖ´ÐÐµµ£¬Äã±ØÐë±à¼­
Makefile£¬ÈÃ CFLAGS ÖÐ°üº¬ "-fsigned-char" Õâ¸öÑ¡Ïî¡£





* Ä¿Ç° linuxppc {[}¾ÍÊÇËùÎ½µÄ linux-pmac] Æ½Ì¨ÉÏ×îÎÈ¶¨µÄ°æ±¾ÊÇ 2.1.24£¬ÐèÒªµÄ»°
¿Éµ½ÏÂÃæµÄÍøÖ·È¡µÃ dhcpcd µÄÐÞÕýÂë£º
\onlynameurl{2.1 °æµÄÐÞÕýÂë}
(http://www.cro.net/~vuksan/dhcppatch)¡£
mklinux Æ½Ì¨ÉÏËù·¢ÐÐµÄ DR2.1 ºÍ DR3.0 ÕâÁ½¸ö°æ±¾£¬²ÉÓÃµÄÊÇ 2.0 µÄºËÐÄ (2.0.33)
£¬ËùÒÔ£¬²»±ØÊ¹ÓÃÕâ¸öÐÞÕýÂë£¬µ«ÊÇ£¬¼´Ê¹°²×°ÁËÕâ¸öÐÞÕýÂëÒ²Ã»ÓÐÊ²÷áÉËº¦¡£Çë×¢Òâ
£¬linuxppc °²×°¹âµúÆ¬ÉÏ dhcpcd ³ÌÊ½µÄ rpm °ü×°Àï£¬²¢²»°üº¬Õâ¸ö 2.1 ÐÞÕýÂë£¬Òò´Ë
£¬ËüÔÚ linuxppc Æ½Ì¨ÉÏÎÞ·¨Õý³£ÔË×÷£¬·´µ¹ÊÇ£¬¿ÉÒÔÔÚ mklinux Æ½Ì¨ÉÏÕý³£Ö´ÐÐ¡£







* µ±ÎÒÃÇÊ¹ÓÃ linuxppc Æ½Ì¨µÄ 2.1.24 ºËÐÄÊ±£¬ÔÚ dhcpcd ³ÌÊ½Æô¶¯Ö®áá£¬Äã»á¿´µ½
Ò»¸ö¼ò¶ÌµÄÂ·ÓÉÆ÷¾¯¸æÑ¶Ï¢¡£Äã¿ÉÒÔºöÂÔËü¡£





* Hariguchi µÄ dhcpcd ³ÌÊ½»á»¨Ò»Ð©Ê±¼ä£¬´óÔ¼ÊÇ 30 Ãë£¬À´Íê³ÉËü³õ´ÎÁ¬½ÓËÅ·þÆ÷ºÍ
Éè¶¨Â·ÓÉµÄ¶¯×÷¡£µ±ÎÒÃÇÊ¹ÓÃµÄÊÇ linuxppc Æ½Ì¨µÄ 2.1.24 ºËÐÄÊ±£¬ÉÏÊöµÄ¾¯¸æÑ¶Ï¢£¬
Ö»ÊÇÔÚËµÃ÷£¬Â·ÓÉÒÑ¾­Éè¶¨Íê³ÉÁË¡£





¶Ôì¶±È½ÏÐÂ°æµÄ linuxppc ºËÐÄ¶øÑÔ£¬ÓÉ Hariguchi Ëù·¢Õ¹µÄ dhcpcd ³ÌÊ½¶¼ÎÞ·¨Ê¹ÓÃ
£º´ËÊ±Äã {\bfseries ±ØÐë} ¸Ä²É Sergei Viznyuk Ëù·¢Õ¹µÄ°æ±¾£¨Ä¿Ç°µÄ·¢ÐÐ°æ±¾Îª 1.3.9
£©¡£Âé·³µÄÊÇ Viznyuk µÄ dhcpcd ³ÌÊ½ÊÇÒÔ glibc 2 Îªº¯Ê½¿âÀ´·¢Õ¹µÄ£¬È»¶ø linuxppc 
2.1.1xx È´²»Ê¹ÓÃÕâ¸öº¯Ê½¿â¡£½á¹û£¬±àÒë³ÌÊ½ÐèÒªÓÃµ½Ò»Ð©¼¼ÇÉ - Ïà¹ØµÄÏ¸½ÚÇëÓëÎÒ
ÁªÂç¡£Ò»µ©³ÌÊ½±àÒëºÃÖ®áá£¬Ëü¾ÍÄÜ¹»ÔÚ½ÏÐÂ°æµÄºËÐÄÉÏÕý³£ÔË×÷ÁË£¨ÔÚ linuxppc µÄ
2.1.24 °æ±¾»ò MkLinux µÄ²¿·Ö°æ±¾ÉÏ»¹ÊÇ²»ÐÐ£©¡£





ÏÖÔÚÎÒÃÇÀ´ÌÖÂÛ Viznyuk Ëù·¢Õ¹µÄ dhcpcd ³ÌÊ½£¬ÎÒÊÖÉÏÓÐÒ»¸ö Viznyuk °æµÄ dhcpcd
£¨v1.3.7£©Ö´ÐÐµµ£¬¿ÉÒÔÔÚ×î½ü·¢ÐÐµÄ linuxppc ºËÐÄ£º2.1.102¡¢103¡¢115¡¢ºÍ 119£¬ÉÏ
Ö´ÐÐ£¬²¢ÇÒÒÑ¾­Íê³É²âÊÔ¡£ÄãÓ¦¸Ã¿ÉÒÔÍ¸¹ýÔ­Ê¼³ÌÊ½ÂëÀ´²úÉúÖ´ÐÐµµ£¬µ«ÊÇ£¬ÎÒ²»ÖªµÀÊµ¼Ê
µÄÏ¸½Ú¡£Viznyuk °æµÄ dhcpcd ÎÞ·¨ÔÚ 2.1.24 µÄºËÐÄÉÏÔË×÷£¬È»¶øÐÞ²¹¹ýµÄ Hariguchi 
°æµÄ dhcpcd ³ÌÊ½È´¿ÉÒÔÕý³£Ê¹ÓÃ¡£Òª±àÒë Hariguchi °æµÄ dhcpcd ³ÌÊ½¾ÍÈÝÒ×¶àÁË¡£





ÕªÒªÕûÀíÈçÏÂ£º





\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
MkLinux£º  Hariguchi£º ¿ÉÓÃ£» Viznyuk£º ²»¿ÉÓÃ
2.1.24£º   Hariguchi£º Èç¹ûÐÞÕý¹ý£¬¿ÉÒÔÕý³£Ê¹ÓÃ£¨²úÉúÖ´ÐÐµµºÜÈÝÒ×£©£» Viznyuk£º ²»¿ÉÓÃ
2.1.102+£º Hariguchi£º ²»¿ÉÓÃ£» Viznyuk£º ¿ÉÓÃ£¨²úÉúÖ´ÐÐµµÐèÒª¼¼ÇÉ£© 
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}






Çë×¢Òâ£¬Viznyuk °æµÄ dhcpcd »á°Ñ×ÊÁÏÖ±½ÓÐ´µ½ /etc/resolv.conf Àï£¨Ð´ÈëÖ®Ç°»áÏÈ
±¸·Ý¾ÉÓÐµÄµµ°¸£©£¬Òò´ËÄã²»±ØÔÙ×Ô¼º´Ó /etc/dhcpc ¸´ÖÆ»òÁ´½áÏà¹ØµÄ×ÊÑ¶¡£Í¬Ê±Ò²Çë
×¢ÒâËüÍ¨³£»á°ÑÖ´ÐÐµµ·Åµ½ /sbin Ä¿Â¼ÖÐ¶ø²»ÊÇ·Åµ½ /usr/sbin Àï£¬ËùÒÔËüµÄÃüÁîÁÐÑ¡
ÏîÓë Hariguchi °æ±¾Ö®¼ä»áÓÐÒ»µã²»Í¬¡£ÈôÄãÊ¹ÓÃ ifup À´Æô¶¯ dhcpcd £¬Ôò ifup Õâ¸ö
ÃüÁî¸åÒ²±ØÐë×öÒ»Ð©Ð¡µÄÐÞÕý¡£





ÈôÄãÏëÒªÈ¡µÃ¸ø linuxppc Ê¹ÓÃµÄÔ¤ÏÈ±àÒëºÃÖ® dhcpcd ³ÌÊ½£¬Çë¼ÄÐÅµ½





\onlynameurl{reshapiro@mediaone.net}¡£

ÎÒÒ²Ìá¹©ÁË¶þÔªÂëµÄ RPMs °ü×°µµ£º





\onlynameurl{}

Çë²»ÒªÊ¹ÓÃ¸ÃÄ¿Â¼Ö®ÏÂµÄ dhcpcd-1.3.8-2.ppc.rpm µµ°¸£¬ËüÒÑ¾­Í£Ö¹Î¬»¤ÁË¡£¿É¿¿µÄ°æ
±¾ÊÇ dhcpcd-0.70-0.ppc.rpm£¨¸ø linuxppc 2.1.24 Ê¹ÓÃµÄ£©ÒÔ¼° dhcpcd-1.3.8-3.ppc.rpm 
£¨¸ø linuxppc 2.1.102 ºÍÒÔÉÏµÄ°æ±¾Ê¹ÓÃµÄ£©¡£°æ±¾ 1.3.9 µÄ rpm °ü×°µµ½üÆÚÄÚÓ¦¸Ã
»áÌá¹©³öÀ´¡£Í¬Ê±ÎÒ»¹ÒÀÕÕ°æ±¾ 0.65 ºÍ 0.70£¨ÓÉ Hariguchi Ëù·¢Õ¹£©µÄ·½Ê½¶Ô°æ±¾ 1.3.9 
£¨ÓÉ Viznyuk Ëù·¢Õ¹£© ×öÁËÒ»Ð©ÐÞ¸Ä£¨¾ÍÊÇ ¸½¼ÓÉÏ -c µÄÃüÁîÁÐÑ¡Ïî£©¡££¨Çë×¢Òâ£¬±ê
×¼µÄ Viznyuk dhcpcd ²¢²»°üº¬ÕâÑùµÄÄÚÈÝ¡££©






\subsection{¡°¼ÇºÅ»·¡±£¨Token Ring£©ÍøÂ·}



ÈôÄã³¢ÊÔÔÚ¡°¼ÇºÅ»·¡±ÍøÂ·ÉÏÖ´ÐÐ dhcpcd ³ÌÊ½£¬½«ÎÞ·¨Õý³£ÔË×÷¡£ÒÔÏÂÊÇ
Henrik Stoerner {\ttfamily (henrik\_stoerner@olicom.dk)} Ìá¹©¸øÎÒµÄ½â¾ö·½°¸¡£





ÎÊÌâ³öÔÚ dhcpcd Ö»ÈÏÊ¶¡°ÒÒÌ«ÍøÂ·¡±£¨ Ethernet£©¿¨¡£ÈôËü·¢ÏÖµ½¡°¼ÇºÅ»·¡±ÍøÂ·¿¨
£¬ÔòËü»á¾Ü¾ø×öÈÎºÎµÄÊÂÇé£¬²¢ÇÒ±¨¸æËµ¡°½çÃæ²»ÊÇÒÒÌ«ÍøÂ·¡±¡£





½â¾ö·½°¸¾ÍÊÇÊ¹ÓÃÒ»¸ö¼òµ¥µÄÐÞÕýÂëÀ´±ä¸ü dhcpcd µÄÔ­Ê¼³ÌÊ½Âë¡£ÎÒÒÑ¾­½«´ËÐÞÕýÂë
·ÅÔÚÒ»¸öÐ¡ÐÍµÄÍøÒ³ÉÏ£¬²¢Ìá¹© RedHat µÄ RPM °ü×°µµºÍÒ»¸öÔ¤ÏÈ±àÒëºÃµÄ¶þÔªµµ£º
\onlynameurl{}





Õâ¸öÐÞÕýÂëÒÑ¾­ËÍµ½ÁË dhcpcd µÄÎ¬»¤ÕßÊÖÉÏÁË£¬Òò´Ë£¬ËüÓÐÏ£Íû±»Î´À´·¢ÐÐµÄ dhcpcd 
°æ±¾Ëù²ÉÓÃ¡£




\subsection{×îáá£¬ÇëÍê³ÉÒÔÏÂµÄ¶¯×÷\label{nameserver}}



ÔÚÄãµÄ»úÆ÷ÖØÐÂ¿ª»úÖ®áá£¬ÄãÓ¦¸ÃÉè¶¨ÍøÂ·µÄ½çÃæ¡£ÇëÊäÈë£º

{\ttfamily ifconfig}

ÄãÓ¦¸Ã»á¿´µ½ÈçÏÂµÄÄÚÈÝ

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
          UP BROADCAST LOOPBACK RUNNING  MTU:3584  Metric:1
          RX packets:302 errors:0 dropped:0 overruns:0 frame:0
          TX packets:302 errors:0 dropped:0 overruns:0 carrier:0 coll:0

eth0      Link encap:Ethernet  HWaddr 00:20:AF:EE:05:45
          inet addr:24.128.53.102  Bcast:24.128.53.255  Mask:255.255.254.0
          ^^^^^^^^^^^^^^^^^^^^^^^
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:24783 errors:1 dropped:1 overruns:0 frame:1
          TX packets:11598 errors:0 dropped:0 overruns:0 carrier:0 coll:96
          Interrupt:10 Base address:0x300 
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}






Èç¹û£¬ÄãÔÚ inet addr Ö®áá¿´µ½Ò»Ð©Õý³£µÄÊý×Ö£¬Õâ±íÊ¾ÄãÒÑ¾­Éè¶¨ºÃÁË¡£Èç¹û£¬Äã¿´µ½
µÄÊÇ 0.0.0.0 Ò²²»Òª¾øÍû£¬ËüÖ»ÊÇ dhcpcd ÔÚÈ¡µÃ IP Î»Ö·Ç°ÔÝÊ±µÄÉè¶¨Öµ¡£Èç¹û£¬¹ýÁË
¼¸·ÖÖÓÖ®áá£¬ÄãÈÔÈ»¿´µ½ 0.0.0.0 £¬Çë²Î¿¼ \ref{troubleshooting} {(ÒÉÄÑÅÅ³ý)}
¡£DHCPcd ÊÇÒ»¸ö¡°¼à¿Ø³ÌÊ½¡±(daemon)£¬ËùÒÔÖ»ÒªÄãµÄ»úÆ÷»¹»îÖø£¬Ëü½«»á³ÖÐø±£³ÖÖ´ÐÐ
µÄ×´Ì¬¡£ËüÃ¿ÈýÐ¡Ê±»áÓë DHCP ËÅ·þÆ÷ÔÙÁªÂçÒ»´Î£¬³¢ÊÔÐøÔ¼ IP Î»Ö·µÄ×âÆÚ¡£Ëü»á½«Ëù
ÓÐµÄÑ¶Ï¢¼ÇÂ¼ÔÚ syslog µµ°¸ÖÐ£¨ÔÚ Slackware ÉÏ£¬Îª /var/adm/syslog£»ÔÚ RedHat/OpenLinux
ÉÏ£¬Îª /var/log/syslog£©¡£





×îááÒª×öÒ»¼þÊÂ¡£Äã±ØÐëÖ¸¶¨Ãû³ÆËÅ·þÆ÷¡£ÓÐÁ½¸ö·½Ê½¿ÉÒÔÍê³ÉÕâ¸ö²½Öè£¬Äã¿ÉÒÔÒªÇóÍøÂ·
·þÎñ¹©Ó¦ÉÌ£¬¸æÖªÃû³ÆËÅ·þÆ÷µÄ IP Î»Ö·£¬È»ááÔÙ½«´ËÎ»Ö·ÌîÈë /etc/resolv.conf µµÖÐ
£¬»òÕß£¬ÄãÒ²¿ÉÒÔÈÃ DHCPcd ´Ó DHCP ËÅ·þÆ÷È¡µÃ×ÊÁÏ£¬È»ááÔÚ /etc/dhcpc Ä¿Â¼ÏÂ²úÉú
µµ°¸ resolv.conf¡£ÎÒ¾ö¶¨Ê¹ÓÃ DHCPcd À´²úÉúµµ°¸ resolv.conf µÄÄÚÈÝ£¬·½·¨ÈçÏÂ£º





±¸·Ý¾ÉµÄ /etc/resolv.conf µµ°¸

{\ttfamily mv /etc/resolv.conf /etc/resolv.conf.OLD}

Èç¹ûÄ¿Â¼ /etc/dhcpc ²»´æÔÚ£¬Äã¿ÉÒÔ×ÔÐÐ²úÉú´ËÄ¿Â¼

{\ttfamily mkdir /etc/dhcpc}

È»ºò½« /etc/resolv.conf ÒÔ¡°·ûºÅÁ´½á¡±ÖÁ /etc/dhcpc/resolv.conf

{\ttfamily ln -s /etc/dhcpc/resolv.conf /etc/resolv.conf}



 Èç¹ûÕâ¸ö·½Ê½ÎÞ·¨Õý³£ÔË×÷£¬Çë³¢ÊÔÊ¹ÓÃÏÂÃæµÄ·½·¨
£¨ÏÂÃæÕâ¸öÐÞÕý·½·¨ÊÇ nothing@cc.gatech.edu Ëù½¨ÒéµÄ£¬ÆäÄÚÈÝÐÞ¸Ä×Ô Henrik Stoerner
ËùÌá¹©µÄÐÞÕý·½·¨£©

 

\label{error3}

ÎÒ»¹±ØÐëÖ´ÐÐÏÂÃæÕâ¸ö²½Öè£¬Ö»ÒòÎªÎÒµÄ dhcpcd ²»»á²úÉúµµ°¸ /etc/dhcpc/resolv.conf
¡£ÎÒÔÚ /etc/sysconfig/network-scripts/ifup µµ°¸ÖÐ£¬×öÁËÒÔÏÂµÄÐÞ¸Ä£¨ËäÈ»¸ÄµÄ²»ÊÇ
ºÜºÃ£¬µ«ÊÇËüÒÑ¾­¿ÉÒÔÎªÎÒ½â¾öÕâ¸öÎÊÌâÁË£©£º







\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
elif [ "$BOOTPROTO" = dhcp -a "$ISALIAS" = no ]; then
    echo -n "Using DHCP for ${DEVICE}... "
    /sbin/dhcpcd -c /etc/sysconfig/network-scripts/ifdhcpc-done ${DEVICE}
    echo "echo \$$ > /var/run/dhcp-wait-${DEVICE}.pid; exec sleep 30" | sh

    if [ -f /var/run/dhcp-wait-${DEVICE}.pid ]; then
        ^^^^
        echo "failed."
        exit 1
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}


ÎÒ°ÑËüÐÞ¸Ä³É£º

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
elif [ "$BOOTPROTO" = dhcp -a "$ISALIAS" = no ]; then
    echo -n "Using DHCP for ${DEVICE}... "
    /sbin/dhcpcd
    echo "echo \$$ > /var/run/dhcp-wait-${DEVICE}.pid; exec sleep 30" | sh

    if [ ! -f /var/run/dhcp-wait-${DEVICE}.pid ]; then
        ^^^^^^
       echo "failed."
       exit 1
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}






{\bfseries ×¢Òâ} ! (bang) Õâ¸ö·ûºÅ
{\ttfamily if [ ! -f /var/run/dhcp-wait-\$$\{$DEVICE$\}$.pid ];}









×ÜËã´ó¹¦¸æ³É£¬¿ÉÒÔ×øÏÂÀ´ÏíÊÜ³É¹ûÁË :-)¡£


\subsection{ÆäËü×¢ÒâÊÂÏî}



ÒÔÏÂµÄ²½Öè²»ÊÇ¾ø¶Ô±ØÒª£¬µ«ÊÇ¶ÔÄ³Ð©ÈË¶øÑÔ£¬¿ÉÄÜ¾ÍÅÉµÃÉÏÓÃ³¡¡£

{\bfseries a) }Èç¹û£¬ÄãÖ»ÊÇÅ¼¶û²Å»áÓÐÍøÂ·Á¬ÏßµÄÐèÇó£¬Äã¿ÉÒÔÊ¹ÓÃÃüÁîÁÐµÄ·½Ê½À´Æô¶¯
dhcpcd£¨ÒªÍê³ÉÕâ¸ö²½Öè£¬Äã±ØÐëÓµÓÐ root µÄÉí·Ý£©£º



{\ttfamily /usr/sbin/dhcpcd}

µ±ÄãÏëÒª¹ØµôÍøÂ·£¬ÇëÊäÈë

{\ttfamily /usr/sbin/dhcpcd -k}






\subsection{ÒÉÄÑÅÅ³ý\label{troubleshooting}}



Èç¹û£¬Äã°´ÕÕÁËÉÏÊöµÄ²½Öè£¬È´ÈÔÈ»ÎÞ·¨´æÈ¡ÍøÂ·£¬ºÜ¿ÉÄÜÊÇÒòÎª£º





{\bfseries I. ÄãµÄÍøÂ·¿¨Éè¶¨²»ÕýÈ·¡£ }



ÔÚ¿ª»úµÄ¹ý³ÌÖÐ£¬Äã»úÆ÷½«»áÕì²âÄãµÄÍøÂ·¿¨£¬²¢ÇÒÓ¦¸Ã»áÏÔÊ¾ÏÂÃæ¼¸ÐÐµÄÑ¶Ï¢ÄÚÈÝ£º

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
eth0: 3c509 at 0x300 tag 1, 10baseT port, address  00 20 af ee 11 11, IRQ 10.
3c509.c:1.07 6/15/95 becker@cesdis.gsfc.nasa.gov
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}


Èç¹û£¬ÄãµÄ Linux ÏµÍ³²»»á³öÏÖÉÏÃæÕâ¸öÑ¶Ï¢£¬Õâ±íÊ¾£¬ÄãµÄÍøÂ·¿¨¿ÉÄÜÎÞ·¨±»±æÊ¶¡£¼Ù
Ê¹£¬ÄãÊ¹ÓÃµÄÊÇÒ»°ãµÄÒÒÌ«ÍøÂ·¿¨£¨NE2000 ÏàÈÝ£©£¬ÄãÓ¦¸Ã»áÄÃµ½Ò»Æ¬ DOS ¹¤¾ß´ÅÆ¬£¬Äã
¿ÉÒÔÓÃËüÀ´Éè¶¨ÍøÂ·¿¨¡£³¢ÊÔÉè¶¨¸÷¸ö IRQs Öµ£¬Ò»Ö±µ½ Linux ¿ÉÒÔ±æÊ¶µ½ÄãµÄÍøÂ·¿¨£¨
IRQ µÄÖµÉè¶¨Í¨³£Îª 9,10,12£©¡£





{\bfseries II. ËùÊ¹ÓÃµÄ DHCP ËÅ·þÆ÷Ö§Ô® RFC 1541 ±ê×¼/ÎÒµÄ DHCP ËÅ·þÆ÷ÊÇ  Windows NT}



³¢ÊÔÖ´ÐÐ dhcpcd £¬ÇëÊäÈë

{\ttfamily dhcpcd -r}

Ê¹ÓÃ ifconfig À´¼ì²é¿´¿´£¬ÊÇ·ñÄãµÄÍøÂ·½çÃæÒÑ¾­Éè¶¨ºÃÁË£¨×î³õÄãËù¿´µ½µÄÊÇ 
Inet.addr=0.0.0.0£¬ÄãµÃµÈ´ý¼¸ÃëµÄÉè¶¨Ê±¼ä£©¡£



Èç¹ûÕâ¸ö·½·¨¿ÉÒÔ½â¾öÄãµÄÎÊÌâ£¬ÔòÄãÓ¦¸ÃÔÚÏà¹ØµÄ¿ª»úÃüÁî¸åÖÐ¼ÓÉÏ "-r" Ñ¡Ïî£¬Æ©Èç
½« {\ttfamily /sbin/dhcpcd} ÐÞ¸Ä³É {\ttfamily /sbin/dhcpcd -r ¡£}





ÒÔ RedHat ÎªÀý£¬Äã±ØÐë±à¼­ /etc/sysconfig/network-scripts/ifup Õâ¸öÃüÁî¸å£¬²¢
½«ËüÐÞ¸Ä³É£º

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
        IFNAME=$[ {DEVICE} \
        "/sbin/dhcpcd -r -c /etc/"- etc etc.    
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}






{\bfseries III. ÔÚ¿ª»úÆÚ¼ä»á²úÉú´íÎóÑ¶Ï¢ "Using DHCP for eth0 ... failed"£¬µ«ÊÇ£¬ÏµÍ³
È´ÄÜÕý³£ÔË×÷¡£}





ÄãºÜ¿ÉÄÜÊ¹ÓÃµÄÊÇ RedHat µÄÏµÍ³£¬¶øÇÒ£¬Äã²¢Î´×ÐÏ¸µØ°´ÕÕËµÃ÷²Ù×÷ :-)¡£ÄãÔÚ if ÐðÊö
ÖÐÒÅÂ©ÁË ! (bang) Õâ¸ö·ûºÅ¡£Ìøµ½ \ref{error3} {(´Ë´¦)} £¬¼ìÊÓÈçºÎÀ´ÐÞÕý
Ëü¡£





{\bfseries IV. ÎÒµÄÍøÂ·¿¨ÔË×÷ÁË¼¸·ÖÖÓÖ®áá£¬±ãÃ»ÓÐ·´Ó¦ÁË¡£}





¿ÉÄÜÊÇ gated£¨¡°Õ¢µÀ¼à¿Ø³ÌÊ½¡±(gateway daemon)£© Ëù»Ø±¨µÄ×ÊÑ¶£¬ÅªÂÒÁË Linux 
Ö÷»úµÄÂ·ÓÉ£¬²Å»áÔì³ÉÕâÑùµÄÎÊÌâ¡£¼ì²éÊÇ·ñ gated ÕýÔÚÖ´ÐÐÖÐ£º





{\ttfamily ps -auxww $|$ grep gate}





Èç¹ûÕæµÄÊÇÕâÑù£¬Äã¿ÉÒÔÊ¹ÓÃ RedHat µÄ RPM ¹ÜÀí³ÌÊ½½«ËüÒÆ³ý£¬»òÊÇÊÖ¶¯½«Ëü´Ó 
/etc/rc.d/ ÖÐÒÆ³ý¡£





{\bfseries V.ÔÚ¿ª»úÊ±¿ÉÒÔ±æÊ¶µ½ÎÒµÄÒÒÌ«ÍøÂ·¿¨£¬µ«ÊÇ£¬ÔÚÎÒµÄÑ¶Ï¢¼ÇÂ¼ÖÐ£¬ÈÔÈ»»á³öÏÖ "NO
DHCPOFFER" µÄÑ¶Ï¢¡£Í¬Ê±£¬Õâ¸ö×´¿öÒ²»á·¢ÉúÔÚÎÒµÄ PCMCIA ÒÒÌ«ÍøÂ·¿¨ÉÏ¡£}





Äã±ØÐëÈ·¶¨£¬ÍøÂ·¿¨Ê¹ÓÃµÄÊÇ 10BaseT Á¬½Ó²º£¨¾ÍÏñµç»°ÏßµÄ²å×ù)¡£Äã×îºÃ¼ì²éÒ»ÏÂ£¬
¿ª»úÊ±ÍøÂ·¿¨µÄÉè¶¨£¬µ½µ×ÊÇÊ¹ÓÃÄÇ¸öÁ¬½Ó²º¡£ÀýÈç£º

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
eth0: 3c509 at 0x300 tag 1, 10baseT port, address  00 20 af ee 11 11, IRQ 10.
                            ^^^^^^^^^^^^
3c509.c:1.07 6/15/95 becker@cesdis.gsfc.nasa.gov
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}






ÎÒÔøÌý¹ýÊ¹ÓÃÏ¥ÉÏÐÍµçÄÔµÄÈË±§Ô¹£¬ËûÃÇÊ¹ÓÃ PCMCIA ¹¤¾ß£¨ÌØ±ðÊÇ ifport£©½«Á¬½Ó²ºÉè
¶¨Îª 10Base2 (¡°Ï¸Í¬ÖáÏßÍøÂ·¡±(thinnet)£©£¬Ò²»áÓÐÕâÑùµÄÎÊÌâ¡£Èç¹ûÄã²»ÏëÖØÐÂÉè¶¨
ÍøÂ·¿¨ºÍÖØ¿ª»ú¡£Äã±ØÐëÈ·¶¨ÄãÊ¹ÓÃµÄÊÇ 10BaseT µÄÁ¬Ïß¡£





{\bfseries VI. Ã»ÓÐËÅ·þÆ÷»ØÓ¦ÎÒ DHCP ÓÃ»§¶ËµÄ¹ã²¥ÒªÇó£¨ÓÉ Peter Amstutz Ìá¹©£©}





ÔÚÄ³Ð©ÏµÍ³ÉÏ£¬ÄãµÄ¹ã²¥ÒªÇóÖÐ±ØÐë°üº¬Äã»úÆ÷µÄÖ÷»úÃû³Æ¡£ÒÔ dhcpcd ÎªÀý£¬Äã¿ÉÒÔÖ´ÐÐ
'dhcpcd -h foohost'¡£»òÐí£¬Äã¿ÉÒÔÊ¹ÓÃÄãÔÚÍøÂ·ÉÏµÄÕÊ»§Ãû³Æ£¬À´×öÎª¸ÃÖ÷»úÃû³Æ¡£





{\bfseries VII. ÎÒÒÑ¾­°´ÕÕËùÓÐµÄ²½ÖèÍê³ÉÁËÉè¶¨£¬µ«ÊÇ£¬ÎÒµÄ»úÆ÷ÈÔÈ»ÎÞ·¨Á¬Ïß¡£}





¡°ÀÂÏßÊý¾Ý»ú¡±£¨cable modem£©Í¨³£»á¼Ç×¡ÄãÍøÂ·¿¨µÄÒÒÌ«ÍøÂ·Î»Ö·£¬ËùÒÔ£¬ÈôÄãÒªÁ¬½Ó
ÐÂµÄµçÄÔ»ò¸ü»»ÍøÂ·¿¨£¬Äã±ØÐëÒÔÄ³ÖÖ·½·¨À´¡°½Ìµ¼¡±ÄãµÄ cable modem ÈÏµÃÐÂµÄµçÄÔ/ÍøÂ·
¿¨¡£Í¨³£Äã¿ÉÒÔÏÈ¹Øµô cable modem £¬µçÄÔ¿ª»úááÔÙÊ¹ÓÃ cable modem£¬»òÊÇÒÔµç»°ÇëÇó
¼¼ÊõµÄÖ§Ô®£¬¸æÖª¶Ô·½ÄãµÄµçÄÔÒÑ¾­¸ü»»ÁËÍøÂ·¿¨¡£ 





ÄãµÄ·À»ðÇ½¹æÔò£¨ipfwadm µÄ¹æÔò£©²»ÔÊÐí²º±àºÅ 67/68£¨ DHCP Ê¹ÓÃÀ´É¢²¼Éè¶¨×ÊÑ¶£©
µÄÁ÷Á¿¡£Çë×ÐÏ¸¼ì²éÄãµÄ·À»ðÇ½¹æÔò¡£





{\bfseries VIII. ÎÒÊ¹ÓÃµÄÊÇ MediaOne Express ËùÌá¹©µÄ·þÎñ£¬µ«ÊÇÎÒÈÔÈ»ÎÞ·¨Á¬Ïß¡£} 





Ô­Òò¿ÉÄÜÊÇ MediaOne ÔÚ DHCP ÖÐ¸½¼ÓÁË²»Ó¦¸Ã³öÏÖµÄÑ¶Ï¢¡£Ò»°ãÏàÐÅ£¬Èç½ñÕâÒÑ²»ÔÙ
ÊÇ¸öÎÊÌâ£¬µ«ÊÇÄãÈ´ÎÞ·¨Ê¹ÓÃËü£¬Äã¿ÉÒÔ³¯Õâ·½ÃæÀ´¼ì²é¡£Èç¹ûÄã£¨²»£©ÐÒÊ¹ÓÃµÄÊÇ 
Windows NT£¬´ËÊ±£¬Èç¹ûÄãÊ¹ÓÃ¡°ÊÂ¼þ¼ìÊÓÆ÷¡±£¨Event Viewer£©£¬Äã½«»á¿´µ½ÈçÏÂµÄ
¾¯Ê¾Ñ¶Ï¢¡£





DHCP ½ÓÊÕµ½Ò»¸öÎ´ÖªµÄ³¤¶ÈÎª 005 µÄ 067 Ñ¡Ïî¡£Ô­Ê¼µÄÑ¡Ïî×ÊÁÏÈçÏÂËùÊ¾¡£

{\ttfamily 0000: 62 61 73 69 63            basic}



Èç¹ûÄãÓöµ½ÕâÑùµÄÎÊÌâ£¬Çëµ½ \onlynameurl{} ÏÂÔØÐÞÕý
µÄ¶þÔªÂë»òÈ¡µÃÔ­Ê¼Âë¡£


















\section{Éè¶¨ DHCP ËÅ·þÆ÷}


\subsection{UNIX ÉÏµÄ DHCP ËÅ·þÆ÷}

ÔÚ¸÷ÖÖ UNIX ÏàÈÝµÄ×÷ÒµÏµÍ³ÉÏ£¬ÓÐÐí¶àÉÌÒµ»òÃâ·ÑµÄ DHCP ËÅ·þÆ÷³ÌÊ½¿ÉÓÃ¡£ÆäÖÐ£¬
½ÏÖøÃûµÄÃâ·ÑËÅ·þÆ÷³ÌÊ½ÊÇ Paul Vixie/ISC °æµÄ DHCPd¡£Ä¿Ç°×îÐÂµÄ°æ±¾ÊÇ 2.0£¨
½¨Òé´ó¼ÒÊ¹ÓÃ£©£¬¶ø 3.0 °æÕýÔÚ×ö beta ½×¶ÎµÄ²âÊÔ¡£Äã¿ÉÒÔµ½ÏÂÃæµÄÍøÖ·È¡µÃ£º

\onlynameurl{}





ÔÚ RedHat£¨°æ±¾ 5.2£©Õâ¸ö Linux Ì×¼þÖÐ°üº¬ÁËÓÐ DHCP ËÅ·þÆ÷¶þÔªÂëµÄ RPM °ü×°¡£
¸Ã RPM °ü×°µÄµµÃûÎª dhcp-2.0b1pl6-2.platform.rpm¡£°²×°Ê±Ö»ÒªÊäÈë





{\ttfamily rpm -i dhcp-2.0b1pl6-2.i386.rpm}





ÈôÄãÊ¹ÓÃÉÏÃæµÄ²½Öè£¬ÔòÄã¿ÉÒÔÌø¹ýÏÂÃæµÄ°²×°ËµÃ÷¡£





ÔÚÄãÏÂÔØÖ®áá£¬Äã±ØÐë½«Ëü½â¿ª¡£È»áá½øÈë½â¿ªµÄÄ¿Â¼£¬ÊäÈë£º

{\ttfamily ./configure}

Òª×öºÃ°²×°Ç°µÄÉè¶¨¹¤×÷£¬¿ÉÄÜÒª»¨µãÊ±¼ä¡£ÇëËæááÊäÈë£º

{\ttfamily make}

ÒÔ¼°

{\ttfamily make install}








\subsection{Éè¶¨ÍøÂ·×éÌ¬¡£}



µ±Íê³É°²×°Ö®áá£¬ÇëÊäÈë ifconfig -a£¬Äã½«¿´µ½ÈçÏÂµÄÑ¶Ï¢£º





\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
eth0      Link encap:10Mbps Ethernet  HWaddr 00:C0:4F:D3:C4:62
          inet addr:183.217.19.43  Bcast:183.217.19.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2875542 errors:0 dropped:0 overruns:0
          TX packets:218647 errors:0 dropped:0 overruns:0
          Interrupt:11 Base address:0x210
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}






Èç¹ûÎ´ÏÔÊ¾ MULTICAST µÄÑ¶Ï¢£¬ÄãÓ¦¸ÃÖØÐÂÉè¶¨ÄãµÄºËÐÄ£¬¼ÓÈë¶Ô¡°¶àÖ·´«²¥¡±
£¨multicast£©µÄÖ§Ô®¡£¶Ôì¶´ó¶àÊýµÄÏµÍ³¶øÑÔ£¬Äã¼¸ºõ¶¼²»±ØÈç´Ë×ö¡£





ÏÂ¸ö²½ÖèÊÇ£¬¼ÓÈë 255.255.255.255 µÄÂ·ÓÉ¡£ÒÔÏÂµÄËµÃ÷ÒýÊö×Ô DHCPd ³ÌÊ½µÄ
¡°¶ÁÎÒµµ°¸¡±£¨README£©£º





¡°ÎªÁËÈÃ dhcpd ÄÜ¹»ÕýÈ·µØ·þÎñ¹ý·ÖÌôÌÞµÄ DHCP ÓÃ»§¶Ë£¨ÀýÈç£¬Windows 95£©£¬dhcpd 
±ØÐëÄÜ¹»ËÍ·â°üµ½ 255.255.255.255 µÄ IP Î»Ö·ÉÏ¡£²»ÐÒµÄÊÇ£¬Linux »á½« 255.255.255.255
×öÎª±¾µØ×ÓÍøÂ·µÄ¹ã²¥Î»Ö·£¨´Ë´¦Îª 192.5.5.223£©¡£Õâ½«Î¥·´ DHCP Í¨Ñ¶Ð­¶¨£¬È»¶øÐí¶à
DHCP ÓÃ»§¶Ë²¢²»ÊÜÓ°Ïì£¬ÓÐÐ©£¨ÀýÈç£¬ËùÓÐ Microsoft DHCP ÓÃ»§¶Ë£©È´»á¡£ÓÐ´ËÀàÎÊÌâ
µÄÓÃ»§¶Ë£¬½«»á¿´²»µ½À´×ÔËÅ·þÆ÷µÄ DHCPOFFER Ñ¶Ï¢¡£¡±





ÊäÈë£º

{\ttfamily route add -host 255.255.255.255 dev eth0}

Èç¹ûÄã¿´µ½ÈçÏÂµÄÑ¶Ï¢

{\ttfamily "255.255.255.255: Unknown host"}

ÄãÓ¦¸Ã½«ÏÂÃæµÄ×ÊÑ¶¼ÓÈëµ½ /etc/hosts µµ°¸ÖÐ£º
/etc/hosts file:

{\ttfamily 255.255.255.255 all-ones}

È»áá£¬ÊäÈë£º

{\ttfamily route add -host all-ones dev eth0}

»ò

{\ttfamily route add 255.255.255.0 dev eth0}

eth0 Ó¦¸ÃÊÇÄãÄ¿Ç°Ê¹ÓÃÍøÂ·¿¨µÄ×°ÖÃÃû³Æ¡£Èç¹û²»ÊÇ£¬ÄãµÃÅäºÏÊµ¼ÊÇé¿ö×öÕýÈ·µÄÐÞ¸Ä¡£








\subsection{DHCPd µÄÑ¡ÏîÉè¶¨}



ÏÖÔÚ£¬Äã±ØÐëÉè¶¨ DHCPd¡£Îª´Ë£¬Äã±ØÐë²úÉú»ò±à¼­ /etc/dhcpd.conf¡£





Í¨³£ÄãËùÒª×öµÄÊÇ£¬Ëæ»úµØÖ¸ÅÉ IP Î»Ö·¡£Îª´Ë£¬Äã±ØÐë°´ÕÕÏÂÃæµÄ·½Ê½À´Éè¶¨£º





\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name "mydomain.org";

subnet 192.168.1.0 netmask 255.255.255.0 {
   range 192.168.1.10 192.168.1.100;
   range 192.168.1.150 192.168.1.200;
}
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}






Éè¶¨µÄ½á¹ûÎª£¬DHCP ËÅ·þÆ÷»áÌá¹©ÓÃ»§¶Ë£¬Ê¹ÓÃ¡õÎ§ 192.168.1.10-192.168.1.100 »ò
192.168.1.150-192.168.1.200 µÄ IP Î»Ö·¡£Èç¹û£¬ÓÃ»§¶ËÃ»ÓÐÌØ±ðÔ¼¶¨ IP Î»Ö·µÄ×âÓÃ
Ê±¼ä£¬ÔòÊÍ³öÊ±¼äÔ¤¶¨Îª 600 Ãë£¬Òª²»È»£¬×î´ó£¨ÔÊÐí£©µÄÊÍ³öÊ±¼äÎª 7200 Ãë¡£Í¬Ê±
ËÅ·þÆ÷Ò²»á¡°Í¨Öª¡±ÓÃ»§¶Ë£¬ÒªÇóËüÊ¹ÓÃ 255.255.255.0 ×öÎª×ÓÍøÂ·ÕÚÕÖ£¬192.168.1.255
×öÎª¹ã²¥Î»Ö·£¬192.168.1.254 ×öÎªÂ·ÓÉ/Õ¢µÀÆ÷£¬²¢ÒÔ 192.168.1.2 ×öÎª DNS ËÅ·þÆ÷¡£





ÄãÒ²¿ÉÒÔÒÀ¾ÝÓÃ»§¶ËµÄÒÒÌ«ÍøÂ·Î»Ö·£¬À´Ö¸ÅÉÌØ¶¨µÄ IP Î»Ö·¸øÓÃ»§¶Ë£¬ÀýÈç

\par
\addvspace{\medskipamount}
\nopagebreak\hrule
\begin{verbatim}
host haagen {
   hardware ethernet 08:00:2b:4c:59:23;
   fixed-address 192.168.1.222;
}
\end{verbatim} 
\nopagebreak\hrule 
\addvspace{\medskipamount}






Õâ¸öÉè¶¨½«»áÖ¸ÅÉ IP Î»Ö· 192.168.1.222 ¸øÒÒÌ«ÍøÂ·Î»Ö·Îª  08:00:2b:4c:59:23 µÄ
ÓÃ»§¶Ë¡£





ÍøÂ·ÉÏ IP Î»Ö·µÄÖ¸¶¨£¬¿ÉÒÔ²É»ìºÏË«¹ìÖÆ£¬Æ©Èç£¬Äã¿ÉÒÔÈÃÄ³Ð©µçÄÔÓµÓÐ¡°¾²Ì¬¡±µÄ
IP Î»Ö·£¨ÀýÈç£¬ËÅ·þÆ÷£©£¬¶øÈÃÆäËüµÄÓÃ»§¶ËÈ¡µÃ¡°¶¯Ì¬¡±µÄIP Î»Ö·£¨ÀýÈç£¬Ê¹ÓÃÏ¥
ÉÏÐÍµçÄÔ£¬»ú¶¯µÄÊ¹ÓÃÕß£©¡£»¹ÓÐÆäËüµÄÑ¡Ïî£¬Æ©Èç£¬Ëµ wins ËÅ·þÆ÷µÄÎ»Ö·¡¢Ê±¼äËÅ·þ
Æ÷µÈµÈ£¬Èç¹ûÄãÐèÒª½øÒ»²½ÁË½âµÄ»°£¬¿ÉÒÔÇë²ÎÔÄ dhcpd.conf µÄËµÃ÷ÎÄ¼þ¡£








\subsection{Æô¶¯ËÅ·þÆ÷}



ÔÚÆô¶¯ËÅ·þÆ÷Ö®Ç°ÄãÖ»Òª×öÒ»¼þÊÂÇé¾ÍÐÐÁË¡£Í¨³£ DHCP µÄ°²×°¹ý³ÌÖÐ²¢²»»á²úÉúµµ°¸
dhcp.leases¡£ËÅ·þÆ÷ DHCPd »áÊ¹ÓÃÕâ¸öµµ°¸À´´¢´æÄ¿Ç°µÄ×âÓÃ×ÊÑ¶¡£¸Ãµµ°¸²ÉÓÃÒ»°ã
ÎÄ×ÖµÄ¸ñÊ½À´´¢´æ×ÊÁÏ£¬ËùÒÔÔÚ DHCPd ²Ù×÷ÆÚ¼äÄã¿ÉÒÔÖ±½Ó¼ìÊÓËüµÄÄÚÈÝ¡£ÏÖÔÚÎÒÃÇ
À´²úÉúµµ°¸ dhcp.leases£¬ÇëÔÚÃüÁîÁÐÉÏÊäÈë£º

{\ttfamily touch /etc/dhcp.leases}

Õâ¸ö¶¯×÷½«»á²úÉúÒ»¸ö¿Õ°×µÄµµ°¸£¨µµ°¸µÄ´óÐ¡ = 0£©¡£Äã²»ÐèÒª¶Ô¸Ãµµ°¸×öÈÎºÎµÄÐÞ¸Ä
ËùÒÔËüÓ¦¸ÃÊÇ¿Õ°×µÄ¡£ÈôÄã¿´µ½Ò»¸ö´íÎóµÄÑ¶Ï¢Ëµ¸Ãµµ°¸ÊÇ¿Õ°×µÄ£¬Äã¿ÉÒÔ²»Àí»áËü²¢ÇÒ
Çë¼ÌÐøÒÔÏÂµÄ²½Öè¡£



ÏÖÔÚ£¬Äã¿ÉÒÔÆôÓÃ DHCP ËÅ·þÆ÷ÁË¡£Ö»ÒªÊäÈë£¨»ò½«ÏÂÃæµÄÐðÊö¼Óµ½¿ª»úÉè¶¨µµÖÐ£©

{\ttfamily /usr/sbin/dhcpd}

Èç¹û£¬ÄãÏëÒªÈ·¶¨ÔË×÷ÊÇ·ñÒ»ÇÐÕý³££¬ÄãÓ¦¸ÃÏÈ¿ªÆô³ý´íÄ£Ê½£¬²¢°ÑËÅ·þÆ÷·Åµ½¡°Ä»Ç°¡±
£¨foreground£©À´Ö´ÐÐ¡£Îª´Ë£¬Äã¿ÉÒÔÊäÈë

{\ttfamily /usr/sbin/dhcpd -d -f}

È»áá£¬¿ªÆôÄãÈÎºÎÒ»¸öÓÃ»§¶Ë»úÆ÷£¬²¢²ì¿´ËÅ·þÆ÷¶Ë¡°²Ù×÷¿ØÖÆÌ¨¡±£¨console£©µÄÓ©Ä»£¬
Äã½«»á¿´µ½Ò»Ð©³ý´íÑ¶Ï¢±»ÏÔÊ¾³öÀ´¡£





\end{document}
