Ŭ·¯½ºÅ͸¦ ±¸ÃàÇϱâ À§ÇØ network¸¦ ±¸¼ºÇÏ´Â °ÍÀº ÀϹÝÀûÀÎ subnetwork¸¦ ±¸¼ºÇÏ´Â °Í°ú Å©°Ô ´Ù¸£Áö ¾Ê´Ù. ¾ÕÀýÀÇ ±¸¼ºµµ¿¡¼ ÀÌ¹Ì È®ÀÎÇßµíÀÌ °¢ ³ëµå¿¡´Â ÆíÀÇ»ó node #number ¶ó´Â À̸§À» ÇÒ´çÇßÀ¸¸ç node1 ÀÌ ¸ÞÀγëµå·Î ¿ÜºÎ network°ú ¿¬°áµÈ À¯ÀÏÇÑ ³ëµåÀÌ´Ù. ¶ÇÇÑ node1 Àº hub¿Í ¿¬°áµÇ¾î Àֱ⵵ ÇÏ´Ù. ³ª¸ÓÁö node2, node3, node4´Â ÀÌ hub¿¡ ¿¬°áµÇ¾î ÀÖÀ¸¸ç »ç¼³ IP¸¦ ÇÒ´çÇß´Ù.
¿ì¼± °¢ ³ëµåÀÇ ³×Æ®¿÷À» ÅëÇÑ ¿¬°áÀÌ °¡´ÉÇÏ°Ô ÇØ¾ß Ç߱⠶§¹®¿¡ ³ª´Â ´ÙÀ½°ú °°ÀÌ »ç¼³ IP¸¦ ÇÒ´çÇß´Ù. /etc/hosts ÆÄÀÏÀ» ÅëÇØ¼ »ç¼³IP¼³Á¤À» ÇØÁÖ¸é µÈ´Ù. ÀÌ ÆÄÀÏÀÇ ³»¿ëÀº °¢ node¸¶´Ù µ¿ÀÏÇØ¾ß ÇÑ´Ù.
# /etc/hosts 127.0.0.1 localhost 192.168.0.1 node1 192.168.0.2 node2 192.168.0.3 node3 192.168.0.4 node4
¶ÇÇÑ node1 Àº 166.104.53.194 ¶ó´Â ¿ÜºÎ¿¡¼ Á¢¼Ó °¡´ÉÇÑ IP ÁÖ¼Òµµ ÇÔ²² ÇÒ´çµÇ¾î ÀÖ´Ù. node1ÀÇ /etc/network/interfaces ÆÄÀÏÀ» ´ÙÀ½°ú °°°Ô ÀÛ¼ºÇØ ÁÖ¸é µÈ´Ù.
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) # The loopback interface auto lo iface lo inet loopback # The first network card - this entry was created during the Debian installation # (network, broadcast and gateway are optional) auto eth0 eth1 iface eth0 inet static address 166.104.53.194 netmask 255.255.255.0 network 166.104.53.0 broadcast 166.104.53.255 gateway 166.104.53.1 iface eth1 inet static address 192.168.0.1 netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.0.255 gateway 166.104.53.194
node2ÀÇ /etc/network/interfaces ÆÄÀÏÀÇ ³»¿ëÀº ´ÙÀ½°ú °°´Ù.
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) # The loopback interface auto lo iface lo inet loopback # The first network card - this entry was created during the Debian installation # (network, broadcast and gateway are optional) auto eth0 iface eth0 inet static address 192.168.0.2 netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.0.255 gateway 192.168.0.1
node3°ú node4ÀÇ network¼³Á¤µµ Å©°Ô ´Ù¸£Áö ¾Ê´Ù. addressºÎºÐ¸¸ ÇÒ´çµÈ »ç¼³IP·Î º¯°æÇØ ÁÖ¸é µÈ´Ù. ÀÌÈÄ network interface¸¦ Àç½ÃÀÛ ½ÃŰ°Å³ª ½Ã½ºÅÛÀ» ÀçºÎÆÃ ½ÃÄѼ °¢ ³ëµåµé°£¿¡ pingÀÌ µµ´ÞÇÏ¸é µÈ´Ù.
node1¿¡¼ ´Ù¸¥ ³ëµåµéÀ» ÀνÄÇÏÁö ¸øÇÑ´Ù¸é, /etc/nsswitch.conf ÆÄÀÏÀÇ ³»¿ëÁß
hosts: files dns
À̶ó´Â ³»¿ëÀÌ µé¾î ÀÖ´ÂÁö È®ÀÎÇØº¸±â ¹Ù¶õ´Ù. files °¡ ¾øÀ¸¸é /etc/hostsÆÄÀÏÀ» ÂüÁ¶ÇÏÁö ¾Ê°í ¹Ù·Î dns·Î Äõ¸®¸¦ º¸³»±â ¶§¹®¿¡ »ç¼³IP¸¦ Àû¿ëÇÑ node2ºÎÅÍ node4 ±îÁö´Â ÀνÄÀÌ µÇÁö ¾Ê´Â´Ù.