Can you fragment the IP Packet more than once?

Introduction

I was sitting and doing my work and suddenly a question crossed my mind, “Can you fragment a IP packet more than once?” I don’t know what triggered it but it just came through. I thought and said to myself, Why not? All my fundamentals said, yes it should be able to do it twice. So for validating my point, I took a quick lab.

All the connections are ethernet hence by default MTU size will be 1500 Bytes. I tried pinging 1.1.1.1 from R3 with packet size of 5000 bytes to force the fragmentation in the network. I was able to ping it successfully:

R3#ping 1.1.1.1 size 5000

Type escape sequence to abort.
Sending 5, 5000-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/68/100 ms

Then I changed the MTU to 600 bytes on router R2 on interface towards R1.

R2(config-router)#int gi1/0
R2(config-if)#ip mtu 600

I sent some more ICMP packets from R3 to R1 and as suspected, ping was successful.

R3#ping 1.1.1.1 size 5000

Type escape sequence to abort.
Sending 5, 5000-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/112/216 ms

Compare the avg RTT of both the pings, there is considerable increase in it (Although the sample is too small to be considered).

So the answer is yes a fragmented packet can be fragmented again.

Lets see the captures from my lab:


I have captured the packets from R2 router on interface pointing towards R1.

So above capture clearly depicts that it is fragmenting the packet thrice while it is sending it to R3 but it is fragmenting the packet 9 times when it is sending it to R1.

Conclusion

When R3 wants to send a packet, it compares the packet with its outgoing interface’s MTU. It observes that packet needs to be fragmented hence it fragments the packet in several small packets. R2 receives the fragmented packets one by one and waits for all the packets to be received. Once all the packets are received which are having same identifier value, it delivers the complete packet to upper layer, ICMP. ICMP observes that this packet needs to be delivered to the some other address. Hence a ICMP request is again formatted. So router R2 like to send it to R1 ( of course, after inspecting its routing table). Again a comparison happens and R2 observes that the packet size 5000 bytes is more than the interface MTU 600 bytes. Hence the packet will be fragmented. Please note that a single packet has not been fragmented again but the fragmented packet received from R1 has been reassembled into one packet and then has been re fragmented.

Tip: MTU always matters for outgoing traffic and not for incoming traffic.

Leave a Comment