我需要一个产品来模拟网络延迟以测试移动应用程序(特别是 iPhone 和 Android)。我计划设置一个连接到 Linux 盒子的 wifi 路由器,并编写一些脚本来解决不同类型的连接问题。
到目前为止,我已经粗略地了解了 Netem 和 ns-2 (或其后代 ns-3)。 Netem 看起来非常容易部署和配置,但它们看起来都需要一些深入的调查。
有没有人对这些解决方案有积极/消极的经验可以分享?或者也许使用不同的解决方案来解决这个问题?
I need a product to simulate network latency for testing mobile applications (in particular iphone and android). I plan to set up a wifi router connected to a linux box, and write a number of scripts to approximate different types of connectivity issues.
So far, I've taken a cursory look at Netem and ns-2 (or its offspring ns-3). Netem looks very easy to deploy and configure, but they both look like they'll require some in-depth investigation.
Does anyone have positive/negative experiences with either of those solutions that they could share? Or maybe used a different solution for this problem?
发布评论
评论(1)
如果有人来这里寻找技巧,我已经找到了一个似乎效果很好的解决方案。
Ubuntu 附带安装了 Netem,所以我继续使用它。基本上,我有一台带有两个以太网端口的计算机,将一个端口转发到另一个端口,并对连接应用 Netem 延迟设置。然后我将无线路由器连接到一个,将 LAN 连接到另一个。 Netem 让我可以使用各种延迟和丢包设置。
顺便说一句,我还尝试使用几台不同的笔记本电脑并将内部无线卡设置为临时无线路由器。我让它在大部分情况下都可以工作,但是找到一台带有内部无线卡的笔记本电脑,可以在 Linux 中与 ad-hoc 配合使用,这充其量是棘手的……不能推荐它。
If anyone comes here looking for tips, I've found a solution that seems to work well.
Ubuntu comes with Netem installed, so I went ahead and just made use of that. Basically, I got a computer with two ethernet ports, forwarded one to the other and applied Netem latency settings to the connection. Then I attached a wireless router to one, and LAN to the other. Netem lets me play with all kinds of latency and packet loss settings.
Btw, I also tried to use a few different laptops and set the internal wireless card up as an ad-hoc wireless router. I got it working for the most part, but finding a laptop with an internal wireless card that plays nice with ad-hoc in Linux is tricky at best... can't recommend it.