How to delay traffic and limit bandwidth at the same time with tc (Traffic Control)?
1
vote
1
answer
3544
views
I want to throttle bandwidth and add delay to a network interface to simulate satellite communication. For example 800ms delay and 1mb/s.
The following limits the bandwidth correctly but does not increase the latency:
17:16:51 root@Panasonic_FZ-55 ~ # tc qdisc add dev eth0 root tbf rate 1024kbit latency 800ms burst 1540
17:18:48 root@Panasonic_FZ-55 ~ # ping 10.10.91.58
PING 10.10.91.58 (10.10.91.58): 56 data bytes
64 bytes from 10.10.91.58: seq=0 ttl=64 time=0.938 ms
64 bytes from 10.10.91.58: seq=1 ttl=64 time=3.258 ms
64 bytes from 10.10.91.58: seq=2 ttl=64 time=1.259 ms
64 bytes from 10.10.91.58: seq=3 ttl=64 time=1.407 ms
^C
--- 10.10.91.58 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 0.938/1.715/3.258 ms
17:18:56 root@Panasonic_FZ-55 ~ # iperf -c 10.10.91.58
------------------------------------------------------------
Client connecting to 10.10.91.58, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[ 3] local 10.10.91.57 port 34790 connected with 10.10.91.58 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.5 sec 1.38 MBytes 1.09 Mbits/sec
17:19:19 root@Panasonic_FZ-55 ~ #
I got my information from this site.
Asked by Matebo
(29 rep)
Oct 7, 2021, 03:22 PM
Last activity: Oct 8, 2021, 11:31 AM
Last activity: Oct 8, 2021, 11:31 AM