DHCP ¼­¹ö ¼³Ä¡

¹èö¼ö/¸®´ª½º¿ùµå ¹ßÇàÀÎ

 

     

1. Âü°í ÀÚ·á

    ÀÌ ±ÛÀ» ¾²´Âµ¥ Âü°í ÇÑ ÀÚ·áµéÀº ¾Æ·¡¿Í °°´Ù.

    1) DHCP-mini-HOWTO
    2) http://www.isc.org/products/DHCP/
    3) dhcp-3.0b1pl14.tar.gz ÆÐÅ°Áö ³»ÀÇ README ¹× ¹®¼­

 

2. DHCP¶õ?

    DHCP(Dynamic Host Configuration Protocol) ÇÁ·ÎÅäÄÝÀº TCP/IP ³×Æ®¿öÅ©¿¡¼­ È£½ºÆ® ÄÄÇ»ÅÍ°¡ IP ÁÖ¼ÒÀÇ ÇÒ´çÀ» ¿äûÇÒ °æ¿ì À̸¦ ÇÒ´çÇØ ÁÖ¸ç µ¿½Ã¿¡ È£½ºÆ®°¡ ¼ÓÇÑ ³×Æ®¿öÅ©¿¡ ´ëÇÑ ´Ù¸¥ Á¤º¸(¿¹: DNS ¼­¹ö ÁÖ¼Ò)¸¦ ¾Ë·ÁÁÖ´Â ¿ªÇÒÀ» ÇÑ´Ù. ³×Æ®¿öÅ© °ü¸®ÀÚ´Â DHCP ¼­¹ö¿¡ ´Ù¸¥ È£½ºÆ®¿¡ ÇÒ´çÇÒ IP ÁÖ¼Ò poolÀ» ÁöÁ¤Çϸç IP¸¦ ÇÒ´ç¹ÞÀ» È£½ºÆ®¿¡´Â dhcp Ŭ¶óÀ̾ðÆ® ÇÁ·Î±×·¥ÀÌ ¼³Ä¡µÇ¾î¾ß ÇÑ´Ù. BOOTP ÇÁ·ÎÅäÄݵµ DHCP¿Í ºñ½ÁÇÑ ¿ªÇÒÀ» ÇÑ´Ù..

    ¿ì¸®°¡ ÈçÈ÷ ÁÖÀ§¿¡¼­ º¼ ¼ö ÀÖ´Â DHCP »ç¿ë ¿¹´Â ÄÉÀ̺í¸ðµ©À¸·Î ÀÎÅͳÝÀ» ¿¬°áÇÏ´Â °æ¿ìÀÌ´Ù. À©µµ¿ì¿¡¼­ ÄÉÀ̺í¸ðµ©À¸·Î ÀÎÅͳÝÀ» ¿¬°áÇÒ ¶§´Â Á¦¾îÆÇ ->³×Æ®¿öÅ© -> tcp/ip ÀÇ µî·ÏÁ¤º¸¿¡¼­ IP ÁÖ¼Ò¸¦ ¡°ÀÚµ¿À¸·Î IP ÁÖ¼ÒÁöÁ¤¡±À¸·Î ¼³Á¤ÇÑ´Ù.

    ±×·¯¸é ÄÉÀ̺í¸ðµ© ȸ»çÀÇ DHCP ¼­¹ö¿¡¼­ À©µµ¿ì¿¡ IP ÁÖ¼Ò¸¦ ÇÒ´çÇØ Áִµ¥ ¿©±â¿¡ DHCP ÇÁ·ÎÅäÄÝÀÌ »ç¿ëµÈ´Ù. ¿©±â¼­ ÄÉÀÌºí ¸ðµ© È¸»ç¿¡´Â DHCP ¼­¹ö ÇÁ·Î±×·¥ÀÌ ÀÛµ¿ÇÏ°í ÀÖ°í À©µµ¿ì¿¡´Â DHCP Ŭ¶óÀ̾ðÆ® ÇÁ·Î±×·¥ÀÌ »ç¿ëµÇ´Â °ÍÀÌ´Ù. µû¶ó¼­ ¸®´ª½º¿¡ ÄÉÀ̺í¸ðµ©À¸·Î ÀÎÅͳÝÀ¸·Î ¿¬°áÇÑ´Ù¸é DHCP ¼­¹ö ÇÁ·Î±×·¥ÀÌ ¾Æ´Ï°í DHCP Ŭ¶óÀ̾ðÆ® ÇÁ·Î±×·¥À» ¼³Ä¡ÇØ¾ß ÇÑ´Ù. ÀÌ ºÎºÐÀº ¾ÕÀÇ ±ÛÀ» Âü°í Çϱ⠹ٶõ´Ù.

 

