Протокол IP: фрагментация | Курс "Компьютерные сети"
Introduction to IP Fragmentation
Overview of IP Protocol
- The lecture is presented by Andrey Sazykhin, focusing on the topic of IP fragmentation within the context of network and telecommunications systems.
- The IP protocol operates at the network layer of the OSI model, facilitating interconnection between networks using different technologies.
Maximum Transmission Unit (MTU)
- Different networks have varying maximum transmission units (MTUs); for Ethernet, it is 1500 bytes, while for other technologies like Token Ring and FDDI, it can be larger.
- When a router receives a packet larger than what the network can transmit, fragmentation occurs to divide the packet into smaller fragments.
Mechanism of Fragmentation
Fields Used in Fragmentation
- Three header fields are essential for implementing fragmentation: Packet Identifier, Flags, and Fragment Offset.
- The Packet Identifier ensures all fragments belong to the same original packet; this field must remain consistent across all fragments.
Flags in Fragmentation
- The Flags field consists of three bits; however, only two are commonly used:
- DF (Don't Fragment): Indicates that fragmentation is not allowed.
- MF (More Fragments): Signals that more fragments will follow.
Order and Assembly of Fragments
Handling Out-of-Order Fragments
- Since IP does not guarantee message delivery order, fragments may arrive out of sequence.
- The Fragment Offset field helps determine how to reassemble these fragments correctly; it measures offsets in 8-byte blocks rather than bytes.
Example of Fragmentation Process
- A practical example illustrates a large packet size of 4000 bytes with an IP header size of 20 bytes. This results in 3980 bytes of data needing transmission over an Ethernet network with a MTU limit.
Detailed Example Breakdown
Creating Fragments from Large Packets
- For a total payload size exceeding MTU limits:
- First fragment: Size = 1480 bytes (Offset = 0).
- Second fragment: Size = 1480 bytes (Offset = 185).
- Third fragment: Size = remaining data with appropriate offset adjustments.
Reassembly Process at Destination
Receiving and Assembling Fragments
- Upon receiving fragments, routers identify incomplete packets through flags and offsets.
- Once all fragments are received, they are combined based on their offsets to reconstruct the original packet accurately.
Implications of DF Flag
Consequences when DF Flag is Set
- If a packet exceeds MTU limits and has its DF flag set, routers cannot fragment it. Instead:
- They discard the packet and send an ICMP Type 3 Code 4 message back to indicate that fragmentation was required but not permitted due to the DF flag being active.
Conclusion on IPv6 Changes
Transition from IPv4 to IPv6