Re: artificial latency for a network interface

From: Andrew Morton (
Date: Thu Jun 28 2001 - 23:13:20 EST

Andreas Schuldei wrote:
> to simulate a sattelite link, I need to add a latency to a
> network connection.
> What is the easiest and best way to do that?
> I wanted to do that using two tun devices.
> I had hoped to have a routing like this:
> <-> eth0 <-> tun0 <-> userspace, waiting queue <-> tun1 <-> eth1

yes, that works very well. A userspace app sits on top of the
tun/tap device and pulls out packets, delays them and reinjects

The problem is routing: when you send the packet back to the
kernel, it sends it straight back to you. You need to rewrite
the headers, which is a pain.

A simpler approach is to use policy routing - use the source
and destination devices to override the IP addresses. Works
well. The code is at

It has its own variable bandwidth management as well
as variable latency. It's for simulating narrowband, high
latency connections.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Jun 30 2001 - 21:00:21 EST