0% found this document useful (0 votes)
5 views24 pages

3 I5 NZR VTNZ

TCP, or Transmission Control Protocol, is a reliable, connection-oriented protocol used for ensuring ordered and error-checked delivery of data across IP networks. It employs a three-way handshake for establishing connections and includes key functionalities such as segmentation, error control, flow control, and congestion control. The TCP header contains critical fields for sequencing, acknowledgements, and error detection, making it essential for effective data transmission.

Uploaded by

gekertxertb
Copyright
© © All Rights Reserved
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
0% found this document useful (0 votes)
5 views24 pages

3 I5 NZR VTNZ

TCP, or Transmission Control Protocol, is a reliable, connection-oriented protocol used for ensuring ordered and error-checked delivery of data across IP networks. It employs a three-way handshake for establishing connections and includes key functionalities such as segmentation, error control, flow control, and congestion control. The TCP header contains critical fields for sequencing, acknowledgements, and error detection, making it essential for effective data transmission.

Uploaded by

gekertxertb
Copyright
© © All Rights Reserved
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/ 24

Table of Contents

1.
Introduction to TCP

2.
TCP Header Overview

3.
Key Functionalities of TCP

4.
TCP Header Fields (Detailed Explanation)

5.
Three-Way Handshake

6.
TCP Flags (Detailed Explanation)

7.
Flow Control and Window Size

8.
Error Control and Checksum

9.
Maximum Segment Size (MSS)

10.
Urgent Pointer

11.
Options and Padding

12.
Points to Remember

13.
Additional Notes and Concepts

14.
Summary

1. Introduction to TCP
Full Form: Transmission Control Protocol.

Layer: Transport Layer (Layer 4 of the OSI model).

Type: Connection-oriented protocol.

Purpose: Ensures reliable, ordered, and error-checked delivery of data between applications running on hosts communicating via an IP
network.

Key Features:

Reliability: Ensures data reaches the receiver without loss.

Error Control: Detects and corrects errors in data transmission.

Flow Control: Manages data flow to prevent receiver overload.


Congestion Control: Adjusts data transmission based on network congestion.

Comparison with UDP:

TCP: Reliable, connection-oriented, slower.

UDP: Unreliable, connectionless, faster.

2. TCP Header Overview

Header Size:

Minimum: 20 bytes.
Maximum: 60 bytes.

Purpose:

Adds functionality like segmentation, sequencing, and error detection.

Ensures data reaches the receiver reliably.

Header Fields:

Source Port, Destination Port, Sequence Number, Acknowledgement Number, Header Length, Flags, Window Size, Checksum, Urgent
Pointer, Options, and Padding.
3. Key Functionalities of TCP
1.
Byte Streaming:

TCP converts continuous data from the application layer into segments (collections of bytes).

Example: If data comes as a stream of bits, TCP groups them into bytes and then into segments.

2.
Connection-Oriented:

Uses a three-way handshake for reliable connection establishment.

Ensures data integrity and reliability.

3.
Full Duplex:
Allows simultaneous two-way communication.

Example: Both sender and receiver can send and receive data at the same time.

4.
Piggybacking:

Combines acknowledgements with data transmission to reduce network load.

Example: Instead of sending an ACK separately, it is sent along with data.

5.
Error Control:

Detects and corrects errors in data transmission.


Example: Uses checksum to verify data integrity.

6.
Flow Control:

Manages data flow to prevent receiver overload.

Example: Uses window size to advertise receiver’s buffer capacity.

7.
Congestion Control:

Adjusts data transmission based on network congestion.

Example: Reduces data rate if network congestion is detected.


4. TCP Header Fields (Detailed Explanation)
1.
Source Port (16 bits):

Identifies the sender’s application.

Example: Port 50001 for a browser.

2.
Destination Port (16 bits):

Identifies the receiver’s application.

Example: Port 80 for HTTP.

3.
Sequence Number (32 bits):
Tracks byte order for sequencing.

Example: If the first byte is numbered 1000, the next will be 1001.

4.
Acknowledgement Number (32 bits):

Confirms receipt of data.

Example: If data up to byte 1050 is received, the ACK number will be 1051.

5.
Header Length (4 bits):

Specifies header size (scaled by 4).


