why MTU test results depend on MTU setting on my router??. ex: when I set MTU on my router for 1440, the result is "1440-28=1412", the first MTU gives replay, so how can I know the best MTU??.
When manually setting the MTU on a router (interface), the router is configured to not send larger packets out that interface. Larger packets are either fragmented (if possible) or dropped. The MTU setting is useful when there are further encapsulations behind the router eating into the packet size.
ping implementations use the length parameter for their optional payload size. Since ping uses ICMP echo requests, the packet size equals 20 bytes (IPv4 header) plus 8 bytes (ICMP header) plus the payload size.
You can test a path's MTU with ping using e.g. (Windows)
ping -f -l <payloadsize> <destination>. When
<payloadsize>+28 exceeds the path MTU the ping fails.
-f sets the Don't Fragment flag, like
-M do in many Linux versions (see jonathanjo's comment below).