A non-transitory computer readable storage medium that stores instructions which when executed by one or more processors of a source network device that is a first endpoint of a Generic Routing Encapsulation (GRE) tunnel cause said processors to perform the following operations:
- transmitting, to a destination network device, a first outer packet including a first outer header that is used to transmit the first outer packet to the destination network device, a first outer GRE header, and a first inner packet, wherein the first inner packet includes a first inner header that is used to deliver the first inner packet to the source network device, a first inner GRE header, and a first payload, and wherein the destination network device is a second endpoint of a GRE tunnel;
- receiving the first inner packet;
- transmitting, to the destination network device, a second outer packet including a second outer header that is used to transmit the second outer packet to the destination network device, a second outer GRE header, and a second inner packet, wherein the second inner packet includes a second inner header that is used to deliver the second inner packet to the source network device, a second inner GRE header, and a second payload that has a size that is greater than a size of the first payload;
- determining that the second inner packet is not received before a predetermined period of time has elapsed;
- and
- determining a path MTU for a path between the source network device and the destination network device based on a size of the first outer packet and a size of the second outer packet.