Example: If the value is 0101 (5), the header size is 5 × 4 = 20 bytes.

6.
Flags (6 bits):

Control flags for specific functionalities:

URG: Urgent data.

ACK: Acknowledgement.

PSH: Push data to the application immediately.

RST: Reset the connection.

SYN: Synchronize sequence numbers (used in handshake).


FIN: Terminate the connection.

7.
Window Size (16 bits):

Indicates receiver’s buffer capacity.

Example: Window size = 10,000 bytes means the receiver can accept up to 10,000 bytes.

8.
Checksum (16 bits):

Used for error detection.

Example: Compares sent and received data for discrepancies.

9.
Urgent Pointer (16 bits):

Points to the location of urgent data in the segment.

Example: If urgent data is from byte 1000 to 1020, the pointer will indicate this range.

10.
Options and Padding:

Additional fields for extra functionalities.

Example: Maximum Segment Size (MSS).

5. Three-Way Handshake
Step 1: Sender sends a SYN (synchronize) request.

Step 2: Receiver responds with SYN-ACK (synchronize-acknowledge).

Step 3: Sender confirms with an ACK.

Purpose: Establishes a reliable connection.

Example:

Client: SYN (Seq = 1000).

Server: SYN-ACK (Seq = 5000, ACK = 1001).

Client: ACK (Seq = 1001, ACK = 5001).


6. TCP Flags (Detailed Explanation)

URG: Indicates urgent data.

Example: Used for priority data like emergency signals.

ACK: Acknowledges received data.

Example: Sent after receiving data up to byte 1050.

PSH: Pushes data to the application immediately.

Example: Used in interactive applications like chat.


RST: Resets the connection.

Example: Used when the connection needs to be terminated abruptly.

SYN: Synchronizes sequence numbers (used in handshake).

Example: Sent during the three-way handshake.

FIN: Terminates the connection.

Example: Sent when the sender wants to close the connection.


7. Flow Control and Window Size

Flow Control:

Prevents overwhelming the receiver’s buffer.

Example: If the receiver’s buffer is full, the sender pauses transmission.

Window Size:

Indicates the receiver’s capacity to accept data.

Example: Window size = 10,000 bytes means the sender can send up to 10,000 bytes.
8. Error Control and Checksum

Error Control:

Ensures data integrity during transmission.

Example: Detects and corrects errors caused by noise.

Checksum:

A 16-bit field used for error detection.

Example: Compares sent and received data for discrepancies.


9. Maximum Segment Size (MSS)

Definition:

The maximum size of a single segment that can be transmitted.

Difference from Window Size:

Window size = Total capacity for multiple segments.

MSS = Size of one segment.

Example:

Window size = 10,000 bytes.


MSS = 1,000 bytes Sender can send 10 segments of 1,000 bytes each.

10. Urgent Pointer

Purpose:

Points to the location of urgent data in the segment.

Usage:

Used with the URG flag to prioritize urgent data.


Example:

If urgent data is from byte 1000 to 1020, the pointer will indicate this range.

11. Options and Padding

Purpose:

Additional fields for extra functionalities.

Common Option:

Maximum Segment Size (MSS): Specifies the size of one segment.


Example:

MSS = 1,000 bytes means each segment should be 1,000 bytes.

12. Points to Remember

TCP is a reliable, connection-oriented protocol.

Uses a three-way handshake for connection establishment.

Key functionalities include segmentation, error control, flow control, and congestion control.

The TCP header contains essential fields for sequencing, acknowledgements, and error detection.
Concepts like piggybacking, MSS, and window size are crucial for understanding TCP.

13. Additional Notes and Concepts

Piggybacking: Combines acknowledgements with data transmission to reduce network load.

Sliding Window Protocol: Uses Go-Back-N and Selective Repeat for efficient data transmission.

Error Detection: Uses checksum for error control.

Congestion Control: Adjusts data transmission based on network conditions.


14. Summary

TCP is a reliable, connection-oriented protocol.

Uses a three-way handshake for connection establishment.

Key functionalities include segmentation, error control, flow control, and congestion control.

The TCP header contains essential fields for sequencing, acknowledgements, and error detection.

Concepts like piggybacking, MSS, and window size are crucial for understanding TCP.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy