We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 54
UNIT -3
The Transport Layer
Services Provided to the Upper Layers Services Provided to the Upper Layers • Transport entity: This is the software or hardware component in the transport layer that ensures data reliability. It can be in the operating system, a library, or a network card. • A TPDU is a unit of data passed between the transport entities on Host 1 and Host 2. It contains the actual data plus information to ensure the message gets delivered properly. Services Provided to the Upper Layers • There are two types of network service. 1. The connection-oriented transport service. 2. The connectionless transport service Transport Service Primitives Transport Service Primitives … A state diagram for a simple connection management scheme. Elements of Transport Protocols Elements of Transport Protocols • Transport protocol similar to data link protocols. • Both do error control and flow control. Elements of Transport Protocols • Addressing • Connection Establishment • Connection Release Addressing • SAP - Service Access Point • TSAP - Transport Service Access Point • NSAP - Network Service Access Point Addressing Addressing Addressing • A name server is a special process that helps users find the TSAP address of a service by providing a mapping between service names and TSAP addresses • To handle this situation, an alternative scheme is often used. In this model, there exists a special process called a name server or sometimes a directory server. To find the TSAP address corresponding to a given service name, such as ''time of day,'' a user sets up a connection to the name server (which listens to a well-known TSAP). The user then sends a message specifying the service name, and the name server sends back the TSAP address. Then the user releases the connection with the name server and establishes a new one with the desired service. Connection Establishment Tomlinson’s Method for Connection Establishment Each computer has a clock that keeps running, even if the system crashes. When a connection is started, the sequence number of packets is tied to the clock, ensuring no two connections have the same number. Connection Establishment • Packet lifetime can be restricted to a known maximum using one (or more) of the following techniques: 1. Restricted subnet design. 2. Putting a hop counter in each packet. 3. Timestamping each packet. Connection Establishment … • Restricted subnet: In a restricted subnet, the network ensures that no packet can travel in circles or be delayed indefinitely. • Hop counter: Each packet gets a number (hop count) that decreases every time it passes through a device on its way to the destination. • Timestamping: Each packet is stamped with the time it was created. If a packet gets too old, the network routers discard it based on a predetermined expiration time. Connection Establishment Connection Establishment • The forbidden region refers to a time interval and sequence number range in which sequence numbers cannot be reused after a system restart or crash. This concept is used in transport layer protocols to prevent delayed duplicate packets from being misinterpreted as new data. Connection Establishment • Three-way handshake. 3 steps : Connection Establishment … Connection Release • There are two styles of terminating a connection: 1. Asymmetric release 2. Symmetric release Connection Release • Asymmetric release is the way the telephone system works, when one party hangs up, the connection is broken.
• Abrupt and may cause
data loss THE INTERNET TRANSPORT PROTOCOLS: UDP • User Datagram Protocol – UDP • The connectionless protocol . • UDP transmits segments consisting of an 8- byte header followed by the pay load. … … • Source Port (16 bits): This field contains the port number of the sender (source) application. It helps identify the sending application on the source machine. Destination Port (16 bits): This field contains the port number of the recipient (destination) application. It identifies which application on the receiving machine should handle the incoming data. … • UDP Length (16 bits): This field specifies the total length of the UDP datagram, including both the header and the payload (data) that follows it. • UDP Checksum (16 bits): The checksum is used for error-checking. It ensures that the UDP header and data haven't been corrupted during transmission. The IPv4 pseudo header included in the UDP checksum. … • Source Address (32 bits): This field contains the IPv4 address of the sending device. • Destination Address (32 bits): This field holds the IPv4 address of the receiving device. …. • Zeros (8 bits): The 8 bits of zeros are used to ensure proper alignment of the fields in the pseudo-header. • Protocol (8 bits): This field contains the protocol number used by UDP, which is 17 in IPv4. TCP (Transmission Control Protocol) • TCP was formally defined in RFC 793 in September 1981. • RFC 1122 added clarifications and fixed some bugs. • RFC 1323 made TCP better for high-speed networks. • RFC 2018 introduced selective acknowledgements …. • RFC 2581 added rules for managing network congestion. • RFC 2873 allowed some header fields to be used for quality of service. • RFC 2988 improved how TCP sets its retransmission timers • RFC 3168 introduced a way to signal when the network is congested. .. • Port A port is a logical access point in a computer network, identified by a 16-bit number, that is used to identify specific processes or network services. It helps direct data to the correct application or service on a device. … • A well-known port is a port number in the range from 0 to 1023 that is reserved for specific services and protocols. These ports are typically used by system services and applications that require a standard connection point, like: • Port 80 for HTTP (web traffic) • Port 443 for HTTPS (secure web traffic) • Port 25 for SMTP (email sending) … • TCP service is obtained by both the sender and the receiver creating end points, called sockets. … … • A 5 tuple refers to a unique combination of parameters that identifies a specific TCP connection between two devices on a network. 1. Protocol: TCP (Transmission Control Protocol) 2. Source IP address: The IP address of the sending host 3. Source port: The port on the sending host 4. Destination IP address: The IP address of the receiving host 5. Destination port: The port on the receiving host … • CWR (Congestion Window Reduced): Indicates that the sender has reduced its sending rate in response to congestion. • ECE (Explicit Congestion Notification Echo): Alerts the sender about network congestion. • URG (Urgent Pointer Valid): Set when the urgent pointer field contains valid data. • ACK: Indicates that the Acknowledgement Number is valid. .. • PSH (Push): Requests the receiver to pass data to the application immediately. • RST (Reset): Resets a confused or invalid connection. • SYN: Used to initiate a connection. • FIN: Indicates that the sender has finished sending data and wants to close the connection. … • The window size is a TCP flow control parameter that tells the sender how many bytes it can send without waiting for an acknowledgment. It ensures efficient data transmission by dynamically adapting to the receiver’s buffer availability, preventing overflow, and avoiding unnecessary waiting time. ….
• The Urgent Pointer field in the TCP
header is used when the URG (Urgent) flag is set to 1. It indicates that certain data within the segment is "urgent" and should be prioritized for processing by the receiver. … • The Options field in the TCP header allows adding extra features not covered by the standard header. Common options include: • MSS (Maximum Segment Size): Specifies the largest packet size a host can handle. • Window Scale: Expands the window size for better performance on high-speed networks. • Timestamp: Tracks packet timing to calculate round-trip time and prevent sequence number wrapping. • SACK (Selective Acknowledgment): Informs the sender of specific data received, helping to retransmit only lost packets efficiently. TCP Connection Establishment Connections TCP Connection Establishment Connections • a malicious sender can tie up resources on a host by sending a stream of SYN segments and never following through to complete the connection. This attack is called a SYN flood, and it crippled many Web servers in the 1990s. TCP Connection Establishment Connections • SYN cookies are a defense mechanism against SYN flood attacks. Instead of storing a sequence number after sending a SYN-ACK message, the server generates a special sequence number using a cryptographic function. This "SYN cookie" is sent to the client. If the client completes the handshake by sending the correct ACK (acknowledging the cookie), the server can recreate the original sequence number to verify the connection—without having stored anything earlier. TCP Connection Release • Closing a TCP connection requires both sides to send FIN and receive ACKs. • Both sides exchange ACKs to confirm the termination • Timers are used to ensure connections don’t hang forever if one side doesn't respond. TCP Connection Management Modeling TCP Congestion Control • Congestion collapse occurs when a network becomes overloaded, causing a drastic drop in goodput .Although data packets are still being sent, most get delayed, lost, or retransmitted, consuming even more network resources and making the situation worse. TCP Congestion Control