´ÙÀ½ ÀÌÀü Â÷·Ê

6. BIND À¯Áö/º¸¼ö

6.1 BIND ½Ã±×³Î

BIND´Â ´ÙÀ½°ú °°ÀÌ ¸î °³ÀÇ ¿¹¾àµÈ ½Ã±×³ÎÀ» »ç¿ëÇÑ´Ù. ½Ã±×³Î Áß ¸î¸î¿¡ ´ëÇؼ­´Â ÆÄÀÏ·Î °á°ú¸¦ Ãâ·ÂÇϴµ¥, ÆÄÀÏÀº º¸Åë /var/named/ ȤÀº /var/tmp/ µð·ºÅ丮¿¡ ³²´Â´Ù.

6.2 BIND Syslog ¸Þ½ÃÁöµé

BIND´Â Syslog¸¦ ÅëÇØ ÀÏ»óÀû ¾Ë¸²¿¡¼­ºÎÅÍ Ä¡¸íÀû ¿À·ù±îÁö ´Ù¾çÇÑ ¸Þ½ÃÁö¸¦ ³²±ä´Ù. ³×ÀÓ¼­¹öÀÇ ÀϹÝÀûÀÎ ¿À·ù ¹× ¿Àµ¿ÀÛÀÇ ¿øÀÎÀº Syslog¿¡¼­ºÎÅÍ Ã£¾Æ³ª°¡´Â °ÍÀÌ ¼ø¼­ÀÌ°Ú´Ù. Syslog´Â /etc/syslog.confÀÇ ¼³Á¤¿¡ µû¶ó ´Ù¸£Áö¸¸, º¸Åë /var/log/messages ȤÀº /var/adm/messages ÆÄÀÏ¿¡ ¸Þ½ÃÁö¸¦ ³²±ä´Ù.

´ÙÀ½Àº, BIND°¡ ±¸µ¿µÉ ¶§, HUP ½Ã±×³ÎÀ» ¹Þ¾ÒÀ» ¶§, Á¾·áµÉ ¶§ ±â·ÏµÇ´Â ÀÏ»óÀûÀÎ ¸Þ½ÃÁöµéÀÌ´Ù.

Jan  1  5:33:39 ns named[288]: starting.  named 8.2
Jan  2 16:57:11 ns named[291]: reloading nameserver
Feb  5  3:34:31 ns named[289]: named shutting down

Syslog¿¡ ³²´Â ¸Þ½ÃÁöÀÇ Çü½ÄÀº '½Ã°£ È£½ºÆ®¸í named[PID]: ¸Þ½ÃÁö'¿Í °°Àº Çü½Ä¸¦ ÃëÇϴµ¥, BIND-4¿Í BIND-8 ±×¸®°í °¢ ¹öÀüº°·Î »ç¿ëµÇ´Â ´Ü¾î¿Í ¸Þ½ÃÁö ¾ç½ÄÀÌ Á¶±Ý¾¿ »óÀÌÇÔ¿¡ À¯ÀÇÇÑ´Ù.

Feb  1 11:33:40 ns named[288]: master zone "nobreak.com"
(IN) loaded (serial 1999012901)

Zone µ¥ÀÌÅͺ£À̽º¸¦ ¸Þ¸ð¸®¿¡ ÀûÀçÇÏ¿´À½À» ÀǹÌÇÑ´Ù. BIND-4¿¡¼­´Â 'primary zone'À̶ó Ç¥ÇöÇÏ¿´Áö¸¸, BIND-8·Î ³Ñ¾î¿À¸é¼­ 'master zone'À¸·Î ¸íĪÀÌ ¼öÁ¤µÇ¾ú´Ù.

¸Å½Ã°£ BIND´Â °£·«ÇÑ Åë°èÁ¤º¸¸¦ ±â·ÏÇÑ´Ù. (BIND-4ÀÇ ÀϺΠ¹öÀü°ú ¸î¸î OS º¥´õ°¡ Á¦°øÇÏ´Â BIND´Â ÀÌ Ç»Ãĸ¦ ±âº»À¸·Î ²¨³õ°í ÀÖ´Ù.)

Feb  2 18:57:12 ns named[291]: USAGE 917949432 917837292
CPU=1558.86u/491.54s CHILDCPU=921.29u/1228.57s

Feb  2 18:57:12 ns named[291]: NSTATS 917949432 917837292
Unknown=3 A=95677 NS=3 SOA=275 PTR=563972 MX=11355 TXT=16 AXFR=10 ANY=17840

Feb  2 18:57:12 ns named[291]: XSTATS 917949432 917837292
RR=270905 RNXD=92478 RFwdR=133260 RDupR=505 RFail=8882
RFErr=0 RErr=75 RAXFR=10 RLame=111437 ROpts=0
SSysQ=24028 SAns=467186 SFwdQ=221971 SDupQ=255265 SErr=5319
RQ=689151 RIQ=17 RFwdQ=0 RDupQ=224 RTCP=53 SFwdR=133260
SFail=290 SFErr=0 SNaAns=189120 SNXD=186481

°¢ ¸Þ½ÃÁöÀÇ Ã³À½¿¡ ³ª¿À´Â 2°³ ¼ýÀÚ´Â ÇöÀç½Ã°£°ú BIND°¡ ½ÃÀÛµÈ ½Ã°£À» ÀǹÌÇÑ´Ù. '917949432 - 917837292'¸¦ °è»êÇϸé, ¼­¹ö°¡ ¿î¿ëµÈ ½Ã°£(ÃÊ)À» ¾Ë ¼ö ÀÖ´Ù. USAGE´Â CPU »ç¿ëÁ¤µµ¸¦ ³ªÅ¸³»´Âµ¥, ÁÖ CPU°¡ 1558Ãʵ¿¾È »ç¿ëÀÚ(u) ¸ðµå¿¡¼­, 491Ãʵ¿¾È ½Ã½ºÅÛ(s) ¸ðµå¿¡¼­ µ¿ÀÛÇÏ¿´À½À» ¾Ë ¼ö ÀÖ´Ù. CHILDCPUµµ °°Àº ÀǹÌÀε¥, ¸ÖƼ ÇÁ·Î¼¼½º ½Ã½ºÅÛÀÌ ¾Æ´Ï¶ó¸é, CHILDCPU´Â 0u/0s ·Î Ç¥½ÃµÉ °ÍÀÌ´Ù. NSTATS¿Í XSTATS´Â 'BIND Statistics'¿¡¼­ ÀÚ¼¼È÷ ´Ù·é´Ù.

