System and Network Administration
lecture
in color
Naming
What's in a name? (TCP/IP Chapter 3)
- IP (unlike other networking protocols) uses NUMBERS ONLY.
- Names provided for convenience.
- Names form a SEPARATE SPACE of options from numbers.
Translating names:
- /etc/hosts (LOCALLY VALID list of names)
- Network Information Service (/etc/hosts for a local network)
- maintains and broadcasts several system tables.
- UNIX-specific
- works on almost all UNIX's.
- distributes /etc/passwd in a frightfully insecure manner.
- NIS+ (/etc/hosts for an enterprise of hosts).
- maintains and broadcasts several system tables.
- UNIX-specific
- barely works on Suns, and it was created for them.
- BIND (/etc/hosts for the internet)
- just naming information
- NOT unix-specific.
Berkeley Internet Name Domain (BIND): (TCP/IP Chapter 8)
A.K.A. Domain Name Service (DNS)
- Hierarchical
- specific to task of translating names
- scalable
Hierarchy of names:
- root domain, root servers: top level of name service
- top level domains:
- org: US non-profit
- edu: US educational
- gov: US government
- com: US commercial (for-profit)
- mil: US military organizations.
- net: US network support organizations.
- geographical top level domains:
- fi: finland
- sg: singapore
- de: Germany. (Deutschland)
- ch: SWITZERLAND(!)
- CAVEAT: international abbreviations are in the
LANGUAGE OF THE COUNTRY
Hierarchical organization and delegation:
Bind parts:
- libresolve: the name resolution LIBRARY.
- compiled into (or dynamically linked into) all programs using names.
- queries nameservers as described in /etc/resolv.conf
- /usr/lib/libresolv.a or -lresolv
- /etc/resolv.conf: configuration file.
- /usr/sbin/named: name service daemon.
Controlling bind
named: the name service daemon
- UNIX process.
- daemon: a process that runs all the time in the background.
- responds to requests on udp port 42
- returns either information or a pointer to a server
with more information.
- different kinds of named service:
- primary: authoritative source for a domain.
- secondary: a backup source slaved to a primary.
- cacheing-only: only queries remote servers and remembers the answer.
named files:
Name service records:
- SOA: start of authority
- NS: name server
- A: name to address
- PTR: address to name
- MX: mail exchanger
- CNAME: canonical name (alias)
- HINFO: host information.
- WKS: well known service.
References:
- largo:/var/named/eecs-tufts.zone:
- largo:/var/named/130.64.23.reverse
- largo:/var/named/130.64.24.reverse
Naming caveats
- naming service serves not only name to IP, but
also other identifying info.
- Mail exchangers.
- Authority for domain.
- Machine type.
- Geographical location.
- Marvelous hack: Realtime blackhole list (anti-spam)
Example files
OOPS!
- I just put my whole nameservice records on the web!
- This is dumb!
- Reason: hackers can use this information to get information
on my machines!
nslookup
contents of names-old/nslookup.txt...
conbrio{couch}386: /usr/sbin/nslookup
Default Server: Largo.EECS.Tufts.EDU
Address: 130.64.23.33
> andante
Server: Largo.EECS.Tufts.EDU
Address: 130.64.23.33
Name: andante.eecs.tufts.edu
Address: 130.64.23.37
> ftp.uu.net
Server: Largo.EECS.Tufts.EDU
Address: 130.64.23.33
Non-authoritative answer:
Name: ftp.uu.net
Address: 192.48.96.9
> set type=ptr
> 5.5.64.130.in-addr.arpa.
Server: Largo.EECS.Tufts.EDU
Address: 130.64.23.33
5.5.64.130.in-addr.arpa name = fat.net.tufts.edu
64.130.IN-ADDR.ARPA nameserver = ns1.tufts.edu
64.130.IN-ADDR.ARPA nameserver = ns2.tufts.edu
64.130.IN-ADDR.ARPA nameserver = ns1.highwire.org
64.130.IN-ADDR.ARPA nameserver = ns2.highwire.org
ns1.tufts.edu internet address = 130.64.1.1
ns2.tufts.edu internet address = 130.64.5.1
...end of names-old/nslookup.txt
dig
contents of names-old/dig.txt...
conbrio{couch}389: dig andante
; <<>> DiG 2.0 <<>> andante
;; ->>HEADER<<- opcode: QUERY , status: NXDOMAIN, id: 6
;; flags: qr rd ra ; Ques: 1, Ans: 0, Auth: 1, Addit: 0
;; QUESTIONS:
;; andante, type = A, class = IN
;; AUTHORITY RECORDS:
. 10699 SOA A.ROOT-SERVERS.NET. hostmaster.internic.NET. (
2000021500 ;serial
1800 ;refresh
900 ;retry
604800 ;expire
86400 ) ;minim
;; Sent 1 pkts, answer found in time: 0 msec
;; FROM: conbrio to SERVER: default -- 130.64.23.33
;; WHEN: Tue Feb 15 16:54:27 2000
;; MSG SIZE sent: 25 rcvd: 98
conbrio{couch}391: dig ftp.uu.net
; <<>> DiG 2.0 <<>> ftp.uu.net
;; ->>HEADER<<- opcode: QUERY , status: NOERROR, id: 6
;; flags: qr rd ra ; Ques: 1, Ans: 1, Auth: 2, Addit: 2
;; QUESTIONS:
;; ftp.uu.net, type = A, class = IN
;; ANSWERS:
ftp.uu.net. 3301 A 192.48.96.9
;; AUTHORITY RECORDS:
UU.NET. 97761 NS AUTH00.NS.UU.NET.
UU.NET. 97761 NS AUTH60.NS.UU.NET.
;; ADDITIONAL RECORDS:
AUTH00.NS.UU.NET. 96966 A 198.6.1.65
AUTH60.NS.UU.NET. 96966 A 198.6.1.181
;; Sent 1 pkts, answer found in time: 0 msec
;; FROM: conbrio to SERVER: default -- 130.64.23.33
;; WHEN: Tue Feb 15 16:54:49 2000
;; MSG SIZE sent: 28 rcvd: 127
conbrio{couch}404: dig 33.23.64.130.in-addr.arpa. ptr
; <<>> DiG 2.0 <<>> 33.23.64.130.in-addr.arpa. ptr
;; ->>HEADER<<- opcode: QUERY , status: NOERROR, id: 6
;; flags: qr aa rd ra ; Ques: 1, Ans: 1, Auth: 5, Addit: 5
;; QUESTIONS:
;; 33.23.64.130.in-addr.arpa, type = PTR, class = IN
;; ANSWERS:
33.23.64.130.in-addr.arpa. 86400 PTR Largo.EECS.Tufts.EDU.
;; AUTHORITY RECORDS:
23.64.130.IN-ADDR.ARPA. 86400 NS Largo.EECS.Tufts.EDU.
23.64.130.IN-ADDR.ARPA. 86400 NS Ns1.Tufts.EDU.
23.64.130.IN-ADDR.ARPA. 86400 NS Ns2.Tufts.EDU.
23.64.130.IN-ADDR.ARPA. 86400 NS Ns1.Highwire.ORG.
23.64.130.IN-ADDR.ARPA. 86400 NS Ns2.Highwire.ORG.
;; ADDITIONAL RECORDS:
Largo.EECS.Tufts.EDU. 86400 A 130.64.23.33
Ns1.Tufts.EDU. 8466 A 130.64.1.1
Ns2.Tufts.EDU. 8547 A 130.64.5.1
Ns1.Highwire.ORG. 118013 A 171.64.249.100
Ns2.Highwire.ORG. 118013 A 171.64.249.110
;; Sent 1 pkts, answer found in time: 1 msec
;; FROM: conbrio to SERVER: default -- 130.64.23.33
;; WHEN: Tue Feb 15 16:57:35 2000
;; MSG SIZE sent: 43 rcvd: 277
...end of names-old/dig.txt
Network Debugging
- Three levels of networking.
- MAC/ARP
- IP/RIP
- DNS (domain name service)
- You never know which has failed.
- Start from the top down or bottom up
(depending upon circumstances).
- Move up or down as appropriate.
Debugging ARP
- operative commands
- procedure: bottom up
- Are we connected?
- Can we ping a host connected to the same hub?
- Can we ping a host connected to the same switch?
Debugging Routes
- operative commands:
-
traceroute <address>
-
netstat -rn
- Procedure: bottom up
- Can we ping our gateway?
- Can we ping another interface on our gateway?
- Can we ping the next hop after our gateway?
- Can we
traceroute to the desired host?
Debugging names
- operative commands:
-
/usr/sbin/nslookup
-
/local/bin/dig
- Procedure: bottom-up
- Does our own nameserver know the appropriate IP address?
- Do our secondary servers know the appropriate address?
- Do the root servers know the appropriate address?
lecture
in color
/comp/150NET/notes/names-old.php
downloaded on Nov-23-2009 03:55:20 PM,
was last modified on Feb-17-2004 10:48:46 PM.
All lecture note content is copyright 2004 by
Alva L. Couch,
Computer Science,
Tufts University