Unit3 1
Unit3 1
2
3
4
5
6
Need for DNS
7
19 TCP/IP Protocol
Suite
20
Domain Name Space
21
◻ Domain name space was designed to achieve hierarchical name space. In this, the
names are represented as a tree like structure with root element on the top and this
tree can have a maximum of 128 levels starting from root element taking the level
0 to level 127.
22
✔ Generic Domains
✔ Country Domains
✔ Inverse Domain
✔ Registrar
25 TCP/IP Protocol
Suite
Figure 19.8 DNS used in the Internet
26 TCP/IP Protocol
Suite
27
Figure 19.9 Generic domains
28 TCP/IP Protocol
Suite
29 TCP/IP Protocol
Suite
30
31
32
Figure 19.10 Country domains
33 TCP/IP Protocol
Suite
34
Figure 19.11 Inverse domain
35 TCP/IP Protocol
Suite
36
DNS at a High-Level
37
The sequence .ac (short for academia) is in use in many countries as a second-level
domain for academic institutions such as universities, colleges, and research
institutes.In the United Kingdom and Japan, for example, academic institutions use
domain names ending in .ac.uk and .ac.jp respectively.
TLD
45
◻ .com (commercial)
◻ .org (organization)
◻ .net (network)
◻ .name (name)
◻ .biz (business)
◻ .info (information
Sponsored TLDs are restricted and certain guidelines must be met by
the person or company that wants to use them. They are:
47
◻ .edu - Only educational institutions can use this.
◻ Administered by ICANN
13 root servers, labeled A M
6 are anycasted, i.e. they are globally replicated
◻ Contacted when names cannot be resolved
In practice, most systems cache this information
Map of the Roots
54
55
56
◻ ROOT SERVERS
◻ NIXI has sponsored three Root Servers, at Mumbai (I
Root), Delhi ( K Root) and Chennai (F Root). These are
hosted at our Exchange points at these locations.
Non-authoritative/Recursive
63
◻ This server does NOT hold any record for a domain but
instead has a cache file that was built with all the DNS
lookups it has performed in the past which received an
authoritative response. If there’s not record in it’s cache,
it will look for the Authoritative.
Nslookup command
64
◻ ipconfig /displaydns
◻ To delete the entries, type ipconfig /flushdns
Recursive DNS
68
Iterative Resolution
a.root
server
69
a3.nstl a.gtld-
d.com server
5
udel ns1.goo
server gle.com
3 iterative response (referral)7
“I don't know. Try a.root-servers.net.”
iterative response (referral) 9
“I don't know. Try a.gtld-servers.net.”
1 iterative response (referral)
iterative response (referral)
“I don't know. Try a3.nstld.com.”
2 4 “I don't know. Try ns1.google.com.”
6 iterative response
8 “The IP address of www.google.com
Local 10 is 216.239.37.99.”
dns
iterative request
“What is the IP address of
www.google.com?”
DNS Server Class
70
Northeastern
www.neu.edu =
Where is www.neu.edu
155.33.17.68
www.neu.edu?
Northeastern
Root edu neu
com
Root
Iterated DNS query
75
www.google.com
Where is www.google.com?
Root
DNS Propagation
76
Root com
asgard.ccs.neu.edu ns.godaddy.com
asgard.ccs.neu.edu
Root
◻ Zone files may be cached com
for 1-72 hours
www.my-new-site.com ns.godaddy.com
What Are DNS Records?
78
81
◻ <name>: The domain name is the name that the user enters into their
browser.
◻ <ttl>: TTL stands for “time to live” and denotes the time (in seconds)
that a record may be temporarily stored in the cache. After the time has
lapsed, it cannot be ensured that the resource record is still current. This
information is optional.
◻ <class>: In theory, there are different classes of DNS records. In
practice, however, the records always refer to the internet (marked as
IN), which is why this information is also optional.
◻ <type>: Different types of resource records appear in a zone file (for
more on this, see below).
◻ <rdlength>: This optional field specifies the size of the subsequent data
field.
◻ <rdata>: Resource data is the information according to which the
domain name can be resolved (such as the IP address).
The DNS record for the example.com web
server thus looks like this:
82
◻ $TTL 12879
◻ $ORIGIN example.com.
◻ www A 93.184.216.34
◻ This notation illustrates that the computer with the name
www is part of the example.com domain. This way,
other computers such as mail or ftp can be placed under
the origin domain.
The Most Important DNS Record
Types
84
◻ A Record
◻ The largest portion of name resolution on the internet takes place via the
type A record. An IPv4 address is located in its data field. Through these
records, it is possible for the internet user to enter a domain name in the
browser and for the client to send an HTTP request to the appropriate IP
address. Since an IPv4 address always has a size of 4 bytes, the value
under rdlength – if specified – is always 4.
◻ AAAA Record
◻ An AAAA record, also known as “quad A”, functions exactly like the A
record. However, it uses an IPv6 address instead of an IPv4 address to
resolve the name. Because IPv6 has a length of 128 bits (16 bytes), the
data field length is also predefined here. The AAAA designation is
based on the fact that the data field has four times the length of an A
record data field.
85
◻ SOA Record
◻ SOA stands for Start of Authority. The records for this type contain
information on the zone that is organized by the zone file and/or the
DNS server. This is important – among other scenarios – during a zone
transfer. Here, zone files are mirrored to other servers in order to prevent
failures. The zone transfer regulates the periodic distribution of the
original file. In this kind of DNS record, a serial number is therefore also
placed next to the mailing address of the responsible administrator. This
increases with each file update.
◻ CNAME Record
◻ Under a CNAME record (canonical name record), one finds an alias – an
additional name for a domain. Using this, the record refers to an existing
A record or AAAA record. With this type, the rdata field is filled with a
domain name that was previously linked with an IP address in the file. In
this way, different addresses can refer to the same server.
86
◻ MX Record
◻ An MX record refers to a mail exchange or an SMTP email server. One
or several email servers are defined here that belong to the relevant
domain. When using several mail servers (for example, to offset a
failure), they specify different priority levels. In this way, the DNS
knows in which sequence the contact attempt should proceed.
◻ PTR Record
◻ The PTR record (pointer) is a DNS record that permits a reverse lookup.
Through this technique, the DNS server can also provide information
regarding which host names belong to a specific IP address. For every IP
address that is used in A or AAAA records, there also exists a
corresponding PTR record. At the same time, the IP address is structured
in reverse sequence and is also provided with the name of a zone.
87
◻ NS Record
◻ In the NS record – a zone file’s name server record – the
jurisdiction for a specific zone is clarified. For this reason, this
record is mandatory for each zone file. This resource record gives
the DNS server information on whether it is responsible for the
request – thus requiring it to organize the relevant zone – and to
whom it must forward the request.
◻ TXT Record
◻ The TXT record contains text that either is intended for human
users as an information source or is machine-readable
information. This DNS record gives an administrator the option of
storing unstructured Text (in contrast to the structured data of the
other DNS records). This could also include details about the
company behind the domain.
88
◻ SRV Record
◻ Via the SRV record, a server can provide information
about other services (SRV). For this purpose, the service,
including the port at which it can be reached, is specified. In
addition, the used protocol forms part of the name. Via the
DNS record, a client can receive information on LDAP or
XMPP services.
◻ LOC Record
◻ Through the LOC record, the location of the physical
server can be disclosed. For this purpose, the latitude,
longitude, height above sea level as well as an error
deviation are given at the end of the record.
Zone File
89
◻ $ORIGIN example.com.
◻ $TTL 12879
◻ The first DNS record is a SOA record. Without this, a
zone file cannot function. Conversely, a zone file is then
also valid only if the SOA record is available. After that,
there are the first records for the name server, and then
the A and AAAA records.
DNS Resource Records
91
Query
◻ Type = A / AAAA Name: www.ccs.neu.edu
Name = domain name Type: A
Value = IP address
Resp.
Name: www.ccs.neu.edu
A is IPv4, AAAA is IPv6 Value: 129.10.116.81
◻ Type = NS
Name = partial domain Query Name: ccs.neu.edu
Type: NS
Value = name of DNS
server for this domain
Resp.
Name: ccs.neu.edu
“Go send your query to this Value: 129.10.116.51
other server”
DNS Types, Continued
93
Type = CNAME
Query
◻ Name: foo.mysite.com
Name = hostname Type: CNAME
Value = canonical
Resp.
hostname Name: foo.mysite.com
Useful for aliasing Value: bar.mysite.com
CDNs use this
Name: ccs.neu.edu
Value = canonical name of Value: amber.ccs.neu.edu
mail server
Reverse Lookups
94
www.google.com
Content Delivery Networks
97
◻ Without DNS…
How could you get to any websites?
◻ How about your mail server
When you sign up for websites, you use your email address
What if someone hijacks the DNS for your mail server?
◻ DNS is the root of trust for the web
When a user types www.bankofamerica.com, they expect to
be taken to their bank’s website
What if the DNS record is compromised?
Denial Of Service
104
◻ Response Spoofing
Eavesdrop on requests
Where is
DNS Spoofing
bankofamerica.com? 123.45.67.89
106
How do you know that a given
name IP mapping is correct?
Where is dns.bofa.com
bankofamerica.com?
66.66.66.93
123.45.67.89
dns.evil.com
66.66.66.93
Where is
DNS Cache Poisoning
www.google.com? www.google.com =
Where is
107
bankofamerica.com? 74.125.131.26
dns.neu.edu ns1.google.com
.com (Verisign)
IP:
IP:123.45.67.89
66.66.66.93
Key: < >
Where is SIG:
SIG: 9na8x7040a3
x9fnskflkalk
bankofamerica.com? dns.bofa.com
dns.evil.com
Does DNSSEC Solve all our
problems?
112
◻ No.
◻ DNS still vulnerable to reflection attacks + injected
responses
113