/usr/share/doc/HOWTO/ja-html/DNS-HOWTO-3.html is in doc-linux-ja-html 2006.05.25-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
<TITLE>DNS HOWTO : $BL>A02r7h$H%-%c%C%7%e$r9T$&%M!<%`%5!<%P(B</TITLE>
<LINK HREF="DNS-HOWTO-4.html" REL=next>
<LINK HREF="DNS-HOWTO-2.html" REL=previous>
<LINK HREF="DNS-HOWTO.html#toc3" REL=contents>
</HEAD>
<BODY>
<A HREF="DNS-HOWTO-4.html">$B<!$N%Z!<%8(B</A>
<A HREF="DNS-HOWTO-2.html">$BA0$N%Z!<%8(B</A>
<A HREF="DNS-HOWTO.html#toc3">$BL\<!$X(B</A>
<HR>
<H2><A NAME="caching"></A> <A NAME="s3">3. $BL>A02r7h$H%-%c%C%7%e$r9T$&%M!<%`%5!<%P(B</A></H2>
<P><B>DNS $B@_Dj$N:G=i$N0lJb!#(B
$B%@%$%"%k%"%C%W!&%1!<%V%k%b%G%`!&(BADSL $B$J$I$N%f!<%6$K$O$H$F$bJXMx$G$9!#(B</B>
<P>Red Hat $B$d!"(BRed Hat $B$K4XO"$7$?%G%#%9%H%j%S%e!<%7%g%s$G$O!"(B
<CODE>bind</CODE> $B%Q%C%1!<%8!&(B<CODE>bind-utils</CODE> $B%Q%C%1!<%8!&(B
<CODE>caching-nameserver</CODE> $B%Q%C%1!<%8$r%$%s%9%H!<%k$9$k$@$1$G!"(B
$B$3$N(B HOWTO $B$N:G=i$N%;%/%7%g%s$N7k2L$HF1$8$b$N$,F@$i$l$^$9!#(B
Debian $B$r;H$C$F$$$k$J$i(B <CODE>bind</CODE> $B$H(B <CODE>bind-doc</CODE>
$B$r%$%s%9%H!<%k$9$k$@$1$G$9(B
($B$"$k$$$OA0<T$KBP$7$F$O(B <CODE>bind9</CODE>$B!#(B
$B$3$NJ8=q$N<9I.;~$G$O!"(BDebian $B$N0BDjHG(B (potato)
$B$O(B BIND 9 $B$r%5%]!<%H$7$F$$$^$;$s(B)$B!#(B
$B$b$A$m$s$3$l$i$N%Q%C%1!<%8$r%$%s%9%H!<%k$9$k$@$1$G$O!"(B
$B$3$N(B HOWTO $B$rFI$`$3$H$K$h$C$FF@$i$l$kCN<1$O<j$KF~$j$^$;$s!#(B
$B$G$9$N$G!"$^$:%Q%C%1!<%8$r%$%s%9%H!<%k$7!"(B
$B$=$3$G%$%s%9%H!<%k$5$l$?%U%!%$%k$rD4$Y$J$,$i!"(B
$BFI$_?J$s$G$$$/$N$,NI$$$G$7$g$&!#(B
<P>
<P>$B%-%c%C%7%e@lMQ$N%M!<%`%5!<%P$H$O!"L>A00z$-$N7k2L$r5-21$7$F$*$-!"(B
$B<!2s$NLd$$9g$o$;$N;~$K$=$N5-21$r;H$C$FEz$($k$b$N$G$9!#(B
$B<!2s$+$i$NLd$$9g$o$;$KBP$9$k1~Ez$O(B ($BFC$KCY$$2s@~$r;H$C$F$$$k>l9g$K$O(B)
$B$H$F$bB.$/$J$j$^$9!#(B
<P>
<P>$B$^$::G=i$K(B <CODE>/etc/named.conf</CODE> $B$H$$$&%U%!%$%k$,I,MW$G$9(B
(Debian $B$G$O(B <CODE>/etc/bind/named.conf</CODE>)$B!#(B
named $B$O5/F0$9$k$H$^$:$3$N%U%!%$%k$rFI$_9~$_$^$9!#(B
$B8=:_$N$H$3$m$O!"<!$N$h$&$J4JC1$J$b$N$G$h$$$G$7$g$&!#(B
<P>
<HR>
<PRE>
// Config file for caching only name server
//
// The version of the HOWTO you read may contain leading spaces
// (spaces in front of the characters on these lines ) in this and
// other files. You must remove them for things to work.
//
// Note that the filenames and directory names may differ, the
// ultimate contents of should be quite similar though.
options {
directory "/var/named";
// Uncommenting this might help if you have to go through a
// firewall and things are not working out. But you probably
// need to talk to your firewall admin.
// query-source port 53;
};
controls {
inet 127.0.0.1 allow { localhost; } keys { rndc_key; };
};
key "rndc_key" {
algorithm hmac-md5;
secret "c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
};
zone "." {
type hint;
file "root.hints";
};
zone "0.0.127.in-addr.arpa" {
type master;
file "pz/127.0.0";
};
</PRE>
<HR>
<P>
<P>Linux $B%G%#%9%H%j%S%e!<%7%g%s$N%Q%C%1!<%8$G$O!"(B
$B$3$3$G>R2p$9$k$=$l$>$l$N%U%!%$%k$K!"JL$NL>A0$r$D$1$F$$$k$+$b$7$l$^$;$s!#(B
$B$G$bFbMF$OF1$8$O$:$G$9!#(B
<P>
<P><CODE>directory</CODE> $B$N9T$O!"(B named $B$,;2>H$9$k%U%!%$%k$NCV$->l=j$r(B
$B;XDj$9$k$b$N$G$9!#$3$l0J9_$N$9$Y$F$N%U%!%$%kL>$O$3$3$+$i$NAjBP%Q%9$H$J$j$^$9!#(B
$B$9$J$o$A%G%#%l%/%H%j(B <CODE>pz</CODE> $B$O(B <CODE>/var/named</CODE> $B0J2<$K$"$j!"(B
$B%U%k%Q%9$GI=5-$9$l$P(B <CODE>/var/named/pz</CODE> $B$H$$$&$3$H$K$J$j$^$9!#(B
<CODE>/var/named</CODE> $B$O(B <EM>Linux Filesystem Standard</EM>
$B$K=`5r$7$?@5$7$$%G%#%l%/%H%jL>$G$9!#(B
<P>
<P><CODE>/var/named/root.hints</CODE> $B$H$$$&%U%!%$%k$NL>A0$O(B
$B$3$3$GIU$1$i$l$F$$$^$9!#(B
$B$3$N%U%!%$%k$NCf?H$O<!$N$h$&$K$J$j$^$9!#(B
<HR>
<PRE>
;
; There might be opening comments here if you already have this file.
; If not don't worry.
;
; About any leading spaces in front of the lines here: remove them!
; Lines should start in a ;, . or character, not blanks.
;
; $B$9$G$K$3$N%U%!%$%k$,$"$C$?>l9g$O!"$3$3$K3+;O%3%a%s%H$,$"$k$+$b(B
; $B$7$l$^$;$s!#$J$/$F$bLdBj$O$"$j$^$;$s!#(B
;
; $B9TF,$K6uGrJ8;z$,$"$C$?>l9g$O!":o=|$7$F$/$@$5$$(B! $B3F9T$O(B ;$B!"(B.
; $B$^$?$OJ8;z$G;O$^$j$^$9!#6uGr$G;O$^$k$3$H$O$"$j$^$;$s!#(B
;
. 6D IN NS A.ROOT-SERVERS.NET.
. 6D IN NS B.ROOT-SERVERS.NET.
. 6D IN NS C.ROOT-SERVERS.NET.
. 6D IN NS D.ROOT-SERVERS.NET.
. 6D IN NS E.ROOT-SERVERS.NET.
. 6D IN NS F.ROOT-SERVERS.NET.
. 6D IN NS G.ROOT-SERVERS.NET.
. 6D IN NS H.ROOT-SERVERS.NET.
. 6D IN NS I.ROOT-SERVERS.NET.
. 6D IN NS J.ROOT-SERVERS.NET.
. 6D IN NS K.ROOT-SERVERS.NET.
. 6D IN NS L.ROOT-SERVERS.NET.
. 6D IN NS M.ROOT-SERVERS.NET.
A.ROOT-SERVERS.NET. 6D IN A 198.41.0.4
B.ROOT-SERVERS.NET. 6D IN A 128.9.0.107
C.ROOT-SERVERS.NET. 6D IN A 192.33.4.12
D.ROOT-SERVERS.NET. 6D IN A 128.8.10.90
E.ROOT-SERVERS.NET. 6D IN A 192.203.230.10
F.ROOT-SERVERS.NET. 6D IN A 192.5.5.241
G.ROOT-SERVERS.NET. 6D IN A 192.112.36.4
H.ROOT-SERVERS.NET. 6D IN A 128.63.2.53
I.ROOT-SERVERS.NET. 6D IN A 192.36.148.17
J.ROOT-SERVERS.NET. 6D IN A 198.41.0.10
K.ROOT-SERVERS.NET. 6D IN A 193.0.14.129
L.ROOT-SERVERS.NET. 6D IN A 198.32.64.12
M.ROOT-SERVERS.NET. 6D IN A 202.12.27.33
</PRE>
<HR>
<P>
<P>$B$3$N%U%!%$%k$K$O@$3&Cf$N%k!<%H%M!<%`%5!<%P$r5-=R$7$^$9!#(B
$B$3$l$O;~4V$H$H$b$KJQ2=$7$F$$$/$N$G!"(B
$B$H$-$I$-99?7$9$kI,MW$,$"$j$^$9!#99?7$NJ}K!$O(B
<A HREF="DNS-HOWTO-8.html#maint">$B%a%s%F%J%s%9(B</A>
$B$N>O$r8+$F$/$@$5$$!#(B
<P>
<P><CODE>named.conf</CODE> $B$NKvHx$NJ}$K$O(B <CODE>zone</CODE> $B%;%/%7%g%s$,$"$j$^$9!#(B
$B$3$NMxMQK!$K$D$$$F$O8e$N>O$G=R$Y$k$D$b$j$G$9$N$G!":#$N$H$3$m$O(B
$B0J2<$N$h$&$JFbMF$N%U%!%$%k$r(B <CODE>pz</CODE> $B%5%V%G%#%l%/%H%j$K(B
<CODE>127.0.0</CODE> $B$H$$$&L>A0$G:n$C$F$*$$$F$/$@$5$$!#(B
(<EM>$B$3$3$G$b%+%C%H%"%s%I%Z!<%9%H$9$k$H$-$K$O(B
$B@hF,$N%9%Z!<%9$r<h$j=|$/$h$&$K$7$F$/$@$5$$(B</EM>)
<P>
<HR>
<PRE>
$TTL 3D
@ IN SOA ns.linux.bogus. hostmaster.linux.bogus. (
1 ; Serial
8H ; Refresh
2H ; Retry
4W ; Expire
1D) ; Minimum TTL
NS ns.linux.bogus.
1 PTR localhost.
</PRE>
<HR>
<P>
<P><CODE>key</CODE> $B$d(B <CODE>control</CODE> $B$H$$$C$?L>A0$,$D$$$?%;%/%7%g%s$O!"(B
$B$3$NFs$D$G$b$C$F!"(B
$B$3$N(B named $B$,%j%b!<%H$+$i@)8f$G$-$k$3$H$r;XDj$7$F$$$^$9(B
(<CODE>rndc</CODE> $B$H$$$&%W%m%0%i%`$,MQ$$$i$l$^$9(B)$B!#(B
$B$3$3$G$O%m!<%+%k%[%9%H$+$i$N@\B3$G$J$1$l$P$J$i$:!"(B
$B%(%s%3!<%I$5$l$?HkL)80$G$NG'>Z$,I,MW$K$J$j$^$9!#(B
$B$3$N80$O%Q%9%o!<%I$N$h$&$J$b$N$G$9!#(B
rndc $B$,5!G=$9$k$K$O!"$3$N80$K%^%C%A$9$k(B <CODE>/etc/rndc.conf</CODE>
$B$,I,MW$K$J$j$^$9!#(B
<P>
<HR>
<PRE>
key rndc_key {
algorithm "hmac-md5";
secret "c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
};
options {
default-server localhost;
default-key rndc_key;
};
</PRE>
<HR>
<P>
<P>$B8+$F$o$+$k$h$&$K!"(Bsecret $B$N;XDj$OF10l$G$9!#(B
<CODE>rndc</CODE> $B$rB>$N%^%7%s$+$i;H$&>l9g$O!"(B
$B$=$l$i$N;~7W$O(B 5 $BJ,0JFb$K2q$C$F$$$J$1$l$P$J$j$^$;$s!#(B
$B$3$NL\E*$K$O(B ntp (<CODE>xntpd</CODE> $B$d(B <CODE>ntpdate</CODE>)
$B%=%U%H%&%'%"$rMQ$$$k$3$H$r$*$9$9$a$7$^$9!#(B
<P>
<P>$B<!$K!"0J2<$N$h$&$JFbMF$N(B <CODE>/etc/resolv.conf</CODE>$B$,I,MW$G$9!#(B
(<EM>$BF1$8$/6uGr$r<h$j=|$/$3$H(B!</EM>)
<P>
<HR>
<PRE>
search subdomain.your-domain.edu your-domain.edu
nameserver 127.0.0.1
</PRE>
<HR>
<P>
<P>`<CODE>search</CODE>' $B$G;O$^$C$F$$$k9T$O!"(B
$BLd$$9g$o$;$5$l$?%[%9%H$rC5$9%I%a%$%s$N;XDj$G$9!#(B`<CODE>nameserver</CODE>'
$B$G;O$^$k9T$O!"%M!<%`%5!<%P$N%"%I%l%9;XDj$G$9!#(B
$B:#$O<+J,$N%^%7%s$G%M!<%`%5!<%P$rF0$+$9$N$G!"%m!<%+%k%[%9%H$r;XDj$7$^$9!#(B
($BCm(B: named $B$O$3$N%U%!%$%k$r;2>H$7$^$;$s!#;2>H$9$k$N$O%l%>%k%P$G$9!#(B
$BCm(B2: resolv.conf $B%U%!%$%k(Bi$B$K$O(B "domain" $B$H=q$+$l$?9T$,$"$k$+$b$7$l$^$;$s!#(B
$B$"$C$F$bLdBj$"$j$^$;$s$,!"(B
"search" $B$H(B "domain" $B$NN>J}$rF1;~$K$OMQ$$$J$$$h$&$K$7$F$/$@$5$$!#(B
$B$I$A$i$+$7$+8zNO$r;}$A$^$;$s!#(B)
<P>
<P>$B$3$N%U%!%$%k$N0UL#$r@bL@$7$^$7$g$&!#%/%i%$%"%s%H$,(B <CODE>foo</CODE>
$B$NL>A00z$-$r9T$&$H!"$^$::G=i$K(B <CODE>foo.subdomain.your-domain.edu</CODE>
$B$rD4$Y!"<!$K(B <CODE>foo.your-domain.edu</CODE> $B$r;n$7!":G8e$K(B <CODE>foo</CODE>
$B$rD4$Y$^$9!#(Bsearch $B9T$K$"$^$jB?$/$N%I%a%$%s$r=q$/$H!"(B
$B$9$Y$F$rD4$Y$k$N$K;~4V$,$+$+$k$h$&$K$J$k$N$G!"(B
$B$[$I$[$I$K$7$F$*$/$N$,NI$$$G$7$g$&!#(B
<P>
<P>$B$3$NNc$G$O$"$J$?$N%^%7%s$,(B <CODE>subdomain.your-domain.edu</CODE>
$B$K$"$k$H$7$F$$$^$9$N$G!"$"$J$?$N%^%7%s$NL>A0$O$*$=$i$/(B
<CODE>your-machine.subdomain.your-domain.edu</CODE> $B$H$J$C$F$$$k$G$7$g$&!#(B
$B$J$*(B search $B9T$K$O$"$J$?$N(B TLD (Top Level Domain, $B$3$N>l9g$O(B `<CODE>edu</CODE>')
$B$r4^$a$k$Y$-$G$O$"$j$^$;$s!#IQHK$K@\B3$9$k$h$&$JFCDj$N%I%a%$%s(B
$B$,$"$l$P!"0J2<$N$h$&$K(B search $B9T$K$=$N%I%a%$%s$r2C$($F$b$$$$$G$7$g$&!#(B
(<EM>$B@hF,$K%9%Z!<%9$,$"$C$?$i<h$j5n$k$N$rK:$l$J$$$h$&$K!#(B</EM>)
<P>
<HR>
<PRE>
search subdomain.your-domain.edu your-domain.edu other-domain.com
</PRE>
<HR>
<P>$B$b$A$m$s<B:]$K$OK\Ev$N%I%a%$%sL>$r=q$/I,MW$,$"$j$^$9!#(B
$B%I%a%$%sL>$N:G8e$K$O%T%j%*%I$r=q$+$J$$$3$H$KCm0U$7$F$/$@$5$$!#(B
$B$3$l$O=EMW$J%]%$%s%H$G$9!#(B
$B%I%a%$%sL>$N:G8e$K$O%T%j%*%I$r=q$+$J$$$3$H$KCm0U$7$F$/$@$5$$!#(B
<P>
<H2><A NAME="starting"></A> <A NAME="ss3.1">3.1 named $B$r5/F0$9$k(B</A>
</H2>
<P>$B$3$l$i$N=`Hw$,$9$s$@$i(B named $B$rN)$A>e$2$^$7$g$&!#(B
$B%@%$%"%k%"%C%W@\B3$r$7$F$$$k?M$O!"$^$:@h$K@\B3$7$F$/$@$5$$!#(B
$B$G$O(B named $B$r5/F0$7$^$9!#(B
$B%V!<%H%9%/%j%W%H$+$i5/F0$9$k>l9g$O(B <CODE>/etc/init.d/named start</CODE>$B!"(B
named $B$rD>@\5/F0$9$k>l9g$O(B <CODE>/usr/sbin/named</CODE> $B$H$7$^$9!#(B
$B0JA0$NHG$N(B BIND $B$G;w$?$h$&$J$3$H$r9T$C$?$H$-$O!"(B
$B$*$=$i$/(B <CODE>ndc</CODE> $B$r;H$C$?$3$H$H;W$$$^$9!#(B
BIND 9 $B$G$O!"$3$l$O(B <CODE>rndc</CODE> $B$KJQ$o$j$^$7$?!#(B
<CODE>rndc</CODE> $B$O(B named $B$r%j%b!<%H$+$i@)8f$G$-$^$9$,!"(B
named $B$r5/F0$9$k$3$H$O$G$-$^$;$s!#(B
named $B$rF0$+$7$F$$$k:GCf$K(B syslog $B$N%a%C%;!<%8%U%!%$%k(B
($BIaDL$O(B <CODE>/var/adm/messages</CODE> $B$G$9$,!"(B
Debian $B$G$O(B <CODE>/var/log/daemin</CODE> $B$G$9$7!"(B
$B%G%#%l%/%H%j$,(B <CODE>/var/log</CODE> $B$@$C$?$j!"(B
$B%U%!%$%kL>$,JL$@$C$?$j$9$k$+$b$7$l$^$;$s(B)
$B$r8+$k$H(B (<CODE>tail -f /var/adm/messages</CODE> $B$H$7$^$9(B)$B!"(B
$B0J2<$N$h$&$J=PNO$,I=<($5$l$k$O$:$G$9(B:
<P>
<P>($B9TKv$,(B \ $B$N9T$O<!$N9T$KB3$-$^$9(B)
<P>
<BLOCKQUOTE><CODE>
<PRE>
Dec 23 02:21:12 lookfar named[11031]: starting BIND 9.1.3
Dec 23 02:21:12 lookfar named[11031]: using 1 CPU
Dec 23 02:21:12 lookfar named[11034]: loading configuration from \
'/etc/named.conf'
Dec 23 02:21:12 lookfar named[11034]: the default for the \
'auth-nxdomain' option is now 'no'
Dec 23 02:21:12 lookfar named[11034]: no IPv6 interfaces found
Dec 23 02:21:12 lookfar named[11034]: listening on IPv4 interface lo, \
127.0.0.1#53
Dec 23 02:21:12 lookfar named[11034]: listening on IPv4 interface eth0, \
10.0.0.129#53
Dec 23 02:21:12 lookfar named[11034]: command channel listening on \
127.0.0.1#953
Dec 23 02:21:13 lookfar named[11034]: running
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>$B%(%i!<%a%C%;!<%8$,$"$C$?>l9g$O!"2?$+4V0c$($F$$$k$N$G$7$g$&!#(B
named $B$OFI$s$G$$$k$=$N%U%!%$%k$rL>;X$7$7$F$/$l$k$O$:$G$9!#(B
$BLa$C$F%U%!%$%k$r%A%'%C%/$7$F$/$@$5$$!#(B
$B=$@5$,=*$o$C$?$i:FEY(B named $B$r5/F0$7$F$/$@$5$$!#(B
<P>
<P>$B$5$F!"$3$3$^$G9T$C$F$-$?@_Dj$r;n$7$F$_$^$7$g$&!#(B
$B$3$l$^$G$O(B <CODE>nslookup</CODE> $B$,%F%9%H$N$?$a$N%W%m%0%i%`$G$7$?!#(B
$B:G6a$G$O(B <CODE>dig</CODE> $B$,?d>)$5$l$F$$$^$9!#(B
<P>
<BLOCKQUOTE><CODE>
<PRE>
$ dig -x 127.0.0.1
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26669
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;1.0.0.127.in-addr.arpa. IN PTR
;; ANSWER SECTION:
1.0.0.127.in-addr.arpa. 259200 IN PTR localhost.
;; AUTHORITY SECTION:
0.0.127.in-addr.arpa. 259200 IN NS ns.linux.bogus.
;; Query time: 3 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Dec 23 02:26:17 2001
;; MSG SIZE rcvd: 91
</PRE>
</CODE></BLOCKQUOTE>
<P>$B$HI=<($5$l$l$P!"$&$^$/F0$$$F$$$k$O$:$G$9!#$3$&$J$k$H$$$$$G$9$M!#(B
$BHs>o$K0[$J$C$?I=<($,=P$?$i!"$d$jD>$7!"A4It:F%A%'%C%/$G$9!#(B
<CODE>named.conf</CODE> $B$rJQ99$7$?$i!"(B
$B$=$N$?$S$K(B <CODE>rndc reload</CODE> $B%3%^%s%I$r<B9T$9$kI,MW$,$"$j$^$9!#(B
<P>
<P>$B$G$OLd$$9g$o$;$r$7$F$_$^$7$g$&!#(B
$B$"$J$?$N6a$/$K$"$k%^%7%s$NL>A0$r0z$$$F$_$^$7$g$&!#(B
$B;d$N6a$/(B (Oslo $BBg3X(B) $B$K$O(B pat.uio.no$B$H$$$&%^%7%s$,$"$j$^$9!#(B
<P>
<BLOCKQUOTE><CODE>
<PRE>
$ dig pat.uio.no
; <<>> DiG 9.1.3 <<>> pat.uio.no
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15574
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 0
;; QUESTION SECTION:
;pat.uio.no. IN A
;; ANSWER SECTION:
pat.uio.no. 86400 IN A 129.240.130.16
;; AUTHORITY SECTION:
uio.no. 86400 IN NS nissen.uio.no.
uio.no. 86400 IN NS nn.uninett.no.
uio.no. 86400 IN NS ifi.uio.no.
;; Query time: 651 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Dec 23 02:28:35 2001
;; MSG SIZE rcvd: 108
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>$B:#EY$O!"(B<CODE>dig</CODE> $B$O$"$J$?$N%^%7%s$GF0$$$F$$$k(B named $B$K(B
<CODE>pat.uio.no</CODE> $B$rC5$9$h$&0MMj$7$^$9!#$9$k$H(B named $B$O(B
<CODE>root.hints</CODE> $B%U%!%$%k$K=q$+$l$F$$$k%M!<%`%5!<%P$N0l$D$K(B
$B@\B3$7$F!"Ld$$9g$o$;$r$7$^$9!#(B
<CODE>/etc/resolv.conf</CODE> $B$K=q$+$l$F$$$k%I%a%$%s$9$Y$F$K$D$$$F(B
$BD4$Y$kI,MW$,$"$k$+$b$7$l$J$$$N$G!"7k2L$,F@$i$l$k$^$G$K(B
$B>/!9;~4V$,$+$+$k$3$H$,$"$j$^$9!#(B
<P>
<P>
<P>$B$3$3$G$b$&0lEYF1$8Ld$$9g$o$;$r9T$&$H!"(B
$B<!$N$h$&$J7k2L$K$J$k$G$7$g$&!#(B
<P>
<BLOCKQUOTE><CODE>
<PRE>
$ dig pat.uio.no
; <<>> DiG 8.2 <<>> pat.uio.no
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 3
;; QUERY SECTION:
;; pat.uio.no, type = A, class = IN
;; ANSWER SECTION:
pat.uio.no. 23h59m58s IN A 129.240.130.16
;; AUTHORITY SECTION:
UIO.NO. 23h59m58s IN NS nissen.UIO.NO.
UIO.NO. 23h59m58s IN NS ifi.UIO.NO.
UIO.NO. 23h59m58s IN NS nn.uninett.NO.
;; ADDITIONAL SECTION:
nissen.UIO.NO. 23h59m58s IN A 129.240.2.3
ifi.UIO.NO. 1d23h59m58s IN A 129.240.64.2
nn.uninett.NO. 1d23h59m58s IN A 158.38.0.181
;; Total query time: 4 msec
;; FROM: lookfar to SERVER: default -- 127.0.0.1
;; WHEN: Sat Dec 16 00:23:09 2000
;; MSG SIZE sent: 28 rcvd: 162
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>
<P>$B$3$s$I$O$:$C$HB.$+$C$?$3$H$,$O$C$-$j$o$+$k$G$7$g$&!#(B
$BA0$O(B 0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