2. Resolving host names
• Domain Name Service
– DNS maps host names (e.g. www.port.ac.uk) ...
– ... to their address (e.g. 148.197.175.1)
– Others – e.g. Microsoft WINS or Sun’s NIS
• Historically:
– Initially (1970s) HOSTS.TXT downloaded by FTP
from a computer at Stanford University
– Name-to-address mapping of all the (few
hundred) hosts on the then ARPAnet
WUCM1 2
3. Domain Name System (DNS)
• DNS has been used since about 1984
• Designed by Paul Mockapetris, USC
• It is a distributed database
– Name servers each keep details about some
segment of the Internet
– Clients called resolvers query the database by
means of calls to name servers
WUCM1 3
4. Pros and cons of distribution
• Resilience (pro)
– not reliant on one machine or one file
• Performance (pro)
– many name servers can be running simultaneously
and the load can be balanced among them
• Consistency (con)
– need to have a mechanism to keep servers
consistent
WUCM1 4
5. Structure of namespace
• Structure of the namespace (and hence the
database) is hierarchical
• There are 13 root name servers (A-M)
• These comprise the root of an inverted tree of
domains
• 10 are in the USA, 1 in the UK, 1 in Sweden
and 1 in Japan
• See http://www.wia.org/pub/rootserv.html
WUCM1 5
7. Top Level Domains
• Since 1980s, three-letter generic top-level
domains (gTLDs) are .com, .net, .org
• .biz .info .name and .pro added 2001-2002
• .arpa contains Internet infrastructure databases
• .aero .asia .cat .coop .edu .gov .int .jobs .mil
.mobi .museum .tel .travel are "sponsored" TLDs
• Two-letter country code top-level domains
(ccTLDs) - ISO 3166-1 codes
– .gb versus .uk
WUCM1 7
8. Rules
• Within each domain:
– The rules for allocating names etc. are up to the
domain administrator, e.g.:
• InterNIC (http://www.internic.net/) administers the
.COM, .NET and .ORG domains
• Nominet.uk (http://www.nic.uk/) is the registry for
most .UK domain names, CO.UK, ORG.UK, etc.
– The domain administrator can delegate parts of
the domain to ease management
WUCM1 8
9. Zones
• The billions of resource records in the DNS
directory are split into millions of files called
zones
• Zones are kept on authoritative servers which
answer DNS queries
• Caching servers simply query the authoritative
servers and cache any replies
• Name servers can be both authoritative and
caching for different zones
WUCM1 9
10. Delegation
“”
= d e le g a tio n
n e t zo n e
net
so u rce fo rg e .n e t
zo n e p h p .n e t
s o u rc e fo rg e php zo n e
e tc .
s g fx
b ria n
s g fx .s o u rc e fo rg e .n e t
m a x im u m
zo n e m o o s ta r b ria n .s o u rc e fo rg e .n e t
lin u x
zo n e
m a x im u m lin u x .s o u rc e fo rg e .n e t
zo n e m o o s ta r.s o u rc e fo rg e .n e t
zo n e
WUCM1 10
11. DNS servers
• DNS servers
– Most are authoritative for just one or a few zones
– Larger servers may be authoritative for many
thousands of zones
• Can be many authoritative servers for a zone
– One would be the primary master name server
• loads from a zone file
– The rest are slave servers
• load from the primary server
WUCM1 11
12. Resolvers
• DNS clients that access name servers on
behalf of user applications, e.g. web browsers
• Resolvers
– Query a name server
– Interpret the response
– Return the IP address to the user application
• Resolvers must know at least one DNS
– e.g. as set up under Windows
WUCM1 12
13. Querying a domain name
• Assume that your web browser wants to look
up a page on sunsite.ic.ac.uk
– The resolver will contact the name server and
send it a recursive query to resolve
sunsite.ic.ac.uk
– If name server has sunsite.ic.ac.uk in its cache, it
will return the address
– If it doesn't, it will send a series of iterative
queries to allow it to resolve the name
WUCM1 13
14. Iterative queries
1. It will ask a root name server for the address of
name servers for the .uk
2. It will ask one of those name servers for address
of the servers for .ac.uk
3. It will ask one of those name servers for address
of the servers for .ic.ac.uk
4. It will ask one of those name servers for the
address of sunsite.ic.ac.uk
5. If it already knows the address of a server it can
short-circuit the process
WUCM1 14
15. q u e ry fo r a d d re ss o f
su n site .ic.a c.u k
“” “”
re fe rra l to u k n a m e s e rv e r
n a m e s e rve r
q u e ry fo r a d d re s s o f
nam e su n site .ic.a c.u k
uk
s e rv e r
re fe rra l to a c.u k n a m e s e rv e r
n a m e se rve r
uk tv fr
q u e ry fo r a d d re ss o f
su n site .ic.a c.u k
a c .u k
re fe rra l to ic.a c.u k n a m e s e rv e r
n a m e se rve r
ac
gov
q u e ry fo r
a d d re s s o f
su n site .ic.a c.u k
ic .a c .u k
re s o lv e r q u e ry
a d d re s s o f n a m e s e rv e r
su n site .ic.a c.u k
ls e ic qm w
answ er
R e so lu tio n p ro c e ss
re s o lv e r
(a fte r A lb n itz , (2 0 0 1 ))
WUCM1 15
16. Time to live (TTL)
• Whenever a name is resolved, the
authoritative name server annotates it with a
"time to live" (TTL)
• A caching server will only cache the entry (if it
can) for that length of time
• After that it will redo a full resolution
• This means that changes to addresses
eventually get noticed
WUCM1 16
17. DNS failure
• The resolver will wait 5 seconds for a response
from a name server
• If there is no reply within that time, it will try
another name server
• Once it has tried and failed on all the servers it
knows, it tries again with longer timeouts
• Limit to the number of retries (normally 3)
• Normally, your resolver will give up after 75-80
seconds with a message like "host name lookup
failure"
WUCM1 17
18. Inverse queries
• Is the resolution of names from addresses
• Uses the .in-addr.arpa domain
– E.g. to find name of 148.197.175.1
– Lookup on 1.175.197.148.in-addr.arpa
• Notes
– Inverse query not guaranteed
– No attempt made to pass query on
WUCM1 18
19. Domain names
• You need to do two things
– You need to choose a name for your domain
– You need to find a parent domain willing to adopt
you
• Obviously you need to choose a name that is
not already taken in the parent domain
WUCM1 19
20. Choosing a good name
• Keep it short - people will certainly have to
remember it and type it
• Relate it to
– the name of your company
– your department
– your role - anything to make it memorable
• Make it distinct from other names
• Don't try to spoof another legitimate name
– see http://www.yaaho.com/
WUCM1 20
21. Registering a domain name
• Most name registration authorities provide a
web interface and search
• For example:
– http://bulkurl.com/
– http://www.domainnamebuyersguide.com/
– http://www.register.md/register_home.jsp
• E.g. to register me.port.ac.uk you need to
persuade the port.ac.uk domain administrator
to adopt you
WUCM1 21
22. What if a name is already taken?
• Choose a different name
• Choose a different parent domain
• Persuade the owners of the name to give/sell
you it
• Initiate the Uniform Domain-Name Dispute-
Resolution Policy
(see http://www.icann.org/udrp/udrp.htm)
(or http://www.nic.uk/ref/drs.html)
• Give up!
WUCM1 22
23. Your own DNS?
• To administer your own zone of the DNS, you
need to:
– Set up a computer as a name server
– Get the administrator of your parent domain to
delegate authority for your sub-domain to you
• DNS software e.g. BIND for Unix
– http://www.isc.org/products/BIND/
• Win2K Server also has a DNS
WUCM1 23
24. Commercial services 1
• Internet Service Providers (ISPs)
– Both Narrow or Broadband providers
– Most ISPs include web space and a domain name
– DNS entry usually derived from ISP name, e.g.
• www.nodename.freeserve.co.uk
– Intended for private use (generally)
WUCM1 24
25. Commercial services 2
• Web hosting companies
– E.g. One&One at http://oneandone.co.uk
• Typical package would include:
– Domain name (in a tld, e.g. .com, .net, etc.)
– Significant web space
– Email accounts – all separately manageable
– Tools for web page design
– Database support – e.g. MySQL or SQL Server
– Technical support – including backup and restore
WUCM1 25
26. Commercial services 3
• Dedicated and managed server hosts
– Your server is located in a managed environment
at a server farm
– They provide 24/7 support but you have
management authority
– Server farms usually near major Internet nodes,
e.g. Canary Wharf (or Fareham)
– E.g. http://www.rackspace.com/index.php
WUCM1 26
27. Summary
• We have looked at:
– Domain Name System – DNS
– Choosing a domain name
– Registering a domain name
– Setting up a DNS
– Commercial services
• ISP basic provision
• Web hosting companies
• Managed server farms
WUCM1 27