3. DHCP ¼­¹ö¸¦ ¿Ö »ç¿ëÇϴ°¡?

    ¿©·¯ºÐ ȸ»ç¿¡ ÀÎÅͳÝÀ» ¿¬°áÇ߰ųª ¶Ç´Â ³»ºÎ ·£¿¡¼­ TCP/IP ÇÁ·ÎÅäÄÝ »ç¿ëÇÏ°í ÀÖ´Ù¸é ¸ðµç Çǽÿ¡´Â ÃÖ¼Ò 3°¡Áö Á¤º¸¸¦ ÀÔ·ÂÇØ¾ß ÇÑ´Ù.

    1) IP ÁÖ¼Ò
    2) °ÔÀÌÆ®¿þÀÌ ÁÖ¼Ò
    3) DNS ¼­¹ö ÁÖ¼ÒµîÀÌ´Ù.

    ±×·±µ¥ IP ÁÖ¼Ò´Â Çǽà ¸¶´Ù ´Þ¶ó¾ß ÇÑ´Ù. ³ª¸ÓÁö µÑÀº °ÅÀÇ º¯ÇÏÁö ¾ÊÁö¸¸ ¾î·µç ¹Ù²ï´Ù¸é ¸ðµç Çǽÿ¡¼­ ¼³Á¤À» ¹Ù²Ù¾î¾ß ÇÑ´Ù. Çǽð¡ ¸î ´ë¶ó¸é º° ¹®Á¦°¡ ¾Æ´ÏÁö¸¸ ¼ö½Ê ´ë¶ó¸é ÀÌ·± ÀÛ¾÷À» ÇÏ´Â°Ô °£´ÜÇÏÁö´Â ¾Ê´Ù. À̶§ DHCP ¼­¹ö¸¦ ¼³Ä¡ÇÑ´Ù¸é ¸ðµç Çǽÿ¡¼­ IP ÁÖ¼Ò Áߺ¹ ¹®Á¦¸¦ °ÆÁ¤ÇÒ ÇÊ¿ä°¡ ¾ø´Ù. °ÔÀÌÆ®¿þÀÌ ÁÖ¼Ò³ª DNS ¼­¹ö ÁÖ¼Ò°¡ º¯Çصµ Çǽø¶´Ù ´Ù½Ã ÁöÁ¤ÇÒ ÇÊ¿ä°¡ ¾ø°í DHCP ¼­¹ö¿¡¼­¸¸ º¯°æÇÏ¸é ³¡³­´Ù.
    ¶Ç Çϳª º»»ç¿Í »ç¹«¼Ò°¡ º°µµ·Î ÀÎÅͳÝÀ» ¿¬°áÇØ »ç¿ëÇÏ´Â °æ¿ì ³ëÆ®ºÏ »ç¿ëÀÚ°¡ ´Ù¸¥ »ç¹«¼Ò¿¡ ÃâÀåÀ» °¡¼­ ÀÎÅͳÝÀ» ¿¬°áÇÏ·Á¸é »ç¹«¼Ò¸¶´Ù ³×Æ®¿öÅ© ¼Â¾÷À» ¹Ù²Ù¾î¾ß ÇÑ´Ù. ±×·±µ¥ µÎ »ç¹«¼Ò¿¡ ¸ðµÎ DHCP ¼­¹ö¸¦ ¼³Ä¡Çß´Ù¸é ³ëÆ®ºÏ »ç¿ëÀÚ´Â ¾î´À »ç¹«¼Ò¿¡ °¡¼­µç ·£ÄÉÀÌºí¸¸ ²ÅÀ¸¸é ¹Ù·Î ÀÎÅÍ³Ý »ç¿ëÀÌ °¡´ÉÇØ Áø´Ù.

 

