» Introduction
Yesterday, I got a hint from a colleague to fake a poor network connection (for debugging an issue) with tc (man page):
| |
This works with Linux and will add a delay and packet loss to the eth0 interface.
I was curious if there is someting similar for macOS, and there is: pfctl and dnctl.
This following commands are mainly copy-pasted from the posts from John Ruble and Sal Ferrarello. Check their posts and the man pages of the commands for more details.
» Enable
Add a packet loss of 30%, a bandwidth limit of 100kbit/s, and a delay of 300ms to the service running on localhost:59219 using TCP:
| |
» Disable
Remove the limitations again and reset everything:
| |
» Status
Get your current configurations:
| |
and
| |