Linuxdoc Sgml/Bridge
<!doctype linuxdoc system> <article> <!-- Title information --> <title>Bridging mini-Howto</title> <author>Christopher Cole, <tt><htmlurl url="mailto:cole@coledd.com" name="cole@coledd.com"></tt></author> <date>v1.21, March 7, 2001 </date> <trans>Â÷ÇÑÁø <tt><htmlurl url="mailto:maylinux@korea.com" name="maylinux@korea.com"></tt></trans> <tdate>2001³â 3¿ù 19ÀÏ</tdate> <abstract> ÀÌ ¹®¼´Â Ethernet bridge ¼³Á¤ÇÏ´Â ¹æ¹ýÀ» ¼³¸íÇϰí ÀÖ´Ù. Ethernet bridge¶õ ¹«¾ùÀΰ¡? ¸¹Àº ¾çÀÇ µ¥ÀÌÅÍ ºñÆ®ÀÇ ¼ÒÅë·®À» ³ª´©´Â ¼ºê³ÝÀÇ µ¥ÀÌÅÍ ÆÐŶÀ» ĿƮ·Ñ ÇÏ´Â ÀåÄ¡ÀÌ´Ù. Bridge ´Â °°Àº ±×·ì¾ÈÀÇ ´Ù¸¥ ÄÄÇ»ÅÍ »çÀÌ¿¡ Ç×»ó Á¸ÀçÇÑ´Ù. ÇÏÁö¸¸ ´Ù¸¥ ±×·ì¿¡ ÀÖ´Â ÄÄÇ»ÅͱîÁö Æ÷ÇÔÇÏÁö´Â ¾Ê´Â´Ù. ÁÁÀº ¿¹·Î ¸ÆÄËÅä½ÃÀÇ Å©·¯½ºÅÍ¿Í À¯´Ð½ºÀÇ Å©·¯½ºÅ͸¦ µé¼ö ÀÖ´Ù. ±× ¸Ó½ÅµéÀº ±×µé ÀÇ»ç¼ÒÅëÀ» ÇϰÔÇÑ´Ù, ±×¸®°í µ¥ÀÌÅÍ ¼ÒÅëÀº °¢ ¸Ó½Å°£ÀÇ ¼ÒÅë¿¡ ÀÇÇÑ µ¥ÀÌÅÍ Ãæµ¹(collisions)ÀÌ ÀϾ´Â À©ÀÎÀ» ¸¸µé¾î³½´Ù. Bridge ´Â µ¥ÀÌÅÍ ÆÐŶÀÌ µµÂøÇÒ ¸ñÀûÁö¿Í Ç༱Áö¸¦ °ËÅäÇÏ°í ´Ù¸¥ ÀÌ´õ³Ý ¼¼Å©¸ÕÆ®¸¦ °æÀ¯ÇÒ°ÍÀÎÁö ¾È ÇÒ°ÍÀÎÁö °áÁ¤ÇÏ´Â ÀÏÀ» ÇÑ´Ù. ±× °á°ú ³×Æ®¿öÅ©¸¦ ´õ ºü¸£°í ¾ÈÁ¤¼º ÀÖÀ¸¸ç Ãæµ¹À» ÁÙÀϼö ÀÖ´Ù. ¿ªÀÚ...Bridge ´Â °¢ ³×Æ®¿öÅ©¸¦ ¿¬°áÇÏ´Â ÀåÄ¡, ¹æ¹ýÀ» ÀÏÄÖ´Â ¸»·Î ±»ÀÌ º¯¿ªÇÏÁö ¾Ê°í Bridge ¶ó´Â ´Ü¾î¸¦ ½èÀ½À» ¾Ë·Áµå¸³´Ï´Ù..±×¸®°í ¿ÀŸ³ª ¿À¿ªÀÌ ÀÖÀ¸¸é ¸ÞÀÏÀ» º¸³»Áֽñ⠹ٶø´Ï´Ù. </abstract> <!-- Table of contents --> <toc> <sect>¼³Ä¡ <p> <enum> <item>``Bridge Config''¸¦ ±¸ÇÑ´Ù. <tscreen> <url url="ftp://ftp.tux.org/people/alan-cox/BRCFG.tgz"> </tscreen> <verb> BRCFG´Â http ¿¡¼µµ ±¸ÇÒ¼ö ÀÖ´Ù. </verb> <tscreen> <url url="http://coledd.com/networking/bridge/"> </tscreen> <item>º¹¼öÀÇ ÀÌ´õ³ÝÀåÄ¡¸¦ »ç¿ëÇÒ¼ö ÀÖµµ·Ï <tt>/etc/lilo.conf</tt>¿¡ ´ÙÀ½°ú °°ÀÌ Ãß°¡Ç϶ó. ±×¸®°í <tt>lilo</tt>¸¦ Àç½ÇÇà½ÃÄѶó. <tscreen> <verb> append = "ether=0,0,eth1" </verb> </tscreen> ¸¸ÀÏ ´ç½ÅÀÌ ¼¼°³ÀÇ ÀÌ´õ³ÝÀåÄ¡¸¦ °¡Áö°í ÀÖ´Ù¸é, ´ÙÀ½ ¶óÀÎÀ¸·Î ´ë½ÅÇ϶ó. <tscreen> <verb> append = "ether=0,0,eth1 ether=0,0,eth2" </verb> </tscreen> <!-- </p> --> <!-- <p> --> ´õ ¸¹Àº ÀåÄ¡°¡ ÀÖ´õ¶óµµ °°Àº ¹æ½ÄÀ¸·Î Ãß°¡ ÇÒ¼ö ÀÖ´Ù. ±âº»ÀûÀ¸·Î ¸®´ª½ºÄ¿³ÎÀº ÇѰ³ÀÇ ÀÌ´õ³ÝÄ«µå¸¦ Áö¿øÇÏ°Ô µÇ¾îÀÖ´Ù. À§¿Í °°Àº append ¼³Á¤À¸·Î ¸¹Àº ÀÌ´õ³ÝÄ«µå¸¦ Áö¿øÇÏ°Ô ÇÒ¼ö ÀÖ´Ù. <!-- </p> --> <!-- <p> --> ¶Ç ´Ù¸¥ ¹æ¹ýÀ¸·Îµµ ÆÄ¶ó¹ÌÅ͸¦ ¼³Á¤ÇÒ¼ö ÀÖ´Ù. <tscreen> <verb> linux ether=0,0,eth1 </verb> </tscreen> ¸¸ÀÏ ¼¼°³ÀÇ ÀåÄ¡¶ó¸é: <tscreen> <verb> linux ether=0,0,eth1 ether=0,0,eth2 </verb> </tscreen> <!-- </p> --> <item><tt>BRIDGING</tt>ÀÌ °¡´ÉÇϵµ·Ï Ä¿³ÎÀ» ÀçÄÄÆÄÀÏÇÏ¿©¶ó. <item>bridge´Â IP address ¸¦ ²À ÇÊ¿äÇÑ°Ç ¾Æ´Ï´Ù. ÀϹÝÀûÀÎ bridge ¿¡¼´Â Çʿ䰡 ¾ø´Ù. ³ÊÀÇ bridge ¿¡¼ IP address Á¦°ÅÇ϶ó. ±×¸®°í <tt>/etc/sysconfig/network-scripts/</tt> (for a RedHat system)·Î À̵¿Ç϶ó. ±×¸®°í <tt>ifcfg-lo0</tt>¸¦ <tt>ifcfg-eth0</tt> ¿Í <tt>ifcfg-eth1</tt>·Î º¹»çÇ϶ó. 2°³ÀÇ ÆÄÀϾÈÀÇ "<tt>DEVICE=lo</tt>"' À» "DEVICE=eth0</tt>" ¿Í "<tt>DEVICE=eth1</tt>"·Î º¯°æÇ϶ó. ´Ù¸¥ ¹èÆ÷ÆÇ¿¡ µû¶ó ¾à°£ ´Ù¸¦¼ö ÀÖ´Ù. ÇÏÁö¸¸ Å©°Ô ´Ù¸£Áö ¾ÊÀ¸´Ï ¼³Á¤¿¡ ¾î·Á¿òÀ» ¾øÀ» °ÍÀÌ´Ù. 2°³ÀÌ»óÀÇ ÀÌ´õ³ÝÀåÄ¡°¡ ÀÖ´Ù¸é ¾Õ¿¡¼ ¾ð±ÞÇÑ ¹Ù¿Í °°ÀÌ ¼³Á¤ÇÏ¸é µÈ´Ù. <item>ÀçºÎÆÃ, ±×¸®°í bridging ÀÌ µÈ »õ·Î¿î Ä¿³Î·Î ½ÇÇàÇØ¾ßÇÑ´Ù. ±×·¯¸é ³×Æ®¿öÅ© ÀÎÅÍÆäÀ̽º»ó¿¡ °æ°è°¡ ¾ø´Â IP ¾îµå·¹½º¸¦ ¾ò°Ô µÉ°ÍÀÌ´Ù. <item>½Ã½ºÅÛ¿¡¼ ¹é¾÷ÇØµÐ °ÍÀ» ÀÌ´õ³ÝÄ«µå¼³Á¤¿¡ ´Ù½Ã Àû¿ëÇÑ´Ù. (¹°·Ð óÀ½ºÎÅÍ ´Ù½Ã ¼³Á¤Çصµ µÇ°ÚÁö¸¸, Á¶±Ý ±ÍÂúÀ¸´Ï) ±×·¯¸é ´ç½ÅÀº ±× ÀåÄ¡¸¦ Åë°úÇÏ´Â ¸ðµç ÆÐŶÀ» º¼¼ö ÀÖ´Ù. <tscreen> <verb> ifconfig eth0 promisc ; ifconfig eth1 promisc </verb> </tscreen> Bridge ³×Æ®¿öÅ©¿¡ ¿¬°áµÈ ¸ðµç ÀåÄ¡µéÀº ¼³Á¤À» À§¿Í °°ÀÌ ÇØ¾ßÇÑ´Ù. <item><tt>brcfg</tt> ÇÁ·Î±×·¥ÀÌ »ç¿ë°¡´ÉÇϵµ·Ï enable ½ÃŲ´Ù. <tscreen> <verb> brcfg -ena </verb> </tscreen> <item>°¢ ÀåÄ¡¿¡¼ µ¥ÀÌÅͼÒÅëÀ» È®ÀÎÇ϶ó. <tscreen> <verb> tcpdump -i eth0 (in one window) tcpdump -i eth1 (in another window) </verb> </tscreen> <item>´Ù¸¥ ¸Ó½Å¿¡¼ sniffer¸¦ ½ÇÇàÇϰųª<tt>tcpdump</tt>·Î bridge °¡ ¼¼±×¸ÕÆ®¸¦ Á¤È®È÷ ºÐ·ùÇÏ´Â È®ÀÎÇ϶ó. </enum> </p> <sect>º¸ÆíÀûÀÎ ¹®Á¦µé <p> <enum> <item> <descrip> <tag/Question/ ´ÙÀ½°ú °°Àº ¸Þ¼¼Áö°¡ Ãâ·ÂµÆ´Ù. <tscreen> <verb> ioctl(SIOCGIFBR) failed: Package not installed </verb> </tscreen> ÀÌ°Ç ¹«½¼ ÀǹÌÀΰ¡?? <tag/Answer/ ´ç½ÅÀÇ Ä¿³Î¿¡¼ bridging ´É·ÂÀ» Áö¿øÀ» ÇÏÁö ¸øÇÑ °ÍÀÌ´Ù. 2.0 ÀÌ»óÀÇ Ä¿³ÎÀ» ´Ù¿î¹Þ¾Æ¼, <tt>BRIDGING</tt> ÀÌ °¡´ÉÇϵµ·Ï Àç ÄÄÆÄÀÏÇ϶ó. </descrip> <item> <descrip> <tag/Question/ ÇÑÂÊ ¸Ó½Å¿¡¼ ´Ù¸¥ ¸Ó½ÅÂÊÀ¸·Î pingÀ» ÇÒ¼ö ¾ø´Ù. <tag/Answer/ <itemize> <item>´ç½ÅÀº "<tt>brcfg -ena</tt>"À» ½ÇÇàÇߴ°¡? (<tt>brcfg</tt> °¡ "<tt>bridging is ENABLED</tt>")¸¦ Ãâ·ÂÇØ¾ßÇÑ´Ù. <item>ÀåÄ¡¿¡ ¸ðµå¼³Á¤À» ÇÏ¿´´Â°¡? "<tt>ifconfig</tt>" ¸í·É¾î°¡ ÇÙ½ÉÀÌ´Ù. "<tt>PROMISC</tt>" Ç¥½Ã°¡ ÀåÄ¡ ¸ðµÎ¿¡¼ ³ªÅ¸³ª¾ß ÇÑ´Ù. <item>¿©·¯°³ÀÇ ÀåÄ¡ ¾î´ðÅ͸¦ »ç¿ëÇÑ´Ù¸é ¿Ã¹Ù¸¥ Çϳª¸¸À» »ç¿ëÇØ¾ß ÇÑ´Ù. ±×¸®°í ±× ³×Æ®¿öÅ© ÀåÄ¡¿¡ ´ëÇØ ¼³Ä¡¿Í ¼³Á¤À» ÇØ¾ßÇÑ´Ù. </itemize> </descrip> <item> <descrip> <tag/Question/ <tt>telnet</tt>/<tt>ftp</tt> ¸¦ bridge·Î ºÎÅÍ ¿¬°áÇÒ¼ö ¾ø´Ù. <tag/Answer/ IP address ¹Ù¿îµùÀÌ ¾î¶² bridge ·Î ºÎÅ͵µ ¾ø¾ú±â ¶§¹®ÀÌ´Ù. bridgeµµ ³×Æ®¿öÅ©ÀÇ ÀÏÁ¾ÀÌ´Ù.. </descrip> <item> <descrip> <tag/Question/ ¶ó¿ìÆÃ °æ·Î¿¡ ´ëÇÑ ¼³Á¤À» ÇØ¾ßÇϳª? <tag/Answer/ Nothing! ¸ðµç ¶ó¿ìÆÃ Á¤º¸´Â Ä¿³ÎÀÇ Bridging Äڵ忡 Á¿ìµÈ´Ù. ´ç½ÅÀº Bridge¿¡ ´ëÇØ ¹è¿î ÀÌ´õ³Ý ¾îµå·¹½ºµéÀ» <tt>brcfg</tt> ÇÁ·Î±×·¥ÀÇ µð¹öµå ¸ðµå·Î º¼¼ö ÀÖ´Ù. <tscreen> <verb> brcfg -deb </verb> </tscreen> </descrip> <item> <descrip> <tag/Question/ Bridge ¿¡ ÀÇÇÑ ÀÛ¾÷Àº "traceroute" ¿¡ º¸ÀÌÁö ¾Ê´Â°¡? <tag/Answer/ º»ÁúÀûÀ¸·Î Bridge´Â "traceroute" ¿¡ º¸ÀÌÁö ¾Ê´Â´Ù. Bridge´Â ³×Æ®¿öÅ©¿¡ ÇÑ ºÎºÐÀ̱⠶§¹®ÀÌ´Ù. </descrip> <item> <descrip> <tag/Question/ Ä¿³ÎÀÇ <tt>IP_FORWARD</tt> ¸¦ ÀçÄÄÆÄÀÏÇØ¾ß Çϴ°¡? <tag/Answer/ ÇÊ¿ä¾ø´Ù. Ä¿³Î¿¡¼ Bridging ÄÚµå´Â ÆÐŶÀ» Àü¼ÛÀ» °ü¸®ÇÑ´Ù. <tt>IP_FORWARD</tt> ´Â °¢ ÀåÄ¡ÀÇ ¾ÆÀÌÇÇ ¾îµå·¹½ºÀÇ ¹Ù¿îµù µÇ´Â °ÔÀÌÆ®¿þÀÌÀÌ´Ù. </descrip> <item> <descrip> <tag/Question/ Æ÷Æ® 1 ,Æ÷Æ® 2 ÀÇ ÀÌ´õ³Ý ¾îµå·¹½º°¡ ¾î¶»°Ô °°Àº "<tt>brcfg</tt>" ÇÁ·Î±×·¥¿¡ ÀÇÇØ Á¿ìµÇ´Â°¡? µÎ°³ÀÇ Æ÷Æ®¸¦ ´Ù¸£°Ô ¼³Á¤ÇؾßÇϴ°¡? <tag/Answer/ ¾Æ´Ï´Ù. ¸ðµç Æ÷Æ®´Â Bridging Äڵ忡 ÀÇÇØ °°Àº ÀÌ´õ³Ý ¾îµå·¹½º·Î Ãë±ÞµÈ´Ù.±×·¯¹Ç·Î ÇÊ¿ä¾ø´Ù. </descrip> <item> <descrip> <tag/Question/ Ä¿³Î¼³Á¤½Ã Bridging ´ëÇÑ ¿É¼ÇÀÌ ³ªÅ¸³ªÁö ¾Ê´Â´Ù. ¾î¶»°Ô ÇØ¾ßÇϴ°¡? <tag/Answer/ Ä¿³Î ¼³Á¤Áß¿¡ ´ÙÀ½°ú Áú¹®ÀÌ ³ª¿À¸é 'Y' ·Î ´ë´äÇ϶ó. <tscreen> <verb> ``Prompt for development and/or incomplete code/drivers (CONFIG_EXPERIMENTAL)[Y/n/?]''. </verb> </tscreen> </descrip> <item> <descrip> <tag/Question/ ¸¹Àº Çãºê(4 ¶Ç´Â ´õ¸¹Àº)°¡ ´Ù¸¥ ½Ã¸®¾ó·Î ¿¬°áµÈ ÀÌ´õ³Ý¿¡¼´Â °¢ ½Ã½ºÅÛ¿¡ ÀÌ´õ³Ý ½Ã°£ºÐ¹è¿¡ ¹®Á¦°¡ ÀÖ´Ù. Bridge ·Î ¼³Á¤µÈ ¼ºê³Ý¿¡¼´Â Çãºê·Î ¾ó¸¶Á¤µµ·Î ¿¬°áµÈ Á¤µµÀÇ È¿°ú°¡ Àִ°¡? <tag/Answer/ Bridge´Â 3/4/5 ÇãºêÁ¤µµ Ãʱ⼳Á¤ÀÌ µÇ¾îÀÖ´Ù. Bridge´Â Çãºê ¹æ½Ä°ú´Â ÆÐŶÀ» ó¸®ÇÏ´Â ¹æ¹ýÀÌ Æ²¸®´Ù. ±×·¸±â ¶§¹®¿¡ ³×Æ®¿öÅ©»óÀÇ ½Ã°£ºÐ¹è¹®Á¦¿¡ Àâ¾Æ¸ÔÈ÷Áö ¾Ê´Â´Ù. </descrip> <item> <descrip> <tag/Question/ 10Mb , 100Mb ÀÌ´õ³ÝÀåÄ¡¸¦ Bridge°¡ µ¿½Ã¿¡ Áö¿øÇÒ¼ö Àִ°¡? µ¥ÀÌÅÍ ¼ÒÅëÀÌ ºü¸¦¶§ ¼Óµµ ÀúÇÏ´Â ¾ø´Â°¡? <tag/Answer/ 10Mb , 100Mb ÀÌ´õ³ÝÀåÄ¡¸¦ µÎ°³ ´Ù Bridge ¿¡¼ »ç¿ëÇÒ¼ö ÀÖ´Ù. 100Mb ¿Í °°Àº ºü¸¥ ³×Æ®¿öÅ© Ä«µå¿¡¼´Â TCP ´Â ³²´Â ½Ã°£ÀÌ ÀÖ´Ù. 100Mb ÀÇ È£½ºÆ®¿¡¼ 10Mb ÀÇ È£½ºÆ®·Î Àü¼ÛÇÒ¶§ÀÇ ¼Óµµ´Â 10Mb ¹Û¿¡´Â ³ª¿Ã¼ö°¡ ¾ø´Ù. µ¥ÀÌÅͼ۽ÅÀÇ ³²´Â ½Ã°£À» ¼ÓµµÀúÇϰ¡ ¾Æ´Ï´Ù. </descrip> </enum> </p> </article> |
How sharper than a hound's tooth it is to have a thankless serpent. |