4. DHCP ¼­¹ö ÇÁ·Î±×·¥ ¼³Ä¡

    ¿©±â¿¡ ¼Ò°³ÇÏ´Â DHCP ¼­¹ö ÇÁ·Î±×·¥Àº ISC»ç(http://www.isc.org/products/DHCP/)ÀÇ dhcpdÀÌ´Ù. ¼³Ä¡¿¡ »ç¿ëµÈ ȯ°æÀº ´ÙÀ½°ú °°´Ù.

 

4.1  ¼³Ä¡ ȯ°æ

    1) ¼­¹ö : ÆæƼ¾ö 150, ¸Þ¸ð¸® 48¸Þ°¡
    2) ¹èÆ÷º» : ¿µ¹® ·¹µåÇÞ 6.0
    3) ·£Ä«µå(2 °³) : 3com 3c509b-txnm
    4) Ä¿³Î 2.2.14

    ³×Æ®¿öÅ© ¼³Á¤Àº ¾Æ·¡¿Í °°´Ù.(µÎ¹ø° ·£Ä«µå¸¸)

    [root@aptiva network-scripts]# cat ifcfg-eth1
    DEVICE=¡±eth1¡±
    IPADDR=¡±192.168.1.21¡±
    NETMASK=¡±255.255.255.0¡±
    NETWORK=192.168.1.0
    BROADCAST=192.168.1.255
    ONBOOT=¡±yes¡±

    eth0´Â ÀÎÅͳݿ¡ ¿¬°áµÇ¾î ÀÖ°í eth1Àº ³»ºÎ ³×Æ®¿öÅ©¿¡ ¿¬°áÇÏ¿© ÀÖ´Ù. À©µµ¿ì ÇǽõéÀº eth1ÀÌ ¼ÓÇÑ ³×Æ®¿öÅ©¿¡ ¿¬°áµÇ¾î ÀÖ°í ÀÌ ¼­¹ö·ÎºÎÅÍ DHCP·Î IP ÁÖ¼Ò(192.168.1.x)¸¦ ÇÒ´ç¹Þ´Â´Ù.
    (º¸¾È»ó °øÀÎ IPÀÇ ¼¼¹ø° ºÎºÐÀº Áö¿ü´Ù.)

    [root@aptiva /root]# ifconfig
    eth0  Link encap:Ethernet HWaddr 00:01:02:55:14:D5
            inet addr:211.104.xx.28 Bcast:211.104.xx.31 Mask:255.255.255.248
            UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
            RX packets:10663 errors:14 dropped:0 overruns:0 frame:14
            TX packets:1330 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0

    eth1  Link encap:Ethernet HWaddr 00:01:02:36:87:76
            inet addr:192.168.1.21 Bcast:192.168.1.255 Mask:255.255.255.0
            UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
            RX packets:1 errors:0 dropped:0 overruns:0 frame:0
            TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0

    lo     Link encap:Local Loopback
            inet addr:127.0.0.1 Mask:255.0.0.0
            UP LOOPBACK RUNNING MTU:3924 Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0

     

    [root@aptiva /root]# netstat -nr
    Kernel IP routing table
    Destination       Gateway       Genmask           Flags   MSS   Window  irtt    Iface
    192.168.1.21     0.0.0.0      255.255.255.255    UH        0         0         0     eth1
    211.104.xx.28    0.0.0.0      255.255.255.255    UH        0         0         0     eth0
    211.104.xx.24    0.0.0.0      255.255.255.248     U         0          0        0     eth0
    192.168.1.0       0.0.0.0      255.255.255.0         U         0          0        0     eth
    127.0.0.0          0.0.0.0      255.0.0.0                U          0         0        0      lo
    0.0.0.0         211.104.xx.25   0.0.0.0                UG         0         0        0     eth0

     

 

