程序代写代做代考 dns database cache Week 9: Application Layer Internet Technologies COMP90007 – cscodehelp代写

Week 9: Application Layer Internet Technologies COMP90007
Lecturer: Semester 2, 2021
© University of Melbourne 2020
1

The Last Layer in Hybrid Stack
n Application Layer
n We will look at key implementations to
study this: Domain Name System first
Application
Transport
Network
Link
Physical
2

DNS (Domain Name System)
n Problem?
§ IP address (32 bit), e.g., 121.7.106.83 – used for addressing
datagrams
§ www.yahoo.com – used by humans
n Question: how do you map between IP address and
name, and vice versa?
n Domain Name System:
§ distributed database implemented in a hierarchy of many name
servers
§ application-layer protocol that allows a host to query the database
in order to resolve names (address/name translation)
§ used by other application-layer protocols (http, ftp, smtp)
3

Conceptual Divisions of DNS Namespace
n A hierarchical naming convention; the top of the hierarchy is managed by ICANN (The Internet Corporation for
Assigned Names and Numbers).
The computer robot.cs.washington.edu
4

Name Space
n Internet historically divided into over 250 top- level domains (TLD).
5

Why not centralize DNS?
n Single point of failure
n Traffic volume
n Distant centralized database n Maintenance
n Does not scale well
6

DNS Services
n hostname to IP address translation
n host aliasing – alias names for canonical names
§ e.g., canonical relay1.westcoast.enterprise.com
aliased to www.enterprise.com
n mail server aliasing
§

n load distribution
§ busy sites are replicated over multiple servers
§ a set of IP addresses is associated with one canonical
name
§ DNS server rotates the order of the addresses to distribute the
load
7

Domain Name Characteristics
n Domain names:
q Are case insensitive
q Can have up to 63 characters per constituent q Can have up to 255 chars per path
q Can be internationalised (since 1999)
n Naming conventions usually follow either organisational or physical boundaries eg.
q au.ibm.com / uk.ibm.com (for email)
q ibm.com.au / ibm.co.uk (for web)
n Absolute domain names ends in a “.”
n Relative domain names partially specify the location and can be used only within the context of an absolute domain name
8

Zone Name Servers
n DNS namespace divided into non-overlapping zones
n Each zone contains a part of the DNS tree and
also name servers authoritative for that zone –
q usually 2 name servers for a zone (called the primary and secondary name servers),
q sometimes secondary is actually outside the zone (for reliability)
n Name servers are arranged in a hierarchical manner extending from a set of root servers
9

Name Servers
n The DNS name space is divided into nonoverlapping zones; each circled contains some part of the tree.
One zone
10

Root Name Servers
n The root servers form the authoritative cluster for enquiry in the event of locally- unresolvable name queries
n There are 13 root servers globally
q In some cases, a root server is a cluster of servers
11

Resource Records
n The Resource Records (RR) are the key objects in the Domain Name System
n A RR consists of a domain name, TTL, class, type, value q DomainName:whichdomainthisrecordappliesto
q TTL:indicatesstabilityortemporalextentoftherecord
q Class:INforinternet(othersexist,butdeprecated) q Type: a closed vocabulary of the following:
n A : The Internet address of the host
n CNAME : The canonical name for an alias
n MX : The mail exchanger
n NS : The name server
n PTR : The host name if the query is in the form of an Internet address; otherwise the pointer to other information
n SOA : The domain’s start-of-authority information
q Value: data (semantics depend on record type)
12

Asking for Domain Name: Example
User requests the URL
www.someschool.edu/index.html
1. User machine runs the client side of the DNS software
2. Browser extracts the hostname from the URL, and passes it to the client-side of the DNS application
3. DNS client sends a query containing the hostname to a DNS server
4. DNS client eventually receives a reply containing the IP address for the hostname
5. Browser initiates a TCP connection to the process located at port 80 at the IP address
13

A Typical DNS Query: dig
dig www.unimelb.edu.au
; <<>> DiG 9.3.0s20021217 <<>> www.unimelb.edu.au
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19905 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2 ;; QUESTION SECTION: ;www.unimelb.edu.au. IN A ;; ANSWER SECTION: www.unimelb.edu.au. 15589 IN ;; AUTHORITY SECTION: unimelb.edu.au. 1217 IN NS unimelb.edu.au. 1217 IN NS ;; ADDITIONAL SECTION: ns1.unimelb.edu.au. 491 IN A ns2.unimelb.edu.au. 494 IN A ;; Query time: 393 msec ;; SERVER: 128.250.66.5#53(128.250.66.5) ;; WHEN: Fri Apr 18 05:46:56 2014 ;; MSG SIZE rcvd: 120 A 128.250.148.40 ns2.unimelb.edu.au. ns1.unimelb.edu.au. 128.250.20.2 128.250.144.180 14 Domain Resource Records Name server Mail gateways n A portion of a possible DNS database for cs.vu.nl. 15 IP addresses of computers DNS In Action n Finding the IP address for a given hostname is called name resolution and is done with the DNS protocol. n Resolution: q Computer requests local name server to resolve q Local name server asks the root name server q Root returns the name server for a lower zone q Continue down zones until name server can answer n DNS protocol: q Runs on UDP port 53, retransmits when lost messages q Caches name server answers for better performance 16 Example n Example of a computer looking up the IP for a name 17 DNS Name Resolution Contd n host at cis.poly.edu wants IP address for gaia.cs.umass.edu n iterated query: § contacted server replies with name of server to contact • “I don’t know this name, but ask this server” n recursive query: § server obtains mapping on client’s behalf 2 3 root DNS server TLD DNS server 4 5 6 local DNS server dns.poly.edu 1 8 7 authoritative DNS server requesting host cis.poly.edu dns.cs.umass.edu gaia.cs.umass.edu 18 DNS: Caching & Updating Records n Once (any) name server learns a mapping, it caches the mapping § IP addresses of TLD servers typically cached in local name servers èroot name servers not often visited § Cache entries timeout (disappear) after some time 19

Leave a Reply

Your email address will not be published. Required fields are marked *