DOC PREVIEW
CORNELL CS 414 - Application, Transport, Network and Link Layer

This preview shows page 1-2-3 out of 9 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1-116: Application, Transport, Network and Link LayersLast Modified: 7/3/2004 1:46:53 PM-2Roadmapr Application Layer (User level)r Transport Layer (OS)r Network Layer (OS)r Link Layer (Device Driver, Adapter Card)-3Application Layerr Network Applications Drive Network Design r Important to remember that network applications are the reason we care about building a network infrastructurer Applications range from text based command line ones popular in the 1980s (like telnet, ftp, news, chat, etc) to multimedia applications (Web browsers, audio and video streaming, realtimevideoconferencing, etc.)-4Applications and application-layer protocolsApplication: communicating, distributed processesm running in network hosts in “user space”m exchange messages to implement appm e.g., email, file transfer, the WebApplication-layer protocolsm one “piece” of an appm define messages exchanged by apps and actions takenm user services provided by lower layer protocolsapplicationtransportnetworkdata linkphysicalapplicationtransportnetworkdata linkphysicalapplicationtransportnetworkdata linkphysical-5Client-server paradigmTypical network app has two pieces: client and serverapplicationtransportnetworkdata linkphysicalapplicationtransportnetworkdata linkphysicalClient:r initiates contact with server (“speaks first”)r typically requests service from server, r for Web, client is implemented in browser; for e-mail, in mail readerServer:r Running first (always?)r provides requested service to client e.g., Web server sends requested Web page, mail server delivers e-mailrequestreply-6How do clients and servers communicate?API: application programming interfacer defines interface between application and transport layerr socket: Internet APIm two processes communicate by sending data into socket, reading data out of socketQ: how does a process “identify” the other process with which it wants to communicate?m IP address of host running other processm “port number” - allows receiving host to determine to which local process the message should be delivered … more on this later.2-7Socket programmingSocket APIr introduced in BSD4.1 UNIX, 1981r Sockets are explicitly created, used, released by applicationsr client/server paradigm r two types of transport service via socket API: m unreliable datagram m reliable, byte stream-oriented a host-local, application-created/owned, OS-controlled interface (a “door”) into whichapplication process can both send and receive messages to/from another (remote or local) application processsocketGoal: learn how to build client/server application that communicate using sockets-8SocketsSocket: a door between application process and end-end-transport protocol (UCP or TCP)processkernelbuffers,variablessocketcontrolled byapplicationdevelopercontrolled byoperatingsystemhost orserverprocesskernelbuffers,variablessocketcontrolled byapplicationdevelopercontrolled byoperatingsystemhost orserverinternet-9Languages and Platformsr Socket API is available for many languages on many platforms:m C, Java,Perl, Python,… m *nix, Windows,…r Socket Programs written in any language and running on any platform can communicate with each other!r Client and server must agree on the type of socket, the server port number and the protocol-10Transport services and protocolsr providelogical communicationbetween app’ processes running on different hostsr transport protocols run in end systems r transport vs network layer services:r network layer:data transfer between end systemsr transport layer:data transfer between processesm relies on, enhances, network layer services applicationtransportnetworkdata linkphysicalapplicationtransportnetworkdata linkphysicalnetworkdata linkphysicalnetworkdata linkphysicalnetworkdata linkphysicalnetworkdata linkphysicalnetworkdata linkphysicallogical end-end transport-11Services provided by Internet transport protocolsTCP service:r connection-oriented:setup required between client, serverr reliable transport between sending and receiving processr flow control: sender won’t overwhelm receiverr congestion control: throttle sender when network overloadedr does not providing: timing, minimum bandwidth guaranteesUDP service:r unreliable data transfer between sending and receiving processr does not provide: connection setup, reliability, flow control, congestion control, timing, or bandwidth guarantee Q: why bother? Why is there a UDP?-12UDPr UDP adds very little functionality (or overhead) to bare IPr Adds multiplexing/demultiplexingr other UDP uses (why?):m DNS: small, retransmit if necessarym often used for streaming multimedia apps• Loss tolerant• rate sensitivesource port # dest port #32 bitsApplicationdata (message)UDP segment formatlength checksumLength, inbytes of UDPsegment,includingheader3-13applicationtransportnetworkMP2applicationtransportnetworkProcess-to-Process Message DeliveryGoal : Deliver application data to correct process (and more particularly to the right socket)Segment - unit of data exchanged between transport layer entities; transport protocol data unit (TPDU)receiverHtHnsegmentsegmentMapplicationtransportnetworkP1MM MP3P4segmentheaderapplication-layerdata-14Multiplexing/demultiplexingDemultiplexing based on IP addresses of sender and and port numbers of both sender and receiver m Can distinguish traffic coming to same port but part of separate conversations (like multiple client connections to a web server)gathering data from multipleapp processes, enveloping data with header (later used for demultiplexing)source port # dest port #32 bitsapplicationdata (message)other header fieldsTCP/UDP segment formatMultiplexing:Stream of incoming data into one machine separated into smaller streams destined for individual processesDemultiplexing:-15TCP adds functionalityr TCP adds lots of functionality over bare IP and over UDPm Still has multiplexing/demultiplexingm Adds reliable, in-order deliverym Adds flow control and congestion controlr How can you guarantee that other side gets “A B C D E” when network could:m Lose data “A B D E”m Duplicate data “A B C C D E”m Corrupt data “A B X D E”m Reorder data “A C D E B”m Or all of the above!-16Common Senser Consider faxing a document with flaky machinem Can’t talk to person on the other side any other wayr What would you do to make sure they got the transmission?m Number the pages – so receiver can put them in order/detect duplicates/detect losses m Need


View Full Document

CORNELL CS 414 - Application, Transport, Network and Link Layer

Documents in this Course
Security

Security

49 pages

Processes

Processes

24 pages

Deadlocks

Deadlocks

57 pages

Threads

Threads

5 pages

Threads

Threads

29 pages

Deadlocks

Deadlocks

36 pages

Load more
Download Application, Transport, Network and Link Layer
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Application, Transport, Network and Link Layer and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Application, Transport, Network and Link Layer 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?