Upload
nabeel-ahmed
View
226
Download
0
Embed Size (px)
Citation preview
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 1/43
2: Application Layer 1
DNS: Domain Name System
People: many identifiers: SSN, name, Passport #
Internet hosts, routers:
IP address (32 bit) -used for addressingdatagrams
´nameµ, e.g.,hermite.cs.smith.edu -
used by humansQ: map between IPaddresses and name ?
Domain Name System: distributed database
implemented in hierarchy ofmany name servers
application-layer protocolhost, routers, name servers tocommunicate to resolve names(address/name translation)
note: core Internet
function implemented asapplication-layer protocol
complexity at network·s´edgeµ
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 2/43
2: Application Layer 2
DNS
Why not centralize DNS?
single point of failure
traffic volume
distant centralizeddatabase
maintenance
doesn·t scale!
DNS services
Hostname to IPaddress translation
Host aliasing Canonical and alias
names
Mail server aliasing
Load distribution Replicated Web
servers: set of IPaddresses for onecanonical name
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 3/43
2: Application Layer 3
Structure of DNS Names
Each name consists of a sequence ofalphanumeric components separated byperiods
Examples:www.ssuet.edu.pk
ssuet.edu.pk
khi.comsats.net.pk
aurangzeb.ssuet.edu.pkNames are hierarchical, with most-
significant component on the right
Left-most component is, generally, acomputer name
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 4/43
2: Application Layer 4
Structure of DNS Names
T op Level Domains (right-most components; alsoknown as T LDs) aredefined by globalauthority Organizationsapply for names in a top-level domain: fsu.edu
macdonalds.com Organizations determine
own internal structure eng.fsu.edu
cs.purdue.edu
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 5/43
2: Application Layer 5
Root DNS Servers
com DNS servers org DNS servers edu DNS servers
poly.edu
DNS servers
umass.edu
DNS serversyahoo.comDNS servers
amazon.comDNS servers
pbs.orgDNS servers
Distributed, Hierarchical Database
Client wants IP for www.amazon.com; 1st approx: Client queries a root server to find com DNS
server Client queries com DNS server to get amazon.comDNS server
Client queries amazon.com DNS server to get IPaddress for www.amazon.com
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 6/43
2: Application Layer 6
DNS: Root name servers
contacted by local name server that can not resolve name
root name server:
contacts authoritative name server if name mapping not known
gets mapping
returns mapping to local name server
13 root nameservers worldwide
b USC-ISI Marina del Rey, CAl ICANN Los Angeles, CA
e NASA Mt View, CA
f Internet Software C. Palo Alto,CA (and 17 other locations)
i Autonomica, Stockholm (plus 3other locations)
k RIPE London (also Amsterdam,Frankfurt)
m WIDE Tokyo
a Verisign, Dulles, VAc Cogent, Herndon, VA (also Los Angeles)
d U Maryland College Park, MDg US DoD Vienna, VA
h ARL Aberdeen, MD j Verisign, ( 11 locations)
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 7/43
2: Application Layer 7
T LD and Authoritative
Servers T op-level domain (T LD) servers: responsible for com, org, net,edu, etc, and all top-level country domains uk, fr, ca, jp.
Network solutions maintains servers for com T LD
Educause for edu T LD
[2007 - TLD servers share responsibilities]
Authoritative DNS servers: organization·s DNS servers,providing authoritative hostname to IP mappings fororganization·s servers (e.g., Web and mail).
Can be maintained by organization or service provider
Local DNS servers: organization·s DNS servers located onvarious subnets to provide DNS lookups for hosts on thesubnet. May not be accessible from outside the subnet. T heirIP addresses are part of the host's network configuration(manual or DHCP).
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 8/43
2: Application Layer 8
Local Name Server
Does not strictly belong to hierarchy
Each ISP (residential ISP, company,university) has one.Also called ´default name serverµ
When a host makes a DNS query, query issent to its local DNS server
Acts as a proxy, forwards query into hierarchy.
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 9/43
2: Application Layer 9
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 10/43
2: Application Layer 10
Inverse domainCountry domains
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 11/43
DNS Name Resolution Example
2: Application Layer 11
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 12/43
DNS Name Resolution Example
2: Application Layer 12
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 13/43
2: Application Layer 13
DNS Operation
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 14/43
2: Application Layer 14
DNS: caching and updating records
once (any) name server learns a mapping, itcaches the mapping (Domain·s DNS = IP)
cache entries timeout (disappear) after sometime (usually 20 minutes)
T LD servers typically cached longer in localname servers
� Th us root name servers not often visited
update/notify mech anisms under design by IETF RFC 2136 h ttp://www.ietf.org/h tml.ch arters/dnsind-ch arter.h tml
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 15/43
2: Application Layer 15
DNS records
DNS: distributed db storing resource records (RR)
T ype=NS name is domain (e.g.
foo.com) value is IP address of
authoritative nameserver for this domain
RR format: (name, value, type,ttl)
T ype=A name is hostname
value is IP address
T ype=CNAME
name is an alias namefor some ´canonicalµ(the real) name
value is canonical name
T ype=MX value is hostname of
mailserver associated withname
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 16/43
2: Application Layer 16
DNS protocol, messages
DNS protocol : query and reply messages, both withsame message format
msg header
identification: 16 bit # forquery, reply to query usessame #
flags:
query or reply
recursion desired recursion available
reply is authoritative
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 17/43
2: Application Layer 17
DNS protocol, messages
Name, type fieldsfor a query
RRs in reponseto query
records forauthoritative servers
additional ́ helpfulµinfo that may be used
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 18/43
wireshark Display of DNS Response
ID is random nonce
used to authenticate
Response to Query
18
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 19/43
Pure P2P architecture
no always-on server
� arbitrary endsystems directly
communicate � peers are
intermittently
connected and change
IP addresses
2: Application Layer 19
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 20/43
File Distribution: Server-Client vs P2P
2: Application Layer 20
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 21/43
File distribution time: server-client
2: Application Layer 21
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 22/43
File distribution time: server-client
2: Application Layer 22
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 23/43
2: Application Layer 23
BitTorrent Overview
Website allowing peers to share music, video and other
media files Central server helps users find initial set of peers that have
pieces of the file
T racker server keeps track of peers possessing content of
individual files Users download the file by participating in exchange:
T hey exchange pieces that they have
for pieces that they don·t have
T herefore, for the system to work, users mus t have inc en tive to g ive
Users who just get, but do not give are called f ree r id ers
Protocol must discourage free riding
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 24/43
BitTorrent
2: Application Layer 24
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 25/43
BitTorrent
2: Application Layer 25
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 26/43
BitTorrent
2: Application Layer 26
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 27/43
BitTorrent
2: Application Layer 27
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 28/43
P2P: Searching for Information
2: Application Layer 28
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 29/43
P2P: centralized directory
2: Application Layer 29
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 30/43
2: Application Layer 30
P2P: problems with centralizeddirectory
Single point of failure
Performance bottleneck
Copyright infringement:
´targetµ of lawsuit is obvious
file transfer isdecentralized, butlocating content ishighly decentralized
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 31/43
2: Application Layer 31
P2P: decentralized directory
Each peer is either agroup leader orassigned to a groupleader.
Group leader tracksthe content in all itschildren.
Peer queries group
leader; group leadermay query other groupleaders.
ordinary ¡ ¡
r
group-leader peer
neighoring relationships
in overlay net¢
ork
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 32/43
Decentralized Indexing: Query Flooding
2: Application Layer 32
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 33/43
Query Flooding
2: Application Layer 33
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 34/43
2: Application Layer 34
P2P: more on query flooding
Pros
peers have similarresponsibilities: no
group leaders highly decentralized
no peer maintainsdirectory info
Cons
excessive querytraffic
query radius: may nothave content whenpresent
bootstrap node
maintenance of overlaynetwork
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 35/43
2: Application Layer 35
More about decentralized directory
overlay network
peers are nodes
edges between peers andtheir group leaders
edges between some pairsof group leaders
virtual neighbors
bootstrap node
connecting peer is either
assigned to a group leaderor designated as leader
advantages of approach
no centralized directoryserver location service
distributed over peers more difficult to shut
down
disadvantages of approach
bootstrap node needed
group leaders can getoverloaded
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 36/43
Gnutella: Peer Joining
2: Application Layer 36
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 37/43
2: Application Layer 37
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 38/43
2: Application Layer 38
Skype
IP telephony system
Allows users to make phone calls to Skype users
to regular phone users
Calls are routed via Skype nodes
Central login server
Super-nodes Nodes that know about location of other nodes
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 39/43
2: Application Layer 39
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 40/43
2: Application Layer 40
Skype P2P Network
Super-nodes are nodeswith powerful CPU andnetwork bandwidth
One has to qualify tobecome a super-node
Super-nodes knowabout locations ofother nodes
Ordinary nodes contact
super-nodes to placecalls
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 41/43
2: Application Layer 41
Skype Components
Skype client ² the client program used to make
phone calls Host cache ² list of other known Skype users,
maintained at each Skype client
Skype login server ² a centralized component.
Processes account information, authentication
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 42/43
2: Application Layer 42
Skype Bootstrap Proced u re
Skype client depends on host cache to find otherusers
How does a new Skype client populate its hostcache?
T here is a list of boo ts trap supern o d es hard-
coded into the Skype client Skype client contacts them to
Find the login server
Find names of other Skype peers
Skype client continues maintaining and refreshingits host cache throughout its lifetime It·s a good idea to let Skype running for a while before
making a phone call!
8/6/2019 Application Layer2
http://slidepdf.com/reader/full/application-layer2 43/43
2: Application Layer 43
Skype User Searc h Proced u re
A Skype client making a phone call needs to findother users
It contacts super-nodes from its host cache,asking them to help find the user
Super-nodes return a list of nodes to contact
T he client contacts those nodes
If unsuccessful, the client asks for more nodes
Guarantees to find any user that has logged inwithin the last 72 hours
Not much specific information on Skype protocolis available«