我需要模拟到服务器的低带宽、高延迟连接,以模拟远程站点上VPN的条件。带宽和延迟应该是可调整的,这样我就可以发现最好的组合来运行我们的软件包。


当前回答

http://www.shunra.com上有一个产品叫做VE Desktop,可以用来模拟不同的网络条件。它允许你用一个简单的UI调整延迟、带宽和丢包。唯一需要注意的是,它不是免费的。希望这能有所帮助。

其他回答

对于macOS,有Network Link Conditioner可以模拟可配置的带宽、延迟和丢包。它包含在Xcode的附加工具包中。

有一篇很棒的关于如何设置一台FreeBSD机器的文章——使用你的标准旧桌面,加上一个额外的网卡,然后构建。

文章可以在http://www.freebsd.org/doc/en/articles/filtering-bridges/article.html上找到。

在上述指令的第5步中,您启用了防火墙。为了模拟不同的IP连接,你可以(例如)执行以下操作:

创建文件“/etc/rc.firewall”。56k,包含以下内容:

ipfw add pipe 1 ip from any to any out
ipfw add pipe 2 ip from any to any in    
ipfw pipe 1 config bw 56Kbit/s   
ipfw pipe 2 config bw 56Kbit/s

修改/etc/rc.conf…更换线路

firewall_type="open"

firewall_type="/etc/rc.firewall.56k"

重新启动,你就有了一个56K的桥!

如果你碰巧在Macintosh上工作,该操作系统默认内置了ipfw。我做了同样的事情,通过机场和以太网路由网络流量,设置它,以便任何经过机场的东西都具有与我试图模拟的东西相同的特征。可以直接在终端上调用ipfw命令,效果相同。

在过去,我使用了使用Linux Netem(网络仿真)功能的桥接。它是高度可配置的——允许引入延迟(第一个例子是WAN)、数据包丢失、损坏等。

我注意到Netem在我的应用程序中工作得非常好,但我也多次使用WANem。提供的可引导的ISO(和虚拟设备映像)非常方便。

Take a look at the NE-ONE Network Emulator which allows you to configure bandwidth, latency, packet loss, packet reordering, packet duplication, packet fragmentation, network congestion and many more impairments so that you can create real-world network conditions in the lab. Different impairments can be configured for the up and downlink so you could have a really good uplink but a really bad downlink experience, great for seeing how the app handles TCP queuing because the acks don't come back in a timely manner and the overall latency therefore increases!

这里有一个专门针对游戏开发者的概述视频http://www.youtube.com/watch?v=DwtqlE7LcrQ,但它说明了它的内容。NE-ONE是使用web浏览器配置的,所以它真的很容易安装和配置-你不需要是一个网络专家:-)

有一个硬件版本- http://www.itrinegy.com/index.php/products/network-emulators/ne-one -或者你可以下载在VMware ESXi Server下运行的虚拟设备(软件)版本。虚拟设备可以从VMware的Solution Exchange - solutionexchange.vmware.com/store/products/ne-one-flex-network-emulator下载

对于Windows,您可以使用这个应用程序:http://www.softperfect.com/products/connectionemulator/

广域网连接模拟器的Windows 2000, XP, 2003, Vista, 7和2008。

也许这是唯一一个Windows版本。