260 likes | 421 Views
OSI Transport Layer. Network Fundamentals – Chapter 4. Objectives. Explain the role of Transport Layer protocols and services in supporting communications across data networks Analyze the application and operation of TCP mechanisms that support reliability
E N D
OSI Transport Layer Network Fundamentals – Chapter 4
Objectives • Explain the role of Transport Layer protocols and services in supporting communications across data networks • Analyze the application and operation of TCP mechanisms that support reliability • Analyze the application and operation of TCP mechanisms that support reassembly and manage data loss. • Analyze the operation of UDP to support communicate between two processes on end devices
Transport Layer • Role of Transport layer
Transport layer • The purpose : • Tracking the individual communication between application on the source and destination host • Segmenting data and managing each piece • Reassembling the segment into stream of application • Identifying the different application • Performing flow control between end user • enabling error discovery • Initiating a session
Transport Layer • Primary responsibilities: • Tracking the individual communication between applications • Segmenting data • Managing each segment • Reassembling the segments • Identifying the different applications
Transport Layer • Major functions of the transport layer and the role it plays in data networks
segment segment Transport Layer • Protocols: • TCP • UDP • IP is a best-effort delivery service • No guarantees • Best-effort service • “Unreliable service” • TCP/UDP is responsible for extending IP’s delivery service between two end systems. • Known as transport layer multiplexing and demultiplexing.
Transport Layer Role and Services • Supporting Reliable Communication
Transport layer • 2 protocol involve (UDP & TCP) • UDP
Transport Layer • TCP
TCP vs. UDP • TCP provides: • Reliable delivery • Error checking • Flow control • Congestion control • Ordered delivery • (Connection establishment) • Applications: • HTTP • FTP • Telnet • MSN messenger • UDP provides: • Unreliable delivery • No error checking • No flow control • No congestion control • No ordered delivery • (No connectionestablishment) • Applications • DNS (usually) • SMTP • DHCP • RTP (Real-Time Protocol) • VoIP
HTTP HTTP SMTP FTP Cabrillo Web Server • A single client may have multiple transport connections with multiple servers. • Notice that TCP is a connection-oriented service (two-way arrow) between the hosts, whereas UDP is a connectionless service (one-way arrow) . (later) TCP TCP TCP ISP’s Email and FTP Server TCP TCP UDP TCP UDP
Transport Laye • port numbers play in the TCP and UDP protocols.
Application and Operation of TCP Mechanisms • port numbers in establishing TCP sessions and directing segments to server process
Application and Operation of TCP Mechanisms • Trace the steps in the handshake in the establishment of TCP sessions
Application and Operation of TCP Mechanisms • Trace the steps in the handshake in the establishment of TCP sessions
Application and Operation of TCP Mechanisms • Trace the steps in the handshake in the termination of TCP sessions
Managing TCP Sessions • Describe how TCP sequence numbers are used to reconstruct the data stream with segments placed in the correct order
TCP: Connection Establishment • For a connection to be established, the two end stations must synchronize on each other's TCP initial sequence numbers (ISNs). • Sequence numbers : • Track the order of packets • Ensure that no packets are lost in transmission. • The initial sequence number is the starting number used when a TCP connection is established. • Exchanging beginning sequence numbers during the connection sequence ensures that lost data can be recovered.
Three-way Handshake Client Web Server SYN, SEQ=8563 SYN Received Note: ISNs do not start a 0 or 1. There are several reasons for this including segments that may still be in buffers and also security issues. (Beyond the scope of this presentation.) Step 1: • The three-way handshake happens before any data, HTTP Request (GET), is sent by the client. • A TCP clientbegins the three-way handshake by sending a segment with the SYN (Synchronize Sequence Number) control flag set, indicating an initial value in the sequence number field in the header. • The sequence number is the Initial Sequence Number (ISN), is randomly chosen and is used to begin tracking the flow of data from the client to the server for this session.
Three-way Handshake Client Web Server SYN, SEQ=8563 SYN Received Step 2: • The TCP server needs to acknowledge the receipt of the SYN segment. • Server sends a segment back to the client with: • ACK flag set indicating that the Acknowledgment number is significant. • The value of the acknowledgment number field is equal to the client initial sequence number plus 1. • This is called an expectational acknowledgement – the next byte this host expects to receive (more soon). • SYN flag is set with its own random ISN for the Sequence number SYN, ACK, SEQ=1678ACK=8564 SYN, ACK Received
Three-way Handshake Client Web Server SYN, SEQ=8563 SYN Received Step 3: • TCP client responds with a segment containing an ACK that is the response to the TCP SYN sent by the server. • The value in the acknowledgment number field contains one more than the initial sequence number received from the server. • The client can now send application data encapsulated in TCP segment. • HTTP Request (GET) SYN, ACK, SEQ=1678 ACK=8564 SYN, ACK Received ACK, SEQ=8564 ACK=1679 ACK Received HTTP Request (GET)
Managing TCP Sessions • TCP that manage the interrelationship between window size, data loss and congestion during a session through 2 way – flow control & Dynamic Window size