Created
July 24, 2012 18:32
-
-
Save romanr/3171701 to your computer and use it in GitHub Desktop.
Simulate slow network on OSX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configure a pipe that has the appropriate bandwidth limit and delay. | |
sudo ipfw pipe 1 config bw 16Kbit/s delay 350ms | |
Attach it to all traffic going to or from port 80. | |
sudo ipfw add 1 pipe 1 src-port 80 | |
sudo ipfw add 2 pipe 1 dst-port 80 | |
Now traffic coming from or going to port 80 anywhere is limited by the pipe that you specified. Do your testing and once you get frustrated with slow access to the web remove the rules like so: | |
sudo ipfw delete 1 | |
sudo ipfw delete 2 | |
Finally, delete the now defunct pipe like so: | |
sudo ipfw pipe 1 delete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment