Computer Networks CSE 434 Fall 2009 Sandeep K. S. Gupta Arizona State University Research Experience.

Slides:



Advertisements
Similar presentations
Chapter 2 Application Layer Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April A note on the use.
Advertisements

Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
No Class on Friday There will be NO class on: FRIDAY 1/30/15.
Network Layer4-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley,
4-1 Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving side, delivers.
Chapter 4 Network Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 14.
2: Application Layer P2P applications and Sockets.
10 - Network Layer. Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving.
Network Layer4-1 Chapter 4: Network Layer Chapter goals: r understand principles behind network layer services: m network layer service models m forwarding.
Network Layer4-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley,
Chapter 4 Network Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 13.
1 Day 01 - The Internet. 2 Chapter 1 Introduction Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
CSE 124 Networked Services Fall 2009 B. S. Manoj, Ph.D 11/03/2009CSE 124 Network Services FA 2009 Some of these.
Network Layer4-1 Data Communication and Networks Lecture 6 Networks: Part 1 Circuit Switching, Packet Switching, The Network Layer October 13, 2005.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.5 Routing algorithms m Link state m Distance.
Chapter 4 Network Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 15.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 All material copyright
Network Layer Goals: understand principles behind network layer services: –routing (path selection) –dealing with scale –how a router works –advanced topics:
Application Layer – Peer-to-peer UIUC CS438: Communication Networks Summer 2014 Fred Douglas Slides: Fred, Kurose&Ross (sometimes edited)
Introduction to Network Layer. Network Layer: Motivation Can we built a global network such as Internet by extending LAN segments using bridges? –No!
CS 1652 The slides are adapted from the publisher’s material All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Jack Lange.
Network Layer4-1 Summary: TCP Congestion Control When CongWin is below Threshold, sender in slow-start phase, window grows exponentially. When CongWin.
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 18 Omar Meqdadi Department of Computer Science and Software Engineering University.
Network Layer4-1 Chapter 4: Network Layer Chapter goals: r understand principles behind network layer services: m network layer service models m forwarding.
Virtual Circuit Network. Network Layer 2 Network layer r transport segment from sending to receiving host r network layer protocols in every host, router.
Network Layer4-1 Chapter 4 Network Layer A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers).
Chapter 2: Application layer
2: Application Layer1 Chapter 2: Application layer r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail  SMTP,
Lecture 6 Overview. TCP: Transmission Control Protocol TCP is an alternative transport layer protocol supported by TCP/IP. TCP provides: – Connection-oriented.
Introduction 1-1 EKT355/4 ADVANCED COMPUTER NETWORK MISS HASNAH AHMAD School of Computer & Communication Engineering.
7-1 Last time □ Wireless link-layer ♦ Introduction Wireless hosts, base stations, wireless links ♦ Characteristics of wireless links Signal strength, interference,
1 CSE3213 Computer Network I Network Layer (7.1, 7.3, ) Course page: Slides modified from Alberto Leon-Garcia.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Network Layer introduction.
1 John Magee 24 February 2014 CS 280: Network Layer: Virtual Circuits / Datagram Networks and What’s inside a Router? Most slides adapted from Kurose and.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
Chapter 3 Transport Layer
Chapter 1 Introduction Circuit/Packet Switching Protocols Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley,
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach Featuring the Internet, 2 nd edition. Jim Kurose, Keith Ross Addison-Wesley,
Introduction1-1 Chapter 1 Computer Networks and the Internet Computer Networking: A Top Down Approach Featuring the Internet, 2 nd edition. Jim Kurose,
Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.
4: Network Layer4-1 Schedule Today: r Finish Ch3 r Collect 1 st Project r See projects run r Start Ch4 Soon: r HW5 due Monday r Last chance for Qs r First.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
1 Peer-to-Peer Systems r Application-layer architectures r Case study: BitTorrent r P2P Search and Distributed Hash Table (DHT)
2: Application Layer1 Chapter 2: Application layer r 2.1 Principles of network applications  app architectures  app requirements r 2.2 Web and HTTP r.
Introduction1-1 Data Communications and Computer Networks Chapter 1 CS 3830 Lecture 1 Omar Meqdadi Department of Computer Science and Software Engineering.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July A.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
2: Application Layer 1 Chapter 2 Application Layer Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April.
Forwarding.
Computer Networks CSE 434 Fall 2009 Sandeep K. S. Gupta Arizona State University Research Experience.
PEAR TO PEAR PROTOCOL. Pure P2P architecture no always-on server arbitrary end systems directly communicate peers are intermittently connected and change.
Network Layer4-1 Chapter 4 Network Layer All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking: A Top Down.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
INTRODUCTION NETWORKING CONCEPTS AND ADMINISTRATION CSIS 3723
Chapter 4 Network Layer All material copyright
Day 01 - The Internet.
Network Layer Goals: Overview:
CS4470 Computer Networking Protocols
Server-client vs. P2P: example
Chapter 4-1 Network layer
Network Layer I have learned from life no matter how far you go
Part 4: Peer to Peer - P2P Applications
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
Chapter 2 Application Layer
Chapter 4 Network Layer A note on the use of these ppt slides:
Presentation transcript:

