DNS and P2P File Sharing

Similar documents
DNS: Domain Name System

Domain Name System (or Service) (DNS) Computer Networks Term B10

Domain Name System Richard T. B. Ma

Chapter 2 Application Layer

How To Map Between Ip Address And Name On A Domain Name System (Dns)

CMPE 80N: Introduction to Networking and the Internet

Domain Name System (DNS)

CS 355. Computer Networking. Wei Lu, Ph.D., P.Eng.

DATA COMMUNICATOIN NETWORKING

The Application Layer: DNS

internet technologies and standards

DNS: Domain Name System

CS 43: Computer Networks Naming and DNS. Kevin Webb Swarthmore College September 17, 2015

Domain Name System (DNS) RFC 1034 RFC

Names vs. Addresses. Flat vs. Hierarchical Space. Domain Name System (DNS) Computer Networks. Lecture 5: Domain Name System

Domain Name System DNS

FTP: the file transfer protocol

Application Layer. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross

DNS. Spring 2016 CS 438 Staff 1

Naming and the DNS. Focus. How do we name hosts etc.? Application Presentation Topics. Session Domain Name System (DNS) /URLs

P2P: centralized directory (Napster s Approach)

Domain Name System (DNS) Reading: Section in Chapter 9

Applications & Application-Layer Protocols: The Domain Name System and Peerto-Peer

Ch 6: Networking Services: NAT, DHCP, DNS, Multicasting

DNS and electronic mail. DNS purposes

NET0183 Networks and Communications

HW2 Grade. CS585: Applications. Traditional Applications SMTP SMTP HTTP 11/10/2009

Domain Name System (DNS)

Ch 6: Networking Services: NAT, DHCP, DNS, Multicasting, NTP

Computer Networks & Security 2014/2015

2.5 DNS The Internet s Directory Service

CS 348: Computer Networks. - DNS; 22 nd Oct Instructor: Sridhar Iyer IIT Bombay

CSCI-1680 CDN & P2P Chen Avin

Application-layer protocols

C 1. Last Time. CSE 486/586 Distributed Systems Domain Name System. Review: Causal Ordering. Review: Causally Ordered Multicast.

Chapter 2: outline. 2.6 P2P applications 2.7 socket programming with UDP and TCP

Network programming, DNS, and NAT. Copyright University of Illinois CS 241 Staff 1

Lecture 2 CS An example of a middleware service: DNS Domain Name System

FTP: the file transfer protocol

DNS records. RR format: (name, value, type, TTL) Type=NS

DNS: Domain Names. DNS: Domain Name System. DNS: Root name servers. DNS name servers

Internet-Praktikum I Lab 3: DNS

3. The Domain Name Service

CSE/ISE 311: Systems Administra5on Networking 2

Resilient Networking. Overview of DNS Known attacks on DNS Denial-of-Service Cache Poisoning. Securing DNS Split-Split-DNS DNSSEC.

The Domain Name System

DNS Domain Name System

Communicating Applications

Names & Addresses. Names & Addresses. Names vs. Addresses. Identity. Names vs. Addresses. CS 194: Distributed Systems: Naming

Overlay Networks. Slides adopted from Prof. Böszörményi, Distributed Systems, Summer 2004.

DNS: Domain Name System

CS640: Computer Networks. Naming /ETC/HOSTS

