Download presentation
Presentation is loading. Please wait.
Published byCaren Long Modified over 8 years ago
1
No Class on Friday There will be NO class on: FRIDAY 1/29/15 1
2
2 Root DNS Servers com DNS servers org DNS serversedu DNS servers poly.edu DNS servers umass.edu DNS servers yahoo.com DNS servers amazon.com DNS servers pbs.org DNS servers Distributed, Hierarchical Database Client wants IP for www.amazon.com; 1 st approx: r Client queries a root server to find com DNS server r Client queries com DNS server to get amazon.com DNS server r Client queries amazon.com DNS server to get IP address for www.amazon.com
3
3 DNS: Root name servers r contacted by local name server that can not resolve name r root name server: m contacts authoritative name server if name mapping not known m gets mapping m returns mapping to local name server 13 root name servers worldwide b USC-ISI Marina del Rey, CA l ICANN Los Angeles, CA e NASA Mt View, CA f Internet Software C. Palo Alto, CA (and 17 other locations) i Autonomica, Stockholm (plus 3 other locations) k RIPE London (also Amsterdam, Frankfurt) m WIDE Tokyo a Verisign, Dulles, VA c Cogent, Herndon, VA (also Los Angeles) d U Maryland College Park, MD g US DoD Vienna, VA h ARL Aberdeen, MD j Verisign, ( 11 locations)
4
4 TLD and Authoritative Servers r Top-level domain (TLD) servers: responsible for com, org, net, edu, etc, and all top-level country domains uk, fr, ca, jp. m Network solutions maintains servers for com TLD m Educause for edu TLD r Authoritative DNS servers: organization’s DNS servers, providing authoritative hostname to IP mappings for organization’s servers (e.g., Web and mail). m Can be maintained by organization or service provider
5
5 Local Name Server r Does not strictly belong to hierarchy r Each ISP (residential ISP, company, university) has one. m Also called “default name server” r When a host makes a DNS query, query is sent to its local DNS server m Acts as a proxy, forwards query into hierarchy.
6
6 requesting host cis.poly.edu gaia.cs.umass.edu root DNS server local DNS server dns.poly.edu 1 2 3 4 5 6 authoritative DNS server dns.cs.umass.edu 7 8 TLD DNS server Example r Host at cis.poly.edu wants IP address for gaia.cs.umass.edu
7
7 requesting host cis.poly.edu gaia.cs.umass.edu root DNS server local DNS server dns.poly.edu 1 2 4 5 6 authoritative DNS server dns.cs.umass.edu 7 8 TLD DNS server 3 Recursive queries recursive query: rputs burden of name resolution on contacted name server iterated query: rcontacted server replies with name of server to contact r“I don’t know this name, but ask this server”
8
8 DNS: caching and updating records r once (any) name server learns mapping, it caches mapping m cache entries timeout (disappear) after some time m TLD servers typically cached in local name servers Thus root name servers not often visited r update/notify mechanisms under design by IETF m RFC 2136 m http://www.ietf.org/html.charters/dnsind-charter.html
9
9 DNS records DNS: distributed db storing resource records (RR) r Type=NS name is domain (e.g. foo.com) value is IP address of authoritative name server for this domain RR format: (name, value, type, ttl) rType=A name is hostname value is IP address rType=CNAME name is alias name for some “cannonical” (the real) name www.ibm.com is really servereast.backup2.ibm.com value is cannonical name rType=MX value is Canon. name of mailserver associated with alias name
10
10 DNS protocol, messages DNS protocol : query and reply messages, both with same message format msg header ridentification: 16 bit # for query, reply to query uses same # rflags: m query or reply m recursion desired m recursion available m reply is authoritative
11
11 DNS protocol, messages Name, type fields for a query RRs in reponse to query records for authoritative servers additional “helpful” info that may be used
12
Pure P2P architecture r no always-on server r arbitrary end systems directly communicate r peers are intermittently connected and change IP addresses Three topics: m file distribution m searching for information m case Study: Skype peer-peer 12
13
File Distribution: Server-Client vs P2P Question : How much time to distribute file from one server to N peers? usus u2u2 d1d1 d2d2 u1u1 uNuN dNdN Server Network (with abundant bandwidth) File, size F u s : server upload bandwidth u i : peer i upload bandwidth d i : peer i download bandwidth 13
14
File distribution time: server-client usus u2u2 d1d1 d2d2 u1u1 uNuN dNdN Server Network (with abundant bandwidth) F r server sequentially sends N copies: m NF/u s time r client i takes F/d i time to download increases linearly in N (for large N) = d cs = max { NF/u s, F/min(d i ) } i Time to distribute F to N clients using client/server approach 14
15
File distribution time: P2P usus u2u2 d1d1 d2d2 u1u1 uNuN dNdN Server Network (with abundant bandwidth) F r server must send one copy: F/u s time r client i takes F/d i time to download r NF bits must be downloaded (aggregate) fastest possible upload rate: u s + u i d P2P = max { F/u s, F/min(d i ), NF/(u s + u i ) } i 15
16
Server-client vs. P2P: example Client upload rate = u, F/u = 1 hour, u s = 10u, d min ≥ u s 16
17
File distribution: BitTorrent tracker: tracks peers participating in torrent torrent: group of peers exchanging chunks of a file obtain list of peers trading chunks peer P2P file distribution 17
18
BitTorrent (1) r file divided into 256KB chunks. r peer joining torrent: m has no chunks, but will accumulate them over time m registers with tracker to get list of peers, connects to subset of peers (“neighbors”) r while downloading, peer uploads chunks to other peers. r peers may come and go r once peer has entire file, it may (selfishly) leave or (altruistically) remain 18
19
BitTorrent (2) Pulling Chunks r at any given time, different peers have different subsets of file chunks r periodically, a peer (Alice) asks each neighbor for list of chunks that they have. r Alice sends requests for her missing chunks m rarest first Sending Chunks: tit-for-tat Alice sends chunks to four neighbors currently sending her chunks at the highest rate re-evaluate top 4 every 10 secs every 30 secs: randomly select another peer, starts sending chunks newly chosen peer may join top 4 “optimistically unchoke” 19
20
BitTorrent: Tit-for-tat (1) Alice “optimistically unchokes” Bob (2) Alice becomes one of Bob’s top-four providers; Bob reciprocates (3) Bob becomes one of Alice’s top-four providers With higher upload rate, can find better trading partners & get file faster! 20
21
Distributed Hash Table (DHT) r DHT: distributed P2P database r database has (key, value) pairs; m key: ss number; value: human name m key: content type; value: IP address r peers query DB with key m DB returns values that match the key r peers can also insert (key, value) peers 21
22
DHT Identifiers r assign integer identifier to each peer in range [0,2 n -1]. m Each identifier can be represented by n bits. r require each key to be an integer in same range. r to get integer keys, hash original key. m e.g., key = h(“Led Zeppelin IV”) m this is why they call it a distributed “hash” table 22
23
How to assign keys to peers? r central issue: m assigning (key, value) pairs to peers. r rule: assign key to the peer that has the closest ID. r convention in lecture: closest is the immediate successor of the key. r e.g.,: n=4; peers: 1,3,4,5,8,10,12,14; m key = 13, then successor peer = 14 m key = 15, then successor peer = 1 23
24
1 3 4 5 8 10 12 15 Circular DHT (1) r each peer only aware of immediate successor and predecessor. r “overlay network” 24
25
Circular DHT (2) 0001 0011 0100 0101 1000 1010 1100 1111 Who’s resp for key 1110 ? I am O(N) messages on avg to resolve query, when there are N peers 1110 Define closest as closest successor 25
26
Circular DHT with Shortcuts r each peer keeps track of IP addresses of predecessor, successor, short cuts. r reduced from 6 to 2 messages. r possible to design shortcuts so O(log N) neighbors, O(log N) messages in query 1 3 4 5 8 10 12 15 Who’s resp for key 1110? 26
27
Peer Churn r peer 5 abruptly leaves r Peer 4 detects; makes 8 its immediate successor; asks 8 who its immediate successor is; makes 8’s immediate successor its second successor. r What if peer 13 wants to join? 1 3 4 5 8 10 12 15 To handle peer churn, require each peer to know the IP address of its two successors. Each peer periodically pings its two successors to see if they are still alive. 27
28
P2P Case study: Skype r inherently P2P: pairs of users communicate. r proprietary application-layer protocol (inferred via reverse engineering) r hierarchical overlay with SNs r Index maps usernames to IP addresses; distributed over SNs Skype clients (SC) Supernode (SN) Skype login server 28
29
Peers as relays r problem when both Alice and Bob are behind “NATs”. m NAT prevents an outside peer from initiating a call to insider peer r solution: m using Alice’s and Bob’s SNs, relay is chosen m each peer initiates session with relay. m peers can now communicate through NATs via relay 29
30
30 Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable data transfer m flow control m congestion control r learn about transport layer protocols in the Internet: m UDP: connectionless transport m TCP: connection-oriented transport m TCP congestion control
31
31 Outline r Transport-layer services r Multiplexing and demultiplexing r Connectionless transport: UDP
32
32 Transport services and protocols r provide logical communication between app processes running on different hosts r transport protocols run in end systems m send side: breaks app messages into segments, passes to network layer m rcv side: reassembles segments into messages, passes to app layer r more than one transport protocol available to apps m Internet: TCP and UDP application transport network data link physical application transport network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical logical end-end transport
33
33 Transport vs. network layer r network layer: logical communication between hosts r transport layer: logical communication between processes m relies on, enhances, network layer services Household analogy: 12 kids sending letters to 12 kids r processes = kids r app messages = letters in envelopes r hosts = houses r transport protocol = parents r network-layer protocol = postal service
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.