|
6. DNS Domain Name System. DNS´Â Domain Name System, Domain Name ServiceÀÇ ¸Ó¸´±ÛÀÚ¸¦ µý °ÍÀÌ´Ù. (System? Service? ¾î·µç À̸§¾ø´Â ip¿¡ Áö¸§À» Áö¾îÁÖ´Â °Í) °¢ host(computer in the net)µéÀº ÀڽŸ¸ÀÇ °íÀ¯ ip¸¦ °¡Áö°í ÀÖ´Ù. networkÀÌ µÈ´Ù¸é ÀÌ°Ç ÀÀ´ç ÀÖ´Â °ÍÀÌ´Ù. ÇÏÁö¸¸ ¿ì¸®°¡ ¾î¶² host¿¡ Á¢¼ÓÇÏ°íÀÚ ÇÒ ¶§ ÀÏÀÏÀÌ ip¸¦ ã¾Æ¼ °¡¾ß ÇÑ´Ù¸é ÀüȹøÈ£ºÎ¿¡ »óÀÀÇϴ åÀ» Ç×»ó °¡Áö°í ´Ù³à¾ß ÇÒ °ÍÀÌ´Ù. ÀÌ·± ¼ö°í¸¦ ´ú¾îÁÙ ¼ö ÀÖ´Â °Ô ¹Ù·Î DNSÀÌ´Ù. Primary Name Server ÇÑ µµ¸ÞÀο¡ ¼ÓÇØ ÀÖ´Â hostsÀÇ À̸§µéÀ» °¡Áö°í ÀÖ´Â server, Domain Name Service°¡ ¼öÇàµÈ´Ù. Secondary Name Server Primary Name Server¿¡ ÀÌ»óÀÌ »ý°Ü ¿ÜºÎ·ÎºÎÅÍÀÇ ÁúÀÇ¿¡ ÀÀ´äÇÒ ¼ö ¾ø´Â »óȲ¿¡ Primary Name Server¸¦ ´ë½ÅÇÏ¿© ip¸¦ nameÀ¸·Î Çؼ®ÇÏ´Â ÀÛ¾÷À» ÇÑ´Ù. Primary Name Server°¡ Á×À» ÀÏ ¾ø´Ù°í Àå´ãÇÒ ¼ö ÀÖ´Ù¸é ÀÌ°Ç ºÒÇÊ¿äÇÏ´Ù. ¿ªÀ¸·Î ¾î¶² »óȲÀ̵ç À¯¿¬ÇÏ°Ô service ÇÏ·Á¸é ÇʼöÀûÀ̶ó ÇÏ°Ú´Ù. ´ÙÀ½ ÆäÀÌÁö¿¡¼± ±¸Ã¼ÀûÀÎ ¼³Ä¡¹ýÀ» ´Ù·é´Ù. directory /var/named À» ¸¸µéÀÚ. ±× ¼Ó¿¡¼ ¸ðµç ÀÏÀº ÀϾ°í ³¡ÀÌ ³¯ °ÍÀÌ´Ù. (¸ðµç À̶õ ¸»¿¡ ¾à°£ÀÇ ¹«¸®¸¦ ÀÖÁö¸¸ ¾î·µç ~) º¹ÀâÇÏ°í ÀÌ·ÐÀûÀÎ ¹®Á¦´Â ´Ù¸¥ site³ª ¹®¼¿¡¼ ³Ê¹«µµ ¸¹ÀÌ ´Ù·ç¾ú±â ¶§¹®¿¡ ½Ç¹«ÀûÀ¸·Î modifyÇØ¾ß ÇÒ °Íµé¸¸ ¤¾î °¡°Ú´Ù. ÀÌ°Ç ³ªÀÇ styleÀÌ´Ù. ¸¾¿¡ µé¾úÀ¸¸é ÇÑ´Ù. ÀÌ¿¡ ¾Õ¼ ±¸ÇØ¾ß ÇÒ (ȤÀº ¸¸µé¾î¾ß ÇÒ, ¶Ç´Â ¼öÁ¤ÇØ¾ß ÇÒ) files´Â ´ÙÀ½°ú °°´Ù. ÀÌ filesÀÇ À§Ä¡´Â ¾Õ¼ ¸»ÇßµíÀÌ /var/named °¡ µÇ°Ú´Ù. named.boot, named.hosts, named.local, named.rev, named.ca named.boot bootÀ̶ó´Â °·ÄÇÑ ÀǹÌÀÇ ¹®ÀÚ¸¦ È®ÀÎÇß´Ù¸é, Àý¹ÝÀº ¼º°øÇÑ °ÍÀÌ´Ù. in.named ¶ó´Â named deamonÀÌ ½Ãµ¿µÉ ¶§ Á¦ÀÏ ¸ÕÀú ÀÐ¾î µéÀÌ´Â ÆÄÀÏÀÌ´Ù. ¿©±â¼± ÁÖ¼®À» »©¹ö·È´Âµ¥, Âü°í·Î ÁÖ¼®Àº ';'À¸·Î ½ÃÁ÷µÈ´Ù. directory /var/named cache . named.ca primary qur.com named.hosts primary 241.203.in-addr.arpa named.rev primary 0.0.127.in-addr.arpa named.local named.hosts ¿©±â¼± ÀÌ domain¿¡ ¼ÓÇÑ hostµéÀÇ Á¤º¸¸¦ ´ã°í ÀÖ´Ù. @ IN SOA blue.qur.com. jhin.blue.qur.com. ( 9707075 ; Serial [yymmdd] 3600 ; Refresh 300 ; Retry 3600000 ; Expire 86400 ) ; Minimum IN NS blue.qur.com. IN NS red.qur.com. IN NS ns.internic.net. IN MX 0 blue.qur.com. blue IN A 203.241.183.23 red IN A 203.241.181.12 staffs IN A 203.241.184.61 white IN A 203.241.184.65 rh1 IN A 203.241.183.200 rh2 IN A 203.241.183.201 ns.internic.net. IN A 198.41.0.4 localhost IN A 127.0.0.1 www IN CNAME red named.local ¾Æ·¡¿¡ ¼³¸íÇÒ named.rev¿Í °°Àº °ÍÀε¥, Named Server¿¡ ´ëÇÑ Á¤º¸(local info)ÀÌ´Ù. @ IN SOA blue.qur.com. jhin.blue.qur.com. ( 9707071 ; serial 36000 ; refresh every 100 hours 3600 ; refresh after 1 hour 3600000 ; expire after 1000 hours 36000 ; default ttl is 100 hours ) IN NS blue.qur.com. 1 IN PTR localhost. named.rev ip ÁÖ¼Ò¸¦ hostµé¿¡°Ô ÇÒ´çµÈ nameÀ¸·Î mappingÇϱâ À§ÇÑ Á¤º¸¸¦ °¡Áö°í ÀÖ´Â ÆÄÀÏÀÌ´Ù. ¸¸¾à ¾î¶² server¿¡ telnetÀ¸·Î Á¢¼ÓÇØ 'who'¶ó´Â ¸í·É¾î·Î ÀÚ½ÅÀÌ µé¾î¿Â °÷À» È®ÀÎÇÒ ¶§, ip°¡ ¾Æ´Ï¶ó host nameÀÌ »Ñ·ÁÁö¸é ÀÌ ÆÄÀÏÀÌ È°µ¿À» ÇÏ°í ÀÖ´Ù´Â °ÍÀÌ´Ù. name.rev¿¡¼ rev´Â reverseÀÇ ¾àÀÚÀÌ´Ù. ±×·³ ÀÌÇØ°¡ µÇ°Ú´Â°¡? named.hosts¿¡¼ ¼öÇàÇÏ´Â ÀÏÀÇ ¹Ý´ëµÇ´Â ÀÏÀÌ´Ù. ¾î¶² anonymous ftp¶óµçÁö, web¿¡¼ ƯÁ¤ fileÀ» Àü¼Û ¹ÞÀ» ¶§, (¿¹¸¦ µé¸é www.javasoft.com¿¡¼ ¹èÆ÷ÇÏ´Â java web server...) host nameÀÌ È®ÀεÇÁö ¾ÊÀ¸¸é °ÅºÎ´çÇÒ °æ¿ì°¡ ÀÖ´Ù. (²À ±×·± °Ç ¾Æ´ÏÁö¸¸...) ÀÌ·² ¶§ ¿ä±äÇÏ°Ô ¾²ÀÏ °ÍÀÌ´Ù. $ORIGIN 241.203.in-addr.arpa. @ IN SOA blue.qur.com. jhin.blue.qur.com. ( 9707072 ; serial 43200 ; refresh 3600 ; retry 36000000 ; expire 2592000 ; manimum ) IN NS blue.qur.com. IN NS red.qur.com. IN NS ns.internic.net. ; 23.183 IN PTR blue.qur.com. 12.181 IN PTR red.qur.com. 65.184 IN PTR white.qur.com. 61.184 IN PTR staffs.qur.com. named.ca root domain¿¡ ´ëÇÑ Á¤º¸¸¦ ¼ö·ÏÇÏ°í ÀÖ´Ù. ÀÌ cache ÆÄÀÏÀÌ ÇÊ¿äÇÏ´Ù¸é ftp://nic.ddn.mil¿¡¼ °¡Á® ¿À¸é µÈ´Ù. Name Server´Â ÀÚ½ÅÀÌ °üÇÒÇÏ´Â domain¿¡ °üÇÑ Á¤º¸ »Ó¸¸¾Æ´Ï¶ó, ¿ÜºÎÀÇ °Íµéµµ ¾Ë°í ÀÖ¾î¾ß ÇÑ´Ù. ±×·¯±â À§ÇØ ÀÌ ÆÄÀÏÀº ÇʼöÀûÀ̶ó ÇÏ°Ú´Ù. Name Server·Î ¿äûÇÑ Á¤º¸°¡ ÀÚ½ÅÀÌ °üÇÒÇÏ´Â domainÀÇ °ÍÀÌ ¾Æ´Ï¶ó¸é ¾Æ·¡¿¡ ¿°ÅµÈ °÷µéÀ» ¼øȯÇÏ¸é¼ Ã£¾Æ ³»°Ô µÈ´Ù. . 3600000 IN NS NS.INTERNIC.NET. NS.INTERNIC.NET. 3600000 A 198.41.0.4 . 3600000 NS B.ROOT-SERVERS.NET. B.ROOT-SERVERS.NET. 3600000 A 128.9.0.107 . 3600000 NS C.ROOT-SERVERS.NET. C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12 . 3600000 NS D.ROOT-SERVERS.NET. D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90 ...... Standard resource Records Format ¡¡ name ttl address class entry type server name : machine anme, @ is current domain ttl ; time to live address class : Internet TCP/IP entry type (Resource Record Type) SOA : Start of Authority, make begin of a zone - serial, reflash, retry, expire, minimum A : Internet Address NS : Name Server MX : Mail Exchange HINFO : Host INFOmation WKS : Well-Known Service CNAME : Cannonical NAME PTR : Pointer IN : Internet System server : IP address or Domain ¸î °¡Áö ¾ð±Þ... serial serial À̶õ ¹®ÀÚ¸¦ ¾Õ¼ º» page¿¡¼ ¹ß°ßÇßÀ» °ÍÀÌ´Ù. À̴ Ưº°ÇÑ Àǹ̸¦ °¡Áö´Â °ÍÀÌ ¾Æ´Ï¶ó, serial numberÀÇ °»½ÅÀ¸·Î ÇØ´ç fileÀÌ updateµÇ¾ú´Ù´Â °ÍÀ» ¿ÜºÎ¿¡ ¾Ë·ÁÁÖ´Â °ÍÀÌ´Ù. ´Ù¸¥ Name ServerµéÀº ÀÌ serial number¸¦ º¸¸ç »õÁ¤º¸ÀÎÁö ¾Æ´ÑÁö¸¦ ÆÇ´ÜÇؼ cacheµÇ¾î ÀÖ´Â Á¤º¸¸¦ Á¦°øÇÒ °ÍÀÎÁö, ȤÀº »õ·Î¿î Á¤º¸¸¦ °¡Á®¿Ã °ÍÀÎÁö ÆÇ´ÜÇÏ°Ô µÈ´Ù. ¸¸¾à ´ç½ÅÀÌ named.hosts¶óµçÁö named.rev¿Í °°Àº °ÍÀ» ¼öÁ¤Çß´Ù¸é ¹Ýµå½Ã serial number¸¦ º¯°æÇØ¾ß ÇÑ´Ù. ÀÚ½ÅÀÇ »ýÀÏÀ» ³ÖµçÁö ¾ÖÀÎÀÇ »ýÀÏÀ» ³ÖµçÁö, ¾îÁ¦ ÀܼҸ®·Î °áÀ縦 ³¡³»´ø »ó»çÀÇ Â÷¹øÈ£¸¦ ³ÖµçÁö, ¾î·µç ÀÌÀü¿¡ ÀÖ´ø serial number¿Í´Â ´Ù¸¥ °ÍÀ» ³Ö¾î¾ß ÇÑ´Ù.ÀϹÝÀûÀ¸·Î serial number´Â ¼öÁ¤µÈ ³¯ÀÚ¸¦ ºÎ¿©ÇÑ´Ù. NTÀÇ DNS´Â ù ¼öÁ¤ ¶© '1'À» µÎ¹ø°¿£ '2'¸¦ ºÎ¿©ÇÑ´Ù... SOAÀÇ ³ª¸ÓÁö Ç׸ñ¿¡ ´ëÇؼ± º°´Ù¸¥ ¼³¸íÀÌ ÇÊ¿ä ¾ø´Ù. º¸À̴µ¥·Î ´À³¢°í ÀÌÇØÇÏ¸é µÇ°Ú´Ù. ÇÑ°¡Áö¸¸ ´õ ÀûÀÚ¸é TTL = Time To Live ¶ó´Â Ç׸ñÀÌ µé¾î°¡±âµµ Çϴµ¥, °ú¿¬ ¾î´À °ü¸®ÀÚ°¡ ¸î ½Ã°£ ÈÄ¿¡ ÀÚ½ÅÀÇ in.named daemonÀÌ Áױ⸦ ¹Ù¶ö±î... ¾î·µç ÀÌ Ç׸ñ µÚ¿¡ ½Ã°£À» ÁÖ¸é ±× ½Ã°£¿¡ service´Â ¸ØÃß°Ô µÈ´Ù. CNAME CNAME ÀÌ ÁöÁ¤ÇÏ´Â Ç׸ñÀº host nameÀ» aliaseÇÏ´Â °ÍÀÌ´Ù. ¾Õ PageÀÇ ¿¹¸¦ µç´Ù¸é red¶ó´Â À̸§Àº www·Î aliaseµÇ¾î ÀÖ´Ù. in.named ¾Õ¼ ±â¼úµÇ¾î ÀÖ´Â page´ë·Î ¼öÁ¤À» ¸¶ÃÆ´Ù¸é, ÀÌÁ¦ daemonÀ» ¶ç¿ö¾ß ÇÑ´Ù. /etc/rc2.d/S72inetsrv ¶ó´Â ÆÄÀÏÀ» ¿°í ¾Æ·¡¿Í °°Àº °÷ÀÌ ÀÖ´ÂÁö ¾ø´ÂÁö È®ÀÎÇÑ´Ù. (¹°·Ð ÀÖ°ÚÁö¸¸ ^^; ¾ø´Ù¸é? ; ´ç¿¬È÷ ³Ö¾îÁÖ¾î¾ß ÇÑ´Ù) # # If this machine is configured to be an Internet Domain Name # System (DNS) server, run the name daemon. # Start named prior to: route add net host, to avoid dns # gethostbyname timout delay for nameserver during boot. # if [ -f /usr/sbin/in.named -a -f /etc/named.boot ]; then /usr/sbin/in.named; echo "starting internet domain name server." fi # À§¿¡¼ º¸¸é /etc/named.boot¸¦ ã¾Æ¼ daemonÀÌ ¼öÇàµÊÀ» ¾Ë ¼ö ÀÖ´Ù. ÀÌ°ÍÀ» /var/named/named.bootÀ¸·Î °íÃÄÁÖ´øÁö, symbolic link¸¦ °É¾îÁÖÀÚ. ¹°·Ð ¿øÇÏ´Â À̸§À¸·Î named.bootÀ» ¹Ù²Ù¾îÁ־ µÈ´Ù. (´Ù¸¥ ÆÄÀϵ鵵 ¸¶Âù°¡Áö°ÚÁö¸¸...^^;) /var/named/ ¿¡ ¾Õ¼ À̾߱âÇØ µÎ¾ú´ø ÆÄÀϵéÀÌ Á¸ÀçÇÑ´Ù¸é Àç ½Ãµ¿½Ã "starting internet domain name server" ¶ó´Â ¸Þ½ÃÁö¿Í ÇÔ²² in.named daemonÀÌ ÀÏÀ» ½ÃÀÛÇÒ °ÍÀÌ´Ù. |
|
Copyleft (c) 1996-2002, Kang Jul Ki. All rights were not reserved. ¢Æ Powered by jkkang.net |