Discussion:
Network stress testing tools
(too old to reply)
Jean-Yves Migeon
2013-08-14 16:43:23 UTC
Permalink
Hi list!

I am looking for a library or set of tools I can integrate in a project
to "simulate" a typical network behavior: latency(ies), packet lossage,
out of order sequence, etc.

It would be cool that this kind of tools is purely userland based;
ultimately I would like to use it for regression testing a set of
libraries I am currently developping, and prefer to have it packaged
easily so other people using my libraries could "make test" it too. I
would expect it to hook socket/read/write/... syscalls.

Unfortunately all my research has so far failed. Most solutions I have
found require either a dedicated machine to run and have admin rights
(uhhh) like Lunix traffic control (tc), or heavyweight stuff like we
have with rump and atf/kyua.

So, dear fellow develociraptors, what are you using to test your new
network code, be it kernel based or not?

Thanks!
--
Jean-Yves Migeon

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Thor Lancelot Simon
2013-08-15 11:46:55 UTC
Permalink
Post by Jean-Yves Migeon
Hi list!
I am looking for a library or set of tools I can integrate in a
project to "simulate" a typical network behavior: latency(ies),
packet lossage, out of order sequence, etc.
How can you do this using the public system call interface? TCP will
obscure many or even all of the issues you describe above...

Thor

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Mouse
2013-08-15 11:54:01 UTC
Permalink
Post by Thor Lancelot Simon
Post by Jean-Yves Migeon
I am looking for a library or set of tools I can integrate in a
project to "simulate" a typical network behavior: latency(ies),
packet lossage, out of order sequence, etc.
How can you do this using the public system call interface? TCP will
obscure many or even all of the issues you describe above...
bpf? Raw sockets? Not everything uses TCP.

/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML ***@rodents-montreal.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Greg Troxel
2013-08-15 11:57:20 UTC
Permalink
Post by Thor Lancelot Simon
Post by Jean-Yves Migeon
Hi list!
I am looking for a library or set of tools I can integrate in a
project to "simulate" a typical network behavior: latency(ies),
packet lossage, out of order sequence, etc.
How can you do this using the public system call interface? TCP will
obscure many or even all of the issues you describe above...
So there are two separate issues:

a socket-level tool to represent the kind of delivery timing that TCP
would have given packet-level impairments. (This sounds hard, and I
would not be inclined to do it.)

a packet-level tool like dummynet from FreeBSD, but somehow hooked
into tap/tun/etc. or via rump, so that it can appear to be a
less-than-first-class wire


I'd be inclined to make something that can be a virtual network between
two rumps, with tunable impairment. Perhaps dummynet code can be
ported, but it doesn't seem that complicated.
Jean-Yves Migeon
2013-08-16 07:30:54 UTC
Permalink
Post by Thor Lancelot Simon
Post by Jean-Yves Migeon
Hi list!
I am looking for a library or set of tools I can integrate in a
project to "simulate" a typical network behavior: latency(ies),
packet lossage, out of order sequence, etc.
How can you do this using the public system call interface? TCP will
obscure many or even all of the issues you describe above...
Indeed, I failed to give more details there: The targetted protocol
(LCT) is UDP based, and tries to broadcast data over multicast channels.

Multicast tends to be unreliable once you go with high TTLs (latencies
and out of order, duplication, even loss of paquets). That is the part I
am trying to deal with.

Current concern is that the library has been developped under NetBSD,
but it will be used under Linux, and probably FreeBSD too. And I would
like to have a simple "make test" target that could at least confirm
that the library behaves correctly, and that my future additions do not
introduce regressions. I hunted one down lately that could have been
spotted earlier if I had a simple test running.

FWIW, nothing prevent testing a userland TCP implementation too, except
that the hooks would be elsewhere (*_input and *_output).

LCT runs above UDP, so hooking typical network syscalls looked like the
best possible place.
--
Jean-Yves Migeon

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Lloyd Parkes
2013-08-18 22:10:39 UTC
Permalink
Multicast tends to be unreliable once you go with high TTLs (latencies and out of order, duplication, even loss of paquets). That is the part I am trying to deal with.
Current concern is that the library has been developped under NetBSD, but it will be used under Linux, and probably FreeBSD too. And I would like to have a simple "make test" target that could at least confirm that the library behaves correctly, and that my future additions do not introduce regressions. I hunted one down lately that could have been spotted earlier if I had a simple test running.
Both dummy net and mininet come from academia and so I expect them to be scriptable so that you can reproduce your experiments. Mininet is certainly scriptable.

Cheers,
Lloyd



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Lloyd Parkes
2013-08-15 19:05:41 UTC
Permalink
Post by Jean-Yves Migeon
Hi list!
I am looking for a library or set of tools I can integrate in a project to "simulate" a typical network behavior: latency(ies), packet lossage, out of order sequence, etc.
I would use Mininet rather than some kernel or user land hack. Mininet allows you to create virtual networks that do whatever you want. I believe it is also possible to hook this virtual network up to a VirtualBox guest running NetBSD. Thie nice thing about this is that since you are using an unmodified NetBSD system, you know that this is how NetBSD will behave on a real network.

Cheers,
Lloyd


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...