icmplib icon indicating copy to clipboard operation
icmplib copied to clipboard

Add the ability to set the DF flag and get MTU size feedback from the ICMP protocol.

Open TonyFlury opened this issue 1 year ago • 0 comments

The ICMP protocol contains flags to prevent Fragmentation, and when the DF flag is set (and a router then rejects the packet due to its size (ie no onward route that will accept that size MTU), the router is supposed to send a Route Unavaialbe message back, which states the maximum MTU that the route can take.

Therefore by using the DF flag and the return value from the ICMP reply, it should be possible to do PMTU discovery for a remote destination.

Currently the only way to set the flags is to use sockets and setsocket_opts, which is a shame when icmplib does so much else already.

TonyFlury avatar Aug 26 '23 19:08 TonyFlury