December 2010
2 posts
3 tags
Emulate network latency using tc
Use this code:
PATH=$PATH:/sbin
lat=$1 ## desired bandwidth in megabits per sec
destip=$2 ## destination host to limit traffic to
if [[ -z $lat ]]
then
lat=100
fi
if [[ -z $destip ]]
then
echo "using default IP: 192.168.245.21"
destip=192.168.245.21
fi
echo "note this may not work for VMs since it uses eth instead of peth0"
tc qdisc del dev eth0 root
tc qdisc add...
2 tags
Making a /proc entry with a kernel module
This is actually really simple.
Just follow this example.