4.2  multicast È®ÀÎ

    DHCP ¿¡¼­ »ç¿ëÇÏ´Â ÀÎÅÍÆäÀ̽ºÀÇ ifconfig ¸í·É °á°ú¿¡ multicast ´Ü¾î¸¦ È®ÀÎÇÑ´Ù. ¾ø´Ù¸é Ä¿³ÎÀ» ÄÄÆÄÀÏÇØ multicast Áö¿øÀ» ³Ö¾î¾ß ÇÑ´Ù.

    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

 

4.3  Ä¿³Î ¿É¼Ç

    Ä¿³ÎÀ» ÄÄÆÄÀÏÇØ »ç¿ëÇÏ´Â °æ¿ì´Â ¾Æ·¡ µÎ ¿É¼ÇÀÌ ¼±ÅõǾî¾ß ÇÑ´Ù.

    Networking options --->
    <*> Packet socket
    [*] Socket Filtering

    À§ µÎ °¡Áö°¡ ¼±ÅõǾî¾ß ÇÑ´Ù.

    ¹èÆ÷º»¿¡¼­ Á¦°øÇÏ´Â µðÆúÆ® Ä¿³ÎÀ» »ç¿ëÇÒ °æ¿ì À§ ¿É¼ÇÀÌ ºüÁ®ÀÖÀ¸¸é dhcpd ½ÇÇà½Ã ¾Æ·¡ ¿¡·¯°¡ ³ª¿Â´Ù.

    socket: Protocol not available - make sure CONFIG_PACKET (Packet socket) and CONFIG_
    FILTER (Socket Filtering) are enabled in your kernel configuration!

 

4.4  ÇÁ·Î±×·¥ ´Ù¿î ¹Þ±â

    ftp://ftp.isc.org ¿¡¼­ 3.0b1pl14 ¹öÀüÀ» ´Ù¿î ¹Þ´Â´Ù.
     

    [root@aptiva /root]# ftp ftp.isc.org
    Connected to isrv4.pa.vix.com.
    220 ProFTPD 1.2.0pre10 Server (ISC FTP Server) [ftp.isc.org]
    Name (ftp.isc.org:root): ftp
    331 Anonymous login ok, send your complete e-mail address as password.
    Password:
    230 Anonymous access granted, restrictions apply.
    Remote system type is UNIX.
    Using binary mode to transfer files.

     

    µð·ºÅ丮´Â /isc/dhcp ÀÌ´Ù.

    -rw-r--r-- 1029 9996 453404 Jun 24 01:20 dhcp-3.0b1pl14.tar.gz

 

4.5  ¾ÐÃà ÇØÁ¦

    ÀÓÀÇÀÇ µð·ºÅ丮¿¡¼­ ¾ÐÃàÀ» ÇØÁ¦ÇÑ´Ù. ÇÊÀÚ´Â /apps µð·ºÅ丮¿¡¼­ ÀÛ¾÷À» Çß´Ù.

    tar zxvf dhcp-3.0b1pl14.tar.gz

    ¾Æ·¡Ã³·³ µð·ºÅ丮°¡ ¸¸µé¾î Áö°í ±× ¾È¿¡ ¼Ò½º°¡ À§Ä¡ÇÑ´Ù.

    drwxr-xr-x 9 1029 9986 1024 Jun 27 14:44 dhcp-3.0b1pl14/

    ÀÌ µð·ºÅ丮 ³»¿¡ ÀÖ´Â README ÆÄÀÏÀ» ÇÊÈ÷ Àб⠹ٶõ´Ù.

 

4.6  ÄÄÆÄÀÏ ¹× ¼³Ä¡

    1) cd dhcp-3.0b1pl14
    2) ./configure
    ¾Æ·¡ ¸Þ½ÃÁö°¡ ³ª¿Â´Ù.

    System Type: linux-2.2

    3) make
    4) make install

    ¿©±â±îÁö ÁøÇàÇßÀ¸¸é ½ÇÇà ÆÄÀÏÀÌ /usr/sbin ¿¡ dhcpd¶õ À̸§À¸·Î »ý¼ºµÈ´Ù.

 

