DOC PREVIEW
NU EECS 340 - Chapter 3 - Transport Layer

This preview shows page 1-2-14-15-29-30 out of 30 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 30 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 30 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 30 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 30 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 30 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 30 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 30 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Announcement• Homework 1 due last night, how is that ?– Will discuss some problems in the lecture next week• Should have completed at least part II of project 1• Homework 2 will be out next weekSome slides are in courtesy of J. Kurose and K. RossReview of Previous Lecture• Socket programming with TCP• Socket programming with UDP• I/O multiplexing• Web cachingChapter 3: Transport LayerOur goals:• understand principles behind transport layer services:– multiplexing/demultiplexing– reliable data transfer– flow control– congestion control• learn about transport layer protocols in the Internet:– UDP: connectionless transport– TCP: connection-oriented transport– TCP congestion controlOutline• Transport-layer services• Multiplexing and demultiplexing• Connectionless transport: UDP• Principles of reliable data transferTransport services and protocols•providelogical communicationbetween app processes running on different hosts• transport protocols run in end systems – send side: breaks app messages into segments, passes to network layer–rcvside: reassembles segments into messages, passes to app layerapplicationtransportnetworkdata linkphysicalapplicationtransportnetworkdata linkphysicalnetworkdata linkphysicalnetworkdata linkphysicalnetworkdata linkphysicalnetworkdata linkphysicalnetworkdata linkphysicallogical end-end transportTransport vs. network layer•network layer:logical communication between hosts•transport layer:logical communication between processes – relies on, enhances, network layer services• On one host, there may be several processes communicating with processes on several other hosts, with different protocolsInternet transport-layer protocols• reliable, in-order delivery (TCP)– congestion control – flow control– connection setup• unreliable, unordered delivery: UDP– no-frills extension of “best-effort” IP• services not available: – delay guarantees– bandwidth guaranteesapplicationtransportnetworkdata linkphysicalapplicationtransportnetworkdata linkphysicalnetworkdata linkphysicalnetworkdata linkphysicalnetworkdata linkphysicalnetworkdata linkphysicalnetworkdata linkphysicallogical end-end transportOutline• Transport-layer services• Multiplexing and demultiplexing• Connectionless transport: UDP• Principles of reliable data transferMultiplexing/demultiplexingapplicationtransportnetworklinkphysicalP1applicationtransportnetworklinkphysicalapplicationtransportnetworklinkphysicalP2P3P4P1host 1host 2host 3= process= socketdelivering received segmentsto correct socketDemultiplexing at rcv host:gathering data from multiplesockets, enveloping data with header (later used for demultiplexing)Multiplexing at send host:How demultiplexing works• Host receives IP datagrams– each datagram has source IP address, destination IP address– each datagram carries 1 transport-layer segment– each segment has source, destination port number (recall: well-known port numbers for specific applications)• Host uses IP addresses & port numbers to direct segment to appropriate socketsource port # dest port #32 bitsapplicationdata (message)other header fieldsTCP/UDP segment formatIP datagram formatverlength32 bitsdata (variable length,typically a TCP or UDP segment)16-bit identifierInternetchecksumtime tolive32 bit source IP addressIP protocol versionnumberheader length(bytes)max numberremaining hops(decremented at each router)forfragmentation/reassemblytotal datagramlength (bytes)upper layer protocolto deliver payload tohead.lentype ofservice“type” of data flgsfragmentoffsetupperlayer32 bit destination IP addressOptions (if any)E.g. timestamp,record routetaken, specifylist of routers to visit.how much overhead with TCP?•20 bytes of TCP•20 bytes of IP•= 40 bytes + app layer overheadConnectionless demultiplexing• UDP socket identified by two-tuple:(dest IP address, dest port number)• When host receives UDP segment:– checks destination port number in segment– directs UDP segment to socket with that port number• IP datagrams with different source IP addresses and/or source port numbers directed to same socketConnectionless demux (cont)ClientIP:BP2clientIP: AP1P1P3serverIP: CSP: 6428DP: 9157SP: 9157DP: 6428SP: 6428DP: 5775SP: 5775DP: 6428SP provides “return address”Connection-oriented demux• TCP socket identified by 4-tuple: – source IP address– source port number– dest IP address–dest port number• recv host uses all four values to direct segment to appropriate socket• Server host may support many simultaneous TCP sockets:– each socket identified by its own 4-tuple• Web servers have different sockets for each connecting client– non-persistent HTTP will have different socket for each requestConnection-oriented demux (cont)ClientIP:BP2clientIP: AP1P1P3serverIP: CSP: 80DP: 9157SP: 9157DP: 80SP: 80DP: 5775SP: 5775DP: 80P4Outline• Transport-layer services• Multiplexing and demultiplexing• Connectionless transport: UDP• Principles of reliable data transferUDP: User Datagram Protocol [RFC 768]•“no frills,”“bare bones”Internet transport protocol• “best effort” service, UDP segments may be:–lost– delivered out of order to app•connectionless:– no handshaking between UDP sender, receiver– each UDP segment handled independently of othersWhy is there a UDP?• no connection establishment (which can add delay)• simple: no connection state at sender, receiver• small segment header• no congestion control: UDP can blast away as fast as desiredUDP: more• often used for streaming multimedia apps– loss tolerant–rate sensitive• reliable transfer over UDP: add reliability at application layer– application-specific error recovery!source port # dest port #32 bitsApplicationdata (message)UDP segment formatlengthchecksumLength, inbytes of UDPsegment,includingheaderUDP checksumSender:• treat segment contents as sequence of 16-bit integers• checksum: addition (1’s complement sum) of segment contents• sender puts checksum value into UDP checksum fieldReceiver:• addition of all segment contents + checksum• check if all bits are 1:– NO - error detected–YES -no error detected. But maybe errors nonetheless?More later ….Goal: detect “errors” (e.g., flipped bits) in transmitted segment0110010110110100Addition:1’s complement sum:01100101010011111’s complement sum:Addition:Outline• Transport-layer services• Multiplexing and


View Full Document

NU EECS 340 - Chapter 3 - Transport Layer

Download Chapter 3 - Transport 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 Chapter 3 - Transport 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 Chapter 3 - Transport 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?