Feb  5 09:39:05 ns named[26674]: Sent NOTIFY for "nobreak.com IN SOA"
(nobreak.com); 1 NS, 1 A

BIND-8¿¡ Æ÷ÇÔµÈ Dynamic Update ±â´ÉÀº Primary°¡ Secondary¿¡°Ô Zone µ¥ÀÌÅͺ£À̽º°¡ ¼öÁ¤µÇ¾úÀ¸´Ï ¾÷µ¥ÀÌÆ®Ç϶ó´Â Á¤º¸¸¦ º¸³½´Ù. º» ¸Þ½ÃÁö´Â 'nobreak.com'¿¡ ´ëÇÑ Zone µ¥ÀÌÅͺ£À̽º°¡ ¾÷µ¥ÀÌÆ®µÇ¾î ¾Ë¸² ¸Þ½ÃÁö¸¦ º¸³Â´Ù´Â ¶æÀÌ´Ù.

Feb  5 09:36:00 ns named[26674]: ns_forw: query(57.132.119.210.in-addr.arpa)
No possible A RRs

Resolver°¡ ¿äûÇÑ µµ¸ÞÀÎ(Àιö½º µµ¸ÞÀÎ)À» ãÀ» ¼ö ¾øÀ» °æ¿ì ÀÌ´Ù.

Feb  5 09:35:46 ns named[26674]: Lame server on 'ryu.siyon.com'
(in 'siyon.com'?): [210.105.79.103].53 'ns.mylover.com'

µµ¸ÞÀÎ 'siyon.com'ÀÌ 'ns.mylover.com'À¸·Î À§ÀӵǾúÀ¸³ª, ÇØ´ç ³×ÀÓ¼­¹ö°¡ Authority ¼³Á¤ÀÌ µÇ¾î ÀÖÁö ¾ÊÀº °æ¿ìÀÌ´Ù. ÀÌ°ÍÀº ¿ÜºÎ ³×Æ®¿öÅ©¿¡¼­ÀÇ Lame DelegationÀ̹ǷΠ½Å°æ ¾²Áö ¾Ê¾Æµµ ÁÁ´Ù.

6.3 BIND Syslog ÁÖÀÇ/¿À·ù ¸Þ½ÃÁöµé

´ÙÀ½ÀÇ ¸Þ½ÃÁöµéÀº ³×ÀÓ½ºÆäÀ̽º»óÀÇ ºñÁ¤»óÀûÀÎ ¸µÅ©¿Í, À߸øµÈ ³×ÀÓ¼­¹ö ¼³Á¤¿¡ ±âÀÎÇÑ ¸Þ½ÃÁöµéÀÌ´Ù. º» ¸Þ½ÃÁö Áß ¸î¸îÀº Ÿ ³×ÀÓ¼­¹ö¿¡ ÀÇÇÑ °ÍÀÌ°í, ÀǵµÀûÀÎ °æ¿ìµµ ÀÖÀ¸´Ï, °¡´ÉÇÑ ¹üÀ§¿¡¼­ ¿øÀÎÀ» Á¦°ÅÇϵµ·Ï ÇÑ´Ù.

Feb  3 12:53:27 ns named[291]: ns_forw: query(shpark.co.kr)
contains our address (ns.nobreak.com:210.105.79.2)

µµ¸ÞÀÎ 'shpark.co.kr'ÀÌ ns.nobreak.com(ÀÚ½Å)À¸·Î À§ÀӵǾúÀ¸³ª, Authority°¡ ¼³Á¤µÇ¾î ÀÖÁö ¾ÊÀ» °æ¿ìÀÌ´Ù. ³»ºÎ ³×Æ®¿öÅ©¿¡ ´ëÇÑ Lame Delegation ¸Þ½ÃÁöÀÌ´Ï, ÇØ´ç µµ¸ÞÀÎÀ» È®ÀÎÇÏ°í, ÀûÀýÇÑ Á¶Ä¡¸¦ ÃëÇϵµ·Ï ÇÑ´Ù.

Feb  5 10:09:01 ns named[26674]: "nobreak.com IN NS"
points to a CNAME (ns.nobreak.com)

Feb  5 10:09:11 ns named[26674]: "nms.nobreak.com IN MX"
points to a CNAME (mail.nobreak.com)

Feb  5 09:57:15 ns named[26674]: power.nobreak.com has CNAME and other data

CNAMEÀÇ À߸øµÈ »ç¿ë¿¡ ±âÀÎÇÑ ¿À·ùµéÀÌ´Ù. ƯÈ÷ MX¿Í °ü·ÃµÈ ¿À·ù´Â Àüü°¡ ¾Æ´Ñ ¸î¸î MTA(¿¹:sendmail)¿¡¼­ ¸ÞÀÏ ¶ó¿ìÆÿ¡ ¹®Á¦°¡ »ý±æ ¼ö Àֱ⠶§¹®¿¡, ¿øÀÎÀ» ã±âÀ§ÇØ ¿À·£ ½Ã°£À» ÇãºñÇÒ ¼ö ÀÖÀ¸¹Ç·Î ÁÖÀÇÇÏÀÚ. ´ÙÀ½°ú °°Àº ¹®¹ýÀû ¿À·ù°¡ ÀÖÀ» ¶§, º» ¸Þ½ÃÁöµéÀÌ ³ªÅ¸³­´Ù.