5. ¼³Á¤ ÆÄÀÏ ÀÛ¼º

    dhcpdÀÇ ¼³Á¤ ÆÄÀÏÀº /etc/dhcpd.conf ÀÌ´Ù. ¾Æ·¡´Â ±âº»ÀûÀÎ ¼³Á¤ ³»¿ë ¿¹ÀÌ´Ù.
     

    subnet 192.168.1.0 netmask 255.255.255.0 {
    range 192.168.1.100 192.168.1.200;
    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.1;
    option domain-name-servers 192.168.1.1,168.126.63.1;
    option domain-name ¡°linuxlab.co.kr¡±;}

     

    1) subnet¿Í netmask´Â DHCP ¼­¹ö¿¡¼­ IP¸¦ ÇÒ´çÇϴ Ŭ¶óÀ̾ðÆ®µéÀÇ ³×Æ®¿öÅ© ÁÖ¼Ò¿Í
        ¼­ºê³×Æ® ¸¶½ºÅ©ÀÌ´Ù. ±× ´ÙÀ½ÀÇ { }³»ÀÇ ¸ðµç ÆĶó¸ÞÅÍ´Â ±× ¼­ºê³×Æ®¿¡¸¸ Àû¿ëµÈ´Ù.
        Áï, subnet´Â ¼±¾ðÀÌ´Ù.

        dhcpd.conf ¿¡´Â ¿©·¯ °³ÀÇ subnet¸¦ ÁöÁ¤ÇÒ ¼ö ÀÖ°í °¢ subnet¸¶´Ù ÆĶó¸ÞÅ͸¦ ´Þ¸® ÇÒ
        ¼ö ÀÖ´Ù. ¿¹¸¦ µé¾î Çǽð¡ 60´ëÀε¥ 192.168.2.0 C Ŭ¶ó½º ÁÖ¼Ò¸¦ 8°³ÀÇ ¼­ºê ³×Æ®·Î
        ³ª´« 192.168.2.0 ³×Æ®¿öÅ©¿Í 192.168.2.64 ³×Æ®¿öÅ© µÎ °³¸¦ ÇÒ´ç ¹Þ¾Æ DHCP ¼­¹ö¿¡¼­
        À©µµ¿ì Ŭ¶óÀ̾ðÆ®¿¡ ÇÒ´çÇÏ·Á¸é subnet ¼±¾ðÀº µÎ °³°¡ ÇÊ¿äÇÏ´Ù.

      Subnet 192.168.2.0 netmask 255.255.255.224
      Subnet 192.168.2.64 netmask 255.255.255.224

        À̶§ °¢ ¼­ºê³×Æ® ³»ÀÇ ÆĶó¸ÞÅÍ´Â °°Áö ¾Ê¾Æµµ »ó°ü¾ø´Ù. ¿¹¸¦ µé¾î ¼­ºê³×Æ®¸¶´Ù º°µµÀÇ
        router ¸í·ÉÀ» ÁöÁ¤Çصµ µÈ´Ù.(´ç¿¬È÷ ´Ù¸¦ °ÍÀÌ´Ù.)

    2) range : dhcp Ŭ¶óÀ̾ðÆ®¿¡ ÇÒ´çÇÒ ÁÖ¼ÒÀÌ´Ù. À§ÀÇ °æ¿ì´Â 192.168.1.100ºÎÅÍ
        192.168.1.200 ±îÁö 101°³ÀÇ IP ÁÖ¼Ò¸¦ Ŭ¶óÀ̾ðÆ®¿¡ ÇÒ´çÇÒ ¼ö ÀÖ´Ù.

        range ´Â ¿©·¯ °³¸¦ ÁöÁ¤ÇÒ ¼ö ÀÖ´Ù. ¸¸¾à DHCP¸¦ »ç¿ëÇÏÁö ¾Ê´Â Ŭ¶óÀ̾ðÆ®°¡
        192.168.1.201 ºÎÅÍ 209±îÁö¸¦ »ç¿ëÇÏ°í ÀÖ°í 210ºÎÅÍ 250±îÁöÀÇ ÁÖ¼Òµµ dhcp
        Å¬¶óÀ̾ðÆ®¿¡°Ô ÇÒ´çÇÏ·Á¸é range 192.168.1.210 192.168.1.250 ÁÙÀ» Ãß°¡ÇÏ¸é µÈ´Ù.

        Áï, ±× ·£¿¡¼­ DHCP ¼­¹ö°¡ ¼³Ä¡µÇ¾î À־ Ŭ¶óÀ̾ðÆ®¿¡ °íÁ¤ IP¸¦ ÁöÁ¤ÇÒ ¼ö ÀÖ´Ù.
        ´Ü ±× ÁÖ¼Ò´Â DHCP ¼­¹öÀÇ range¿¡ ÁöÁ¤ÇÏÁö ¾Ê¾Æ¾ß ÇÑ´Ù.

    3) default-lease-time : dhcp Ŭ¶óÀ̾ðÆ®°¡ ¿äûÀ» ÇÏÁö ¾Ê´Â °æ¿ì ±âº»À¸·Î IP¸¦ ÇÒ´çÇØ
        ÁÖ´Â ½Ã°£ÀÌ´Ù. ÀÌ ½Ã°£³»¿¡ DHCP Ŭ¶óÀ̾ðÆ®°¡ IP »ç¿ëÀ» °è¼ÓÇÒ °ÍÀ» ¿äûÇϸé
        IP address´Â °è¼Ó À¯ÁöµÈ´Ù. (ÃÊ) À©98ÀÇ °æ¿ì´Â 5ºÐ °£°ÝÀ¸·Î DHCP ¿äûÀÌ µé¾î¿Â´Ù.
        µû¶ó¼­ default-lease-timeÀº 400(ÃÊ) ÀÌ»óÀ» ÁöÁ¤ÇÏ´Â°Ô ÁÁ´Ù. ¾Æ·¡ dhcp.lease ³»¿ëÀÌ´Ù.
     

    lease 192.168.1.100 {
               starts 5 2000/06/30 03:16:19;
               ends 5 2000/06/30 03:26:19;
               hardware ethernet 00:01:02:3d:a8:32;
               uid 01:00:01:02:3d:a8:32;
               client-hostname ¡°hansol¡±;
    }
    lease 192.168.1.100 {
              starts 5 2000/06/30 03:21:19;
              ends 5 2000/06/30 03:31:19;
              hardware ethernet 00:01:02:3d:a8:32;
              uid 01:00:01:02:3d:a8:32;
              client-hostname ¡°hansol¡±;

     

    4) max-lease-time : DHCP Ŭ¶óÀ̾ðÆ®¿¡°Ô ÃÖ´ë·Î IP¸¦ ÇÒ´çÇØ ÁÖ´Â ½Ã°£ÀÌ´Ù.
        ÀÌ ½Ã°£ÀÌ °æ°úÇÏ¸é ±âÁ¸ ÇÒ´çµÈ IP ÁÖ¼Ò´Â ¼Ò¸êÇÑ´Ù.

 

