On Tue, Apr 12, 2011 at 12:37 PM, Andrew McNabb <[email protected]> wrote:
> 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.

The netem thing looks cool.  I also did some research into this,
though more for creating virtual networks of virtual machines than for
creating poorly-behaved network links.  You might be interested in a
couple of projects:

Virtual Network User Mode Linux:
http://neweb.dit.upm.es/vnumlwiki/index.php/Main_Page
VirtualSquare Project: http://wiki.virtualsquare.org/wiki/index.php/Main_Page
VirtualSquare Virtual Distributed Ethernet:
http://wiki.virtualsquare.org/wiki/index.php/VDE

The VDE thing looks like it's exactly what you asked for, especially
with the wirefilter component, though Andrew's suggestion may be
closer to what you want, depending on what it is that you do want. :)

      --Levi

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to