\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{ÇÅ½ÓÆ÷µÄÔË×÷ mini-Howto}
\author{×÷Õß: Christopher Cole,  {\ttfamily \onlynameurl{cole@lynkmedia.com}}\\ 
ÒëÕß: Mile Yeh {\ttfamily mile@mail.timenet.net}}
\date{v1.10, 13Ê®Ò»ÔÂ 1997}
\abstract{ÕâÎÄ¼þÃèÊöÈçºÎÈ¥Éè¶¨Ò»¸öÒÒÌ«ÍøÂ·ÇÅ½ÓÆ÷.Ê²÷áÊÇÒ»¸öÒÒÌ«ÍøÂ·ÇÅ½ÓÆ÷?Ò»¸öÒÒÌ«ÍøÂ·ÇÅ½ÓÆ÷ÊÇÒ»¸öÉè±¸Ëü¿ÉÒÔ¿ØÖÆÔÚÒ»¸ö×ÓÍøÂ·Ö®ÄÚµÄ×ÊÁÏ·â°üÈ¥ÊÔÍ¼¼õÉÙÍøÂ·µÄ´óÁ¿Á÷Á¿. Ò»¸öÇÅ½ÓÆ÷ÊÇÍ¨³£°²·ÅµÄÔÚÁ½×é·Ö¿ªµÄµçÄÔÈº×éÖ®¼äÊ¹µçÄÔ×Ô¼ºÔÚÄÚ²¿¹µÍ¨×ÔÒÑ,¶ø²»ÊÇÆµ·±ºÍÆäËûµÄÈº×éµÄµçÄÔ¹µÍ¨.Ò»¸öºÃµÄÀý×ÓµÄÊÇÏëÏëÒ»ÈºµÄÂó½ðËþºÍÒ»ÈºµÄ Unix »úÆ÷.ÕâÐ©×é±ðµÄ»úÆ÷Á½¸öÈº×é¶¼ÇãÏòì¶ËûÃÇ×Ô¼ººÍ×ÔÒÑµÄ»úÆ÷Ê®·Ö·±Ã¦µÄ¹µÍ¨,
ËûÃÇÔÚÍøÂ·ÉÏ²úÉúµÄÍ¨Ñ¶Á÷Á¿Ê¹ÆäËû»úÆ÷ÊÔÖøºÍÁíÍâÒ»¸ö¹µÍ¨Ê±µÄÔì³ÉÅö×².Ò»¸öÇÅ½ÓÆ÷ÊÇ·ÅµÄÔÚÕâÐ©µçÄÔ×éÈºÖ®¼ä.ÇÅ½ÓÆ÷µÄ¹¤×÷ÊÇÈ»áá¼ì²éÄÇÄ¿µÄµØµÄÊý¾Ý·â°üÒ»¸öÒ»´Î¶øÇÒ¾ö¶¨Òª²»Òª´«Êä·â°üµ½ÄÇÒÒÌ«ÍøÇø¶ÎÁíÒ»±ß.½á¹ûÊÇ±ä³ÉÒ»¸ö¸ü¿ìµÄ,¸ü°²¾²,¸üÉÙµÄÅö×²µÄÍøÂ·.}


\begin{document}
\maketitle
\tableofcontents

\section{Éè¶¨}