nobreak.com.    IN      NS      ns.nobreak.com.   ; (X) ns´Â CNAMEÀÌ´Ù.
ns              IN      CNAME   mild.nobreak.com.

nms             IN      MX      mail.nobreak.com. ; (X) mailÀº CNAME ÀÌ´Ù.
mail            IN      CNAME   mhub.nobreak.com.

power           IN      CNAME   layla.nobreak.com.
                IN      MX      mhub.nobreak.com. ; (X)Ãß°¡·¹Äڵ尡 ¿Ã ¼ö ¾ø´Ù.

CNAME ·¹ÄÚµå´Â ¾î¶°ÇÑ Ãß°¡ ·¹Äڵ嵵 °®À» ¼ö ¾øÀ¸¸ç, NS/MX/SOA ·¹ÄÚµå´Â CNAME°ú ¿¬°áµÉ ¼ö ¾øÀ½À» ±â¾ïÇÏÀÚ.

Feb  5 09:24:56 ns2 named-xfer[2502]: record too short from
[210.105.79.2], zone nobreak.com

Primary NS°¡ xfrnets(BIND-4) ȤÀº allow-transfer(BIND-8) ¿É¼ÇÀ¸·Î, Zone Transfer¸¦ ¸·¾Æ, ÇØ´ç ZoneÀ» °®°í ¿ÀÁö ¸øÇÒ °æ¿ìÀÌ´Ù. ÇØ´ç ³×ÀÓ¼­¹ö °ü¸®ÀÚ¿¡°Ô ¿¬¶ôÇÏ¿©, Zone Transfer°¡ °¡´ÉÇϵµ·Ï ÇÏ¿©¾ß ÇÑ´Ù.

6.4 BIND Statistics

³×ÀÓ¼­¹ö È°¿ëÁ¤µµ¿Í µµ¸ÞÀγ»¿¡ ¿ä±¸µÇ´Â ·ÎÄà ³×ÀÓ¼­¹ö °³¼ö¸¦ ÆľÇÇϱâ À§ÇÏ¿©, ÁÖ±âÀûÀÎ Åë°è ÀÚ·á °ËÅä°¡ ÇÊ¿äÇÏ´Ù. ¿©±â¼­ ³×ÀÓ¼­¹ö Åë°è Á¤º¸ ºÐ¼®¿¡ ´ëÇØ ¾Ë¾Æº¸°íÀÚ ÇÑ´Ù. Åë°èÁ¤º¸´Â [±×¸² 6]°ú °°ÀÌ timeout(DNS´Â ±âº»ÀûÀ¸·Î UDP¸¦ »ç¿ëÇϱ⠶§¹®¿¡)¿¡ ÀÇÇÑ Áߺ¹µÈ Äõ¸®¸¦ Æ÷ÇÔÇÑ´Ù.

[Image]
[±×¸² 6] ³×ÀÓ¼­¹ö°£ÀÇ ÁúÀÇ ¿¹Á¦

BIND·ÎºÎÅÍ Åë°è Á¤º¸¸¦ ¾ò±â À§Çؼ­´Â ´ÙÀ½°ú °°ÀÌ ILL(BIND-8)/IOT(BIND-4) ½Ã±×³ÎÀ» »ç¿ëÇÑ´Ù. BIND´Â ½Ã±×³ÎÀ» ¹ÞÀ¸¸é Åë°è ÆÄÀÏÀ» /var/named/named.stats ȤÀº /var/tmp/named.stats·Î Ãâ·ÂÇÑ´Ù.

# kill -ILL `cat /var/run/named.pid`
# ls -al /var/named/named.stats
-rw-r--r--   1 root     root        19832 Mar  8 04:51 /var/named/named.stats
# cat /var/named/named.stats
+++ Statistics Dump +++ (920978301) Tue Mar  9 20:18:21 1999
208719  time since boot (secs)
3396    time since reset (secs)
3       Unknown query types
205739  A queries
39      NS queries
916     SOA queries
802719  PTR queries
19192   MX queries
2       TXT queries
15      AAAA queries
129     AXFR queries
29359   ANY queries

++ Name Server Statistics ++
(Legend)
        RR      RNXD    RFwdR   RDupR   RFail
        RFErr   RErr    RAXFR   RLame   ROpts
        SSysQ   SAns    SFwdQ   SDupQ   SErr
        RQ      RIQ     RFwdQ   RDupQ   RTCP
        SFwdR   SFail   SFErr   SNaAns  SNXD
(Global)
        447781  164719 227112   869     25991
        0       245    125      170586  0
        33963   720395 337570   294284  8122
        1058113 0      337570   190     0
        227112  20791  0        228616  298214

[210.104.247.129]
        157     0      0        0       10
        0       0      0        147     0
        0       36     146      22      0
        36      0      0        0       0
        11      0      0        0       13

.
.
.

À§´Â BIND 8.2¿¡¼­ Åë°èÁ¤º¸¸¦ Ãâ·ÂÇÑ ¿¹ÀÌ´Ù.

208719  time since boot (secs)
3396    time since reset (secs)

BIND°¡ ±¸µ¿µÈÈÄ ¿î¿ëµÈ ½Ã°£°ú ¸¶Áö¸·À¸·Î ¸®·ÎµåµÈ(HUP ½Ã±×³ÎÀ» ¹ÞÀº) ÈÄ °æ°úµÈ ½Ã°£À» ÃÊ´ÜÀ§·Î Ç¥½ÃÇÑ´Ù.

3       Unknown query types