6. /var/state/dhcp µð·ºÅ丮¿¡ ³»¿ëÀÌ ¾ø´Â dhcpd.lease ÆÄÀÏÀ» ¸¸µç´Ù.

    1) mkdir /var/state
    2) mkdir /var/state/dhcp
    3) cd /var/state/dhcp
    4) touch dhcpd.leases

    ÀÌ ÆÄÀÏÀÌ ¾øÀ¸¸é dhcpd ½ÇÇà½Ã ¾Æ·¡ ¿¡·¯°¡ ¶á´Ù.
     

    Can¡¯t open lease database /var/state/dhcp/dhcpd.leases: No such file or directory -- check for failed database rewrite attempt! Please read the dhcpd.leases manual page if you don¡¯t know what to do about this. exiting.

 

7. dhcpd ¼­¹ö ÇÁ·Î±×·¥ ½ÇÇà

    ¾Æ·¡ ¸í·ÉÀ» ½ÇÇàÇÑ´Ù.

    /usr/sbin/dhcpd eth1
    (dhcp ¼­¹ö°¡ IP ÁÖ¼Ò¸¦ ÇÒ´çÇÒ Å¬¶óÀ̾ðÆ®°¡ ¼ÓÇÑ ·£ÀÌ dhcp¼­¹öÀÇ µÎ¹ø° ·£Ä«µå¿¡ ¿¬°áµÈ °æ¿ìÀÌ´Ù.)

    ¾Æ·¡ ¸Þ½ÃÁö°¡ ³ª¿Â´Ù.
     

    [root@aptiva dhcp]# dhcpd eth1
    Internet Software Consortium DHCP Server V3.0b1pl14
    Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.
    All rights reserved.

    Please contribute if you find this software useful.
    For info, please visit http://www.isc.org/dhcp-contrib.html

    Listening on LPF/eth1/00:01:02:36:87:76/192.168.1.0
    Sending on LPF/eth1/00:01:02:36:87:76/192.168.1.0
    Sending on Socket/fallback/fallback-net

     

    dhcpd ½ÇÇà ¸í·ÉÀ» rc.local ½ºÅ©¸³Æ®¿¡ Æ÷ÇÔÇØ¾ß ºÎÆ®½Ã ½ÇÇàµÈ´Ù.

 

