tags:

views:

32

answers:

1

Does anyone know if its possible to adjust the MTU while sending an ICMP echo packet (with IcmpSendEcho)?

I'm trying to do this under Windows using the IcmpSendEcho() function.

A: 

The maximum transmission unit (MTU) is a property of your network subsystem, it's not something that can be changed on the fly. Typical Ethernet, for instance, has a maximum MTU of 1,500 bytes.

If you want to adjust the size of the request, it looks as if the fourth argument to IcmpSendEcho() is the size of the data to send.

If you're trying to implement path MTU discovery this is the way to adjust the size of your outgoing request, to figure out what the maximum allowable MTU to a host is. Note that you also need to set the DF (don't fragment) IPv4 header bit.

What are you trying to achieve?

unwind
Thanks, adding larger payload and setting the DF flag is probably what I need (yes, I'm trying to find the optimal path MTU).