IPv4 – Why Is the Don’t Fragment Flag Needed?

fragmentationipv4

enter image description here

Why the IPv4 need Don't fragment Flag?

We know the IPv4 Flags options are: Reserved bit, Don't fragment, More fragments, fragment offset options.

Why there need the Don't fragment Flag? if it is small than MTU of transmission nodes what will happen?

Best Answer

If frame is bigger than MTU and have don't fragment bit set then it will drop the packet. Discarding router will send back to sender ICMP message Fragmentation Needed (Type 3, Code 4) which contains MTU size and then sender should send this packet again adjusted to MTU size which he received in ICMP message.

IPv4 don't need fragment bit but it can be set in IP stack. Fragmentation causes extra CPU overhead which can affect total throughput so most of the times this DF bit is set.

Related Topic