This is an old revision of the document!
Master Communications - Protocols and Networks
Details for traffic shaping are in .
Details regarding tcp testing are here: .
Setup Ubuntu installation for Network analysis
The network throughput analysis is done with different tools.
- iperf Performance Measurement
- Wireshark Packet Tracing
- Network emulation
- tcp_probe Kernel module (see
sudo apt-get install git iperf wireshark gnuplot
TCP Throughput test with iperf
Setup a server on one computer
iperf -s
Run a client on a second computer. The client will send data to the server.
iperf -c SERVERIP -i 1
Option -i will show intermediate bandwidth results every second.
Add netem network emulation traffic shaping to an ethernet device
In the following example an additional 100 ms delay to the outgoing traffic is added.
sudo tc qdisc add dev eth0 root netem delay 100ms
Show the current traffic shaper
tc qdisc show
Remove a traffic shaper
sudo tc qdisc del dev eth0 root
For limiting the bandwidth a token bucket shaper can be used. In the example below the packet is delayed by 100 ms with the netem shaper and the goes to the token bucket shaper. See .
sudo tc qdisc add dev eth0 root handle 1: netem delay 100ms sudo tc qdisc add dev eth0 parent 1:1 handle 10: tbf rate 256kbit buffer 1600 limit 300 tc -s qdisc