elec comp 177 fall 2016
play

ELEC / COMP 177 Fall 2016 Some slides from Kurose and Ross, Computer - PowerPoint PPT Presentation

ELEC / COMP 177 Fall 2016 Some slides from Kurose and Ross, Computer Networking , 5 th Edition Application Layer Transport Layer Network Layer Link Layer Physical Layer 2 Application Layer Transport Layer Network Layer Link Layer


  1. ELEC / COMP 177 – Fall 2016 Some slides from Kurose and Ross, Computer Networking , 5 th Edition

  2. Application Layer Transport Layer Network Layer Link Layer Physical Layer 2

  3. Application Layer Transport Layer Network Layer Link Layer Physical Layer “Bits on a wire” Encoding schemes fight: attenuation distortion clock skew 3

  4. Application Layer Transport Layer Network Layer Link Layer Transfer between Ethernet! neighbors Framing MAC addresses Media Access Control Error Detection Hubs & Switches Physical Layer 4

  5. Application Layer Transport Layer Network Layer End-to-End packet IP – Internet Protocol! transfer Packet Headers Routers ICMP for error reporting and router signaling IP Addresses Routing Protocols Link Layer Physical Layer 5

  6. Application Layer Transport Layer Sockets Flow Control Congestion Control End-to-End message transfer UDP TCP Network Layer Link Layer Physical Layer 6

  7. Application Layer HTTP DNS IMAP Skype BitTorrent RDP SSH LDAP NFS Sockets … and many more! Transport Layer Network Layer Link Layer Physical Layer 7

  8. ¡ Transport-layer service ¡ Examine popular models application-level protocols § TCP and UDP ¡ Communication § HTTP paradigms § SMTP / POP3 / IMAP § Client-server § DNS ¡ Program network § Peer-to-peer applications § Socket API 8

  9. ¡ What programs do you run that use the Internet? 9

  10. application transport ¡ Write programs that network data link § Run on (different) end physical systems § Communicate over network § e.g., web server software communicates with browser software ¡ No need to write software for network-core devices application § Network-core devices do transport network not run user applications data link application physical § Applications on end transport network systems allows for rapid data link physical app development and distribution 10

  11. ¡ Client-server § Including data centers / cloud computing ¡ Peer-to-peer (P2P) ¡ Hybrid of client-server and P2P 11

  12. ¡ Server: § Always-on host § Permanent IP address § Lots of bandwidth § Server farms for scaling ¡ Clients: § Communicate with client/server server § May be intermittently connected § May have dynamic IP addresses § Do not communicate directly with each other 12

  13. The Datacenter 13

  14. The Datacenter 14

  15. Google Datacenter (1 of many…) 15

  16. Microsoft Datacenter (Dublin, Ireland) 16

  17. NSA Datacenter (Bluffdale, Utah. 2+ Billion $$) 17

  18. ¡ No always-on server ¡ Arbitrary end systems directly communicate ¡ Peers are peer-peer intermittently connected and change IP addresses ¡ No central point of failure ¡ Highly scalable but difficult to manage 18

  19. P2P “Datacenter” 19

  20. ¡ Skype § Voice-over-IP P2P application § Centralized server: finding address of remote party § Client-client connection: direct (not through server) ¡ Instant messaging § Chatting between two users is P2P § Centralized service: client presence detection/location ▪ User registers its IP address with central server when it comes online ▪ User contacts central server to find IP addresses of buddies 20

  21. ¡ Process: program ¡ Client process: process running within a host that initiates communication § Within same host, two processes communicate ¡ Server process: using inter-process process that waits to communication (defined be contacted by OS) ¡ Applications with P2P § Processes in different architectures have hosts communicate by both client and server exchanging messages processes! 21

  22. ¡ Process sends/receives host or host or messages to/from its socket server server ¡ Socket analogous to door § Sending process shoves controlled by message out door app developer § Transport infrastructure on process process other side of door carries socket socket message to socket at receiving process TCP with TCP with Internet § Imagine you are just writing to buffers, buffers, variables a file… variables ¡ API allow customization of socket controlled § Choose transport protocol by OS § Choose parameters of protocol 22

  23. ¡ Sockets just allow us to send raw messages between processes on different hosts § Transport service takes care of moving the data ¡ What exactly is sent is up to the application § An application-layer protocol § HTTP, IMAP, Skype, etc… 23

  24. ¡ Both the client and server speaking the protocol must agree on § Types of messages exchanged ▪ e.g., request, response § Message syntax ▪ What fields are in messages ▪ How fields are delineated § Message semantics ▪ Meaning of information in fields § Rules for when and how processes send and respond to messages 24

  25. ¡ Public-domain protocols: § Defined in RFCs (Request for Comment) § Allows for interoperability § Examples: HTTP, SMTP, BitTorrent ¡ Proprietary protocols § Examples: Skype 25

  26. ¡ What kind of transport service do applications need? ¡ Data loss – OK or forbidden? § Some apps can tolerate some loss § Other apps requires 100% reliable data transfer ¡ Latency – OK, or bad? § Some apps require low delay to be effective ¡ Throughput § Some apps require minimum amount of throughput to be effective § Other apps (“elastic apps”) utilize whatever throughout is available ¡ Security? § Some apps require encyption 26

  27. What do you think? Application Data Loss? Throughput? Time Sensitive? (OK or not?) (Min required or (Low delay required?) elastic?) File transfer Email Web pages Real-time audio / video Stored audio/video Gaming Instant messaging 27

  28. Application Data Loss? Throughput? Time Sensitive? (OK or not?) (Min required or (Low delay required?) elastic?) File transfer No data loss Elastic “Normal” delay OK Email No data loss Elastic “Normal” delay OK Web pages No data loss Elastic “Normal” delay OK Real-time audio / Loss tolerant Minimum Time sensitive video Stored audio/video Loss tolerant Minimum “Normal” delay OK Gaming No data loss Minimum Time sensitive Instant messaging No data loss Elastic “Normal” delay OK 28

  29. TCP SERVICE UDP SERVICE ¡ Connection-oriented ¡ Unreliable data transfer § Setup required between client between sending and and server processes receiving process ¡ Reliable transport between ¡ Does not provide sending and receiving process ¡ Flow control § Connection setup § Sender won’t overwhelm § Reliability Why receiver § Flow control ¡ Congestion control bother § Congestion control with UDP § Sender won’t overwhelm the network then? § Timing ¡ Does not provide § Throughput guarantee § Timing, minimum throughput § Security guarantees, security 29

  30. Application Data Loss? Throughput? Time Sensitive? Transport (OK or not?) (Min required or (Low delay required?) Protocol elastic?) File transfer No data loss Elastic “Normal” delay OK TCP Email No data loss Elastic “Normal” delay OK TCP Web pages No data loss Elastic “Normal” delay OK TCP Real-time audio / Loss tolerant Minimum Time sensitive UDP video Stored audio/video Loss tolerant Minimum “Normal” delay OK TCP or UDP Gaming No data loss Minimum Time sensitive UDP Instant messaging No data loss Elastic “Normal” delay OK TCP 30

  31. 31

  32. ¡ Web page consists of base HTML file and (potentially) many referenced objects § HTML file, JPEG image, Flash video, … ¡ Each object is addressable by a URL ¡ Example URL: www.somecompany.com/someDept/image.png path name host name 32

  33. ¡ HTTP is the application layer protocol for the PC running web Chrome ¡ It is how the client and server communicate ¡ Client/server model Server running § Client : browser that Apache Web requests, receives, server “displays” Web objects § Server : Web server Mac running Safari sends objects in response to requests 33

  34. Client Server Client initiates TCP connection (creates socket) to server, port 80 Server accepts TCP connection from client HTTP messages (application-layer protocol messages) exchanged between browser (HTTP client) and Web server (HTTP server) TCP connection closed by client or server 34

  35. ¡ HTTP is “stateless” ¡ Why no state? ¡ Server maintains no § Protocols that maintain information about past “state” are complex! § Past history (state) must client requests be maintained § If server/client crashes, their views of “state” may be inconsistent and must be reconciled 35

  36. ¡ Nonpersistent HTTP ¡ Persistent HTTP § At most one object is § Multiple objects can be sent over a TCP sent over single TCP connection. connection between client and server. 36

  37. Suppose user enters URL www.someCompany.com/someDept/index.html (contains text and references to 10 jpeg images) 1a . HTTP client initiates TCP connection to HTTP server 1b. HTTP server at host (process) at www.someCompany.com www.someCompany.com waiting for TCP connection at port on port 80 80. “accepts” connection, notifying client 2. HTTP client sends HTTP request message (containing URL) into TCP 3. HTTP server receives request connection socket. Message indicates that client wants object message, forms response message someDept/index.html containing requested object, and sends message into its socket time 37

Recommend


More recommend