Network(Security(Protocols(

The Role and uses of Peer-to-Peer in file-sharing. Computer Communication & Distributed Systems EDA 390

Application Layer. CMPT Application Layer 1. Required Reading: Chapter 2 of the text book. Outline of Chapter 2

Chapter 23 The Domain Name System (DNS)

Lecture 5: Network Attacks I. Course Admin

The Domain Name System

Motivation. Domain Name System (DNS) Flat Namespace. Hierarchical Namespace

Distributed Systems. 09. Naming. Paul Krzyzanowski. Rutgers University. Fall 2015

The Domain Name System

Professor Yashar Ganjali Department of Computer Science University of Toronto.

Understanding DNS (the Domain Name System)

Domain Name System (DNS) Omer F. Rana. Networks and Data Communications 1

The Domain Name System (DNS)

CS3600 SYSTEMS AND NETWORKS

1 Introduction: Network Applications

CS244A Review Session Routing and DNS

Computer Networks Prof. S. Ghosh Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 34 DNS & Directory

loss-tolerant and time sensitive loss-intolerant and time sensitive loss-intolerant and time insensitive

Introduction to Network Operating Systems

416 Distributed Systems. Feb 24, 2016 DNS and CDNs

Department of Computer Science Institute for System Architecture, Chair for Computer Networks. File Sharing

Chapter 2 Application Layer

Network Layer, Part 1 Internet Architecture. History

Part 5 DNS Security. SAST01 An Introduction to Information Security Martin Hell Department of Electrical and Information Technology

Overview. Tor Circuit Setup (1) Tor Anonymity Network

Types of hypertext. Hypertext documents can either be 1.Static 2.Dynamic

Introduction to Computer Networks

Domain Name System (DNS) Fundamentals

Computer Networks: Domain Name System

INTERNET DOMAIN NAME SYSTEM

Peer-to-Peer Networks 02: Napster & Gnutella. Christian Schindelhauer Technical Faculty Computer-Networks and Telematics University of Freiburg

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ MEng. Nguyễn CaoĐạt

Lesson 13: DNS Security. Javier Osuna GMV Head of Security and Process Consulting Division

Overview of Computer Networks

Transcription:

Computer Networks DNS and P2P File Sharing Based on Computer Networking, 4 th Edition by Kurose and Ross DNS: Domain Name System People: many identifiers: SSN, name, passport # Internet hosts, routers: IP address (32 bit) - used for addressing datagrams name, e.g., www.yahoo.com - used by humans Q: map between IP addresses and name? Domain Name System: distributed database implemented in hierarchy of many name servers application-layer protocol host, routers, name servers to communicate to resolve names (address/name translation) note: core Internet function, implemented as application-layer protocol complexity at network s edge

DNS DNS services Hostname to IP address translation Host aliasing Canonical and alias names Mail server aliasing Load distribution Replicated Web servers: set of IP addresses for one canonical name Why not centralize DNS? single point of failure traffic volume distant centralized database maintenance doesn t scale! Distributed, Hierarchical Database Client wants IP for www.amazon.com; st approx: Client queries a root server to find com DNS server Client queries com DNS server to get amazon.com DNS server Client queries amazon.com DNS server to get IP address for www.amazon.com Root DNS Servers com DNS servers org DNS servers edu DNS servers yahoo.com DNS servers amazon.com DNS servers pbs.org DNS servers poly.edu DNS servers umass.edu DNS servers 2

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 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, ( locations) k RIPE London (also Amsterdam, Frankfurt) i Autonomica, Stockholm (plus 3 other locations) e NASA Mt View, CA f Internet Software C. Palo Alto, CA (and 7 other locations) m WIDE Tokyo 3 root name servers worldwide b USC-ISI Marina del Rey, CA l ICANN Los Angeles, CA TLD and Authoritative Servers Top-level domain (TLD) servers Responsible for com, org, net, edu, etc, and all top-level country domains uk, fr, ca, jp. Network Solutions maintains servers for com TLD Educause for edu TLD Authoritative DNS servers Organization s DNS servers, providing authoritative hostname to IP mappings for organization s servers (e.g., Web and mail). Can be maintained by organization or service provider 3

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 is sent to its local DNS server Acts as a proxy, forwards query into hierarchy Example Host at cis.poly.edu wants IP address for gaia.cs.umass.edu local DNS server dns.poly.edu 2 8 root DNS server 3 4 5 7 TLD DNS server 6 requesting host cis.poly.edu authoritative DNS server dns.cs.umass.edu gaia.cs.umass.edu Recursive queries recursive query: puts burden of name resolution on contacted name server heavy load? iterated query: contacted server replies with name of server to contact I don t know this name, but ask this server 2 local DNS server dns.poly.edu root DNS server 7 6 5 3 4 TLD DNS server 8 requesting host cis.poly.edu authoritative DNS server dns.cs.umass.edu gaia.cs.umass.edu 4

DNS: caching and updating records once (any) name server learns mapping, it caches mapping cache entries timeout (disappear) after some time TLD servers typically cached in local name servers Thus root name servers not often visited update/notify mechanisms under design by IETF RFC 236 http://www.ietf.org/html.charters/dnsind-charter.html DNS records DNS: distributed db storing resource records (RR) Type=A name is hostname value is IP address RR format: (name, value, type, ttl) Type=NS name is domain (e.g. foo.com) value is hostname of authoritative name server for this domain Type=CNAME name is alias name for some canonical (the real) name www.ibm.com is really servereast.backup2.ibm.com value is canonical name Type=MX value is name of mailserver associated with name 5

DNS protocol, messages DNS protocol: query and reply messages, both with same message format msg header identification: 6 bit # for query, reply to query uses same # flags: query or reply recursion desired recursion available reply is authoritative Name, type fields for a query RRs in response to query records for authoritative servers additional helpful info that may be used Inserting records into DNS Example: just created startup Network Utopia Register name networkuptopia.com at a registrar (e.g., Network Solutions) Need to provide registrar with names and IP addresses of your authoritative name server (primary and secondary) Registrar inserts two RRs into the com TLD server: (networkutopia.com, dns.networkutopia.com, NS) (dns.networkutopia.com, 22.22.22., A) Put in authoritative server Type A record for www.networkuptopia.com and Type MX record for networkutopia.com How do people get the IP address of your Web site? 6

P2P file sharing Example Alice runs P2P client application on her notebook computer Intermittently connects to Internet; gets new IP address for each connection Asks for Hey Jude Application displays other peers that have copy of Hey Jude. Alice chooses one of the peers, Bob. File is copied from Bob s PC to Alice s notebook: HTTP While Alice downloads, other users uploading from Alice. Alice s peer is both a Web client and a transient Web server. All peers are servers = highly scalable! P2P: centralized directory original Napster design ) when peer connects, it informs central server: IP address content 2) Alice queries for Hey Jude 3) Alice requests file from Bob centralized directory server Bob peers Problems Single point of failure Performance bottleneck Copyright infringement: target of lawsuit is obvious 2 3 file transfer is decentralized, but locating content is highly centralized Alice 7

