https://github.com/regit/lagfactory
Bash script that uses Netem to simulate delay and packet loss to a given target
https://github.com/regit/lagfactory
Last synced: about 1 year ago
JSON representation
Bash script that uses Netem to simulate delay and packet loss to a given target
- Host: GitHub
- URL: https://github.com/regit/lagfactory
- Owner: regit
- Created: 2011-07-23T16:20:14.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2013-09-19T17:54:32.000Z (over 12 years ago)
- Last Synced: 2025-03-21T23:34:01.776Z (about 1 year ago)
- Language: Shell
- Homepage:
- Size: 113 KB
- Stars: 8
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
=================
LagFactory script
=================
Goal
====
This bash script uses `Netem `_ to simulate delay and packet loss to a given target.
Using it
========
You need first to edit parameters at the start of the script to specify the network interfaces and target ::
IFACE="eth0 eth2" # Input and output interface to simulate lag in INPUT and OUTPUT
TARGET="192.168.1.0/24" # Host or network to apply lag on
Then, you will simply need to run as root something like ::
lagfactory.sh start 4000 2
DELAY : 4000 ms
LOSS : 2%
This will simulate a delay of 4 sec (plus or minus 2 sec) for all packets going to ''192.168.1.0/24'' via ''eth0'' and coming back from ''192.168.1.0/24'' via ''eth2''. There is also a 2 percent packet loss on these packets.
To ease administrator work, SSH trafic is not affected by this modification of network property.