I have it working now. I had followed those instructions and the reason
for it not working was that I had connected it up wrong (probably I need
less coffee and more sleep!).
I am impressed that the amount of setup required to do this is trivial.
Ian McDonald wrote:
Glenn - haven't got much time to reply at present
but also look at:
A few notes:
- I use with a third machine in middle and route/traffic shape on this
- makes it much simpler - client boxes don't need to be modified
- make sure you look at the limit parameter or else your behaviour is real bad
- use a kernel with HZ=1000 if possible and/or a machine with hrtimers
(new kernels). Netem in past always introduces minimum one tick delay
(which new netem/hrtimer resolves but haven't tested).
Feel free to ask me more as I have used a lot (and wrote that Wiki
page I linked to). Not much time to respond quickly though often!
On 11/29/07, Glenn Ramsey <glenn(a)componic.co.nz> wrote:
In order to test some software I am developing I need to introduce a
network delay between a machine and the rest of my LAN.
After a bit of web searching I discovered that this is supposed to be
simple to do, you just set up Linux as a transparent bridge and use the
iproute tools to simulate network behaviour. However I can't get it to
work how I want.
I have an old AMD K6/500 box with 2 10bT ethernet cards running Xubuntu
7.10. One card is connected to my office LAN switch and the other to a
hub, like this:
I have installed bridge-utils and iproute and I have configured the
bridge machine according to the bridge-utils documentation by removing
the eth0 and eth1 entries and adding a br0 to /etc/network/interfaces :
iface br0 inet static
bridge_ports eth0 eth1
This works fine and MachineB can get an address via DHCP and see the
rest of the network.
Now I need to add a delay so that all traffic between MachineB and the
rest of the network has some latency.
In order to add a delay, according to  I just need to do this:
$ tc qdisc add dev DEV root netem delay 100ms
I have done this for various combinations of eth0, eth1 and br0 but it
only seems to delay traffic to and from the bridge itself, not traffic
being relayed through the bridge.
Does anyone know how to set this up to delay traffic going through the
Glenn Ramsey <glenn(a)componic.co.nz> 07 8627077
wlug mailing list | wlug(a)list.waikato.ac.nz