IT story

낮은 대역폭, 높은 대기 시간 환경을 어떻게 시뮬레이션합니까?

hot-time 2020. 5. 10. 10:24
반응형

낮은 대역폭, 높은 대기 시간 환경을 어떻게 시뮬레이션합니까?


원격 사이트에서 VPN의 조건을 에뮬레이트하려면 서버에 대한 낮은 대역폭, 높은 대기 시간 연결을 시뮬레이션해야합니다. 소프트웨어 패키지를 실행하기 위해 최상의 조합을 발견 할 수 있도록 대역폭과 대기 시간을 조정할 수 있어야합니다.


들어 맥 OS 는이 네트워크 링크 컨디셔너 구성 지연 대역폭 및 패킷 손실을 시뮬레이션합니다. Xcode 용 하드웨어 IO 도구에 포함되어 있습니다.스크린 샷


이 작업을 수행하기 위해 FreeBSD 머신을 설정하는 훌륭한 글이 있습니다. 표준 오래된 데스크탑을 가져 와서 추가 NIC를 던지고 빌드하십시오.

이 글은 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에서 작업하는 경우 해당 OS에 기본적으로 ipfw가 내장되어 있습니다. 공항과 이더넷을 통해 네트워크 트래픽을 라우팅하여 공항에서 오는 모든 것이 내가 모방하려는 것과 동일한 특성을 갖도록 설정하여 동일한 작업을 수행했습니다. 터미널에서 직접 ipfw 명령을 호출하여 동일한 효과를 얻을 수 있습니다.


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.


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.

Mac의 Charles

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.

DummyNet

You could also use vmware to run BSD or Linux and try this article (DummyNet) or this one.


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.


Try WANem

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.


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.


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.


Another client-side program (Windows only), is NetLimiter - http://www.netlimiter.com


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.


Found this one for Windows using Fiddler (free solution) http://www.logic-worx.com/index.php/tools-and-apps/fiddler-connection-simulator/


I guess tc could do the job on UNIX based platform.

tc is used to configure Traffic Control in the Linux kernel
http://lartc.org/manpages/tc.txt


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.


Here is good article about this http://purefinity.blogspot.com/2009/01/simulating-network-delay-using-linux.html


If you're on linux, I find the Traffic Control program to be a great help for this sort of thing.


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.


i think i found what i need. maybe you can use charles proxy or slowy. hope it helps.


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


We used this software once inside of a Virtual Machine to do some bandwidth scale testing:

http://www.softinengines.com/index.php?section=download&langu=en

It's not free, but does have a 30 day trial.


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.


You can try this: CovenantSQL/GNTE just write YAML like this:

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"

run ./generate scripts/your.yaml

참고 URL : https://stackoverflow.com/questions/130354/how-do-i-simulate-a-low-bandwidth-high-latency-environment

반응형