Created
November 30, 2011 22:11
-
-
Save doctyper/1411283 to your computer and use it in GitHub Desktop.
Add latency to localhost
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
# enable | |
sudo ipfw pipe 1 config bw 50KBytes/s delay 100ms | |
sudo ipfw add 1 pipe 1 src-port 80 | |
sudo ipfw add 2 pipe 1 dst-port 80 | |
# disable | |
sudo ipfw delete 1 | |
sudo ipfw delete 2 |
Yeah, a potential problem with the NLC is it tries to do too much. I don't need it to drop packets, just to slow down the network. Co-worker was having problems with it earlier, went the command-line route.
Cool. Nice hack, but I can totally see myself forgetting to disable it and constantly bitching about wtf is up with our internet here. ;)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you're on a Mac check out /Developer/Applications/Utilities/Network Link Conditioner/Network Link Conditioner.prefpane
See http://9to5mac.com/2011/08/10/new-in-os-x-lion-network-link-conditioner-utility-lets-you-simulate-internet-and-bandwidth-conditions/