\begin{enumerate}
\item È¡µÃ ``ÇÅ½ÓÆ÷ÅäÖÃ'':
\begin{tscreen}
\nameurl{ftp://shadow.cabi.net/pub/Linux/BRCFG.tgz}{}
\end{tscreen}

\item È¡µÃºÍÔÄ¶Á ``Multiple ethernet'' HOWTO:
\begin{tscreen}
\nameurl{ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini/Multiple-Ethernet}{}
\end{tscreen}

\item Ê¹¶à¸öÒÒÌ«ÍøÂ·Éè±¸ÔÚÄãµÄ»úÆ÷ÔË×÷ÕÕÖø
¼ÓÈëÕâÐÐµ½ÄãµÄ {\ttfamily /etc/lilo.conf},
ºÍÖØÐÂÖ´ÐÐ {\ttfamily lilo}:
\begin{tscreen}
\begin{verbatim}
append = "ether=0,0,eth1"
        
\end{verbatim}
\end{tscreen}

Èç¹ûÄãÔÚÄãµÄÇÅ½ÓÆ÷ÉÏÓÐÈýÕÅ½çÃæ¿¨,Ê¹ÓÃÕâÐ©ÐÐÈ¡´úÉÏÃæ:
\begin{tscreen}
\begin{verbatim}
append = "ether=0,0,eth1 ether=0,0,eth2"
        
\end{verbatim}
\end{tscreen}


¿¿¼ÓÈë¸ü¶àµÄÒÒÌ«³ÂÊö¿ÉÒÔÕÒµ½¸ü¶àµÄ½çÃæ.
Ô¤ÉèÉÏÒ»¸ö´«Í³µÄ Linux ºËÐÄÖ»Õì²âÒ»ÕÅ¶ÀÒ»µÄÒÒÌ«ÍøÂ·¿¨,
ºÍµ±Ò»¸ö±»ÕÒµ½Õì²â¾Í»áÍ£Ö¹.
ÉÏÃæËù¸½¼ÓµÄ³ÂÊö¸æËßºËÐÄÔÚµÚÒ»¸ö±»ÕÒµ½Ö®áá¼ÌÐøÕì²â
È¥ÕÒµ½¸ü¶àÒÒÌ«ÍøÂ·Éè±¸.

ÁíÒ»¸ö·½·¨,¿ÉÒÔÊ¹ÓÃÆô¶¯±äÊýÀ´È¡´ú:
\begin{tscreen}
\begin{verbatim}
linux ether=0,0,eth1
        
\end{verbatim}
\end{tscreen}

»òÕß, ÓÐÈý¸ö½çÃæ,Ê¹ÓÃ:
\begin{tscreen}
\begin{verbatim}
linux ether=0,0,eth1 ether=0,0,eth2
        
\end{verbatim}
\end{tscreen}




\item ÖØÐÂ±àÒëÄÇºËÐÄÆô¶¯{\ttfamily BRIDGING}¹¦ÄÜ.
\item Ò»¸öÇÅ½ÓÆ÷Ó¦Ã»ÓÐÒ»¸öµÄ IP µØÖ·.
Ëü¿ÉÒÔÓÐÒ»¸ö,µ«ÊÇÒ»¸öÆ½³£µÄÇÅ½ÓÆ÷²»ÐèÒªÒ»¸ö IP µØÖ·.
´ÓÄãµÄÇÅ½ÓÆ÷ÉÏÒÆ³ý IP µØÖ·,µ½
{\ttfamily /etc/sysconfig/network-scripts/} (¶Ôì¶Ò»¸ö RedHatÏµÍ³)
ºÍ¿½±´ {\ttfamily ifcfg-lo0}µ½ {\ttfamily ifcfg-eth0} \&
{\ttfamily ifcfg-eth1}.
ÔÚÕâÁ½¸öÒÒÌ«µµ°¸ÖÐ,¸Ä±äÄÇÐÐ°üº¬
``{\ttfamily DEVICE=lo}'' to ``{\ttfamily DEVICE=eth0}''
ºÍ ``{\ttfamily DEVICE=eth1}''.
±ðµÄ Linux distribution Ò²ÐíºÍÕâ¸ö²»Í¬,×ÔÒÑ¶¯ÊÖ×öÄãÏëÒªµÄ!
Èç¹ûÇÅ½ÓÆ÷ÉÏÓÐ³¬¹ýÁ½¸ö½çÃæ¿¨,
È·¶¨Ò²Ê¹Éè¶¨·ûºÏÕâÐ©½çÃæ.
\item ÖØÐÂÆô¶¯,Ö´ÐÐÄÇ°üº¬ÇÅ½ÓÆ÷¹¦ÄÜµÄºËÐÄ,
ÁíÍâÒ²²éÃ÷È·ÈÏÒ»¸ö IP µØÖ·Ã»ÓÐÖ¸¶¨µ½
ÕâÍøÂ·½çÃæ¿¨.
\item Ò»´ÎÏµÍ³ÊÇ±¸·Ý,
°ÑÒÒÌ«ÍøÂ·¿¨Éè¶¨ÔÚ·×ÂÒ(promiscuous)µÄÄ£Ê½,
ËûÃÇ½«¿¿ËüµÄ½çÃæ¼à¿´Ã¿Ò»¸öÍ¨¹ýµÄ·â°ü:
\begin{tscreen}
\begin{verbatim}
ifconfig promisc eth0 ; ifconfig promisc eth1
        
\end{verbatim}
\end{tscreen}

Á¬½Óµ½ÍøÂ·Çø¶ÎµÄÈ«²¿µÄ½çÃæ¿¨±»ÇÅ½ÓÆ÷·Ö¿ª
½øÈë promiscuous(·×ÂÒ) µÄÄ£Ê½.
\item Æô¶¯ÇÅ½ÓÆ÷Ê¹ÓÃ {\ttfamily brcfg}³ÌÊ½:
\begin{tscreen}
\begin{verbatim}
brcfg -ena
        
\end{verbatim}
\end{tscreen}

\item ¼ìÑéÃ¿Ò»¸ö½çÃæ¿¨ÓÐ²»Í¬µÄ½»Í¨Á÷Á¿:
\begin{tscreen}
\begin{verbatim}
tcpdump -i eth0      (ÔÚÒ»¸öÊÓ´°)
tcpdump -i eth1      (ÔÚÁíÒ»¸öÊÓ´°)
        
\end{verbatim}
\end{tscreen}

\item Ö´ÐÐÒ»¸ö sniffer (¼à¿´Æ÷) »òÕß {\ttfamily tcpdump} ÔÚÁíÍâµÄ»úÆ÷ÉÏ
È¥¼ìÑéÇÅ½ÓÆ÷ÕýÈ·µØ·Ö¿ªÇø¶Î.
\end{enumerate}



\section{Ò»°ãµÄÎÊÌâ}

\begin{enumerate}
\item 
\begin{description}
\item[Question] \mbox{}

ÎÒµÃµ½Õâ¸öÑ¶Ï¢
\begin{tscreen}
\begin{verbatim}
ioctl(SIOCGIFBR) failed: Package not installed
        
\end{verbatim}
\end{tscreen}

ÕâÊÇÊ²÷áÒâË¼?

\item[Answer] \mbox{}

ÄãµÄºËÐÄÃ»ÓÐÇÅ½ÓÆ÷µÄÄÜÁ¦.
È¡µÃµ½Ò»¸ö 2.0»òÕß¸üááÃæµÄºËÐÄ,
ºÍÖØÐÂ±àÒëÆô¶¯ÇÅ½ÓÆ÷¹¦ÄÜµÄÑ¡Ïî {\ttfamily BRIDGING}.

\end{description}

\item 
\begin{description}
\item[Question] \mbox{}

»úÆ÷ÔÚÒ»±ß²»ÄÜ ping µ½ÁíÍâÒ»±ß!

\item[Answer] \mbox{}

\begin{itemize}
\item ÄãÓÐÊ¹ÓÃ ``{\ttfamily brcfg -ena}' Ê¹ÇÅ½ÓÆ÷ÔË×÷'Âð£¿
({\ttfamily brcfg}½«Ëµ ``{\ttfamily bridging is ENABLED}'')
\item ÄãÓÐ°Ñ½çÃæ·ÅÔÚ promiscuous(·×ÂÒ)µÄÄ£Ê½Âð?
(Ê¹ÓÃ ``{\ttfamily ifconfig}''ÃüÁî.
ÄÇ ``{\ttfamily PROMISC}''²ÎÊýÓ¦¸ÃÊÇÔÚ
Á½¸ö½çÃæ¿¨ÉÏ.)
\item Èç¹ûÕýÔÚÓÃ multiple-media ½çÃæ¿¨,
È·¶¨Æô¶¯µÄÊÇÕýÈ·µÄÊÇÄÇÒ»¶Ë.
ÄãÒ²ÐíÐèÒªÊ¹ÓÃºÍÍøÂ·½çÃæ¿¨¸½µÄ ÅäÖÃ/Éè¶¨ ³ÌÊ½À´×öÉè¶¨
.
\end{itemize}


\end{description}

\item 
\begin{description}
\item[Question] \mbox{}

ÎÒ²»ÄÜ´ÓÇÅ½ÓÆ÷ÉÏ {\ttfamily telnet}/{\ttfamily ftp}!ÎªÊ²÷á?

\item[Answer] \mbox{}

ÕâÊÇÒòÎªÃ»ÓÐ IP µØÖ·Ö¸¶¨µ½ÈÎºÎµÄÇÅ½ÓÆ÷µÄ
½çÃæ¿¨.Ò»¸öÇÅ½ÓÆ÷ÊÇÒ»¸öÍøÂ·µÄÍ¸Í¨²¿·Ö.

\end{description}

\item 
\begin{description}
\item[Question] \mbox{}

ÔÚÉè¶¨Â·ÓÉ·½ÃæÎÒÐèÒª×öÊ²÷á?

\item[Answer] \mbox{}

ÎÞ!
Õû¸öµÄÂ·ÓÉ×ÊÁÏÊÇÓÉ
ºËÐÄµÄÇÅ½ÓÆ÷µÄÂëËùÕÆÎÕ.
¿¿ÇÅ½ÓÆ÷¿´¼ûÄÇÒÒÌ«ÍøÂ·µØÖ·ËûÃÇÊÇ±»Ñ§Ï°,
ÔÚ²â´íÄ£Ê½ÏÂÊ¹ÓÃ {\ttfamily brcfg}³ÌÊ½:
\begin{tscreen}
\begin{verbatim}
brcfg -deb
        
\end{verbatim}
\end{tscreen}


\end{description}

\item 
\begin{description}
\item[Question] \mbox{}

ÄÇÇÅ½ÓÆ÷¿´ÆðÀ´ÓÐÔË×÷,µ«ÊÇÎªÊ²÷á ``traceroute'' Ã»ÓÐÏÔÊ¾ÄÇ
ÇÅ½ÓÆ÷ÊÇÂ·¾¶µÄÒ»¸ö²¿·Ö?

\item[Answer] \mbox{}

ÓÉì¶ÇÅ½ÓÆ÷µ±È»µÄ¹¦ÄÜ, ``traceroute''½«²»ÏÔÊ¾
ÇÅ½ÓÆ÷µ±×÷Â·¾¶µÄÒ»²¿·Ö.Ò»¸öÇÅ½ÓÆ÷ÊÇÍøÂ·µÄÒ»¸öÍ¸Í¨
×é¼þ.

\end{description}

\item 
\begin{description}
\item[Question] \mbox{}

{\ttfamily IP\_FORWARD} ÊÇ·ñ±ØÒª±àÒëµ½ºËÐÄÖÐÄØ?

\item[Answer] \mbox{}

²».ºËÐÄÖÐµÄÇÅ½ÓÆ÷µÄÂëÕÕÁÏ·â°ü
´«ËÍ.
{\ttfamily IP\_FORWARD}¶Ôì¶Ò»¸ö gateway(Í¨Â·Õ¢)ËüÒªÓÐ IP µØÖ·
Ö¸¶¨µ½ËüµÄ½çÃæ.

\end{description}

\item 
\begin{description}
\item[Question] \mbox{}

¸ù¾ÝÄÇ ``{\ttfamily brcfg}''³ÌÊ½ÏÔÊ¾,ÎªÊ²÷á¶Ôì¶²º 1ºÍ²º 2 ÊµÌåµÄ
ÒÒÌ«ÍøÂ·µØÖ·ÊÇÏàÍ¬µÄ?
ËûÃÇÓ¦¸ÃÊÇ²»Í¬µÄÂð?

\item[Answer] \mbox{}

²».Ò»¸öÇÅ½ÓÆ÷µÄÃ¿Ò»²ºÊÇ¹ÊÒâµØÊÇÓÉÇÅ½ÓÆ÷µÄÂëÖ¸¶¨ÄÇÏàÍ¬µÄ
ÊµÌåµÄÒÒÌ«ÍøÂ·µØÖ·.

\end{description}

\item 
\begin{description}
\item[Question] \mbox{}

µ±ÔÚºËÐÄÖÐÖ´ÐÐµÄÒ»¸ö (make config)½¨ÔìÉè¶¨,ÇÅ½ÓÆ÷µÄÑ¡ÏîÃ»ÓÐ³öÏÖ
.ËüÊÇÈçºÎÆô¶¯µÄÄØ£¿

\item[Answer] \mbox{}

ÔÚºËÐÄÅäÖÃµÄÊ±ºò,Õë¶ÔÒÔÏÂµÄÎÊÌâ»Ø´ð 'Y' , ``Prompt for
development and/or incomplete code/drivers (CONFIG\_EXPERIMENTAL) 
{[}Y/n/?]''.

\end{description}

\item 
\begin{description}
\item[Question] \mbox{}

Ì«¶à¼¯ÏßÆ÷ (4¸ö»òÕß¸ü¶à)Ò»¸ö½ÓÒ»¸ö´®Á¬ÔÚÒ»Æð (Á¬ÐøµØ) 
ÔÚÒ»¸öÒÒÌ«ÍøÂ·ÉÏÔì³ÉÊ±¼ä»ØÓ¦µÄÎÊÌâ.ÔÚÒ»¸öÓÉ¼¯ÏßÆ÷Ëù²¼½¨µÄ×ÓÍøÖÐ
Ò»¸öÇÅ½ÓÆ÷»áÓÐÊ²÷á½á¹û?

\item[Answer] \mbox{}

Ò»¸öÇÅ½ÓÆ÷ÖØÉè 3/4/5¼¯ÏßÆ÷¹æÔò.Ò»¸öÇÅ½ÓÆ÷Ã»ÓÐÈçÍ¬Ò»¸ö¼¯ÏßÆ÷Ëù×öµÄ´¦Àí
·â°ü,Òò´ËÃ»ÓÐÒ»¸ö contributor(¹±Ï×Õß) µ½
ÔÚÒ»¸öÍøÂ·ÉÏÓÐÊ±¼ä»ØÓ¦ÎÊÌâ.

\end{description}

\item 
\begin{description}
\item[Question] \mbox{}

Ò»¸öÇÅ½ÓÆ÷½çÃæÄÜ¹»Í¬Ê±Á¬½Ó 10Mb ºÍ 100Mb Á½¸öÒÒÌ«ÍøÂ·Çø¶Î?
ÕâÑùµÄÅäÖÃ»áÔì³É¸ßËÙÁ÷Á¿µÄÁíÒ»±ß
ÂýÏÂÀ´Âð?

\item[Answer] \mbox{}

ÊÇ,Ò»¸öÇÅ½ÓÆ÷ÄÜ¹»°Ñ 10 Mb µÄÇø¶ÎºÍ 100Mb µÄÇø¶Î°óÔÚÒ»Æð
Ö»ÒªÄÇÍøÂ·¿¨ÔÚÇÅ½ÓÆ÷µÄ¿ìËÙÍøÂ·µÄÄÇÒ»±ß
ÊÇÓÐ 100Mb ÄÜÁ¦µÄ , TCP ½«ÒªÕÕÁÏÆäâÅµÄ²¿·Ö.ÕâÊ±Ëü·¢ÉúµÄÇéÐÎÊÇ
´ÓÒ»¸öÔÚ 100Mb ÍøÂ·µÄÖ÷»úËÍ·â°ü¹µÍ¨Áí
Ò»¸öÔÚ 10Mb ÍøÂ·µÄÖ÷»úÊÇÖ»ÓÐÓÃ 10Mb/s µÄËÙ¶ÈÒÆ¶¯,ÆäâÅµÄ 
ÄÇÍøÂ·½»Í¨ÔÚ¿ìËÙÒÒÌ«ÍøÂ·ÊÇ²»»á±»ÍÏÂý.  

\end{description}
\end{enumerate}


\end{document}
