290 likes | 325 Views
D omain N ame S ystem. Introduction nslookup B erkeley I nternet N ame D omain Host DNS Configuration Maintenance Experiment. Introduction. History HOSTS.TXT Traffic & Load Conflict Consistency DNS. Introduction. Domain Name Space Domain Top-level Domain
E N D
Domain Name System Introduction nslookup Berkeley Internet Name Domain Host DNS Configuration Maintenance Experiment
Introduction • History • HOSTS.TXT • Traffic & Load • Conflict • Consistency • DNS
Introduction • Domain Name Space • Domain • Top-level Domain • com, edu, gov, mil, net, org, int • Delegation • Forward / Reverse • winnie.corp.hp.com • 15.16.192.152
Introduction • Name Server • Zone • Primary/Secondary, Master/Slave
Introduction • Name Resolution • Resolver • Root Name Server • Recursive • Iterative • Caching • Time to Live (TTL)
Introduction • Recursive
Introduction • Iterative
Introduction • Caching
[Non]Interactive Option nslookup
[Non]Authoritative Change Query Server nslookup
Zone Transfer nslookup
BIND • db Files • Resource Record • Comments • SOA • NS • A • PTR • CNAME • TXT • RP
BIND • SOA • Name Server Host, Admin. E-mail • Serial (YYMMDDNN) • Refresh Time (24 hrs.) • Retry Time (2 hrs.) • Expire Time (30 days) • Min. TTL Time (4 days)
BIND • Alias • Address Sorting • Rotated • CNAME (Canonical Name)
BIND • Root Cache Data • named.boot in BIND-4.9
BIND • named.conf in BIND-8.x
BIND • Abbreviation • Appending Domains • @ • Repeat • tab, space
BIND • Startup named • /etc/namedb • named.boot • db files • Root cache • /usr/sbin/named -b bootfile • Test • nslookup
BIND • Secondary • named.boot in BIND-4.9
BIND • named.conf in BIND-8.x
BIND • DNS vs. E-mail • MX Resource Record • Mail Exchanger • Capacity • Working time • Connectivity • Control & Administration • 0~65535
Host DNS Configuration • Resolver • Default Domain • Search List • Name Server • Unix • Solaris: /etc/resolv.conf, /etc/nsswitch.conf • FreeBSD: /etc/resolv.conf, /etc/host.conf • Windows 95/98/NT
Host DNS Configuration # $Id: host.conf,v 1.2 1993/11/07 01:02:57 wollman Exp $ # If that doesn't work, then try the /etc/hosts file hosts # Default is to use the nameserver first bind # If you have YP/NIS configured, uncomment the next line # nis # /etc/resolv.conf domain ee.ncku.edu.tw nameserver 140.116.72.14 nameserver 140.116.2.6 search ncku.edu.tw ee.ncku.edu.tw # # /etc/nsswitch.files: # # An example file that could be copied over to /etc/nsswitch.conf; it # does not use any naming service. # # "hosts:" and "services:" in this file are used only if the # /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports. passwd: files group: files hosts: files dns networks: files
Maintenance • Signals • HUP • Restart and re-reading database and boot file. • INT • Dump database to /usr/tmp/named_dump.db • ABRT/IOT • Add statistics into /usr/tmp/named.stats • USR1/USR2 • Enable/disable debug information in /usr/tmp/named.run
Maintenance • db Files • SOA • Root Cache • Multiple Directories and Domain • directory in boot file • $ORIGIN, $INCLUDE in db files • Syslog • /var/adm/messages, /var/log/messages
Experiment • Primary • ~/namedb • ./named.boot • ./named.ca • ./nii60.host • ./rev.60 • ./rev.localhost • /usr/sbin/in.named -b bootfile -p 53/4260
Experiment • Secondary • ~/namedb2 • ./named.boot • ./named.ca • ./rev.localhost • /usr/sbin/in.named -b bootfile -p 53/5260
Experiment • nslookup > set qt=ptr > 192.168.60.2 Server: eesol04.ee.ncku.edu.tw Address: 140.116.49.14 Non-authoritative answer: 2.60.168.192.in-addr.arpa name = earth.nii60.edu.tw > eesol04:/user1/staff/andrew/namedb>nslookup Default Server: eebsd.ee.ncku.edu.tw Address: 140.116.49.1 > server 140.116.49.14 Default Server: eesol04.ee.ncku.edu.tw Address: 140.116.49.14 > set port=4260 > earth.nii60.edu.tw Server: eesol04.ee.ncku.edu.tw Address: 140.116.49.14 Non-authoritative answer: Name: earth.nii60.edu.tw Address: 192.168.60.2