On Tue, Apr 12, 2011 at 11:57:48AM -0600, Dave Smith wrote: > I am looking for a tool to help me simulate a badly behaved TCP/IP > network connection. I want to simulate a network with high latency, low > bandwidth, frequent bit errors, and occasional drop-outs. This will help > me test some software I'm writing.
I think the magic words you're looking for are netem and tc: http://www.linuxfoundation.org/collaborate/workgroups/networking/netem If you're doing it all on one machine, you have to be careful about routing. If you have two ports, 192.168.1.1 and 192.168.2.1 linked by a tunnel, and you send a packet from 192.168.2.1 to 192.168.1.1, the kernel gets clever and realizes that it doesn't need to go through the tunnel. If I remember correctly, Google contributed a kernel patch that lets you disable this optimization. -- Andrew McNabb http://www.mcnabbs.org/andrew/ PGP Fingerprint: 8A17 B57C 6879 1863 DE55 8012 AB4D 6098 8826 6868 /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */