DF bit is bit in IPv4 header, NOT in ICMP header. Exactly there it is.
When DF bit is set to 1 it tells the router that fragmentation of this ip packet is NOT allowed.
If router receives packet that has, lets say 1500 bytes, on ingress interface and packet has to be forwarded to egress interface that has for example 1400 bytes ip mtu, this would normally result in packet fragmentation in case DF bit was set to 0. But in case when DF bit is set to 1 then fragmentation of this packet is prohibited and router that needs to fragment the packet uses ICMP to let the originator of this big packet know, that he cant forward the packet because it is “too big” and would need to fragment it in order to forward it, but fragmentation is prohibited by DF bit.
Because GRE encapsulation creates new IPv4 outter header, DF bit would be set to 0 by default. But when we want to prohibit fragmentation on GRE tunnel path itself we should copy DF bit that is set to 1 in original IP header to outter IP header. This is done using “tunnel path-mtu-discovery” command in tunnel interface.
ICMP messages are just used as mechanism how to tell the originator of ip packet that he needs to lower packet in size othervise packet needs to be fragmented.
