Professional Documents
Culture Documents
DNS (Domain Name Server)
DNS (Domain Name Server)
DNS (Domain Name Server)
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
1/68
Domain Name
Service (DNS)
Outline
Introduction
1 Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
4 Implementation
5 Queries & Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
8 Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
9 Reverse Lookup
10 Zone Transfer
11 Administration Authorities
12 Final remarks
2/68
Domain Name
Service (DNS)
Introduction
Bibliography
DNS & BIND. Paul Albitz & Cricket Liu. OReally &
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
Associates.
DNS HOWTO. Nicolai Langfeldt and others.
RFC-1034. Domain Names. Concepts and Facilities.
RFC-1035. Domain Names. Implementation and
Specification.
RFC-1591. Domain Name System Structure and
Delegation.
RFC-1912. Common DNS Operational and
Configuration Errors.
RFC-2219. Use of DNS Aliases for Network Services.
RFC-2317. Classless IN-ADDR.ARPA delegation.
RIPE-114. Taking care of your domain.
RIPE-192. Simple DNS configuration example.
RIPE-203. Recommendations for DNS SOA values.
3/68
Domain Name
Service (DNS)
Introduction
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
addresses.
The Domain Name System (DNS) links names and
addresses.
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
4/68
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
backus.upc.es
backus
5/68
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
More
specific
Less
specific
www.entel.upc.edu.es.
Country
Organization type
Organization name
Department
Hostname
Caseless
Administration
Authorities
Final remarks
6/68
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
tree efficiently
solves the problem
of uniqueness.
Also allows
delegation of
subdomains.
We can have
com
edu net
...
www
cat
es
upc
...
...
entel
www
7/68
Domain Name
Service (DNS)
Outline
Introduction
1 Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
4 Implementation
5 Queries & Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
8 Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
9 Reverse Lookup
10 Zone Transfer
11 Administration Authorities
12 Final remarks
8/68
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
Universities
Commercial Organizations
Non commercial Organizations
Administrative networks
US Army
US Government
9/68
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
domains.
Domains overlap: the domain upc.edu includes the
domain entel.upc.edu.
The DNS tree is administratively divided into zones.
A zone is a delegation & administration point.
Each zone is managed by a different name server1 .
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
1
In fact, as we explain later, a zone can be managed by a group of name
servers in a master-slave configuration.
10/68
Domain Name
Service (DNS)
Outline
Introduction
1 Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
4 Implementation
5 Queries & Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
8 Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
9 Reverse Lookup
10 Zone Transfer
11 Administration Authorities
12 Final remarks
11/68
Domain Name
Service (DNS)
Names
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
com
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
example
bob.com
ROOT-SERVER.
nsc.com
net
example
nsn.net
nsne.example.net
nsce.example.com
david.example.com
alice.example.com
left
bob.left.example.net
david.example.net
right
nsner.right.example.net
carla.right.example.net
Final remarks
12/68
Domain Name
Service (DNS)
Domains
Introduction
Domains &
Zones
Example: a
little Internet
.com.
com
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
7 domains
.net.
net
root
.example.net.
.example.com.
example
bob
nsc
example
nsn
david
nsne
alice
nsce
left
david
right
Other RRs
Reverse
Lookup
Zone Transfer
bob
.left.example.net.
nsner
carla
.right.example.net.
Administration
Authorities
Final remarks
13/68
Domain Name
Service (DNS)
Zones
Introduction
Domains &
Zones
6 zones
Example: a
little Internet
com
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
nsc
example
nsce
net
root
bob
example
nsn
david
nsne
left
alice
right
david
bob
nsner
carla
Administration
Authorities
Final remarks
14/68
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Network Addressing
The DNS hierarchy is orthogonal with respect to the
network topology.
Example: a
little Internet
Implementation
Queries &
Replies
com
Practical
Name
Resolutions
Real Root
Servers
example
nsce
.021
Reverse
Lookup
Administration
Authorities
Final remarks
nsc
.011
david
Other RRs
Zone Transfer
bob
.012
alice
.022
net
root
.001
nsn
.111
example
nsne
.121
left
david
.122
right
10.0.0.0/24
bob
.133
nsner
.131
carla
.132
15/68
Domain Name
Service (DNS)
Outline
Introduction
1 Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
4 Implementation
5 Queries & Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
8 Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
9 Reverse Lookup
10 Zone Transfer
11 Administration Authorities
12 Final remarks
16/68
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
resolver (optional).
Class : Resource records belong to a class. Typically,
the class is IN (Internet).
Type : There are different types of records, e.g. Type =
A is an address.
RDATA : Record Information. E.g. A records contain an
IP address.
Note. We need to use parenthesis if the RR does not fit
into a single line.
17/68
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
30
IN
10.0.0.22
Domain Name
Service (DNS)
BIND
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Maintained by http://www.isc.org
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
Bind services
Names to IP addresses translation.
Inverse Translation.
Access Control Lists (ACL).
Secondary servers.
Secure zones transfers between primary and
secondary servers (and ports).
Service Location (SRV records).
Parameterized replies depending on the origin of the
request (views).
Custom logs.
19/68
Domain Name
Service (DNS)
ROOT-SERVER
named.conf
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
20/68
Domain Name
Service (DNS)
ROOT-SERVER
Zone .
Introduction
Domains &
Zones
Example: a
little Internet
Practical
Name
Resolutions
$TTL
60000 ; 16h40m default Time to Live of the DNS records
.
IN
SOA
ROOT-SERVER.
admin-mail.ROOT-SERVER.(
2006031201 ; serial
28800 ; refresh
14400 ; retry
3600000 ; expire
0 ; negative cache ttl
)
Real Root
Servers
.
ROOT-SERVER.
IN
IN
Other RRs
com.
nsc.com.
IN NS
IN A
net.
nsn.net.
IN
IN
Implementation
Queries &
Replies
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
NS
A
NS
A
ROOT-SERVER.
10.0.0.1
nsc.com.
10.0.0.11
nsn.net.
10.0.0.111
21/68
Domain Name
Service (DNS)
Record NS
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
parent zone.
In the parents zone configuration, there will be as many
Administration
Authorities
Final remarks
22/68
Domain Name
Service (DNS)
Glue record
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
IN NS
IN A
nsc.com.
10.0.0.11
org.
IN NS
nsc.com.
If you did not provide the glue records for name servers
Final remarks
23/68
Domain Name
Service (DNS)
NSC.COM
named.conf
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
options {
directory "/var/cache/bind";
min-roots 1;
};
zone "." {
type hint;
file "/etc/bind/db.root";
};
zone "localhost" {
type master;
file "/etc/bind/db.local";
};
zone "127.in-addr.arpa" {
type master;
file "/etc/bind/db.127";
};
zone "0.in-addr.arpa" {
type master;
file "/etc/bind/db.0";
};
zone "255.in-addr.arpa" {
type master;
file "/etc/bind/db.255";
};
// add entries for other zones below here
zone "com" {
type master;
file "/etc/bind/db.com";
};
24/68
Domain Name
Service (DNS)
NSC.COM
Zone .com
Introduction
Domains &
Zones
Example: a
little Internet
$TTL
com.
60000
IN SOA
nsc.com.
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
com.
nsc.com.
bob.com.
30
IN
IN
IN
admin-mail.nsc.com. (
2006031201 ; serial
28800 ; refresh
14400 ; retry
3600000 ; expire
0 ; negative cache ttl
)
NS
nsc.com.
A
10.0.0.11
A
10.0.0.12
Other RRs
Reverse
Lookup
example.com.
nsce.example.com.
IN
IN
NS
A
nsce.example.com.
10.0.0.21
Zone Transfer
Administration
Authorities
Final remarks
Domain Name
Service (DNS)
NSCE.EXAMPLE.COM
named.conf
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
options {
directory "/var/cache/bind";
min-roots 1;
};
zone "." {
type hint;
file "/etc/bind/db.root";
};
zone "localhost" {
type master;
file "/etc/bind/db.local";
};
zone "127.in-addr.arpa" {
type master;
file "/etc/bind/db.127";
};
zone "0.in-addr.arpa" {
type master;
file "/etc/bind/db.0";
};
zone "255.in-addr.arpa" {
type master;
file "/etc/bind/db.255";
};
// add entries for other zones below here
zone "example.com" {
type master;
file "/etc/bind/db.com.example";
};
26/68
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
NSCE.EXAMPLE.COM
Zone .example.com
; /etc/bind/db.com.example
$ORIGIN example.com.
$TTL
60000
@
IN
SOA
nsce admin-mail.nsce (
2006031201 ; serial
28 ; refresh
14 ; retry
3600000 ; expire
20 ; 20 secs of negative cache ttl
)
@
IN
NS
nsce
; unqualified name
nsce
IN
A
10.0.0.21
david
IN
CNAME david.example.net.
@
IN
MX
10 mailserver1
@
IN
MX
20 mailserver2.example.com.
alice
IN
A
10.0.0.22
mailserver1
IN
A
10.0.0.25
mailserver2
IN
A
10.0.0.26
; alice.example.com IN
A
10.0.0.22
Zone Transfer
Administration
Authorities
Final remarks
Domain Name
Service (DNS)
Introduction
Domains &
Zones
RR CNAME
The record CNAME is used to create an alias or a canonical name
(CNAME).
Example: a
little Internet
Implementation
Queries &
Replies
com
net
Practical
Name
Resolutions
Real Root
Servers
example
example
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
david
david
Record CNAME
to david.example.net.
Notice that for a configuration with several names translating to the same IP
address, we can also use A records.
28/68
Domain Name
Service (DNS)
MX Record
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
servers.
Example:
@
IN
MX
20
mail.upc.edu.
Zone Transfer
Administration
Authorities
Final remarks
29/68
Domain Name
Service (DNS)
Outline
Introduction
1 Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
4 Implementation
5 Queries & Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
8 Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
9 Reverse Lookup
10 Zone Transfer
11 Administration Authorities
12 Final remarks
30/68
Domain Name
Service (DNS)
Client configuration I
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
name translations.
In Unix systems this configuration is stored in the
backus.upc.es backus
/etc/resolv.conf. Example:
nameserver 147.83.2.3
nameserver 147.83.2.10
search upc.edu
31/68
Domain Name
Service (DNS)
Client configuration II
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
nameserver @IP.
Points out to the name server you will ask for
translations.
Up to 3 name servers may be listed.
Your name server has to be configured to accept your
queries
Filters based on IP addresses can be defined with
BIND.
The name server is typically provided by your ISP or
your organization.
There are also open name servers like 8.8.8.8 and
8.4.4.4 (from Google) that anyone can use.
Administration
Authorities
Final remarks
32/68
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
search upc.edu.
Users can use unqualified names and network
applications add the search list (upc.edu in this case).
If you do not want to add the search, you can use the
trailing dot.
In Linux, we have a couple of useful commands to
host
host
dig
dig
alice
alice.example.com
alice
alice.example.com
Reverse
Lookup
Zone Transfer
Administration
Authorities
names.
Final remarks
33/68
Domain Name
Service (DNS)
Queries I
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
recursive.
In an iterative query, the queried name server returns
Final remarks
34/68
Domain Name
Service (DNS)
Queries II
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
35/68
Domain Name
Service (DNS)
Responses
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
36/68
Domain Name
Service (DNS)
Outline
Introduction
1 Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
4 Implementation
5 Queries & Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
8 Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
9 Reverse Lookup
10 Zone Transfer
11 Administration Authorities
12 Final remarks
37/68
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
DNS service.
The DNS client must know at least one DNS (in
Final remarks
38/68
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
com
Queries &
Replies
Practical
Name
Resolutions
example
david
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
bob
.012
nsce
.021
alice
.022
(1)
# /etc/resolv.conf
nameserver 10.0.0.21
search example.com
alice.example.com IN A
net
root
.001
nsc
.011
nsn
.111
example
nsne
.121
left
david
.122
right
(2)
bob
.133
nsner
.131
carla
.132
Final remarks
39/68
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
com
Queries &
Replies
Practical
Name
Resolutions
example
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
bob
.012
david
Real Root
Servers
alice
.022
bob.com IN A
(1)
(6)
(2)
nsc
.011
(5)
nsce
.021
net
root
.001
nsn
.111
example
nsne
.121
left
(4)
david
.122
right
(3)
bob
.133
nsner
.131
carla
.132
Final remarks
40/68
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
com
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
example
bob
.012
david
nsce
.021
alice
.022
# /etc/resolv.conf
nameserver 10.0.0.21
search example.com
bob.com IN A
net
root
.001
nsc
.011
nsn
.111
example
nsne
.121
left
david
.122
right
(2)
(1)
time<TTL=30
bob
.133
nsner
.131
carla
.132
Administration
Authorities
Final remarks
41/68
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
com
Implementation
Queries &
Replies
Practical
Name
Resolutions
example
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
bob
.012
david
Real Root
Servers
alice
.022
bob.com IN A
(1)
(4)
(2)
nsc
.011
(3)
nsce
.021
net
root
.001
nsn
.111
example
nsne
.121
left
(2)
david
.122
right
(3)
bob
.133
nsner
.131
carla
.132
Final remarks
42/68
Domain Name
Service (DNS)
List of ROOT-SERVERs I
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
follows:
; /etc/bind/named.conf
options {
directory "/var/cache/bind";
min-roots 1;
};
zone "." {
type hint;
file "/etc/bind/db.root";
};
...
NS
A
ROOT-SERVER.
10.0.0.1
43/68
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
List of ROOT-SERVERs II
Lets try an iterative (non recursive) query with dig
from alice.
For convenience, we will avoid displaying question
44/68
Domain Name
Service (DNS)
Outline
Introduction
1 Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
4 Implementation
5 Queries & Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
8 Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
9 Reverse Lookup
10 Zone Transfer
11 Administration Authorities
12 Final remarks
45/68
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
Root servers
were 13 root
servers in the
Internet.
These servers were maintained by voluntary
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
13 root servers
Nowadays, we have the 13 root name servers2
Bytes.
This value was chosen to allow a reasonable sized
physical servers?
2
You can obtain additional information about root name servers in
http://en.wikipedia.org/wiki/Root_name_server.
47/68
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Reliability
Each operator uses redundant computer equipment to
provide reliable service even if failure of hardware or
software occur.
Additionally, some servers operate in multiple geographical
locations using a routing technique called anycast.
Only 13 names and IP addresses are used but servers A, C,
E, F, G, I, J, K, L and M servers now exist in multiple
locations on different continents using anycast.
As a result most of the physical root servers are now outside
the United States, allowing for high performance worldwide.
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
48/68
Domain Name
Service (DNS)
Anycast
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
49/68
Domain Name
Service (DNS)
Outline
Introduction
1 Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
4 Implementation
5 Queries & Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
8 Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
9 Reverse Lookup
10 Zone Transfer
11 Administration Authorities
12 Final remarks
50/68
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
A6.
The use of AAAA records is recommended, as A6
example:
example.host.com. 3600 IN AAAA 3ffe:8050:201:1860:42::1
Zone Transfer
Administration
Authorities
Final remarks
51/68
Domain Name
Service (DNS)
Optional RRs
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
52/68
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
SRV Record I
SRV. Service resource records (RFC2052).
Allow to specify the location of the servers for a certain
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
SRV Record II
Format:
service.protocol.name TTL class SRV priority weight port destination
Examples:
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
Kerberos, etc.
54/68
Domain Name
Service (DNS)
Outline
Introduction
1 Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
4 Implementation
5 Queries & Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
8 Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
9 Reverse Lookup
10 Zone Transfer
11 Administration Authorities
12 Final remarks
55/68
Domain Name
Service (DNS)
PTR
PTR is used in reverse lookups and it is a pointer to another
node in the hierarchy of names.
Introduction
Domains &
Zones
224.39.83.147.in-addr.arpa.
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
arpa
Other RRs
Reverse
Lookup
Final remarks
147 255
upc
Zone Transfer
Administration
Authorities
es
in-addr
Real Root
Servers
83 255
0 . 2
135
255
255
www
IN
PTR cript0.upc.es
A PTR record
D.C.B.A.inaddr.arpa. is defined
for each A.B.C.D IP
address.
These domains are
delegated to the
entities or ISPs
having these IP
ranges of addresses.
E.g. the domain
83.147.in-addr.arpa.
is delegated to the
UPC.
56/68
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
com
Implementation
Queries &
Replies
example
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
bob
.012
nsc
.011
david
nsce
.021
alice
.022
net
root
.001
nsn
.111
example
nsne
.121
left
david
.122
right
10.0.0.0/24
bob
.133
nsner
.131
carla
.132
Administration
Authorities
Final remarks
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
options {
directory "/var/cache/bind";
};
zone "." {
type master;
file "/etc/bind/db.root";
};
zone "localhost" {
type master;
file "/etc/bind/db.local";
};
zone "0.0.10.in-addr.arpa" {
type master;
file "/etc/bind/db.10.0.0";
};
Final remarks
58/68
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
SOA
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
@
1
11
12
21
22
111
121
122
131
132
133
IN
IN
IN
IN
IN
IN
IN
IN
IN
IN
IN
IN
NS
PTR
PTR
PTR
PTR
PTR
PTR
PTR
PTR
PTR
PTR
PTR
ROOT-SERVER. admin-mail.ROOT-SERVER. (
2006031201 ; serial
28 ; refresh
14 ; retry
3600000 ; expire
0 ; negative cache ttl
)
ROOT-SERVER.
ROOT-SERVER.
nsc.com.
bob.com.
nsce.example.com.
alice.example.com.
nsn.net.
nsne.example.net.
david.example.net.
nsner.right.example.net.
carla.right.example.net.
bob.left.example.net.
59/68
Domain Name
Service (DNS)
Outline
Introduction
1 Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
4 Implementation
5 Queries & Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
8 Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
9 Reverse Lookup
10 Zone Transfer
11 Administration Authorities
12 Final remarks
60/68
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
Zone Transfer I
Name servers that store information about a certain
are:
To distribute the load.
Provide some failure tolerance (when an authoritative
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
Zone Transfer II
A procedure called zone transfer is necessary in those
zone.
These changes must be mirrored on all secondary
record.
Asks the master for its SOA record.
The master answers with its own SOA.
62/68
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
63/68
Domain Name
Service (DNS)
Outline
Introduction
1 Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
4 Implementation
5 Queries & Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
8 Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
9 Reverse Lookup
10 Zone Transfer
11 Administration Authorities
12 Final remarks
64/68
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Numbers
http://www.icann.org
Coordinates root and first level servers.
Delegates zones to RIRs (Regional Internet Registry)
RIRs:
APNIC (Asia-Pacific Network Information Centre)
ARIN (American Registry for Internet Numbers)
LACNIC (Latin-American and Caribbean IP Address
Registry)
RIPE NCC (Rseaux IP Europens)
AfriNIC (African Regional Internet Registry)
Final remarks
65/68
Domain Name
Service (DNS)
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
A RIR:
Assigns ranges of IP addresses to ISPs (or rarely to
organizations).
Implement the whois service (to know to whom
belongs an IP address). Example: try
whois 147.83.2.3
Delegates the authority to each country, so that the
country can manage its domains: .es, .uk, etc.
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
(http://www.nic.es).
For the .cat domain we have puntcat
(http://www.domini.cat).
Final remarks
66/68
Domain Name
Service (DNS)
Outline
Introduction
1 Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
4 Implementation
5 Queries & Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
8 Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
9 Reverse Lookup
10 Zone Transfer
11 Administration Authorities
12 Final remarks
67/68
Domain Name
Service (DNS)
Remarks
Introduction
Domains &
Zones
Example: a
little Internet
Implementation
Queries &
Replies
Practical
Name
Resolutions
Real Root
Servers
Other RRs
Reverse
Lookup
Zone Transfer
Administration
Authorities
Final remarks
68/68