
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[tlug] Re: Adding latency to network connection
Alberta, John,
Sorry bit of a delay in replying. I had already tried John's suggestion
which worked well enough for what I needed.
John Fremlin wrote:
> Use tc netem?
>
> http://www.linuxfoundation.org/en/Net:Netem
>
> Emulating wide area network delays
>
> This is the simplest example, it just adds a fixed amount of delay to all packets going out of the local Ethernet.
>
> # tc qdisc add dev eth0 root netem delay 100ms
Thanks that was pretty much what I was after. It obviously only adds
the latency to outgoing packets so I also needed to add latency for
incoming packets.
# modprobe ifb
# ip link set dev ifb0 up
# tc qdisc add dev eth0 ingress
# tc filter add dev eth0 parent ffff: protocol ip u32 match u32 0 0 flowid 1:1 action mirred egress redirect dev ifb0
# tc qdisc add dev ifb0 root netem delay 500ms
If you are trying this at home you might also want ;)
# tc qdisc del dev eth0 root
# tc qdisc del dev ifb0 root
Edward
Home |
Main Index |
Thread Index