¾Ë·ÁÁöÁö ¾ÊÀº Äõ¸®¿¡ ´ëÇÑ ÁúÀÇ È½¼öÀÌ´Ù. ÀÌ´Â À߸øµÈ ±¸Çö¿¡ ±âÀÎÇϰųª, ´©±º°¡¿¡ ÀÇÇÑ »õ·Î¿î ŸÀԽõµ ¶§¹®ÀÌ´Ù.

205739  A queries

A Äõ¸®´Â ´ëºÎºÐÀÇ ÀÀ¿ë¿¡¼­ ¿ä±¸ÇÏ´Â ÁúÀÇÀ̸ç, °¡Àå ºó¹øÈ÷ ¿ä±¸µÈ´Ù.

39      NS queries

³»ºÎÀûÀ¸·Î BIND´Â ·çÆ® ¼­¹ö¿¡ ÁúÀÇ ÇÒ¶§, NS Äõ¸®¸¦ »ç¿ëÇÑ´Ù. ÇØ´ç ¼­¹ö°¡ ·çÆ® ¼­¹ö°¡ ¾Æ´Ò °æ¿ì¿¡´Â Dig³ª Nslookup°°Àº ÁúÀÇ µµ±¸¿¡ ÀÇÇÑ ¸í½ÃÀû ¿äûÀ» ¶æÇÑ´Ù.

916     SOA queries

SOA Äõ¸®´Â Secondary NS°¡ ÇØ´ç ZoneÀÇ ½Ã¸®¾ó º¯È­¸¦ °¨ÁöÇϱâ À§ÇØ »ç¿ëÇÑ´Ù.

802719  PTR queries

Reverse µµ¸ÞÀÎÀ» ¿ä±¸ÇÏ´Â ÀÀ¿ëµé¿¡ ÀÇÇϸç A Äõ¸®¿Í ÇÔ²² °¡Àå ºó¹øÈ÷ ¿äûµÈ´Ù.

19192   MX queries

MX Äõ¸®´Â Sendmail°ú °°Àº MTA°¡ ¸ÞÀÏ ¶ó¿ìÆà Á¤º¸¸¦ ½ÀµæÇϱâ À§ÇØ ¿äûÇÑ´Ù.

2       TXT queries
15      AAAA queries

TXT¿Í AAAA Äõ¸®´Â Dig³ª Nslookup°°Àº DNS ÁúÀÇ µµ±¸¿¡ ÀÇÇØ ¿äûµÈ´Ù.

129     AXFR queries

AXFR Äõ¸®´Â Secondary°¡ Zone Transfer ÇÒ ¶§ ¿äûµÇ¹Ç·Î, ±× ¼öÄ¡´Â Zone Transfer Ƚ¼ö¸¦ ÀǹÌÇÑ´Ù.

29359   ANY queries

Any Äõ¸®´Â ±Ù·¡ÀÇ SendmailÀÌ ¸ñÀûÁö È£½ºÆ®ÀÇ A, MX, CNAME Á¤º¸¸¦ ¾ò±â À§ÇØ »ç¿ëÇÑ´Ù.

³ª¸ÓÁö Åë°èÁ¤º¸´Â °³º° È£½ºÆ®(Remote ³×ÀÓ¼­¹ö¿Í Stub Resolver)ÀÇ Åë°è Á¤º¸¸¦ ³ªÅ¸³½´Ù. º¸Åë ÃÑ ÇÕÀ» Ç¥½ÃÇÏ´Â [Global] ÇÊµå ¾Æ·¡·Î ¼ö¹é ȤÀº ¼öõÀÇ È£½ºÆ®°¡ ³ª¿­µÇ´Âµ¥, °³º° ¼­¹ö¿ÍÀÇ Åë°èÁ¤º¸´Â ¸Þ¸ð¸®¸¦ ¼ÒºñÇÒ »Ó ÀϹÝÀûÀ¸·Î Áß¿äÄ¡ ¾Ê¾Æ, BIND-8¿¡¼­´Â ±âº»À¸·Î Á¦°ÅµÇ¾î [Global] Çʵ常ÀÌ Ç¥½ÃµÈ´Ù. ÇÏÁö¸¸, °³º° È£½ºÆ®º° Åë°è´Â ¼Û/¼ö½Å ÆÐŶ¿¡ ´ëÇÑ ÀÚ¼¼ÇÑ ³»¿ªÀ» ¾Ë·ÁÁֱ⠶§¹®¿¡, ÀϹÝÀûÀÎ Åë°è¿¡¼­ ÆľÇÇÒ ¼ö ¾ø´Â ¹®Á¦(³×Æ®¿öÅ© Áö¿¬°ú °°Àº)¸¦ Áø´ÜÇϴµ¥ µµ¿òÀÌ µÇ±âµµ ÇÑ´Ù. ´ÙÀ½°ú °°ÀÌ ºÎÆ® ÆÄÀÏ ¿É¼ÇÀ» Á¶Á¤ÇÔÀ¸·Î½á °³º° È£½ºÆ® Åë°è¸¦ °¡´ÉÇÏ°Ô ÇÒ ¼ö ÀÖ´Ù.

* named.conf (BIND-8)
options {
        host-statistics yes;
};

Legend·Î Ç¥½ÃµÇ´Â ±¸ºÐÀÚµéÀº °¢ ÇʵåÀÇ Àǹ̸¦ ³ªÅ¸³»´Âµ¥, S(Sent)·Î ½ÃÀÛÇϴ°ÍÀº ·ÎÄà ȣ½ºÆ®¿¡¼­ ¼Û½ÅµÈ Äõ¸®¸¦ ÀǹÌÇÏ°í, R(Received)Àº ¼ö½ÅÀ» ¶æÇÑ´Ù. ¼ø¼­¿Í Á¾·ù´Â BINDÀÇ ¹öÁ¯¿¡ µû¶ó Á¶±Ý¾¿ »óÀÌÇÒ ¼ö ÀÖ´Ù.

