How do I simulate a low bandwidth, high latency en

2019-01-05 06:47发布

I need to simulate a low bandwidth, high latency connection to a server in order to emulate the conditions of a VPN at a remote site. The bandwidth and latency should be tweakable so I can discover the best combination in order to run our software package.

22条回答
我想做一个坏孩纸
2楼-- · 2019-01-05 07:25

I found this little neat program 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.

查看更多
女痞
3楼-- · 2019-01-05 07:25
做自己的国王
4楼-- · 2019-01-05 07:25

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.

查看更多
老娘就宠你
5楼-- · 2019-01-05 07:27

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.

EDIT: There is also the MasterShaper web interface to control the settings.

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.

查看更多
叼着烟拽天下
6楼-- · 2019-01-05 07:29

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:

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.

查看更多
The star\"
7楼-- · 2019-01-05 07:29

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.

查看更多
登录 后发表回答