120 likes | 215 Views
Transport Layer Lecture 7 Imran Ahmed University of Management & Technology. Our goals: understand principles behind transport layer services: multiplexing/demultiplexing reliable data transfer flow control congestion control. learn about transport layer protocols in the Internet:
E N D
Transport Layer Lecture 7 Imran Ahmed University of Management & Technology
Our 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 control Transport Layer
Agenda • Overview of transport layer • Flow control mechanisms • Connection-less services – UDP • Connection-oriented services – TCP • TCP congestion control
Provide logical communication between app processes running on different hosts Transport protocols run in end systems send side: breaks app messages into segments. rcv side: reassembles segments into messages. More than one transport protocol available to apps Internet: TCP and UDP 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 logical end-end transport Transport services and protocols
network layer: logical communication between hosts transport layer: logical communication between processes relies on, enhances, network layer services Household analogy: 12 kids sending letters to 12 kids processes = kids app messages = letters in envelopes hosts = houses transport protocol = Ann and Bill network-layer protocol = postal service Transport vs. network layer
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 guarantees 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 logical end-end transport Internet transport-layer protocols
Agenda • Overview of transport layer • Connection-less services – UDP • Flow control mechanisms • Connection-oriented services – TCP • TCP congestion control
Connectionlessservice unreliable data transfer no flow control no congestion control no handshaking between UDP sender, receiver Using UDP: Streaming media, teleconferencing, Internet telephony Why is there a UDP? no connection establishment delay) simple: no connection state at sender, receiver small segment header no congestion control: UDP can blast away as fast as desired UDP: User Datagram Protocol [RFC 768]
Other UDP uses DNS SNMP Reliable transfer over UDP: add reliability at application layer application-specific error recovery! UDP: more 32 bits source port # dest port # Length, in bytes of UDP segment, including header checksum length Application data (message) UDP segment format
The UDP header UDP length field includes the 8-byte header and the data. UDP checksum is optimal and stored as 0 if not computed (a true computed 0 checksum is stored as all 1s). UDP does not do-flow control, error control, or retransmission upon receipt of a bad segment. All of that is up to the user processes. UDP provides just what the doctor ordered
Sender: 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 field Receiver: compute checksum of received segment check if computed checksum equals checksum field value: NO - error detected YES - no error detected. UDP checksum Goal: detect “errors” (e.g., flipped bits) in transmitted segment
UDP Checksum Example Add 16-bit words (add pad bytes if necessary) e.g. 0001001011010110 0001101010101100 0010110110000010 checksum= 1101001001111101 Checksum is optional; If not used, checksum = all 0’s