RR(Sent us an answer) 447781
RQ(Sent us a query) 1058113

¸®¸ðÆ® È£½ºÆ®°¡ ·ÎÄà ³×ÀÓ¼­¹ö·Î ÀÀ´ä(Answer)ÇÑ È½¼ö°¡ RRÀ̸ç, ÁúÀÇ(Question)ÇÑ È½¼ö°¡ RQÀÌ´Ù. RRÀÌ RQ¿¡ ´ëÇÑ ÀÀ´äÀº ¾Æ´Ï¹Ç·Î, RR°ú RQÀÇ ¼öÄ¡¿£ »ó°ü°ü°è°¡ ¾ø´Ù.

RNXD(Sent us a negative response) 164719
SNXD(Sent them a negative response) 298214

RNXD´Â ¿äûÇÑ Äõ¸®¿¡ ´ëÇØ 'µµ¸ÞÀÎ ¾øÀ½' ÀÀ´äÀ» ¹Þ¾ÒÀ» °æ¿ì Áõ°¡ÇÑ´Ù. SNXD´Â ¹Ý´ë·Î 'µµ¸ÞÀÎ ¾øÀ½' Äõ¸®¸¦ Àü¼ÛÇßÀ» °æ¿ìÀÌ´Ù.

RFwdR(Sent us a response we had to fwd) 227112
SFwdR(Forwarded a response to them) 227112
RFwdQ(Sent us a query we had to forward) 337570
SFwdQ(Forwarded a query to them) 337570

ResolverÀÇ ¿äû¿¡ ´ëÇØ ·ÎÄà ³×ÀÓ¼­¹ö´Â ³×ÀÓ½ºÆäÀ̽º¸¦ °Ë»öÇÏ¿© ÃÖÁ¾ÀûÀ¸·Î ¸®¸ðÆ® ³×ÀÓ¼­¹ö·ÎºÎÅÍ ÀÀ´ä¹ÞÀº °á°ú¸¦ Resolver¿¡°Ô ÅëÁöÇϴµ¥, RFwdRÀº ¸®¸ðÆ® ³×ÀÓ¼­¹ö·ÎºÎÅÍ ÀÀ´ä¹ÞÀº Äõ¸®(RR)Áß Æ÷¿öµùÇÒ Äõ¸®ÀÇ °³¼öÀÌ°í, SFwdRÀº ½ÇÁ¦ Æ÷¿öµùÇÑ Äõ¸® °³¼öÀÌ´Ù. ¹Ý´ë·Î RFwdQ´Â ResolverÀÇ ÁúÀÇ(RQ)¿¡ ´ëÇÑ Æ÷¿öµù ¿äûÀ̸ç, SFwdQ ½ÇÁ¦ ¸®¸ðÆ® ³×ÀÓ¼­¹ö·Î ÁúÀǸ¦ Æ÷¿öµùÇÑ °æ¿ìÀÌ´Ù.

RDupR(Sent us an extra answer) 869
RDupQ(Sent us a retry) 190
SDupQ(Sent them a retry) 294284

³×ÀÓ¼­¹ö°¡ ´Ù¿îµÇ¾î TimeoutÀÌ ¾ß±âµÇ°Å³ª, ³×Æ®¿öÅ© Àå¾Ö µîÀÇ ¿ä¼Ò·Î È£½ºÆ®°£ ÆÐŶ ¼Û/¼ö½Å¿¡ Áö¿¬ÀÌ ¹ß»ýÇÒ °æ¿ì, È£½ºÆ®°£¿¡ Áߺ¹µÈ(Retry) Äõ¸® ¿äûÀÌ ¹ß»ýÇÒ ¼ö ÀÖ´Ù. RDupRÀº ¸®¸ðÆ® È£½ºÆ®¿¡¼­ ·ÎÄà ³×ÀÓ¼­¹ö·Î Àü¼ÛÇÑ Áߺ¹µÈ ÀÀ´ä([±×¸² 6]ÀÇ ½Ã³ª¸®¿À Âü°í) Ƚ¼öÀ̸ç, RDupQ´Â ·ÎÄà ³×ÀÓ¼­¹ö°¡ ¼ö½ÅÇÑ Áߺ¹ ÁúÀÇ(ÇØ´ç ÁúÀǸ¦ ¹Ìó ó¸®ÇÏÁö ¸øÇÑ »óÅ¿¡¼­ ¼ö½ÅµÇ´Â µ¿ÀÏÇÑ ÁúÀÇ) Ƚ¼öÀÌ°í, SDupQ´Â ·ÎÄà ³×ÀÓ¼­¹ö°¡ ¸®¸ðÆ® È£½ºÆ®·Î ¿äûÇÑ Áߺ¹ ÁúÀÇ °³¼öÀÌ´Ù.

RFail(Sent us a SERVFAIL) 5176
SFail(Sent them a SERVFAIL) 90

RFailÀº È£½ºÆ®(Remote)ÀÇ À߸øµÈ Zone µ¥ÀÌÅͺ£À̽º ¼³Á¤, ¸Þ¸ð¸® ÇÒ´ç ¿À·ù, SecondaryÀÏ °æ¿ì ExpireµÈ µµ¸ÞÀÎ µîÀÇ ¹®Á¦·Î ±âÀÎÇÑ SERVFAIL ÀÀ´ä Ƚ¼ö¸¦ ³ªÅ¸³½´Ù. SFailÀº ·ÎÄà ³×ÀÓ¼­¹öÀÇ ¹®Á¦·Î ¹ß¼ÛµÈ SERVFAIL ¸Þ½ÃÁöÀÌ´Ù.

RFErr(Sent us a FORMERR) 0
SFErr(Sent them a FORMERR) 0

