我想直观地评估网页的几个互联网连接类型的响应时间(DSL,电缆,T1,拨号等),而我的浏览器和网络服务器是在同一局域网,甚至在同一台机器上。是否有任何简单的网络工具或浏览器插件来降低网络带宽,以模拟不同的现实连接场景。
对此我很感激。
我想直观地评估网页的几个互联网连接类型的响应时间(DSL,电缆,T1,拨号等),而我的浏览器和网络服务器是在同一局域网,甚至在同一台机器上。是否有任何简单的网络工具或浏览器插件来降低网络带宽,以模拟不同的现实连接场景。
对此我很感激。
当前回答
对于Linux和OSX系统,可以使用ipfw。
来自Quora (http://www.quora.com/What-is-the-best-tool-to-simulate-a-slow-internet-connection-on-a-Mac)
本质上是使用防火墙来限制所有网络数据:
定义一个规则,该规则使用管道重新路由来自任何源的所有流量 地址到任何目标地址,执行以下命令(作为 Root或使用sudo): $ ipfw添加管道1从任意到任意 配置此规则,将带宽限制为300Kbit/s,并强制 每次200ms的延迟: $ ipfw pipe 1配置bw 300Kbit/s delay 200ms 删除所有规则并恢复原来的网络连接: $ ipfw flush
其他回答
Mac OS X现在有一个集成的工具,可以模拟缓慢和糟糕的网络:http://9to5mac.com/2011/08/10/new-in-os-x-lion-network-link-conditioner-utility-lets-you-simulate-internet-and-bandwidth-conditions/
You can use dummynet ofcourse, There is extension of dummynet called KauNet. which can provide even more precise control of network conditions. It can drop/delay/re-order specific packets (that way you can perform more in-depth analysis of dropping key packets like TCP handshake to see how your web pages digest it). It also works in time domain. Usually most the emulators are tuned to work in data domain. In time domain you can specify from what time to what time you can alter the network conditions.
一个简单的mac GUI程序是
https://www.macupdate.com/app/mac/28072/entonnoir/可以限制速度
在Linux上,请参阅netem:内核已经包含了对流量整形的支持,并且可以模拟高延迟、低带宽、数据包丢失和所有其他不利条件,甚至在环回设备上(因此您不需要一个真实的物理网络进行测试)。
对于Linux和OSX系统,可以使用ipfw。
来自Quora (http://www.quora.com/What-is-the-best-tool-to-simulate-a-slow-internet-connection-on-a-Mac)
本质上是使用防火墙来限制所有网络数据:
定义一个规则,该规则使用管道重新路由来自任何源的所有流量 地址到任何目标地址,执行以下命令(作为 Root或使用sudo): $ ipfw添加管道1从任意到任意 配置此规则,将带宽限制为300Kbit/s,并强制 每次200ms的延迟: $ ipfw pipe 1配置bw 300Kbit/s delay 200ms 删除所有规则并恢复原来的网络连接: $ ipfw flush