DNS ¼¹ö
¼Â¾÷ 2
ÀÌ Àå¿¡¼´Â ½ÇÁ¦·Î ³×ÀÓ
¼¹ö¸¦ ±¸ÃàÇϱâ À§ÇÑ °úÁ¤°ú ÀÛ¼ºÇØ¾ß ÇÒ ÆÄÀϵ鿡 ´ëÇØ
¼³¸íÇÕ´Ï´Ù. Àüü
µð·ºÅ丮 ±¸Á¶
ÀûÀýÇÑ µð·ºÅ丮¿¡ ÇÊ¿äÇÑ
ÆÄÀÏÀ» ÀÛ¼ºÇÕ´Ï´Ù. °¢ ÆÄÀϵéÀÇ À§Ä¡´Â º¯°æÀÌ °¡´ÉÇÏÁö¸¸
¿©±â¼´Â ¾Æ·¡ÀÇ µð·ºÅ丮¿¡ ÀÛ¼ºÇÏ´Â °ÍÀ¸·Î ÇÕ´Ï´Ù.
- /etc/named.boot
- /etc/resolv.conf
- /etc/defaultdomain
- /etc/defaultrouter
- /var/named/root.cache
- /var/named/localhost.rev
- /var/named/µµ¸ÞÀθí.zone
- /var/named/IP.rev
À§ÀÇ ÆÄÀϵé Áß µµ¸ÞÀθí.zone¿Í
IP.rev´Â primary¿¡¼¸¸ ÀÛ¼ºÇÏ°í secondary ¿¡¼´Â ÀÚµ¿À¸·Î
»ý¼ºÀÌ µÇ¹Ç·Î º°µµ·Î ÀÛ¼ºÇÒ ÇÊ¿ä°¡ ¾ø½À´Ï´Ù. Primary
³×ÀÓ ¼ºñ½º¸¦ ÇÏ´Â °æ¿ì¿Í secondary ³×ÀÓ ¼ºñ½º¸¦ ÇÏ´Â
°æ¿ì¿¡ ´Ù¼Ò Â÷ÀÌ°¡ Àִµ¥ ¸ÕÀú secondaryÀÎ °æ¿ì¸¦ »ìÆ캸°í
±× ´ÙÀ½¿¡ primaryÀÎ °æ¿ì¸¦ »ìÆ캸µµ·Ï ÇÏ°Ú½À´Ï´Ù.
Secondary ³×ÀÓ ¼ºñ½º¸¦
ÇÏ´Â °æ¿ì
(´Ü, ¿©±â¼ µµ¸ÞÀθíÀº
abc.co.kr·Î °¡Á¤ÇÏ°í IP¾îµå·¹½º´Â 203.235.60.0ÀÌ¸ç ¼¹ö¿Í
¶ó¿ìÅÍÀÇ ÁÖ¼Ò´Â °¢°¢ 1°ú 254ÀÎ °ÍÀ¸·Î °¡Á¤ÇÕ´Ï´Ù.)
¸ÕÀú /etc/µð·ºÅ丮¿¡
named.boot, resolv.conf, defaultdomain, defaultrouter
ÆÄÀÏÀ» ÀÛ¼ºÇÕ´Ï´Ù.
#vi /etc/named.boot
directory /var/named
cache . root.cache
primary 0.0.127.in-addr.arpa localhost.rev
secondary abc.co.kr 203.255.112.34 abc.zone
secondary 60.235.203.in-addr.arpa 203.255.112.34 203.235.60.rev
#vi /etc/resolv.conf
domain abc.co.kr
nameserver 127.0.0.1
nameserver 203.255.112.34
#vi /etc/defaultdomain
abc.co.kr
#vi /etc/defaultrouter
203.235.60.254
´ÙÀ½¿¡´Â /var/named/µð·ºÅ丮¿¡
root.cache,localhost.rev,abc.zone,IP.rev ÆÄÀÏÀ» ÀÛ¼ºÇÕ´Ï´Ù.
¾Õ¼ ¾ð±ÞÇÑ ¹Ù¿Í °°ÀÌ secondaryÀÎ °æ¿ì abc.zoneÆÄÀÏ°ú
IP.revÆÄÀÏÀº ÀÛ¼ºÇÒ ÇÊ¿ä°¡ ¾ø½À´Ï´Ù.
#vi /var/named/root.cache
. 99999999 IN NS NS.INTERNIC.NET.
NS.INTERNIC.NET. 99999999 A 198.41.0.4
. 99999999 IN NS NS1.ISI.EDU.
NS1.ISI.EDU. 99999999 A 128.9.0.107
. 99999999 IN NS C.PSI.NET.
C.PSI.NET. 99999999 A 192.33.4.12
. 99999999 IN NS TERP.UMD.EDU.
TERP.UMD.EDU. 99999999 A 128.102.16.10
. 99999999 IN NS NS.NASA.GOV.
NS.NASA.GOV. 99999999 A 128.102.16.10
99999999 A 102.52.195.10
99999999 IN NS NS.ISC.ORG.
NS.ISC.ORG. 99999999 A 192.5.5.241
. 99999999 IN NS NIC.DDN.MIL.
NIC.DDN.MIL. 99999999 A 102.112.36.4
. 99999999 IN NS AOS.ARL.ARMY.MIL.
AOS.ARL.ARMY.MIL. 99999999 A 128.63,4.82
99999999 A 192.5.25.82
99999999 IN NS NIC.NORDU.NET.
NIC.NORDU.NET. 99999999 A 192.36.148.17
localhost.revÆÄÀÏÀº
´ÙÀ½°ú °°½À´Ï´Ù.
#vi /var/named/localhost.rev
@ IN SOA nuri.net. netopt.nuri.net. (
940004 ; serial
21600 ; refresh
900 ; retry
604800 ; expire
43200 ) ; minimum
IN NS sol.nuri.net.
;
1 IN PTR localhost.
¸¶Áö¸·À¸·Î ¾Æ·¡¿Í °°ÀÌ
±âÁ¸ÀÇ namedµ¥¸óÀ» ÁßÁö½ÃÅ°°í »õ·Î¿î namedµ¥¸óÀ» ½ÇÇà½Ãŵ´Ï´Ù.
#ps -ef(ȤÀº ax) | grep
named(ȤÀº in.named) 529 ? s 2825.38 /usr/sbin/named(ȤÀº
in.named) 1332 pts/38 s 0:00 grep named
#kill -9 529 (±âÁ¸ÀÇ ³×ÀÓ µ¥¸ó ÁßÁö) #/usr/sbin/named(ȤÀº
in.named)
Primary ³×ÀÓ ¼ºñ½º¸¦
ÇÏ´Â °æ¿ì
SecondaryÀÎ °æ¿ì¿ÍÀÇ
Â÷ÀÌÁ¡Àº /etc/named.bootÆÄÀÏÀÇ ³»¿ëÀÌ ´Ù¼Ò ´Ù¸£°í /var/named/µð·ºÅ丮¿¡
abc.zoneÆÄÀÏ°ú 203.235.60.rev¶ó´Â ÆÄÀÏÀ» ÀÛ¼ºÇØ¾ß ÇÑ´Ù´Â
°ÍÀÔ´Ï´Ù.
¾Æ·¡¿¡ ±â¼úµÈ 3°³ÀÇ
ÆÄÀÏÀ» Á¦¿ÜÇÑ ¸ðµç ³»¿ëÀº secondaryÀÇ °æ¿ì¿Í µ¿ÀÏÇÕ´Ï
´Ï´Ù.
#vi /etc/named.boot
directory /var/named
cache . root.cache
primary 0.0.127.in-addr.arpa localhost.rev
primary abc.co.kr abc.zone
primary 60.235.203.in-addr.arpa 203.235.60.rev
#vi /var/named/abc.zone
@ IN SOA ns.abc.co.kr. root.ns.abc.co.kr. (
940004 ; serial
21600 ; refresh
900 ; retry
604800 ; expire
43200 ) ; minimum
;domain
IN NS ns.abc.co.kr.
IN A 203.235.60.1
;host information
ns IN A 203.235.60.1
www IN CNAME ns
ftp IN A 203.235.60.1
#vi /var/named/203.235.60.rev
@ IN SOA ns.abc.co.kr. root.ns.abc.co.kr. (
940004 ; serial
21600 ; refresh
900 ; retry
604800 ; expire
43200 ) ; minimum
$ORIGIN 60.235.203.in-addr.arpa.
1 IN PTR ns.abc.co.kr.
±âÁ¸ÀÇ µ¥¸óÀ» ÁßÁö½ÃÅ°°í
»õ·Î¿î µ¥¸óÀ» ½ÇÇà½ÃÅ°´Â °úÁ¤Àº secondaryÀÇ °æ¿ì¿Í µ¿ÀÏÇÕ´Ï´Ù.
ÁÖÀÇ »çÇ×
O/S°¡ SolarisÀÎ °æ¿ì¿¡´Â
Ãß°¡·Î /etc/nsswtch.confÆÄÀÏÀ» ¼öÁ¤ÇØ¾ß ÇÕ´Ï´Ù.
#vi /etc/nsswitch.conf
~~~~~ passwd : files group : files hosts
: files dns (Áï, "dns"¸¦ ÀÌ°÷¿¡ »ðÀÔÇÕ´Ï´Ù.)
Networks : files ~~~~~
Å×½ºÆ®
¼Â¾÷ÀÌ ¿Ï·áµÇ°í µ¥¸óÀ»
½ÇÇà½ÃŲ µÚ ¹Ýµå½Ã named µ¥¸óÀÌ Á¤»óÀûÀ¸·Î ½ÇÇàµÇ´Â
Áö È®ÀÎÀ» ÇØ¾ß ÇÕ´Ï´Ù. È®ÀÎÇÏ´Â ¹æ¹ýÀ¸·Î´Â µµ¸ÞÀθíÀ¸·Î
ping Å×½ºÆ®¸¦ Çϰųª nslookup ¸í·ÉÀ» »ç¿ëÇÏ´Â ¹æ¹ýµîÀÌ
ÀÖ½À´Ï´Ù.
#ping sol.nuri.net
sol.nuri.net is alive ȤÀº #nslookup default
server : ns.abc.co.kr address : 127.0.0.1 >www.sun.com
default server : localhost address : 127.0.0.1
name : www.sun.com address : 192.9.9.100 >exit(ȤÀº
Ctrl-d)
Áï, IP¾îµå·¹½º°¡ ¾Æ´Ñ
µµ¸ÞÀθíÀ¸·Î pingÅ×½ºÆ®°¡ °¡´ÉÇϰųª nslookup¸í·ÉÀ»
»ç¿ëÇÒ ¼ö ÀÖÀ¸¸é DNS°¡ ¼º°øÀûÀ¸·Î ¼³Ä¡µÈ °ÍÀÔ´Ï´Ù. |