100 likes | 276 Views
CECS 474 Computer Network Interoperability. TCP & UDP Supplement Layer 4 – Transport Protocols. Tracy Bradley Maples, Ph.D. Computer Engineering & Computer Science California State University, Long Beach. Notes for Douglas E. Comer, Computer Networks and Internets (5 th Edition) .
E N D
CECS 474 Computer Network Interoperability TCP & UDP Supplement Layer 4 – Transport Protocols Tracy Bradley Maples, Ph.D. Computer Engineering & Computer Science California State University, Long Beach Notes for Douglas E. Comer, Computer Networks and Internets (5th Edition)
The Transport Layer • GOAL: The Transport Layer provideslogical communication between application processes running on different hosts. • Transport protocols run in the end systems (end-to-end) • • The sending side breaks application messages into segments and passes them down to the Network layer • • The receiving side reassembles the segments into messages and passes them up to the Application layer • NOTE: • The Network Layer provides logical communication between hosts. • The Transport Layer provides logical communication between processes.
Transport Layer Protocols • Two Transport Protocols are available for Applications to use on the Internet: • UDP • TCP • UDP (User Datagram Protocol) • Provides: Unreliable, unordered delivery of segments. • TCP (Transmission Control Protocol) • Provides: Reliable, in-order delivery of segments. • TCP includes: • Connection set-up (3-way handshake) • Flow Control • Congestion Control • NOTE:Neither protocol provides: • Delay guarantees • Bandwidth guarantees
UDP (User Datagram Protocol) • UDP is: • A “no frills,” “bare bones” Internet Transport protocol • Provides “best effort” service • UDP segments may be: • lost • delivered out of order to application • Connectionless • UDP: • has no handshaking between UDP sender, receiver • each UDP segment handled independently of others
UDP (User Datagram Protocol) (cont’d) • Since UDP provides so few services, why is there a UDP? • UDP has no connection establishment => • So it has lower delay • It is simple (no connection state is need at sender, receiver) • It has a small segment header • UDP has no congestion control => • UDP can blast away as fast as desired • Uses of UDP: • It is often used for streaming multimedia apps, because UDP is: • loss tolerant • rate sensitive • UDP is also used in: • DNS • SNMP
TCP (Transmission Control Protocol) • TCP characteristics: • point-to-point connections • one sender, one receiver • full duplex data: • bi-directional data flow in same connection • reliable, in-order byte steam transmission • with no “message boundaries” between bytes • pipelined transmission • multiple segments are sent at the same time • Maximum segments sent simultaneously = TCP congestion/flow control window size • send & receive buffers at sender and receiver • connection-oriented: • handshaking occurs between the sender, receiver before data exchange • Uses flow control: • The sender will not overwhelm receiver’s buffer
TCP (Transmission Control Protocol) (cont’d) Conceptual View Figure from Kurose & Ross, Networking: A Top Down Approach
TCP (Transmission Control Protocol) (cont’d) • TCP creates reliable data service on top of IP’s (Layer 3’s) unreliable delivery service. • To make transmission reliable, TCP uses: • pipelined transmission of segments • send & receive buffers at sender and receiver • ACKs (Acknowledgement) messages sent when segments are received correctly • A retransmission timer • The time will expire if an ACK is not received during the specified time • Retransmissions of segments occur whenever the timer expires. • NOTE: We are skipping the “messy” details of Reliable data transmission!
TCP (Transmission Control Protocol) (cont’d) Important: When an Application sends a message down the protocol stack, it selects whether TCP or UDP should be used for the transmission: