GentooX86 Handbook_Ko_4-3
1.1. ³×Æ®¿öÅ© ¸ðµâ ¶¿ì¸®°¡ ÀÌÁ¦ ¸ðµâ·¯ ³×Æ®¿öÅ· ½ºÅ©¸³µå¸¦ Áö¿øÇÑ´Ù´Â °ÍÀº »õ·Î¿î ÀÎÅÍÆäÀ̽º À¯ÇüÀ» À§ÇØ ½±°Ô Ãß°¡ÇÒ ¼ö ÀÖ°í ȯ°æ ¼³Á¤ ¸ðµâÀÌ ÀÌ¹Ì Á¸ÀçÇϴ°ͰúÀÇ È£È¯¼ºÀ» À¯ÁöÇÒ ¼ö ÀÖ´Ù´Â ÀǹÌÀÔ´Ï´Ù.
ÇÊ¿äÇÑ ÆÐÅ°ÁöµéÀÌ ¼³Ä¡µÇ¾úÀ»¶§ ¸ðµâµéÀº ±âº»À¸·Î ·Îµå µË´Ï´Ù. ¸¸¾à ¼³Ä¡µÇÁö ¾ÊÀº ÆÐÅ°Áö¿¡ ´ëÇÑ ¸ðµâÀ» ÁöÁ¤Çß´Ù¸é ÆÐÅ°Áö ¼³Ä¡°¡ ÇÊ¿äÇÏ´Ù´Â ¾Ë¸² ¿¡·¯¸Þ¼¼Áö¸¦ º¸°Ô µÉ °ÍÀÔ´Ï´Ù. ÀÌ»óÀûÀ¸·Î, °°Àº ¼ºñ½º¸¦ Á¦°øÇÏ´Â µÑ ÀÌ»óÀÇ ÆÐÅ°Áö°¡ ¼³Ä¡ µÇ¾úÀ» ¶§ ±×¸®°í ´Ù¸¥ °Í ±× ÀÌ»óÀÇ ¾î¶² Çϳª¸¦ ÃëÇÒ ÇÊ¿ä°¡ ÀÖÀ»¶§ µ¶ÀÚ¿©·¯ºÐÀº ´ÜÁö ¸ðµâµéÀÇ ¼³Á¤»çÇ׸¸ »ç¿ëÇÏ°Ô µÉ °ÍÀÔ´Ï´Ù.
À¯ÀÇ»çÇ× ´Ù¸¥ ¾î¶²°ÍÀÌ ÁöÁ¤µÇ±â Àü¿¡´Â ¸ðµç ¼ÂÆÃÀº /etc/conf.d/net¿¡ ÀÖ½À´Ï´Ù.
¿¹Á¦ 1-1: ¸ðµâ ¼³Á¤
# Prefer iproute2 over ifconfig modules=( "iproute2" ) # You can also specify other modules for an interface # In this case we prefer udhcpc over dhcpcd modules_eth0=( "udhcpc" ) # You can also specify which modules not to use - for example you may be # using a supplicant or linux-wlan-ng to control wireless configuration but # you still want to configure network settings per ESSID associated with. modules=( "!iwconfig" ) 1.2. ÀÎÅÍÆäÀ̽º Çڵ鷯 ¶¿ì¸®´Â µÎ°¡Áö ÀÎÅÍÆäÀ̽º Çڵ鷯ifconfig¿Í iproute2¸¦ ¹Ù·Î Á¦°øÇÕ´Ï´Ù. ¾î¶² ³×Æ®¿öÅ© ȯ°æ¼³Á¤À» Çϱâ À§ÇØ À̵éÁß Çϳª°¡ ÇÊ¿äÇÕ´Ï´Ù.
ifconfig ´Â ÇöÀç Á¨Åõ ±âº»»çÇ×ÀÌ°í ½Ã½ºÅÛ ÇÁ·ÎÆÄÀÏ¿¡ Æ÷ÇԵǾî ÀÖ½À´Ï´Ù. iproute2´Â Á»´õ °·ÂÇÏ°í À¯¿¬ÇÑ ÆÐÅ°ÁöÀÌÁö¸¸ ±âº»À¸·Î µé¾îÀÖÁö ¾Ê½À´Ï´Ù.
¿¹Á¦ 2-1 : iproute2 ¼³Ä¡
# emerge sys-apps/iproute2 # To prefer iproute2 over ifconfig if both are installed modules=( "iproute2" ) ifconfig¿Í iproute2 µÑ ´Ù°¡ ¸Å¿ì À¯»çÇÑ ÀÏÀ» ÇϵíÀÌ ¿ì¸®´Â »óÈ£°£ °°ÀÌ µ¿ÀÛÇÏ°Ô ÇÏ´Â ±âº» ȯ°æ¼³Á¤À» Çϵµ·Ï ÇÒ ¼ö ÀÖ½À´Ï´Ù. ¿¹¸¦ µé¾î ¾Æ·¡ Á¦½ÃµÈ ÀϺÎÄÚµå µÑ Àº µ¶ÀÚ¿©·¯ºÐÀÌ »ç¿ëÇÏ°í ÀÖ´Â ¸ðµâÀÌ ¾î¶²°ÍÀÎÁö °í·ÁÇÏÁö ¾Ê°í µ¿ÀÛÇÕ´Ï´Ù.
¿¹Á¦ 2-2 : ifconfig¿Í iproute2 ¿¹Á¦
config_eth0=( "192.168.0.2/24" ) config_eth0=( "192.168.0.2 netmask 255.255.255.0" ) # We can also specify broadcast config_eth0=( "192.168.0.2/24 brd 192.168.0.255" ) config_eth0=( "192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255" ) 1.3. DHCP ¶DHCP´Â ³×Æ®¿öÅ© Á¤º¸(IPÁÖ¼Ò, DNS¼¹ö, °ÔÀÌÆ®¿þÀÌ µî)¸¦ DHCP ¼¹ö·ÎºÎÅÍ ¿äûÇÔÀ» ÀǹÌÇÕ´Ï´Ù. ÀÌ´Â ³×Æ®¿öÅ©»ó¿¡ DHCP¼¹ö°¡ µ¿ÀÛÇÑ´Ù¸é, ÀÌ°ÍÀÌ ´ÜÁö DHCP¸¦ »ç¿ëÇÏ¿© °¢°¢ÀÇ Å¬¶óÀ̾ðÆ®¸¦ ºÒ·¯³»°í ÀÌ°Í¿¡ ÀÇÇØ ¸ðµç ³×Æ®¿öÅ©°¡ ¼³Á¤µÊÀ» ÀǹÌÇÕ´Ï´Ù. ÀÌ¿ÜÀÇ DHCP¸¦ »ç¿ëÇÒ ¼ö ÀÖ±â Àü¿¡ ÀÌ°ÍÀ» ¿ä±¸ÇÑ´Ù¸é ¹«¼±·£À̳ª PPP ¶Ç´Â ´Ù¸¥ °Íµé°ú ºñ½ÁÇÑ ³×Æ®¿÷ ÀåÄ¡¸¦ À§ÇØ DHCP¸¦ ¼³Á¤ÇØ¾ß ÇÕ´Ï´Ù.
DHCP ´Â dhclient, dhcpcd, pump, udhcpc¿¡ ÀÇÇØ Á¦°øµË´Ï´Ù. °¢°¢ÀÇ DHCP ¸ðµâµéÀº ³ª¸§ Àå´ÜÁ¡ÀÌ ÀÖ½À´Ï´Ù. ¿©±â À绡¸® ÈÈ¾î º¼ ¼ö ÀÖ´Â °ÍµéÀÌ ÀÖ½À´Ï´Ù.
¸¸¾à Çϳª ÀÌ»óÀÇ DHCP Ŭ¶óÀ̾ðÆ®°¡ ¼³Ä¡µÇ¾ú´Ù¸é ±×µé Áß Çϳª¸¦ ÁöÁ¤Çؼ »ç¿ëÇØ¾ß ÇÕ´Ï´Ù. ±×°Ô ¾Æ´Ï¶ó¸é, °¡´ÉÇÑÇÑ ¿ì¸®´Â dhcpcd¸¦ ±âº»À¸·Î »ç¿ëÇÒ °ÍÀÔ´Ï´Ù. DHCP¸ðµâ¿¡ ÁöÁ¤ ¼±ÅûçÇ×À» º¸³»±â À§Çؼ´Â module_eth0="..."À» »ç¿ëÇÕ´Ï´Ù.
(»ç¿ëÇÏ°íÀÚ ÇÏ´Â DHCP¸ðµâ·Î ¸ðµâÀ» ¹Ù²ÙÀÚ¸é dhcpcd_eth0 ¿Í °°ÀÌ ÇÕ´Ï´Ù)
»ó´ëÀûÀ¸·Î ÀÌ»óÇϱâ ¦ÀÌ ¾ø´Â DHCP¸¦ ½ÃµµÇغ¸°í ¸¸µé¾îº¾´Ï´Ù. ¿ì¸®´Â dhcp_eth0º¯¼ö¸¦ »ç¿ëÇϴµ¥ ÀÖ¾î ´ÙÀ½ ¸í·ÉµéÀ» Áö¿øÇÕ´Ï´Ù. ±âº»ÀûÀ¸·Î´Â ´ÙÀ½Áß ±× ¾î¶² °Íµµ ÁöÁ¤µÇ¾î ÀÖÁö ¾Ê½À´Ï´Ù.
# Only needed if you have more than one DHCP module installed modules=( "dhcpcd" ) config_eth0=( "dhcp" ) dhcpcd_eth0="-t 10" # Timeout after 10 seconds dhcp_eth0="release nodns nontp nonis" # Only get an address À¯ÀÇ»çÇ× : dhcpcd, udhcpc, pump´Â ±âº»ÀûÀ¸·Î È£½ºÆ®³×ÀÓÀ» DHCP¼¹ö·Î Àü¼ÛÇϹǷΠ´õÀÌ»óÀÇ °ÍÀ» Á¤ÇÒ ÇÊ¿ä°¡ ¾ø½À´Ï´Ù.
1.4. PPPOE/PPPOA¸¦ ÀÌ¿ëÇÑ ADSL ¶¿ì¼± ¿ì¸®´Â ADSL ¼ÒÇÁÆ®¿þ¾î¸¦ ¼³Ä¡ÇÒ ÇÊ¿ä°¡ ÀÖ½À´Ï´Ù.
¿¹Á¦ 4-1 : pppÆÐÅ°Áö ¼³Ä¡
# emerge net-dialup/ppp À¯ÀÇ»çÇ× PPPoA°¡ ÇÊ¿äÇÏ´Ù¸é baselayout-1.12.x ÀÌ»ó »ç¿ëÁßÀÎÁö È®ÀÎÇغ¸¼¼¿ä.
µÎ¹ø°·Î PPP¿¡ ÀÇÇØ »ç¿ëµÉ ÀÌ´õ³Ý ÀÎÅÍÆäÀ̽º¸¦ À§ÇÑ PPP net ½ºÅ©¸³Æ®¸¦ »ý¼ºÇÕ´Ï´Ù.
¿¹Á¦ 4-2 : PPP¿Í ÀÌ´õ³Ý ½ºÅ©¸³Æ® »ý¼º
# ln -s /etc/init.d/net.lo /etc/init.d/net.ppp0 # ln -s /etc/init.d/net.lo /etc/init.d/net.eth0 ¹°·Ð /etc/conf.d/rc¿¡ RC_NET_STRICT_CHECKING="yes"¸¦ ¼³Á¤ÇÕ´Ï´Ù.
ÀÌÁ¦ /etc/conf.d/net ¼³Á¤ÀÌ ÇÊ¿äÇÕ´Ï´Ù..
¿¹Á¦ 4-3 : ±âº» PPPoE ¼³Á¤
config_eth0=( null ) (Specify your ethernet interface) config_ppp0=( "ppp" ) link_ppp0="eth0" (Specify your ethernet interface) plugins_ppp0=( "pppoe" ) username_ppp0='user' password_ppp0='password' pppd_ppp0=( "noauth" "defaultroute" "usepeerdns" "holdoff 3" "child-timeout 60" "lcp-echo-interval 15" "lcp-echo-failure 3" noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp ) depend_ppp0() { need net.eth0 } ¶ÇÇÑ /etc/ppp/pap-secrets¿¡ ¾ÏÈ£¸¦ ÁöÁ¤ÇÒ ¼ö ÀÖ½À´Ï´Ù.
¿¹Á¦ 4-4 : /etc/ppp/pap-secrets °ßº»
# The * is important "username" * "password" ¸¸¾à USB¸ðµ©À¸·Î PPPoE¸¦ »ç¿ëÇÑ´Ù¸é br2684ctl¸¦ emergeÇÒ ÇÊ¿ä°¡ ÀÖ½À´Ï´Ù. ¾î¶»°Ô ¼³Á¤ÇÏ´ÂÁö ÀÚ¼¼ÇÑ Á¤º¸¸¦ ¾Ë·Á¸é /usr/portage/net-dialup/speedtouch-usb/files/README ¸¦ º¸¼¼¿ä.
Áß¿ä : /etc/conf.d/net.example¿¡¼ ADSL°ú PPP ¼½¼ÇÀ» Àß Àо¼¼¿ä. ¿©±â¿¡´Â PPP¼³Á¤À» Çϴµ¥ ÇÊ¿äÇÒ¸¸ÇÑ ¸ðµç ¼ÂÆÿ¡ °üÇÑ º¸´Ù »ó¼¼ÇÑ ¼³¸íÀÌ ¸¹ÀÌ ÀÖ½À´Ï´Ù.
1.5. APIPA (Automatic Private IP Addressing) ¶APIPA´Â 169.254.0.0-169.254.255.255 ¹üÀ§³»¿¡¼ ÀÎÅÍÆäÀ̽ºÀÇ ¹üÀ§³»¿¡¼ ÀÓÀÇÀÇ ÁÖ¼Ò¸¦ arping ÇÏ¿© ¿©ºÐÀÇ ÁÖ¼Ò¸¦ ã´Â °ÍÀ» ½ÃµµÇÕ´Ï´Ù. ÀÀ´äÀÌ ¾ø´Â °æ¿ì ÇØ´ç ÁÖ¼Ò°¡ ÀÎÅÍÆäÀ̽º¿¡ ÇÒ´çµÈ °ÍÀÔ´Ï´Ù.
ÀÌ´Â DHCP¼¹ö°¡ ¾ø°í Á÷Á¢ÀûÀ¸·Î ÀÎÅͳݿ¡ ¿¬°áÇÒ ¼ö ¾øÀ¸¸ç ´Ù¸¥ ÄÄÇ»Å͵éÀÌ APIPA ¸¦ »ç¿ëÇÏ´Â °÷¿¡¼¸¸ À¯¿ëÇÕ´Ï´Ù.
APIPA Áö¿øÀ» À§Çؼ´Â, net-misc/iputils ȤÀº net-analyzer/arping ¸¦ emerge ÇÕ´Ï´Ù.
¿¹Á¦ 5-1 : /etc/conf.d/net¿¡¼ APIPA ȯ°æ ¼³Á¤
# Try DHCP first - if that fails then fallback to APIPA config_eth0=( "dhcp" ) fallback_eth0=( "apipa" ) # Just use APIPA config_eth0=( "apipa" ) 1.6. º»µù ¶º»µù, Æ®··Å·À» ¿¬°áÇÏ·Á¸é net-misc/ifenslave¸¦ emerge ÇØ¾ß ÇÕ´Ï´Ù..
º»µùÀº ³×Æ®¿öÅ© ´ë¿ªÆøÀ» Áõ°¡Çϱâ À§ÇØ »ç¿ëµË´Ï´Ù. µÎ ³×Æ®¿öÅ©Ä«µå°¡ °°Àº ³×Æ®¿öÅ©»ó¿¡ ¿¬°áµÇ¾ú´Ù¸é À̰͵éÀ» ÇÔ²² º»µùÇÏ¿© ¾îÇø®ÄÉÀ̼ǿ¡¼ À̸¦ ÇϳªÀÇ ÀÎÅÍÆäÀ̽º·Î º¸Áö¸¸ ½ÇÁ¦·Î µÎ°³ÀÇ ³×Æ®¿öÅ©Ä«µå¸¦ ¾²µµ·Ï ÇÒ ¼ö ÀÖ½À´Ï´Ù.
¿¹Á¦ 6-1 : /etc/conf.d/net¿¡¼ º»µù ȯ°æ¼³Á¤
# To bond interfaces together slaves_bond0="eth0 eth1 eth2" # You may not want to assign an IP to the bonded interface config_bond0=( "null" ) # Depend on eth0, eth1 and eth2 as they may require extra configuration depend_bond0() { need net.eth0 net.eth1 net.eth2 } 1.7. ºê¸´Â¡ (802.1d Áö¿ø) ¶ºê¸´Â¡À» Áö¿øÇÏ·Á¸é net-misc/bridge-utils¸¦ emerge ÇØ¾ß ÇÕ´Ï´Ù.
ºê¸´Â¡Àº µÎ ³×Æ®¿öÅ©¸¦ ÇÔ²² ¹À»¶§ »ç¿ëÇÕ´Ï´Ù. ¿¹¸¦ µé¾î ADSL¸ðµ©À» ÅëÇØ ÀÎÅͳÝÀ¸·Î ¿¬°áµÇ´Â ¼¹ö´Â, ¹«¼± ¾×¼¼½º Ä«µå¸¦ ÅëÇØ ´Ù¸¥ ÄÄÇ»ÅÍ·Î ÇÏ¿©±Ý ADSL·Î ¿¬°áµÇ°Ô ÇÒ ¼ö ÀÖ½À´Ï´Ù. µÎ ÀÎÅÍÆäÀ̽º¸¦ ÇÔ²² ¹±â À§ÇØ ºê¸´Áö¸¦ »ý¼ºÇÒ ¼ö ÀÖ½À´Ï´Ù.
¿¹Á¦ 7-1 : /etc/conf.d/net¿¡¼ÀÇ ºê¸´Â¡ ȯ°æ¼³Á¤
# Configure the bridge - "man brctl" for more details brctl_br0=( "setfd 0" "sethello 0" "stp off" ) # To add ports to bridge br0 bridge_br0="eth0 eth1" # You need to configure the ports to null values so dhcp does not get started config_eth0=( "null" ) config_eth1=( "null" ) # Finally give the bridge an address - you could use DHCP as well config_br0=( "192.168.0.1/24" ) # Depend on eth0 and eth1 as they may require extra configuration depend_br0() { need net.eth0 net.eth1 } Áß¿ä : ¾î¶² ºê¸´Áö ¼³Á¤À» »ç¿ëÇϱâ À§Çؼ´Â, º¯¼ö À̸§ ¹®¼¸¦ ÂüÁ¶ÇÒ ÇÊ¿ä°¡ ÀÖ½À´Ï´Ù.
1.8. ¸Æ ÁÖ¼Ò ¶sys-apps/baselayout-1.11.14ÀÌ»óÀÇ ÆÐÅ°Áö¸¦ Áö´Ï°í ÀÖ°í ƯÁ¤ ¸Æ ÁÖ¼Ò¸¦ º¯°æÇÏ·Á¸é ÀÎÅÍÆäÀ̽ºÀÇ ¸Æ ÁÖ¼Ò¸¦ º¯°æÇϱâ À§ÇØ ±× ¾î¶²°Íµµ emergeÇÒ ÇÊ¿ä°¡ ¾ø½À´Ï´Ù. ±×·¯³ª ÀÓÀÇÀÇ ¸Æ ÁÖ¼Ò·Î ¹Ù²Ü ÇÊ¿ä°¡ Àְųª baselayout¹öÀüÀÌ ¾ð±ÞµÈ ¹öÀüº¸´Ù ³·À»°æ¿ì net-analyzer/macchanger¸¦ emerge ÇÏ¿© ÀÌ ±â´ÉÀ» »ç¿ëÇÒ ¼ö ÀÖ°Ô ÇØ¾ß ÇÕ´Ï´Ù.
¿¹Á¦ 8-1 : ¸Æ ÁÖ¼Ò º¯°æ ¿¹Á¦
# To set the MAC address of the interface mac_eth0="00:11:22:33:44:55" # To randomize the last 3 bytes only mac_eth0="random-ending" # To randomize between the same physical type of connection (e.g. fibre, # copper, wireless) , all vendors mac_eth0="random-samekind" # To randomize between any physical type of connection (e.g. fibre, copper, # wireless) , all vendors mac_eth0="random-anykind" # Full randomization - WARNING: some MAC addresses generated by this may # NOT act as expected mac_eth0="random-full" 1.9. Åͳθµ ¶ÀÎÅÍÆäÀ̽º Çڵ鷯°¡ µ¶ÀÚ¿©·¯ºÐÀ» À§ÇØ ÀÌ°ÍÀ» ÇÒ ¼ö ÀÖÀ¸¹Ç·Î ±× ¾î¶²°Íµµ emergeÇÒ ÇÊ¿ä°¡ ¾ø½À´Ï´Ù.
¿¹Á¦ 9-1 : /etc/conf.d/net¿¡¼ Åͳθµ ȯ°æ¼³Á¤
# For GRE tunnels iptunnel_vpn0="mode gre remote 207.170.82.1 key 0xffffffff ttl 255" # For IPIP tunnels iptunnel_vpn0="mode ipip remote 207.170.82.2 ttl 255" # To configure the interface config_vpn0=( "192.168.0.2 peer 192.168.1.1" ) 1.10. VLAN(802.1q Áö¿ø) ¶VLANÀÌ Áö¿øµÇ±â À§Çؼ´Â, net-misc/vconfig¸¦ emerge Çϼ¼¿ä.
Virtual LAN (°¡»ó·£)Àº ´ÜÀÏ ³×Æ®¿öÅ© ¼¼±×¸ÕÆ®¿¡ ¿¬°áµÈ °Í°ú °°ÀÌ ÇൿÇÏ´Â ³×Æ®¿öÅ© ÀåÄ¡ÀÇ ±×·ìÀÔ´Ï´Ù. ºñ·Ï ±×°ÍµéÀÌ ±×·¸°Ô ¾ÈµÇ¾î ÀÖ´Ù ÇÒÁö¶óµµ ¸»ÀÔ´Ï´Ù. VLAN ±¸¼º¿øÀº °°Àº ¹°¸®Àý ³×Æ®¿öÅ©¸¦ °øÀ¯ÇÏ°í ÀÖ´Ù ÇÒÁö¶óµµ °°Àº VLAN¿¡¼ÀÇ ±¸¼º¿ø¸¸ º¼ ¼ö ÀÖ½À´Ï´Ù.
¿¹Á¦ 10-1 : /etc/conf.d/net¿¡¼ÀÇ VLAN ȯ°æ¼³Á¤
# Specify the VLAN numbers for the interface like so # Please ensure your VLAN IDs are NOT zero-padded vlans_eth0="1 2" # You can also configure the VLAN # see for vconfig man page for more details vconfig_eth0=( "set_name_type VLAN_PLUS_VID_NO_PAD" ) vconfig_vlan1=( "set_flag 1" "set_egress_map 2 6" ) # Configure the interface as usual config_vlan1=( "172.16.3.1 netmask 255.255.254.0" ) config_vlan2=( "172.16.2.1 netmask 255.255.254.0" ) Áß¿ä : ¾î¶² VLAN ¼³Á¤À» »ç¿ëÇϱâ À§Çؼ´Â º¯¼ö À̸§¹®¼¸¦ Âü°íÇغ¼ ÇÊ¿ä°¡ ÀÖ½À´Ï´Ù.
|
One man tells a falsehood, a hundred repeat it as true. |