8. dhcpd ½ÇÇà È®ÀÎ

    1) ps ax ¸í·ÉÀ» ÁÖ¸é ¾Æ·¡ ¶óÀÎÀÌ ³ª¿Â´Ù.

    541 S 0:00 dhcpd eth1

    2) /var/log/messages ÆÄÀÏ¿¡ ¾Æ·¡Ã³·³ ³ª¿Â´Ù.

    Jun 30 10:47:58 aptiva dhcpd: Internet Software Consortium DHCP Server V3.0b1pl14
    Jun 30 10:47:58 aptiva dhcpd: Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.
    Jun 30 10:47:58 aptiva dhcpd: All rights reserved.
    Jun 30 10:47:58 aptiva dhcpd: Please contribute if you find this software useful.
    Jun 30 10:47:58 aptiva dhcpd: For info, please visit http://www.isc.org/dhcp-contrib.html
    Jun 30 10:47:58 aptiva dhcpd: Listening on LPF/eth1/00:01:02:36:87:76/192.168.1.0
    Jun 30 10:47:58 aptiva dhcpd: Sending on LPF/eth1/00:01:02:36:87:76/192.168.1.0
    Jun 30 10:47:58 aptiva dhcpd: Sending on Socket/fallback/fallback-net

    3) /var/state/dhcp µð·ºÅ丮ÀÇ dhcpd.lease ÆÄÀÏ¿¡ DHCP ¼­¹ö¿¡¼­ ÇÒ´çÇÏ´Â ³»¿ªÀÌ ³ª¿Â´Ù.

    (1) DHCP Ŭ¶óÀ̾ðÆ®¿¡¼­ ¿¬°áÀÌ ¾øÀ¸¸é ¾Æ·¡ ³»¿ë¸¸ µé¾î ÀÖ´Ù.

    # All times in this file are in UTC (GMT), not your local timezone. This is
     

    # not a bug, so please don¡¯t ask about it. There is no portable way to
    # store leases in the local timezone, so please don¡¯t request this as a
    # feature. If this is inconvenient or confusing to you, we sincerely
    # apologize. Seriously, though - don¡¯t ask.
    # The format of this file is documented in the dhcpd.leases(5) manual page.

     

    (2) À©µµ¿ì 98¿¡¼­ DHCP¼­¹ö·ÎºÎÅÍ IP¸¦ ÇÒ´ç ¹Þ¾ÒÀ» ¶§´Â ÇÒ´çÇÑ IP ³»¿ªÀÌ ³ª¿Â´Ù.

 

9. DHCP »ç¿ëÀ» À§ÇÑ À©µµ¿ì ¼³Á¤

    À©µµ¿ìÀÇ Á¦¾îÆÇ/³×Æ®¿öÅ©/tcpip/µî·ÏÁ¤º¸ÀÇ ¼³Á¤ÀÌ´Ù.

 