Query flooding: Gnutella fully distributed no central server public domain protocol many Gnutella clients implementing protocol overlay network: graph edge between peer X and Y if there s a TCP connection all active peers and edges is overlay net Edge is not a physical link Given peer will typically be connected with < 0 overlay neighbors Gnutella: protocol Query message sent over existing TCP connections peers forward query message QueryHit sent over reverse path Scalability: limited scope flooding Query QueryHit Query QueryHit File transfer: HTTP 8

Gnutella: Peer joining. Joining peer Alice must find another peer in Gnutella network: use list of candidate peers 2. Alice sequentially attempts TCP connections with candidate peers until connection setup with Bob 3. Flooding: Alice sends Ping message to Bob; Bob forwards Ping message to his overlay neighbors (who then forward to their neighbors.) peers receiving Ping message respond to Alice with Pong message 4. Alice receives many Pong messages, and can then setup additional TCP connections Hierarchical Overlay between centralized index, query flooding approaches each peer is either a group leader or assigned to a group leader. TCP connection between peer and its group leader. TCP connections between some pairs of group leaders. group leader tracks content in its children ordinary peer group-leader peer neighoring relationships in overlay network 9

Comparing Client-server, P2P architectures Question : How much time distribute file initially at one server to N other computers? File, size F Server u d u s u 2 d2 u s : server upload bandwidth u i : client/peer i upload bandwidth d i : client/peer i download bandwidth d N u N Network (with abundant bandwidth) Client-server: file distribution time server sequentially sends N copies of a file of size F: NF/u s time client i takes F/d i time to download F Server d N u N u d u s u 2 d2 Network (with abundant bandwidth) Time to distribute F to N clients using = d cs = max { NF/u s, F/min(d i ) } i client/server approach increases linearly in N (for large N) 0

Minimum Distribution Time P2P: file distribution time server must send one copy: F/u s time client i takes F/d i time to download NF bits must be downloaded (aggregate) F Server d N u N u d u s u 2 d2 Network (with abundant bandwidth) fastest possible upload rate (assuming all nodes sending file chunks to same peer): u s + u i i=,n d P2P = max { F/u s, F/min(d i ), NF/(u s + u i) } i i=,n Comparing Client-server, P2P architectures 3.5 3 2.5 P2P Client-Server 2.5 0.5 0 0 5 0 5 20 25 30 35 N

P2P Case Study: BitTorrent file divided into 256KB chunks. peer joining torrent: has no chunks, but will accumulate them over time registers with tracker to get list of peers, connects to subset of peers ( neighbors ) while downloading, peer uploads chunks to other peers. peers may come and go once peer has entire file, it may (selfishly) leave or (altruistically) remain tracker: tracks peers participating in torrent obtain list of peers peer torrent: group of peers exchanging chunks of a file P2P Case Study: BitTorrent Pulling Chunks at any given time, different peers have different subsets of file chunks periodically, a peer (Alice) asks each neighbor for list of chunks that they have. Alice issues requests for her missing chunks 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 0 secs every 30 secs: randomly select another peer, starts sending chunks newly chosen peer may join top 4 2

P2P Case study: Skype P2P (pc-to-pc, pc-to-phone, phone-to-pc) Voice-Over-IP (VoIP) application also IM proprietary application-layer protocol (inferred via reverse engineering) hierarchical overlay Skype login server Skype clients (SC) Supernode (SN) Making a call User starts Skype SC registers with SN list of bootstrap SNs SC logs in (authenticate) Call: SC contacts SN will callee ID SN contacts other SNs (unknown protocol, maybe flooding) to find addr of callee; returns addr to SC SC directly contacts callee, overtcp 3