TCP/IP Protocol Stack

TCP/IP Protocol Stack

1. Application Layer

The application layer is the first layer of the TCP/IP protocol, directly providing services to application processes. (Data unit: message) It supports the World Wide Web with HTTP, email with SMTP, and file transfer with the FTP protocol.

2. Transport Layer

Responsible for providing general data transmission services for communication between processes on two hosts; as the second layer of the TCP/IP protocol, the transport layer plays a crucial role in the entire TCP/IP protocol. Within the transport layer, both TCP and UDP also play a significant role.

  • Transmission Control Protocol (TCP): Provides connection-oriented, reliable data transmission services; (Data transmission unit: segment)

  • User Datagram Protocol (UDP): Provides connectionless, best-effort data transmission services (does not guarantee the reliability of data transmission); (Data transmission unit: user datagram)

  • Differences between TCP and UDP:

  • TCP is connection-oriented (like making a phone call requires dialing to establish a connection); UDP is connectionless, meaning no connection needs to be established before sending data.

  • TCP provides reliable services. This means that data transmitted over a TCP connection is error-free, not lost, not duplicated, and arrives in order; UDP makes a best-effort delivery, meaning it does not guarantee reliable delivery.

  • TCP is byte-stream oriented, treating data as a continuous stream of unstructured bytes; UDP is message-oriented and does not have congestion control, so network congestion does not reduce the sending rate of the source host (useful for real-time applications like IP telephony, real-time video conferencing, etc.).

  • Each TCP connection can only be point-to-point; UDP supports one-to-one, one-to-many, many-to-one, and many-to-many interactive communication.

  • TCP header overhead is 20 bytes; UDP has a smaller header overhead of only 8 bytes.

  • TCP provides a full-duplex reliable communication channel, while UDP provides an unreliable channel.

3. Network Layer

The network layer is the third layer in the TCP/IP protocol. In the TCP/IP protocol, the network layer can establish and terminate network connections and locate IP addresses, among other functions. (Data transmission unit: IP packet/fragment)

  • Main protocols: Connectionless Internet Protocol IP, Routing Protocol

4. Network Interface Layer

In the TCP/IP protocol, the network interface layer is the fourth layer. Since the network interface layer combines the physical layer and the data link layer, it serves as both the physical medium for data transmission and provides an accurate line for the network layer.

  • Data Link Layer: Data transmission unit -> Frame (contains data and control information, such as synchronization information, address, error control, etc.)

  • Physical Layer: Data transmission unit -> Bit; main tasks: determine some characteristics related to the interface with the transmission medium (mechanical characteristics, electrical characteristics, functional characteristics, process characteristics).

Leave a Comment