RFErrÀº ¼ö½ÅÇÑ FORMERR ÀÀ´ä Ƚ¼ö¸¦ ³ªÅ¸³½´Ù. FORMERR ÀÀ´äÀº ¸®¸ðÆ® ³×ÀÓ¼­¹ö°¡ ¹®¹ýÀû ¿À·ù°¡ ÀÖ´Â ÁúÀǸ¦ ¹Þ¾ÒÀ» ¶§ º¸³»¾îÁø´Ù. SFErrÀº ¹Ý´ë·Î ·ÎÄà ³×ÀÓ¼­¹ö°¡ ¼Û½ÅÇÑ FORMERR ¸Þ½ÃÁöÀÇ °³¼öÀÌ´Ù. ³×Æ®¿öÅ©»óÀÇ ÆÐŶÀü¼Û¿¡ ¹®Á¦°¡ ¹ß»ýÇÏÁö ¾Ê´Â ÇÑ º» µÎ °ªÀº 0 ÀÌ´Ù.

RErr(Sent us some other error) 245
SErr(Sent failed) 8122

¼ö½ÅµÈ SERVFAIL °ú FORMERR ÀÌ¿ÜÀÇ ¸ðµç ¼ö½Å/¼Û½Å ¿À·ù ¸Þ½ÃÁö´Â RErr/SErr¿¡ Æ÷ÇԵȴÙ.

RAXFR(Sent us an AXFR) 125

AXFR Äõ¸®´Â Secondary°¡ Zone Transfer Çϱâ À§ÇØ º¸³»¾î Áø´Ù. °³º° È£½ºÆ® Ç׸ñ¿¡¼­ º» Çʵ尡 0 ÀÏ °æ¿ì¿¡´Â ÇØ´ç È£½ºÆ®°¡ ·ÎÄà ³×ÀÓ¼­¹öÀÇ ¾î¶°ÇÑ µµ¸ÞÀο¡ ´ëÇؼ­µµ Secondary·Î µ¿ÀÛÇÏÁö ¾ÊÀ½À» ¶æÇÑ´Ù.

RLame(Sent us a lame delegation) 170586

À§ÀÓµÈ µµ¸ÞÀÎÁß ¸î¸î¿¡´ëÇØ Authority°¡ ¼³Á¤µÇ¾îÀÖÁö ¾ÊÀ»°æ¿ì º» °ªÀº 0ÀÌ ¾Æ´Ï´Ù. Áï ƯÁ¤ µµ¸ÞÀÎÀÇ ³×ÀÓ¼­¹ö·Î ÁöÁ¤µÇ¾î ÀÖÀ¸³ª Primary ȤÀº Secondary ¼³Á¤ÀÌ ¾øÀ» °æ¿ìÀÌ´Ù.

ROpts(Sent us some IP options) 0

IP ¿É¼ÇÀÌ ¼³Á¤µÈ ÆÐŶÀ» ¼ö½ÅÇÏ¿´À» °æ¿ì, ROpts°¡ Áõ°¡ÇÑ´Ù.

SSysQ(Sent them a sysquery) 33963

·ÎÄà ³×ÀÓ¼­¹öÀÇ ½Ã½ºÅÛ Äõ¸® Àü¼ÛȽ¼öÀÌ´Ù. ½Ã½ºÅÛ Äõ¸®´Â ¸®¸ðÆ® ³×ÀÓ¼­¹ö(·çÆ® ³×ÀÓ¼­¹ö¸¦ Æ÷ÇÔÇÏ¿©) Á¤º¸¸¦ ¾÷µ¥ÀÌÆ® Çϱâ À§ÇØ »ç¿ëµÈ´Ù.

RIQ(Sent us an inverse query) 0

RIQ´Â ¼ö½ÅÇÑ Reserve Domain ¿äû Ƚ¼öÀÌÁö¸¸, ±Ù·¡ÀÇ BIND¿¡¼­´Â PTR queries·Î Èí¼öµÇ¾î ´õ ÀÌ»ó »ç¿ëµÇÁö ¾Ê´Â´Ù. µû¶ó¼­ RIQ´Â Ç×»ó 0ÀÌ´Ù.

RTCP(Sent us a query using TCP) 0

RTCP´Â TCP ¿¬°áÀ» ÅëÇØ ¼ö½ÅµÈ ÁúÀÇ È½¼ö¸¦ ÀǹÌÇÑ´Ù. ´ëºÎºÐÀÇ Äõ¸®´Â UDP¸¦ ÅëÇØ ¼Û/¼ö½ÅµÇ¹Ç·Î º» °ªÀº 0À» °®°Å³ª, ºñÀ²ÀûÀ¸·Î ¸Å¿ì ÀûÀº ¼öÄ¡¸¦ À¯ÁöÇÑ´Ù.

SAns(Sent them an answer) 720395
SNaAns(Sent them a non-autoritative answer) 228616

SAns´Â ¿äûµÈ ÁúÀÇ(RQ)¿¡ ´ëÇÑ ÀÀ´ä Ƚ¼ö¸¦ ¸»Çϸç, °á°ú°¡ ij½¬¿¡¼­ ¹ß°ßµÇ¾úÀ» °æ¿ì¿¡´Â SNaAns°¡ Ä«¿îÆ®µÈ´Ù.

6.5 BIND Bebugging Output

