Вы находитесь на странице: 1из 24

14 1/1

DNS
This work is licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0
License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/3.0/ or send a
letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.

BIND

DHCP

NIS

/etc/hosts
/etc/networks
- 18/1

DNS

- Stub resolver dig, host


- /etc/nsswitch.conf

(c) 2007,

/etc/resolv.conf
search linux-traning.ru
nameserver 192.168.0.250
nameserver 192.168.0.251

DHCP-

(c) 2007,

DNS

IP-

IP-

DNS

(master, slave, caching-only,


forwarding)
(c) 2007,

BIND

Berkely Internet Name Daemon -


DNS RFC

DNS-

: 53(tcp,udp) 953(tcp,udp)

http://www.isc.org/sw/bind/

System V

/etc/init.d/named

SELinux

chroot- ( bind-chroot)
(c) 2007,

RPM-

bind

bind-utils

bind-chroot

caching-nameserver

(c) 2007,

/etc/named.conf

/var/named/*

/etc/rndc.key

/etc/sysconfig/named

(c) 2007,

chroot-

chroot-
/var/named/chroot/
/etc/sysconfig/named

ROOTDIR=/var/named/chroot

(c) 2007,

10

/etc/named.conf (1)

(ACL)

/* */, //, #

(c) 2007,

11

/etc/named.conf (2)
acl linux { 192.168.0.0/24; 192.168.1.2; };
options {
# listen-on port 53 { myaddresses; };
directory "/var/named";
allow-query { linux; };
allow-recursion { linux; };
allow-transfer { linux; };
blackhole { bogus; };
forwarders { 192.168.1.1 };
# forward only;
};
include "/etc/rndc.key";
controls {
(c) 2007,

inet 127.0.0.1 allow { localhost; } keys { rndckey; }; };

12

/etc/named.conf (3)
zone "localhost" {

zone "linux-training.ru" {

type master;

type master;

file "localhost.zone";

file "linux-training.ru.zone";

};

forwarders {};

zone "0.0.127.in-addr.arpa" {

};

type master;

zone "0.168.192.in-addr.arpa" {

file "127.0.0.zone";

type master;

};

file "192.168.0.zone";

zone "." {

forwarders {};

type hint;

};

file "named.ca";
};
(c) 2007,

13

caching-nameserver

named.caching-nameserver.conf

named.ca

(c) 2007,

14

ACL

none IP-

any

localhost IP-

localnets

(c) 2007,

15

Slave- /var/named/chroot/var/named/slaves/

Master- /var/named/chroot/var/named/

(c) 2007,

16

domain ttl class type rdata

SOA

NS

MX

PTR

CNAME

@
(c) 2007,

17

SOA
; Begin Start Of Authority resource record
example.com. IN SOA srv1.linux-training.ru. root.srv1.linux-training.ru. (
2007052200

; serial number

1H

; refresh slave

5M

; retry query

1W

; expire

1M

; negative TTL

(c) 2007,

18



NS

sub.linux-training.ru.

IN NS ns.sub.linux-training.ru.


,
A

ns.sub

IN A 192.168.2.250
(c) 2007,

19

named-checkconf -t /path/to/named.conf

named-checkzone origin /path/to/zonefile

(c) 2007,

20

rndc

(
)


localhost

(c) 2007,

21

dig

/etc/nsswitch.conf

dig +trace linux-training.ru

dig -x 192.168.0.250

dig -t mx linux-training.ru

dig -t soa linux-training.ru

(c) 2007,

22

DHCP-

Dynamic Host Configuration Protocol

System V

/etc/init.d/dhcpd

: 67,68 (udp)

/etc/dhcpd.conf

/var/lib/dhcpd/dhcpd.leases

/usr/share/doc/dhcp-*/dhcpd.conf.sample

service dhcpd configtest


(c) 2007,

23

DNS

(c) 2007,

24