Linux系统:UDP数据包被保存在缓冲或者网络unreacheable DROP掉?我怎么能证明呢? [英] Linux : Udp packet is kept in buffer or droped when network is unreacheable?? how can i prove it?

查看:525
本文介绍了Linux系统:UDP数据包被保存在缓冲或者网络unreacheable DROP掉?我怎么能证明呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个客户不断发送UDP数据包通过路由器Wifi连接到主机。我想知道发生什么事到的数据包,如果我突然关闭路由器。将UDP数据包被丢弃或保持在一定的缓冲?

I have a client constantly sending UDP packets to host by Wifi connection through a router. I would like to know what happen to the packets if i suddenly turn off the router. Will the udp packets be dropped or be kept in a certain buffer?

另外,我想知道发生什么事到的数据包,如果我打开背面的WiFi一会儿我把它关掉了。

Also, i want to know what happen to the packets if i turn on back the wifi a moment after i turn it off.

我需要证明在android系统linux下什么工具包是否被丢弃(在该层),或保持在一定的缓冲液(ACCES来缓冲,以验证它是我发出的数据包)?

I need what tools in android linux to prove whether the packet is dropped(and at which layer) or kept in a certain buffer(acces to buffer to verify it is the packet that i sent)?

感谢

推荐答案

据UDP的天性,数据包将开始下降(丢失)如果网络不可达。

According to UDP's nature, the packets will start dropping (lost) if the network is unreachable.

和一旦网络重新建立时,数据包将开始到达到目的地的最佳努力(但不是丢失的)。

And once the network is re-established, the packets will start arriving to the destination with the best effort (but not the lost ones).

要测试这个行为,你可以简单地创建一个客户端 - 服务器的模型应用(无论是在Android中,.NET或任何语言你喜欢的),其中客户端发送一个UDP数据包(包括序列号和日期戳)发送到服务器和服务器的审计到达/丢失的数据包。在传输过程中,你可以将网络下来,以观察行为和测试所需的情况下(S)。

To test this behavior, you may simply create a Client-Server model application (either in Android, .NET or any language you like) in which client starts sending UDP packets (including serial number and date stamp) to the server and the server audits the arrived/lost packets. During the transmission, you may put the network down in order to observe the behavior and test your required case(s).

一旦网络出现故障,您的客户端应用程序将继续发送数据包不知道网络的可用性,同时所有的刷新数据包就会丢失。一旦网络恢复,传输将恢复了。

Once the network is down, your Client application will keep on sending the packets without knowing the unavailability of network and meanwhile all the flushed packets will be lost. Once the network is resumed, the transmission will resume too.

这篇关于Linux系统:UDP数据包被保存在缓冲或者网络unreacheable DROP掉?我怎么能证明呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