开发者

Does the reply of PING contain the original data?

开发者 https://www.devze.com 2022-12-20 03:27 出处:网络
I am using C# Ping class to ping a server. If I send the ping with a buffer (say 10240 bytes), will the server come back with also the original 10240 bytes?

I am using C# Ping class to ping a server.

If I send the ping with a buffer (say 10240 bytes), will the server come back with also the original 10240 bytes?

I ask this because I am measuring the lat开发者_开发技巧ency between two endpoints, together with the data size (to see how much impact of the data size on the latency in Ping).

If I ping with 10240 bytes, will the server send the reply back with 10240 bytes, or just tell me that it receives, not with 10240 bytes?


the icmp reply should contain all the data.

Note that when you're sending packets that big - it'll likely get fragmented at the IP layer - and that can typically be expensive. e.g. TCP will try to not send packets that gets fragmented but slice the data up in segments fitting the MTU.


It will echo all the data. See ping: Message format.


from rfc 792

" The data received in the echo message must be returned in the echo reply message."

can an icmp packet be 10k? I doubt it

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号