Transport Layer Summary (26.8)
The following is a summary of each topic in the chapter and some questions for your reflection.
Packet Tracer—TCP and UDP Communications (26.8.1)
In this activity, you will explore the functionality of the TCP and UDP protocols, multiplexing, and the function of port numbers in determining which local application requested the data or is sending the data.
What Did I Learn in This Chapter? (26.8.2)
• Transportation of Data—The transport layer is the link between the application layer and the lower layers that are responsible for network transmission. The transport layer is responsible for logical communications between applications running on different hosts. The transport layer includes TCP and UDP. Transport layer protocols specify how to transfer messages between hosts and are responsible for managing reliability requirements of a conversation. The transport layer is responsible for tracking conversations (sessions), segmenting data and reassembling segments, adding header information, identifying applications, and conversation multiplexing. TCP is stateful, reliable, acknowledges data, resends lost data, and delivers data in sequenced order. TCP is used for email and the web. UDP is stateless, fast, has low overhead, does not requires acknowledgments, does not resend lost data, and delivers data in the order it arrives. Use UDP for VoIP and DNS.
• TCP Overview—TCP establishes sessions, ensures reliability, provides same-order delivery, and supports flow control. A TCP segment adds 20 bytes of overhead as header information when encapsulating the application layer data. TCP header fields are the Source Port, Destination Port, Sequence Number, Acknowledgment Number, Header Length, Reserved, Control Bits, Window Size, Checksum, and Urgent. Applications that use TCP are HTTP, FTP, SMTP, and Telnet.
• UPD Overview—UDP reconstructs data in the order it is received, does not resend lost segments, does not establish a session, and does not inform the sender of resource availability. UDP header fields are Source Port, Destination Port, Length, and Checksum. Applications that use UDP are DHCP, DNS, SNMP, TFTP, VoIP, and video conferencing.
• Port Numbers—The TCP and UDP transport layer protocols use port numbers to manage multiple, simultaneous conversations. This is why the TCP and UDP header fields identify a source application port number and a destination application port number. The source and destination ports are placed within the segment. The segments are then encapsulated within an IP packet. The IP packet contains the IP addresses of the source and destination. The combination of the source IP address and source port number, or the destination IP address and destination port number, is known as a socket. The socket is used to identify the server and service being requested by the client. The range of port numbers is 0 through 65535. This range is divided into groups: well-known ports, registered ports, and private and/or dynamic ports. Some well-known port numbers are reserved for common applications such as FTP, SSH, DNS, HTTP, and others. Sometimes it is necessary to know which active TCP connections are open and running on a networked host. Netstat is an important network utility that can be used to verify those connections.
• TCP Communications Process—Each application process running on a server is configured to use a port number. The port number is either automatically assigned or configured manually by a system administrator. TCP server processes are as follows: clients sending TCP requests, clients requesting destination ports, clients requesting source ports, and the server responding to destination port and source port requests. To terminate a single conversation supported by TCP, four exchanges are needed to end both sessions. Either the client or the server can initiate the termination. The three-way handshake establishes that the destination device is present on the network, verifies that the destination device has an active service and is accepting requests on the destination port number that the initiating client intends to use, and informs the destination device that the source client intends to establish a communication session on that port number. The six control bits flags are URG, ACK, PSH, RST, SYN, and FIN.
• Reliability and Flow Control—For the original message to be understood by the recipient, all the data must be received and the data in these segments must be reassembled into the original order. Sequence numbers are assigned in the header of each packet. No matter how well designed a network is, data loss occasionally occurs. TCP provides ways to manage segment losses, including a mechanism to retransmit segments for unacknowledged data. Host operating systems today typically employ an optional TCP feature called selective acknowledgment (SACK), negotiated during the three-way handshake. If both hosts support SACK, the receiver can explicitly acknowledge which segments (bytes) were received, including any discontinuous segments. That way, the sending host needs to retransmit only the missing data. Flow control helps maintain the reliability of TCP transmission by adjusting the rate of data flow between source and destination. To accomplish this, the TCP header includes a 16-bit field called the Window Size. The process of the destination sending acknowledgments as it processes bytes received and the continual adjustment of the source’s send window is known as sliding windows. A source might be transmitting 1,460 bytes of data within each TCP segment. This is the typical maximum segment size (MSS) that a destination device can receive. To avoid and control congestion, TCP employs several congestion handling mechanisms. The source reduces the number of unacknowledged bytes it sends, not the window size determined by the destination.
• UPD Communication—UDP is a simple protocol that provides the basic transport layer functions. When UDP datagrams are sent to a destination, they often take different paths and arrive in the wrong order. UDP does not track sequence numbers the way TCP does. UDP has no way to reorder the datagrams into their transmission order. UDP simply reassembles the data in the order that it was received and forwards it to the application. If the data sequence is important to the application, the application must identify the proper sequence and determine how the data should be processed. UDP-based server applications are assigned well-known or registered port numbers. When UDP receives a datagram destined for one of these ports, it forwards the application data to the appropriate application based on its port number. The UDP client process dynamically selects a port number from the range of port numbers and uses this as the source port for the conversation. The destination port is usually the well-known or registered port number assigned to the server process. After a client has selected the source and destination ports, the same pair of ports is used in the header of all datagrams used in the transaction. For the data returning to the client from the server, the source and destination port numbers in the datagram header are reversed.
This chapter had a lot of information about the transport layer. I never knew so much happened here! Did you? When going to a website or sending an email, did you ever think about how that was different than joining a video call? Did you wonder why you always receive every word in an email message but sometimes lose a word on your video call? Now you should have some knowledge about the differences between TCP and UDP and why TCP is more reliable than UDP. I am excited to be taking this course, and I hope you are too!