10. ¿¬°á Å×½ºÆ®

    ÀÌ»ó°ú °°ÀÌ À©µµ¿ìÀÇ tcp/ip µî·ÏÁ¤º¸¸¦ ¼³Á¤ ÈÄ ¸ÕÀú ¸®´ª½º¿¡¼­ dhcpd¸¦ ½ÇÇàÇÏ°í À©µµ¿ì Çǽø¦ ¸®ºÎÆÃÇϸé À©µµ Çǽÿ¡ IP ÁÖ¼Ò°¡ ÇÒ´çµÈ´Ù. ¾Æ·¡°¡ ÇÒ´çÇÑ ³»¿ëÀÌ´Ù.

    1

    À̶§ dhcpd ¼­¹öÀÇ /var/state/dhcp/dhcpd.lease ÆÄÀÏ ³»¿ëÀº ¾Æ·¡¿Í °°´Ù.
     

    lease 192.168.1.100 {
    starts 5 2000/06/30 02:06:18;
    ends 5 2000/06/30 02:16:18;
    hardware ethernet 00:01:02:3d:a8:32;
    uid 01:00:01:02:3d:a8:32;
             client-hostname ¡°hansol¡±;
    }
    lease 192.168.1.100 {
             starts 5 2000/06/30 02:11:18;
             ends 5 2000/06/30 02:21:18;
             hardware ethernet 00:01:02:3d:a8:32;
             uid 01:00:01:02:3d:a8:32;
             client-hostname ¡°hansol¡±;
    }
    lease 192.168.1.100 {
             starts 5 2000/06/30 02:16:18;
             ends 5 2000/06/30 02:26:18;
             hardware ethernet 00:01:02:3d:a8:32;
             uid 01:00:01:02:3d:a8:32;
             client-hostname ¡°hansol¡±;
    }

       

    /var/log/messages ¿¡ ¾Æ·¡Ã³·³ ÇÒ´ç ³»¿ëÀÌ ³ªÅ¸³­´Ù.
     

    Jun 30 11:06:17 aptiva dhcpd: DHCPDISCOVER from 00:01:02:3d:a8:32 via eth1
    Jun 30 11:06:18 aptiva dhcpd: DHCPOFFER on 192.168.1.100 to 00:01:02:3d:a8:32 via eth1
    Jun 30 11:06:18 aptiva dhcpd: DHCPREQUEST for 192.168.1.100 from 00:01:02:3d:a8:32 via eth1
    Jun 30 11:06:18 aptiva dhcpd: DHCPACK on 192.168.1.100 to 00:01:02:3d:a8:32 via eth1

 

11. ÀϺΠ2.0 Ä¿³ÎÀ» »ç¿ëÇÏ´Â ¹èÆ÷º»¿¡¼­ dhcp ¼­¹ö¸¦ °¡µ¿ÇÏ·Á¸é ¾Æ·¡ÀÇ
      ¶ó¿ìÆà ¸í·ÉÀ» ºÎÆ®½Ã¿¡ ½ÇÇàµÇ°Ô ÇØ¾ß ÇÑ´Ù.

    route add -net 255.255.255.0 dev eth0

¸¶Ä¡¸é¼­

    DHCP ¼­¹ö´Â ȸ»ç³»ÀÇ ³×Æ®¿öÅ©°¡ ¿©·¯ °³ÀÇ ¼­ºê³×Æ®·Î ÀÌ·ç¾îÁ® ÀÖ°í °¢ ³×Æ®¿öÅ© °£¿¡ PCÀÇ À̵¿ÀÌ ºó¹øÇÑ °æ¿ì ¶Ç´Â ³ëÆ®ºÏ Çǽà »ç¿ëÀÚ°¡ ¸¹Àº ȯ°æ¿¡¼­ °ñÄ¡ ¾ÆÇ IP ¾îµå·¹½º °ü¸® ¹®Á¦¸¦ ´Ü¼û¿¡ ÇØ°áÇØÁØ´Ù. ¶Ç ¿ø°ÝÁö »ç¹«¼Ò¿¡ ³×Æ®¿öÅ© °ü¸®ÀÚ°¡ ¾ø´Â °æ¿ì ¿ø°ÝÁö¿¡¼­ DHCP ¼­¹ö¸¸ °ü¸®ÇÏ¸é ³×Æ®¿öÅ© °ü¸®¸¦ ½±°Ô ÇÒ ¼ö ÀÖ´Â ÀåÁ¡ÀÌ ÀÖ´Ù.




¡ã top

homeÀ¸·Î...