我需要模拟到服务器的低带宽、高延迟连接,以模拟远程站点上VPN的条件。带宽和延迟应该是可调整的,这样我就可以发现最好的组合来运行我们的软件包。
当前回答
我在我的Windows电脑上使用NetBalancer。
http://seriousbit.com/netbalancer/
2017-10-07更新:NetBalancer最新免费版本为9.2.7。该程序有一个硬编码的截止日期。在启动NetBalancer服务之前,您需要在2016-10-18之前调回系统时钟。详情请参阅本文。
其他回答
在过去,我使用了使用Linux Netem(网络仿真)功能的桥接。它是高度可配置的——允许引入延迟(第一个例子是WAN)、数据包丢失、损坏等。
我注意到Netem在我的应用程序中工作得非常好,但我也多次使用WANem。提供的可引导的ISO(和虚拟设备映像)非常方便。
您可以试试这个:CovenantSQL/GNTE 就像这样写YAML:
group:
-
name: china
nodes:
-
ip: 10.250.1.2
cmd: "cd /scripts && ./YourBin args"
-
ip: 10.250.1.3
cmd: "cd /scripts && ./YourBin args"
delay: "100ms 10ms 30%"
loss: "1% 10%"
-
name: us
nodes:
-
ip: 10.250.2.2
cmd: "cd /scripts && ./YourBin args"
-
ip: 10.250.2.3
cmd: "cd /scripts && ./YourBin args"
delay: "1000ms 10ms 30%"
loss: "1% 10%"
network:
-
groups:
- china
- us
delay: "200ms 10ms 1%"
corrupt: "0.2%"
rate: "10mbit"
运行。/generate scripts/your.yaml
对于Windows,您可以使用这个应用程序:http://www.softperfect.com/products/connectionemulator/
广域网连接模拟器的Windows 2000, XP, 2003, Vista, 7和2008。
也许这是唯一一个Windows版本。
如果你在linux上,我发现流量控制程序对这类事情有很大的帮助。
LANforge ICE is a network emulator with an emphasis on virtual routing, jitter, corruption and delay. Projects have used it to emulate satellite link, cable and modem connections, and high-speed (10Gbit) wan emulation. You can use a Java GUI to build your virtual networks and generate very detailed reports of the traffic flow. The LANforge products also provide traffic generation features: frame, ethernet, layer-3 and stateful traffic (NFS, http). Recent editions for LANforge have sophisticated WiFi testing features as well.
推荐文章
- 如何模拟低带宽、高延迟的环境?
- 使用Moq验证方法调用
- 尝试模拟datetime.date.today(),但不工作
- 如何用python timeit对代码段进行性能测试?
- 确定bash中是否存在一个函数
- 如何使用“测试”包打印Go测试?
- 如何在IntelliJ中为整个项目配置“缩短命令行”方法
- toBe(true) vs toBeTruthy() vs toBeTrue()
- 什么时候应该使用Debug.Assert()?
- 从控制台停止一个Android应用程序
- 使Android模拟器运行得更快
- 如何“去测试”我的项目中的所有测试?
- 测试HTML电子邮件渲染
- 测试过程。环境与玩笑
- Rspec:“数组。应该== another_array"而不考虑顺序