BINDÀÇ µð¹ö±ë Ãâ·ÂÀº °³¹ßÀÚµéÀÌ ¼ÒÇÁÆ®¿þ¾î¸¦ ¸ÞÀÎÅͳͽºÇÒ ¸ñÀûÀ¸·Î È°¿ëµÇ¹Ç·Î, ¶Ç ´Ù¸¥ ±¸ÇöÀ» »ý°¢Çϰųª BINDÀÇ µ¿ÀÛÀ» ÆľÇÇϱâ À§ÇÑ ÀÌÀ¯°¡ ¾Æ´Ï¶ó¸é, ±»ÀÌ À̸¦ ¸ðµÎ ÀÌÇØÇÏ·Á ÇÒ ÇÊ¿ä´Â ¾ø´Ù. ÇÏÁö¸¸ BIND¸¦ Á»´õ ±í¼÷ÀÌ ÀÌÇØÇÏ°í ±× ÀÀ¿ëÀ» ±Ø´ëÈ­ ÇÏ°íÀÚ ÇÑ´Ù¸é, µð¹ö±ë Á¤º¸ ºÐ¼®¿¡ ¸¹Àº Àç¹Ì¸¦ ´À³¥ ¼ö ÀÖÀ» °ÍÀÌ´Ù. ¿©±â ¸ðµÎ´Â ¾Æ´ÏÁö¸¸ µð¹ö±ë Ãâ·ÂÁ¤º¸¸¦ Çؼ®ÇÏ´Â ±âº»ÀûÀÎ ¾ÆÀ̵ð¾î¸¦ ¼Ò°³ÇÑ´Ù.

# kill -USR1 `cat /var/run/named.pid` (or 'ndc trace')
# ping www.openbsd.org.
# kill -USR2 `cat /var/run/named.pid` (or 'ndc notrace')
# ls -al /var/named/named.run
-rw-r--r--  1 root  bin  1153 Mar 10 00:30 named.run

BIND´Â USR1 ½Ã±×³ÎÀº ¹ÞÀ»¶§¸¶´Ù µð¹ö±ë ·¹¹úÀ» ÇѴܰ辿 ³ô¿©°¡´Âµ¥, ³ôÀº µð¹ö±ë ·¹º§Àº Á»´õ ÀÚ¼¼ÇÑ Á¤º¸¸¦ Ç¥½ÃÇÏ¿© ÁØ´Ù. µð¹ö±ë Ãâ·ÂÀº /var/named/named.run ȤÀº /var/tmp/named.run ÆÄÀÏ·Î »ý¼ºµÇ¸ç, ¸Å¿ì ºü¸£°Ô Áõ°¡ÇϹǷΠÇÊ¿äÇÑ Á¤º¸°¡ ÀâÇû´Ù°í ÆǴܵǴ ½ÃÁ¡¿¡¼­ USR2 ½Ã±×³ÎÀ» ÀÌ¿ëÇØ Ãâ·ÂÀ» Á¤Áö½ÃÅ°±â ¹Ù¶õ´Ù. BIND µð¹ö±ë Ãâ·ÂÀº ´Ù¹ßÀûÀ¸·Î ¹ß»ýÇÏ´Â Äõ¸®¿¡ ´ëÇÑ Á¤º¸°¡ ¸ðµÎ ±â·ÏµÇ¹Ç·Î, ¶§·Ð ¿øÇÏ´Â Á¤º¸¸¦ Ã߸®´Âµ¥ ¾à°£ÀÇ Àγ»½ÉÀÌ ÇÊ¿äÇÒ ¼öµµ ÀÖ´Ù. BINDÀÇ ÃʱâÈ­ °úÁ¤À» »ìÆ캸°íÀÚ ÇÑ´Ù¸é 'named -d 1 &'°ú °°ÀÌ ºÎÆýà Ŀ¸Çµå¶óÀÎ ¿É¼ÇÀ» ÁÖ¾î¾ß ÇÑ´Ù.

datagram from [210.105.79.6].3442, fd 21, len 33;

ÀÌ°ÍÀº È£½ºÆ® '210.105.79.6'¿¡¼­ Æ÷Æ® 3442¹øÀ¸·Î ±æÀÌ 33 byteÀÇ UDP ÆÐŶÀÌ ÆÄÀÏ µð½ºÅ©¸³ÅÍ 6¹øÀ» ÅëÇØ ¼ö½ÅµÇ¾úÀ½À» ¶æÇÑ´Ù. ¿©±â¼­ ¸»ÇÏ´Â ÆÄÀÏ µð½ºÅ©¸³ÅͶõ ¼­¹ö IP ÁÖ¼Ò(ÆÐŶÀ» listen ÇÏ´Â)¿¡ boundµÈ ¼ÒÄÏ Çڵ鷯¸¦ ¸»ÇÑ´Ù.

req: nlookup(www.openbsd.org) id 28375 type=1 class=1

¿äûµÈ datagramÀº 'www.openbsd.org'¿¡ ´ëÇÑ ÁúÀÇ(req)ÀÓÀ» ¾Ë ¼ö ÀÖ´Ù. ±¸Ã¼ÀûÀ¸·Î Ŭ·¡½º IN(class=1)¿¡ ´ëÇÑ A(type=1) ·¹ÄÚµå ¿äûÀÌ¸ç ³»ºÎ ±¸ºÐ¹øÈ£´Â 28375·Î ¸Å°ÜÁ³´Ù.

req: missed 'www.openbsd.org' as '' (cname=0)

¿äû µµ¸ÞÀο¡ ´ëÇØ ¾Ë°íÀÖ´Â ÀÚ·á°¡ ¾øÀ½(³×ÀÓ¼­¹ö°¡ ÇØ´ç µµ¸ÞÀο¡ ´ëÇØ Authority¸¦ °®°í ÀÖÁö ¾ÊÀ¸¸ç, ij½¬¿¡¼­µµ ãÀ» ¼ö ¾øÀ» ¶§)À» ¶æÇÑ´Ù. 'cname=0'´Â 'www.openbsd.org'°¡ CNAMEÀ¸·Î ¼³Á¤µÇÁö ¾Ê¾ÒÀ½À» ¸»Çϴµ¥, ¹°·Ð Áö±Ý ´Ü°è¿¡¼­´Â BIND°¡ ÇØ´ç µµ¸ÞÀÎÀÇ CNAME ¼³Á¤¿©ºÎ¸¦ ¾Ë¾Æ³¾ ¼ö ¾øÁö¸¸, º» °ªÀÌ 0ÀÌ ¾Æ´Ò °æ¿ì¿¡´Â CNAMEÀÌ °¡¸£Å°´Â µµ¸ÞÀÎÀ» ´ë½Å ã´Â´Ù.

