我会尝试在 Linux 上使用 netem 。 使用它,您可以模拟额外的延迟、损坏、数据包丢失和重复。 它甚至可以在环回设备上工作。
I would try using netem on linux. With it you can simulate additional delay, corruption, packet loss and duplication. It even works on the loopback device.
Updates on 2017-10-07: The last free version of NetBalancer is 9.2.7. The program has a hard-coded expiration date. Before you start the NetBalancer service, you need to turn back the system clock before 2016-10-18. See this article for details.
WANem is a Wide Area Network Emulator, meant to provide a real experience of a Wide Area Network/Internet, during application development / testing over a LAN environment.
I came across Charles the web debugging proxy application and had great success in emulating network latency. It works on Windows, Mac, and Linux.
Bandwidth throttle / Bandwidth simulator
Charles can be used to adjust the bandwidth and latency of your Internet connection. This enables you to simulate modem conditions using your high-speed connection.
The bandwidth may be throttled to any arbitrary bytes per second. This enables any connection speed to be simulated.
The latency may also be set to any arbitrary number of milliseconds. The latency delay simulates the latency experienced on slower connections, that is the delay between making a request and the request being received at the other end.
I found this little neat program for Windows called clumsy. It's in kind of alpha status, but it seem to work fine for me, and it's open source.
Edit: Others have noticed that you can't limit bandwidth with clumsy, and that's true. You can only add Latency and a couple of other network related errors. This will disqualify this answer as a valid answer to the question, however since I had good use for it when I wanted to simulate a bad network so I'll leave it here as long as it has > 0 votes or similar.
In the past, I have used a bridge using the Linux Netem (Network Emulation) functionality. It is highly configurable -- allowing the introduction of delays (the first example is for a WAN), packet loss, corruption, etc.
I'm noting that Netem worked very well for my applications, but I also ended up using WANem several times. The provided bootable ISO (and virtual appliance images) made it quite handy.
In step 5 of the above instructions, you're enabling a firewall. For just simulating a different IP connection, you could (for example) do the following:
Create a file /etc/rc.firewall.56k which contains the following:
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
And change /etc/rc.conf... replace the line
firewall_type="open"
with
firewall_type="/etc/rc.firewall.56k"
reboot, and you've got yourself a 56K bridge!
If you happen to be working from a Macintosh, that OS has ipfw built into it by default. I've done the same thing by routing network traffic over the Airport and through the ethernet, setting it up so that anything coming over the airport has the same characteristics as whatever I'm trying to emulate. You can invoke the ipfw commands directly from the terminal and get the same effects.
For macOS, there is the Network Link Conditioner that simulates configurable bandwidth, latency, and packet loss. It is contained in the Additional Tools for Xcode package.
要使用 Google Chrome 模拟低带宽连接来测试网站,您可以转到 F12 工具中的“网络”选项卡,然后选择要模拟的带宽级别或创建要模拟的自定义带宽。
To simulate a low bandwidth connection for testing web sites use Google Chrome, you can go to the Network Tab in F12 Tools and select a bandwidth level to simulate or create custom bandwidth to simulate.
http://www.shunra.com 有一个名为 VE Desktop 的产品,可以用来模拟不同的网络状况。 它允许您通过简单的 UI 调整延迟、带宽和数据包丢失。 唯一需要注意的是,它不是免费的。 希望这可以帮助。
There is a product from http://www.shunra.com called VE Desktop which can be used to simulate varying network conditions. It allows you to tweak latencies, bandwidth and packetloss with a simple UI. Only caveat is, its not free. Hope this helps.
I've been looking for an easy to use tool for this type of testing for a while now. I just came across this the other day: Network Delay Simulator
If you're running Windows, you should check it out. It was super easy to set up and get going, and seems to work really well. It allows you to define bandwidth, latency, and packet loss in each direction. The other really nice thing is that you can define "Flow Match Conditions" so that it only affects the traffic you want it to. Oh yeah, and it's free.
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.
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!
There's an overview video here http://www.youtube.com/watch?v=DwtqlE7LcrQ specifically aimed at game developers, but it shows what it's about. NE-ONE is configured using a web browser so it's really easy to get installed and configured - you don't need to be a network guru :-)
There's a hardware version - http://www.itrinegy.com/index.php/products/network-emulators/ne-one - or you can download a Virtual Appliance (software) version that runs under VMware ESXi Server. The Virtual Appliance can be download from VMware's Solution Exchange - solutionexchange.vmware.com/store/products/ne-one-flex-network-emulator
发布评论
评论(20)
我会尝试在 Linux 上使用 netem 。 使用它,您可以模拟额外的延迟、损坏、数据包丢失和重复。 它甚至可以在环回设备上工作。
I would try using netem on linux. With it you can simulate additional delay, corruption, packet loss and duplication. It even works on the loopback device.
另一个客户端程序(仅限 Windows)是 NetLimiter - http://www.netlimiter.com
Another client-side program (Windows only), is NetLimiter - http://www.netlimiter.com
我在 Windows 机器上使用 NetBalancer。
http://seriousbit.com/netbalancer/
2017-10-07 更新:NetBalancer 的最后一个免费版本是 9.2.7。 该程序有一个硬编码的到期日期。 在启动NetBalancer服务之前,您需要在2016年10月18日之前调回系统时钟。 请参阅本文了解详情。
I use NetBalancer on my Windows machine.
http://seriousbit.com/netbalancer/
Updates on 2017-10-07: The last free version of NetBalancer is 9.2.7. The program has a hard-coded expiration date. Before you start the NetBalancer service, you need to turn back the system clock before 2016-10-18. See this article for details.
尝试 WANem
Try WANem
对于 Windows,您可以使用此应用程序:http://www.softperfect.com/products/connectionemulator/
适用于 Windows 2000、XP、2003、Vista、7 和 2008 的 WAN 连接模拟器。
也许是唯一适用于 Windows 的模拟器。
For Windows you can use this application: http://www.softperfect.com/products/connectionemulator/
WAN Connection Emulator for Windows 2000, XP, 2003, Vista, Seven and 2008.
Perhaps the only one available for Windows.
Charles
我遇到了 Charles Web 调试代理应用程序,并在模拟网络延迟方面取得了巨大成功。 它适用于 Windows、Mac 和 Linux。
DummyNet
您还可以使用 vmware 运行 BSD 或 Linux 并尝试本文 (DummyNet)或这个。
Charles
I came across Charles the web debugging proxy application and had great success in emulating network latency. It works on Windows, Mac, and Linux.
DummyNet
You could also use vmware to run BSD or Linux and try this article (DummyNet) or this one.
我发现了一个名为 clumsy 的 Windows 小型程序。 它处于 alpha 状态,但对我来说似乎工作得很好,而且它是开源的。
编辑:其他人已经注意到你不能用笨拙的方式限制带宽,这是事实。 您只能添加延迟和一些其他与网络相关的错误。
这将取消这个答案作为问题的有效答案的资格,但是因为当我想模拟一个糟糕的网络时我很好地利用了它,所以只要它有>,我就会把它留在这里。 0 票或类似。
I found this little neat program for Windows called clumsy. It's in kind of alpha status, but it seem to work fine for me, and it's open source.
Edit: Others have noticed that you can't limit bandwidth with clumsy, and that's true. You can only add Latency and a couple of other network related errors.
This will disqualify this answer as a valid answer to the question, however since I had good use for it when I wanted to simulate a bad network so I'll leave it here as long as it has > 0 votes or similar.
过去,我使用过 Linux Netem (网络仿真)的桥接器功能。 它是高度可配置的——允许引入延迟(第一个例子是 WAN)、数据包丢失、损坏等。
我注意到 Netem 对我的应用程序运行得很好,但我最终也使用了 WANem 多次。 提供的可启动 ISO(和虚拟设备映像)使其非常方便。
In the past, I have used a bridge using the Linux Netem (Network Emulation) functionality. It is highly configurable -- allowing the introduction of delays (the first example is for a WAN), packet loss, corruption, etc.
I'm noting that Netem worked very well for my applications, but I also ended up using WANem several times. The provided bootable ISO (and virtual appliance images) made it quite handy.
有一篇关于设置 FreeBSD 机器来执行此操作的精彩文章 - 使用标准的旧桌面,添加额外的 NIC,然后进行构建。
该文章可在 http://www.freebsd.org/ 获取doc/en/articles/filtering-bridges/article.html。
在上述说明的第 5 步中,您将启用防火墙。 为了模拟不同的 IP 连接,您可以(例如)执行以下操作:
创建一个文件
/etc/rc.firewall.56k
,其中包含以下内容:并更改
/etc/rc reboot替换该行
.conf...用
,你就拥有了一个56K的桥!
如果您碰巧使用 Macintosh,该操作系统默认内置有 ipfw。 我通过在机场和以太网上路由网络流量来完成同样的事情,并进行设置,以便经过机场的任何内容都具有与我试图模拟的内容相同的特征。 您可以直接从终端调用 ipfw 命令并获得相同的效果。
There's an excellent writeup of setting up a FreeBSD machine to do just this - take your standard old desktop, toss in an additional NIC, and build.
The writeup is available at http://www.freebsd.org/doc/en/articles/filtering-bridges/article.html.
In step 5 of the above instructions, you're enabling a firewall. For just simulating a different IP connection, you could (for example) do the following:
Create a file
/etc/rc.firewall.56k
which contains the following:And change
/etc/rc.conf
... replace the linewith
reboot, and you've got yourself a 56K bridge!
If you happen to be working from a Macintosh, that OS has ipfw built into it by default. I've done the same thing by routing network traffic over the Airport and through the ethernet, setting it up so that anything coming over the airport has the same characteristics as whatever I'm trying to emulate. You can invoke the ipfw commands directly from the terminal and get the same effects.
对于macOS,有网络链接调节器可以模拟可配置的带宽、延迟和数据包丢失。 它包含在 Xcode 的其他工具中包裹。
For macOS, there is the Network Link Conditioner that simulates configurable bandwidth, latency, and packet loss. It is contained in the Additional Tools for Xcode package.
我想我找到了我需要的东西。 也许您可以使用 charles proxy 或 慢。 希望能帮助到你。
i think i found what i need. maybe you can use charles proxy or slowy. hope it helps.
使用 Fiddler 找到了适用于 Windows 的这个(免费解决方案)
http://www.logic-worx。 com/index.php/tools-and-apps/fiddler-connection-simulator/
Found this one for Windows using Fiddler (free solution)
http://www.logic-worx.com/index.php/tools-and-apps/fiddler-connection-simulator/
我猜
tc
可以在基于 UNIX 的平台上完成这项工作。tc
用于配置Linux内核中的流量控制http://lartc.org/manpages/tc.txt
I guess
tc
could do the job on UNIX based platform.tc
is used to configure Traffic Control in the Linux kernelhttp://lartc.org/manpages/tc.txt
要使用 Google Chrome 模拟低带宽连接来测试网站,您可以转到 F12 工具中的“网络”选项卡,然后选择要模拟的带宽级别或创建要模拟的自定义带宽。
To simulate a low bandwidth connection for testing web sites use Google Chrome, you can go to the Network Tab in F12 Tools and select a bandwidth level to simulate or create custom bandwidth to simulate.
如果您使用的是 Linux,我发现 流量控制 程序是一个很棒的程序对这类事情有帮助。
If you're on linux, I find the Traffic Control program to be a great help for this sort of thing.
http://www.shunra.com 有一个名为 VE Desktop 的产品,可以用来模拟不同的网络状况。 它允许您通过简单的 UI 调整延迟、带宽和数据包丢失。 唯一需要注意的是,它不是免费的。 希望这可以帮助。
There is a product from http://www.shunra.com called VE Desktop which can be used to simulate varying network conditions. It allows you to tweak latencies, bandwidth and packetloss with a simple UI. Only caveat is, its not free. Hope this helps.
一段时间以来,我一直在寻找一种易于使用的工具来进行此类测试。 前几天我刚遇到这个: 网络延迟模拟器
如果您运行的是 Windows,您应该一探究竟。 设置和使用都非常简单,而且看起来效果非常好。 它允许您定义每个方向的带宽、延迟和数据包丢失。 另一个非常好的事情是您可以定义“流量匹配条件”,以便它只影响您想要的流量。 哦,是的,而且它是免费的。
I've been looking for an easy to use tool for this type of testing for a while now. I just came across this the other day: Network Delay Simulator
If you're running Windows, you should check it out. It was super easy to set up and get going, and seems to work really well. It allows you to define bandwidth, latency, and packet loss in each direction. The other really nice thing is that you can define "Flow Match Conditions" so that it only affects the traffic you want it to. Oh yeah, and it's free.
您可以尝试以下操作: CovenantSQL/GNTE
只需像这样编写 YAML:
运行
./generate script/your.yaml
You can try this: CovenantSQL/GNTE
just write YAML like this:
run
./generate scripts/your.yaml
LANforge ICE 是一个网络模拟器,重点关注虚拟路由、抖动、损坏和延迟。 项目已使用它来仿真卫星链路、电缆和调制解调器连接以及高速 (10Gbit) 广域网仿真。 您可以使用 Java GUI 构建虚拟网络并生成非常详细的流量报告。 LANforge 产品还提供流量生成功能:帧、以太网、第 3 层和状态流量(NFS、http)。 LANforge 的最新版本还具有复杂的 WiFi 测试功能。
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.
看一下 NE-ONE 网络模拟器,它允许您配置带宽、延迟、数据包丢失、数据包重新排序、数据包重复、数据包碎片、网络拥塞和更多损伤,以便您可以在实验室中创建真实的网络条件。 可以为上行链路和下行链路配置不同的损伤,这样您就可以获得非常好的上行链路但非常糟糕的下行链路体验,非常适合查看应用程序如何处理 TCP 队列,因为确认没有及时返回以及整体延迟因此增加!
这里有一个概述视频http://www.youtube.com/watch?v=DwtqlE7LcrQ 专门针对游戏开发者,但它展示了它的含义。 NE-ONE 使用网络浏览器进行配置,因此安装和配置非常容易 - 您不需要成为网络专家:-)
有一个硬件版本 - 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
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!
There's an overview video here http://www.youtube.com/watch?v=DwtqlE7LcrQ specifically aimed at game developers, but it shows what it's about. NE-ONE is configured using a web browser so it's really easy to get installed and configured - you don't need to be a network guru :-)
There's a hardware version - http://www.itrinegy.com/index.php/products/network-emulators/ne-one - or you can download a Virtual Appliance (software) version that runs under VMware ESXi Server. The Virtual Appliance can be download from VMware's Solution Exchange - solutionexchange.vmware.com/store/products/ne-one-flex-network-emulator