Skip to content

Commit 4982acb

Browse files
committed
tcp-ip-model-updated
1 parent 015d5ef commit 4982acb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/guides/resources/tcp-ip-model.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ TCP ensures reliable, ordered, and error-checked delivery of data packets betwee
8787

8888
In contrast, [UDP](https://en.wikipedia.org/wiki/User_Datagram_Protocol) is a connectionless protocol. It allows the transmitting (host, port) end to send a data packet to a destination (host, port) end without requiring an exclusive connection. This leads to unreliable communication. For instance a data packet could be addressed to a certain port on a host, but no process might have acquired the port. This means, the packet will be lost, but UDP provides no acknowledgement to the sending (host, port) end that a failure occurred. Failure can also occur if the data was lost during transmission. It is also possible that data is received in a different order from what was transmitted (out of order delivery). UDP is commonly used in scenarios where speed is prioritized over reliability, such as in real-time applications (e.g., video streaming or online gaming), where the loss or re-sequencing of some data does not significantly impact the overall experience. We will see more details about these protocols in the [TCP Socket Programming](/guides/resources/tcp-socket-programming.md) and [UDP Socket Programming](/guides/resources/udp-socket-programming.md) documentations.
8989

90-
In the Transport Layer, the unit of data being transferred is called a [**segment**](https://en.wikipedia.org/wiki/Transmission_Control_Protocol#TCP_segment_structure). A segment consists of a header and data. The maximum size of a Transport Layer segment depends on the protocol being used. The TCP header typically has a minimum size of 20 bytes and a maximum size of 60 bytes, depending on the options included in the header. On the other hand, the UDP header has a fixed size of 8 bytes. The maximum size of a Transport Layer segment is generally constrained by the [Maximum Transmission Unit (MTU)](https://en.wikipedia.org/wiki/Maximum_transmission_unit) of the network. (The Maximum Transmission Unit (MTU) refers to the largest size of a data packet or frame that can be transmitted over a network link or communication channel without needing to be fragmented.) For example, in an [Ethernet network](https://en.wikipedia.org/wiki/Ethernet) with an MTU of 1500 bytes, the maximum payload for TCP is usually around 1460 bytes (1500 bytes - 20 bytes for the IP header - 20 bytes for the TCP header). Similarly, for UDP on an Ethernet network with an MTU of 1500 bytes, the maximum payload is around 1472 bytes (1500 bytes - 20 bytes for the IP header - 8 bytes for the [UDP header](https://en.wikipedia.org/wiki/User_Datagram_Protocol#UDP_datagram_structure)).
90+
In the Transport Layer, the unit of data being transferred is called a [**segment**](https://en.wikipedia.org/wiki/Transmission_Control_Protocol#TCP_segment_structure). A segment consists of a header and data. The maximum size of Transport Layer segment depends on the protocol being used. The TCP header typically has a minimum size of 20 bytes and a maximum size of 60 bytes, depending on the options included in the header. On the other hand, the UDP header has a fixed size of 8 bytes. The maximum size of a TCP Transport Layer segment is generally constrained by the [Maximum Transmission Unit (MTU)](https://en.wikipedia.org/wiki/Maximum_transmission_unit) of the network. (The Maximum Transmission Unit (MTU) refers to the largest size of an IP packet that can be transmitted over a network link or communication channel without needing to be fragmented.) For example, in an [Ethernet network](https://en.wikipedia.org/wiki/Ethernet) with an MTU of 1500 bytes, the maximum payload for TCP is usually around 1460 bytes (1500 bytes - 20 bytes for the IP header - 20 bytes for the TCP header).
91+
92+
In case of UDP, there is no segmentation at the transport layer. If the [UDP](https://en.wikipedia.org/wiki/User_Datagram_Protocol#UDP_datagram_structure) datagram size exceeds the MTU, the fragmnetation takes place at the network layer.
9193

9294
## Internet Layer
9395

0 commit comments

Comments
 (0)