forw: forw -> [198.41.0.10].53 ds=23 nsid=19461 id=28375 5ms retry 4sec

ÀÚü lookup¿¡ ½ÇÆÐÇÏ¿´±â ¶§¹®¿¡ ´ÙÀ½ ´Ü°è·Î ÁúÀǸ¦ 'J.ROOT-SERVERS.NET(198.41.0.10:53)'À¸·Î Æ÷¿öµù ÇÑ´Ù.

datagram from [198.41.0.10].53, fd 21, len 449;
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19461
;; flags: qr; Ques: 1, Ans: 0, Auth: 12, Addit: 12
;; QUESTIONS:
;;      www.openbsd.org, type = A, class = IN

;; AUTHORITY RECORDS:
ORG.    518400  IN      NS      A.ROOT-SERVERS.NET.
ORG.    518400  IN      NS      I.ROOT-SERVERS.NET.
ORG.    518400  IN      NS      K.GTLD-SERVERS.NET.

;; ADDITIONAL RECORDS:
A.ROOT-SERVERS.NET.     3600000 IN      A       198.41.0.4
I.ROOT-SERVERS.NET.     3600000 IN      A       192.36.148.17
K.GTLD-SERVERS.NET.     518400  IN      A       195.8.99.11

'J.ROOT-SERVERS.NET'ÀÌ ¿äû¿¡ ´ëÇÑ ÀÀ´äÀ» º¸³»¾î ¿Ô´Ù. ÀÌó·³ ÀÀ´äÀÌ delegation¿¡ ´ëÇÑ ·¹ÆÛ·±½ÌÀÏ °æ¿ì °ü·Ã ³»¿ëÀÌ ¸ðµÎ Ãâ·ÂµÈ´Ù. °á°ú´Â ij½¬¿¡ ÀúÀåµÈ´Ù.

resp: nlookup(www.openbsd.org) qtype=1

ij½¬¿¡¼­ 'www.openbsd.org.'¸¦ ´Ù½Ã ã´Â´Ù.

resp: found 'www.openbsd.org' as 'org' (cname=0)
resp: forw -> [195.8.99.11].53 ds=23 nsid=19462 id=28375 1ms

¿Ïº®ÇÑ °á°ú´Â ¾Æ´ÏÁö¸¸, ORG ·¹º§¿¡¼­ À§ÀÓÁ¤º¸¸¦ ¹ß°ßÇÏ¿´±â ¶§¹®¿¡, 'K.GTLD-SERVERS.NET(195.8.99.11)'À¸·Î ÁúÀǸ¦ Æ÷¿öµù ÇÑ´Ù.

datagram from [195.8.99.11].53, fd 21, len 219;
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19462
;; flags: qr rd; Ques: 1, Ans: 0, Auth: 5, Addit: 3
;; QUESTIONS:
;;      www.openbsd.org, type = A, class = IN

;; AUTHORITY RECORDS:
OPENBSD.org.    172800  IN      NS      ZEUS.THEOS.COM.
OPENBSD.org.    172800  IN      NS      CVS.OPENBSD.org.
OPENBSD.org.    172800  IN      NS      NS.SIGMASOFT.COM.

;; ADDITIONAL RECORDS:
ZEUS.THEOS.COM.         172800  IN      A       199.185.137.1
CVS.OPENBSD.org.        172800  IN      A       199.185.137.3
NS.SIGMASOFT.COM.       172800  IN      A       209.249.129.35

'K.GTLD-SERVERS.NET'À¸·ÎºÎÅÍ À§ÀÓÁ¤º¸¿¡ ´ëÇÑ ·¹ÆÛ·±½Ì ÀÀ´äÀÌ µ¹¾Æ¿Ô´Ù.

resp: nlookup(www.openbsd.org) qtype=1
resp: found 'www.openbsd.org' as 'openbsd.org' (cname=0)

ij½¬¿¡¼­ 'www.openbsd.org.'¸¦ ã´Â °úÁ¤ Áß, 'openbsd.org.' ·¹º§ÀÇ À§ÀÓÀ» ¹ß°ßÇß´Ù.

resp: forw -> [199.185.137.3].53 ds=23 nsid=19467 id=28375 22ms
datagram from [199.185.137.3].53, fd 21, len 272;

'CVS.OPENBSD.ORG(199.185.137.3)'·Î ÁúÀǸ¦ Æ÷¿öµùÇÑ ÈÄ, ±â´ëÇÑ ÀÀ´ä(A)À» ¼ö½ÅÇÏ¿´´Ù. (µð¹ö±ë ·¹º§ 1¿¡¼­´Â À§ÀÓ Á¤º¸¸¸ÀÌ Ç¥½ÃµÇ±â ¶§¹®¿¡, °á°úÀÇ ³»¿ëÀ» º¸°íÀÚ ÇÒ °æ¿ì¿¡´Â ´õ ³ôÀº µð¹ö±ë ·¹º§À» Àû¿ëÇÏ¿©¾ß¸¸ ÇÑ´Ù)

send_msg -> [210.105.79.6].3442 (UDP 21) id=28375

¸¶Áö¸·À¸·Î °Ë»öµÈ °á°ú¸¦ Ŭ¶óÀ̾ðÆ®¿¡ ÀÀ´äÇÔÀ¸·Î½á, 28375 Äõ¸®¿¡ ´ëÇÑ Ã³¸®°¡ ¼º°øÀûÀ¸·Î ¸¶¹«¸®µÇ¾ú´Ù.


´ÙÀ½ ÀÌÀü Â÷·Ê