windows下查看网卡MTU值

 

/*
Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
[-r count] [-s count] [[-j host-list] | [-k host-list]]
[-w timeout] target_name

Options:
-t Ping the specified host until stopped.
To see statistics and continue - type Control-Break;
To stop - type Control-C.
-a Resolve addresses to hostnames.
-n count Number of echo requests to send.
-l size Send buffer size.
-f Set Don't Fragment flag in packet.
-i TTL Time To Live.
-v TOS Type Of Service.
-r count Record route for count hops.
-s count Timestamp for count hops.
-j host-list Loose source route along host-list.
-k host-list Strict source route along host-list.
-w timeout Timeout in milliseconds to wait for each reply.
*/

 

/*
 使用ping命令来检查网卡MTU值,例如:

>ping -f -l 1472 www.baidu.com

Pinging www.a.shifen.com [119.75.213.51] with 1472 bytes of data:

Reply from 119.75.213.51: bytes=1472 time=37ms TTL=51
Reply from 119.75.213.51: bytes=1472 time=36ms TTL=51
Reply from 119.75.213.51: bytes=1472 time=37ms TTL=51
Reply from 119.75.213.51: bytes=1472 time=37ms TTL=51

Ping statistics for 119.75.213.51:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 36ms, Maximum = 37ms, Average = 36ms
------------------------------------------------------------------------
>ping -f -l 1473 www.baidu.com

Pinging www.a.shifen.com [119.75.213.51] with 1473 bytes of data:

Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.

Ping statistics for 119.75.213.51:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

上例表明ping程序能发送的数据最大为1472字节,根据ping程序原理,可以计算出网卡MTU值为1472 + 8 + 20 = 1500字节


*/

 

 

 

 

posted @ 2010-07-10 11:28  penink  阅读(7827)  评论(1)    收藏  举报