From: Erik Auerswald <auerswal@unix-ag.uni-kl.de>
To: lartc@vger.kernel.org
Subject: Simulating (emulating?) bad network conditions
Date: Sat, 23 May 2020 20:22:40 +0000 [thread overview]
Message-ID: <20200523202240.GA2619@unix-ag.uni-kl.de> (raw)
Hi,
recently someone asked about a script for simulating or emulating degraded
network conditions. I could not provide an answer, because I do not have
something like that available, yet.
But I have just read about "Comcast" which seems to do just that:
https://github.com/tylertreat/Comcast
The README.md contains information on how to use iptables and/or tc
directly instead of through Comcast as well:
"""
Linux
On Linux, you can use iptables to drop incoming and outgoing packets.
$ iptables -A INPUT -m statistic --mode random --probability 0.1 -j DROP
$ iptables -A OUTPUT -m statistic --mode random --probability 0.1 -j DROP
Alternatively, you can use tc which supports some additional options.
$ tc qdisc add dev eth0 root netem delay 50ms 20ms distribution normal
$ tc qdisc change dev eth0 root netem reorder 0.02 duplicate 0.05 corrupt 0.01
To reset:
$ tc qdisc del dev eth0 root netem
"""
-- https://github.com/tylertreat/Comcast#linux
I have not tested this, but it seems to provide a starting point for
experimentation.
HTH,
Erik
--
To a first approximation, we can say that accidents are almost always
the result of incorrect estimates of the likelihood of one or more things.
-- C. Michael Holloway, NASA
next reply other threads:[~2020-05-23 20:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-23 20:22 Erik Auerswald [this message]
2020-05-23 20:34 ` Simulating (emulating?) bad network conditions Jehan Tremback
2020-05-23 21:16 ` Quentin Smith
2020-05-23 23:50 ` Rich Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200523202240.GA2619@unix-ag.uni-kl.de \
--to=auerswal@unix-ag.uni-kl.de \
--cc=lartc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).