Skip to content

Commit 63c094a

Browse files
committed
internet layer corrections
1 parent 4982acb commit 63c094a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +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 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).
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(called Maximum Segment Size - MSS) 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). If the data send by the application layer exceeds the MSS, then segmentation happens at the transport layer.
9191

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.
92+
In case of UDP, there is no segmentation at the transport layer. The data send by the application layer is contained in a single UDP datagram. If the [UDP](https://en.wikipedia.org/wiki/User_Datagram_Protocol#UDP_datagram_structure) datagram size exceeds the MTU, then fragmentation takes place at the network layer.
9393

9494
## Internet Layer
9595

@@ -101,7 +101,7 @@ The major protocols involved in the network layer include [IP](https://en.wikipe
101101

102102
[IP](https://en.wikipedia.org/wiki/Internet_Protocol) (Internet Protocol) is the foundational protocol responsible for addressing, routing, and delivering packets of data across different networks. There are two versions of IP commonly used, they are IPv4 and IPv6. IPv4 is the most widely used version of the IP protocol and is based on a 32-bit address format, allowing for approximately 4.3 billion unique addresses. IPv4 address is written as four decimal numbers separated by dots (e.g., `192.168.1.2`). Each set of numbers represents eight bits, or a byte, and can take a value from 0 to 255. IPv6 was introduced to address the limitations of IPv4, primarily the shortage of available IP addresses. IPv6 uses a 128-bit address format, allowing for an almost infinite number of unique addresses (approximately 340 undecillion addresses). IPv6 address is written as eight groups of four hexadecimal digits separated by colons (e.g., `2001:0db8:85a3:0000:0000:8a2e:0370:7334`) where each group represents 16 bits.
103103

104-
[ICMP (Internet Control Message Protocol)](https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol) is primarily used by hosts and routers for error reporting, network diagnostics, and management functions. Since the IP protocol itself does not include an error-checking mechanism for packet delivery, it relies on ICMP to handle such tasks. Ping and Traceroute are two utilities that leverage ICMP messages: Ping is used to test connectivity between two devices, while Traceroute tracks the path packets take from source to destination by sending ICMP Echo Requests (or UDP packets) , allowing the source to identify intermediate routers along the path.
104+
[ICMP (Internet Control Message Protocol)](https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol) is another internet layer protocol primarily used by hosts and routers for error reporting, network diagnostics, and management functions. Ping and Traceroute are two utilities that leverage ICMP messages: Ping is used to test connectivity between two devices, while Traceroute tracks the path packets take from source to destination by sending ICMP Echo Requests (or UDP packets), allowing the source to identify intermediate routers along the path.
105105

106106
## Link Layer
107107

0 commit comments

Comments
 (0)