ÈçÈ÷ ¸»ÇÏ´Â À¯´Ð½º ½ºÅ¸ÀÏÀÇ OS¿¡¼ »ç¿ëÇÒ ¼ö ÀÖ´Â DHCP ¼¹öÀÇ Á¾·ù´Â ´Ù¾çÇÏ´Ù. À̰͵éÀº »ó¿ë ¶Ç´Â ¹«·áÀÇ ÇüÅ·Π¹èÆ÷µÈ´Ù. ¹«·á ¼ÒÇÁÆ®¿þ¾îÁß ¸Å¿ì Àαâ ÀÖ´Â °ÍÁß Çϳª°¡ Paul Vixie/ISC DHCDdÀÌ´Ù. °¡Àå ÃÖ±ÙÀÇ ¹öÀüÀº 1.0ÀÌ°í, ÇöÀç 2.0ÀÌ º£Å¸ Å×½ºÆ® ÁßÀÌ´Ù. ÇÏÁö¸¸ ¿ì¸®´Â 1.0À¸·Î ¹®¼¸¦ ÀÛ¼ºÇÏ¿´°í ¾ÆÁ÷Àº 1.0À» »ç¿ëÇϱ⸦ ±Ç°íÇÑ´Ù. ´ÙÀ½ »çÀÌÆ®¿¡¼ ¹ÞÀ» ¼ö ÀÖÀ» °ÍÀÌ´Ù.
´Ù¿î·Îµå ÈÄ ¾ÐÃàÀ» Ç®°í »ý±ä µð·ºÅ丮·Î µé¾î°¡ ´ÙÀ½ÀÇ °úÁ¤À» ¹â´Â´Ù.
./configure¾Æ¸¶ ¼³Á¤À» ÇϱâÀ§ÇØ ¾î´ÀÁ¤µµÀÇ ½Ã°£ÀÌ °É¸± °ÍÀÌ´Ù. ´Ù µÇ¸é
make;make installÀ» ÅëÇÏ¿© ½î½º¸¦ ÄÄÆÄÀÏÇÏ°í ¼³Ä¡ÇÑ´Ù.
¼³Ä¡°¡ ³¡³ª°í³ª¸é ifconfig -a ¸í·ÉÀ» ÅëÇØ ´ÙÀ½°ú °°Àº ³»¿ëÀ» º¼ ¼ö ÀÖÀ» °ÍÀÌ´Ù.
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
¸¸ÀÏ 3¹ø° ¶óÀο¡ ÀÖ´Â MULTICAST ¶ó´Â ´Ü¾î°¡ º¸ÀÌÁö ¾Ê´Â´Ù¸é ¸ÖƼij½ºÆ®¸¦ Áö¿øÇϵµ·Ï Ä¿³Î ÄÄÆÄÀÏÀ» ´Ù½ÃÇØ¾ß ÇÒ °ÍÀÌ´Ù. ÇÏÁö¸¸ ´ëºÎºÐÀÇ ½Ã½ºÅÛ¿¡¼´Â ¸ÖƼij½ºÆ®°¡ Áö¿øµÇ°í ÀÖÀ» °ÍÀÌ´Ù. ´ÙÀ½ °úÁ¤Àº 255.255.255.255¸¦ À§ÇÑ ¶ó¿ìÆÃÀ» Ãß°¡ÇØ ÁÖ¾î¾ß ÇÑ´Ù. DHCPdÀÇ README ÆÄÀÏ¿¡¼ ÀοëÇØ º¸¸é
¾î¶² ¼±ÅÃµÈ Å¬¶óÀ̾ðÆ® - ¿¹¸¦ µé¾î windows 95 ½Ã½ºÅÛ - ¿Í Àß ºÎÇÕµÇ¾î µ¹¾Æ°¡´Â dhcpd¸¦ À§Çؼ, µ¥¸ó¿¡¼ ´ë»ó IP ÁÖ¼ÒÀÎ 255.255.255.255¿Í ÆÐŶµéÀ» ÇÔ²² º¸³¾ ¼ö ÀÖ¾î¾ß ÇÑ´Ù. ºÒÇàÈ÷µµ ¸®´ª½º´Â 255.255.255.255¸¦ ³»ºÎ ¼ºê³Ý ºê·Îµåij½ºÆ® ¾îµå·¹½º·Î ¼³Á¤ÇØ ¹ö¸®°í ¸¸´Ù. ÀÌ·± °á°ú´Â DHCP ÇÁ·ÎÅäÄÝ°ú ºÎÇÕµÇÁö ¾Ê´Â´Ù. ¹°·Ð ¸¹Àº DHCP Ŭ¶óÀ̾ðÆ®¿¡¼´Â ÀÌ·± ¹®Á¦Á¡ÀÌ µå·¯³ªÁö ¾Ê´Â´Ù. ÇÏÁö¸¸ ¸î¸î Ŭ¶óÀ̾ðÆ®(¸ðµç ¸¶ÀÌÅ©·Î¼ÒÇÁÆ®»çÀÇ Å¬¶óÀ̾ðÆ®)¿¡¼´Â ¹®Á¦°¡ ÀÖ´Ù. ¾Æ¸¶ DHCPOFFER ¸Þ¼¼Áö¸¦ ¼¹ö·ÎºÎÅÍ ¹ÞÀ» ¼ö ¾ø´Ù´Â °æ°í°¡ ³ª¿Ã °ÍÀÌ´Ù.
´ÙÀ½ÀÇ ¸í·ÉÇàÀ¸·Î Ãß°¡ÇÑ´Ù.
route add -host 255.255.255.255 dev eth0
¸¸ÀÏ
255.255.255.255: Unknown host
¶ó´Â ÀÀ´äÀ» ¹Þ´Â´Ù¸é /etc/hostsÆÄÀÏ¿¡ ´ÙÀ½ÀÇ ¿£Æ®¸®¸¦ Ãß°¡ÇÑ ÈÄ
255.255.255.255 all-ones
´Ù½Ã Çѹø ¶ó¿ìÆÃÀ» ÇÑ´Ù.
route add -host all-ones dev eth0
ȤÀº ÀÌ·± ¹æ½Äµµ °¡´ÉÇÏ´Ù.
route add -net 255.255.255.0 dev eth0
´ç¿¬ÇÑ À̾߱âÁö¸¸ eth0Àº ¹°¸®ÀûÀÎ ³×Æ®¿öÅ© µð¹ÙÀ̽ºÀÇ À̸§ÀÌ´Ù. ´Ù¸¥ À̸§À» ¾´´Ù¸é ÀûÀýÈ÷ ¹Ù²ãÁÖ±æ ¹Ù¶õ´Ù.
ÀÌÁ¦ DHCPd¸¦ ¼³Á¤ÇØ¾ß ÇÑ´Ù. ¼³Á¤ ÆÄÀÏÀº /etc/dhcpd.confÀÌ´Ù. ¾ø´Ù¸é ¸¸µéµµ·Ï ÇÑ´Ù. ÀϹÝÀûÀÎ ¹æ¹ýÀ¸·Î´Â IP address¸¦ ÀÓÀÇ·Î ¼³Á¤ÇÏ°Ô ÇÏ´Â °ÍÀÌ´Ù. ÀÌ°ÍÀº ´ÙÀ½°ú °°Àº ¼³Á¤À¸·Î °¡´ÉÇÏ´Ù.
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; }
À§ÀÇ ¼³Á¤À¸·Î´Â Ŭ¶óÀ̾ðÆ®¿¡°Ô 192.168.1.10¿¡¼ 192.168.1.100±îÁö ±×¸®°í 192.168.1.150ºÎÅÍ 192.168.1.200±îÁöÀÇ IP ¾îµå·¹½º¸¦ ÇÒ´çÇÒ °ÍÀÌ´Ù. Ŭ¶óÀ̾ðÆ®°¡ ÀûÀýÇÑ ½Ã°£³»¿¡ ÀÀ´äÀ» ÇÏÁö ¾Ê´Â´Ù ÇÏ´õ¶óµµ, ¿ì¼±ÀûÀ¸·Î´Â 600ÃÊ µ¿¾È IP ¾îµå·¹½º¸¦ ÇÒ´çÇÑ´Ù. ±×·¸Áö ¾Ê´Â´Ù¸é ÃÖ´ëÇÑ 7200Ãʸ¦ ÇÒ´çÇÑ´Ù. ¶ÇÇÑ ¼¹ö´Â °¢ Ŭ¶óÀ̾ðÆ®·Î ÇÏ¿©±Ý ¼ºê³Ý ¸¶½ºÅ©¸¦ 255.255.255.0À¸·Î ¾²µµ·Ï ¾Ë·ÁÁØ´Ù. 192.168.1.255´Â ºê·Îµå ij½ºÆ® ¾îµå·¹½ºÀÌ°í, 192.168.1.254´Â ¶ó¿ìÅͳª °ÔÀÌÆ®¿þÀ̸¦ °¡¸®Å²´Ù. ¹°·Ð µµ¸ÞÀÎ ³×ÀÓ ¼¹ö ¿ª½Ã ¼¼ÆõǾîÀÖ´Ù. ¸¸ÀÏ Æ¯Á¤ ÀÌ´õ³Ý Ä«µå¸¦ °¡Áø Ŭ¶óÀ̾ðÆ®¿¡°Ô ƯÁ¤ÇÑ IPÁÖ¼Ò¸¦ ÁÖ°í ½Í´Ù¸é ´ÙÀ½°ú °°Àº ¹æ¹ýÀ¸·Î ÇÒ ¼ö ÀÖÀ» °ÍÀÌ´Ù.
host haagen { hardware ethernet 08:00:2b:4c:59:23; fixed-address 192.168.1.222; }
ÀÌ °ÍÀº ÀÌ´õ³Ý ¾îµå·¹½º·Î 08:00:2b:4c:59:23¸¦ °¡Áø ³×Æ®¿öÅ© Ä«µå¸¦ ¼³Ä¡ÇÑ ÄÄÇ»ÅÍ¿¡ 192.168.1.222ÀÇ IP ¾îµå·¹½º¸¦ ÇÒ´çÇØ ÁØ´Ù.
¶ÇÇÑ ¿©·¯°¡Áö ¿É¼ÇµéÀ» ¼¯¾î ÀÌ¿ëÇÒ ¼öµµ ÀÖ´Ù. Áï ¾î¶² Ŭ¶óÀ̾ðÆ®´Â °íÁ¤ÀûÀÎ IP ¾îµå·¹½º¸¦ °¡Áö°í ÀÖ°í(¼¹öµé) ´Ù¸¥ °ÍµéÀº ´ÙÀ̳ª¹ÍÇÑ IP ·Î ÇÒ´çÇϱ⸦ ¹Ù¶õ´Ù¸é ´Ù¸¥ ¿É¼ÇµéÀ» ÀÌ¿ëÇÏ¿© ¼¼Æà °¡´ÉÇÏ´Ù(ex wins server addresses, time server µîµî) ´õ ÀÚ¼¼ÇÑ °ÍÀÌ ¾Ë°í ½Í´Ù¸é dhcp.confÀÇ ¸Å´º¾óÀ» Âü°íÇϱ⠹ٶõ´Ù.
´Ü¼øÇÏ°Ô´Â
/usr/sbin/dhcpd¶ó°í ¸í·ÉÀ» ÁÖ´Â °Í¸¸À¸·Î °£´ÜÈ÷ ½ÇÇà ÇÒ ¼öÀÖ´Ù.(ȤÀº ºÎÆ® ½ºÅ©¸³Æ®¿¡ ³Ö´Â ¹æ¹ý ¿ª½Ã À¯¿ëÇÏ´Ù) ¸¸ÀÏ ÃÖÃÊ·Î ½ÇÇàÇØ º¼¶§ ¿©·¯°¡Áö ¼³Á¤ »çÇ׵鿡 ´ëÇØ È®ÀÎÇØ º¸°í ½Í´Ù¸é ´ÙÀ½°ú °°Àº ¸í·ÉÀ¸·Î µð¹ö±ë ¸ðµå¿¡ Æ÷±×¶ó¿îµå ¸ðµå·Î »ç¿ëÇÒ ¼ö ÀÖÀ» °ÍÀÌ´Ù.
/usr/sbin/dhcpd -d -fÀÚ ÀÌÁ¦ DHCP¸¦ Áö¿øÇϴ Ŭ¶óÀ̾ðÆ®¸¦ ºÎÆýÃÅ°°í ¼¹öÀÇ Äֿܼ¡ ¶ß´Â ¸Þ¼¼Áö¸¦ Á¡°ËÇÏÀÚ. ¿À·ù¸¦ ¹ß°ßÇÒ Áöµµ, ÀÚ½ÅÀÇ ½Ç·Â¿¡ °¨ÅºÇÒ Áöµµ ¸ð¸¥´Ù.