Computer Networks CSE 434 Fall 2009 Sandeep K. S. Gupta Arizona State University Research Experience for Undergraduates (REU)

Announcements and Agenda  HW 3 – due Oct 12 th.  Quiz 4  HW3 discussion  Summary last class.  File distribution Bit-Torrent  P2P cont.  Distributed Index (database) maintenance using DHT  Skype – using P2P for user location and NAT traversal  App Layer Recap

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

File distribution time: server-client usus u2u2 d1d1 d2d2 u1u1 uNuN dNdN Server Network (with abundant bandwidth) F  server sequentially sends N copies:  NF/u s time  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

2: Application Layer 5 File distribution time: P2P usus u2u2 d1d1 d2d2 u1u1 uNuN dNdN Server Network (with abundant bandwidth) F  server must send one copy: F/u s time  client i takes F/d i time to download  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

2: Application Layer 6 Server-client vs. P2P: example Client upload rate = u, F/u = 1 hour, u s = 10u, d min ≥ u s

2: Application Layer 7 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 r P2P file distribution

2: Application Layer 8 BitTorrent (1)  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

2: Application Layer 9 BitTorrent (2) 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 sends requests for her missing chunks  rarest first Sending Chunks: tit-for-tat r Alice sends chunks to four unchoked neighbors currently sending her chunks at the highest rate  re-evaluate top 4 every 10 secs r every 30 secs: randomly select another peer, starts sending chunks  newly chosen peer may join top 4  “optimistically unchoke”

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!

Distributed Hash Table (DHT)  Index (simple database) is crucial for many P2P applications – it is useful in locating an item (e.g. a file (song) ).  DHT = distributed (structured) P2P database  Database has (key, value) pairs;  key: ss number; value: human name  key: content type; value: IP address  Peers query DB with key  DB returns values that match the key  Peers can also insert (key, value) peers

Example: Bit-Torrent Tracker  Uses (Kandemlia) DHT  Key is torrent identifier  Value is IP addresses of all the peers currently participating in the torrent  A newly arriving BT peer: queries the tracker with torrent ID to find a peer responsible for the identifier  It then queries the peer to get a list of other peers in the torrent.

Important Issues  Decentralization  Scalability  Fault-Tolerance

DHT Identifiers  Assign integer identifier to each peer in range [0,2 n -1].  Each identifier can be represented by n bits.  Require each key to be an integer in same range.  To get integer keys, hash original key.  Hash Function: many-to-one function for which two different inputs can have the same output, but the likelihood of this is extremely small  eg, key = h(“Led Zeppelin IV”)  This is why they call it a distributed “hash” table

How to assign keys to peers?  Central issue:  Assigning (key, value) pairs to peers.  Rule: assign key to the peer that has the closest ID.  Convention in lecture: closest is the immediate successor of the key.  Ex: n=4; peers: 1,3,4,5,8,10,12,14;  key = 13, then successor peer = 14  key = 15, then successor peer = 1

Circular DHT (1)  Each peer only aware of immediate successor and predecessor.  “Overlay network” over “underlay network”

Circle DHT - Routing Query(2) 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

Circular DHT with Shortcuts  Each peer keeps track of IP addresses of predecessor, successor, short cuts.  Reduced from 6 to 2 messages.  Possible to design shortcuts so O(log N) neighbors, O(log N) messages in query Who’s resp for key 1110?

Peer Churn  Peer 5 abruptly leaves  Peer 4 detects; makes 8 its immediate successor; asks 8 who its immediate successor is; makes 8’s immediate successor its second successor.  What if peer 13 wants to join? 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.

2: Application Layer 20 P2P Case study: Skype  inherently P2P: pairs of users communicate.  proprietary application-layer protocol (inferred via reverse engineering)  hierarchical overlay with SNs  Index maps usernames to IP addresses; distributed over SNs Skype clients (SC) Supernode (SN) Skype login server

2: Application Layer 21 Peers as relays  Problem when both Alice and Bob are behind “NATs”.  NAT prevents an outside peer from initiating a call to insider peer  Solution:  Using Alice’s and Bob’s SNs, Relay is chosen  Each peer initiates session with relay.  Peers can now communicate through NATs via relay

Summary Application Layer  At the edge of the network, Programmable, Open  Application Layer Protocols  Structure: Client-Server, P2P  Core Intenet Fuctionality at App Layer: DNS  Examples: HTTP, FTP, SMTP  Issues: Addressing, Service needed along different dimensions: reliability, throughput, security, communication abstraction (different types of group communication) Support from Transport Layers  Protocol Design Issues:  Separate or Combined Data and Control Channel  Stateful versus Stateless  Push versus Pull  Getting across NAT  Performance,  Scalability,  Fault-tolerance

Chapter 4 Network Layer A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint form so you can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following:  If you use these slides (e.g., in a class) in substantially unaltered form, that you mention their source (after all, we’d like people to use our book!)  If you post any slides in substantially unaltered form on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material. Thanks and enjoy! JFK/KWR All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking: A Top Down Approach 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009.

Chapter 4: Network Layer Chapter goals:  understand principles behind network layer services:  network layer service models  forwarding versus routing  how a router works  routing (path selection)  dealing with scale  advanced topics: IPv6, mobility  instantiation, implementation in the Internet

Chapter 4: Network Layer  4. 1 Introduction  4.2 Virtual circuit and datagram networks  4.3 What’s inside a router  4.4 IP: Internet Protocol  Datagram format  IPv4 addressing  ICMP  IPv6  4.5 Routing algorithms  Link state  Distance Vector  Hierarchical routing  4.6 Routing in the Internet  RIP  OSPF  BGP  4.7 Broadcast and multicast routing

Network layer  transport segment from sending to receiving host  on sending side encapsulates segments into datagrams  on rcving side, delivers segments to transport layer  network layer protocols in every host, router  router examines header fields in all IP datagrams passing through it 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 network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical

Two Key Network-Layer Functions  forwarding: move packets from router’s input to appropriate router output  routing: determine route taken by packets from source to dest.  routing algorithms analogy:  routing: process of planning trip from source to dest  forwarding: process of getting through single interchange

value in arriving packet’s header routing algorithm local forwarding table header value output link Interplay between routing and forwarding

Connection setup  3 rd important function in some network architectures:  ATM, frame relay, X.25  before datagrams flow, two end hosts and intervening routers establish virtual connection  routers get involved  network vs transport layer connection service:  network: between two hosts (may also involve intervening routers in case of VCs)  transport: between two processes

What’s Next?  HW 3 due Monday  Next Class: Midterm Review

Network service model Q: What service model for “channel” transporting datagrams from sender to receiver? Example services for individual datagrams:  guaranteed delivery  guaranteed delivery with less than 40 msec delay Example services for a flow of datagrams:  in-order datagram delivery  guaranteed minimum bandwidth to flow  restrictions on changes in inter- packet spacing

Network layer service models: Network Architecture Internet ATM Service Model best effort CBR VBR ABR UBR Bandwidth none constant rate guaranteed rate guaranteed minimum none Loss no yes no Order no yes Timing no yes no Congestion feedback no (inferred via loss) no congestion no congestion yes no Guarantees ?

Chapter 4: Network Layer  4. 1 Introduction  4.2 Virtual circuit and datagram networks  4.3 What’s inside a router  4.4 IP: Internet Protocol  Datagram format  IPv4 addressing  ICMP  IPv6  4.5 Routing algorithms  Link state  Distance Vector  Hierarchical routing  4.6 Routing in the Internet  RIP  OSPF  BGP  4.7 Broadcast and multicast routing

Network layer connection and connection-less service  datagram network provides network-layer connectionless service  VC network provides network-layer connection service  analogous to the transport-layer services, but:  service: host-to-host  no choice: network provides one or the other  implementation: in network core

Virtual circuits  call setup, teardown for each call before data can flow  each packet carries VC identifier (not destination host address)  every router on source-dest path maintains “state” for each passing connection  link, router resources (bandwidth, buffers) may be allocated to VC (dedicated resources = predictable service) “source-to-dest path behaves much like telephone circuit”  performance-wise  network actions along source-to-dest path

VC implementation a VC consists of: 1. path from source to destination 2. VC numbers, one number for each link along path 3. entries in forwarding tables in routers along path  packet belonging to VC carries VC number (rather than dest address)  VC number can be changed on each link.  New VC number comes from forwarding table

Forwarding table VC number interface number Incoming interface Incoming VC # Outgoing interface Outgoing VC # … … Forwarding table in northwest router: Routers maintain connection state information!

Virtual circuits: signaling protocols  used to setup, maintain teardown VC  used in ATM, frame-relay, X.25  not used in today’s Internet application transport network data link physical application transport network data link physical 1. Initiate call 2. incoming call 3. Accept call 4. Call connected 5. Data flow begins 6. Receive data

Datagram networks  no call setup at network layer  routers: no state about end-to-end connections  no network-level concept of “connection”  packets forwarded using destination host address  packets between same source-dest pair may take different paths application transport network data link physical application transport network data link physical 1. Send data 2. Receive data

Forwarding table Destination Address Range Link Interface through through through otherwise 3 4 billion possible entries