How to use multiple interfaces with packetdrill?

197 views
Skip to first unread message

arnaud...@gmail.com

unread,
Jul 31, 2013, 11:39:01 AM7/31/13
to packe...@googlegroups.com
Hi,

We are a few students trying to expand packetdrill in order to test the multipath tcp network stack. We easily achieved to add the mp_capable option support and a kind of "variable management" to refer generated values (keys) later in the script. However, to properly implement and test other mptcp options (mp_join,...) we would like to use packetdrill with multiple interfaces. Is this possible? If so, could we have one or more scripts examples doing it, or at least an example using a single interface and multiple tcp connections (currently we only have the script example found on github and no script language specification)? Any kind of help would be very appreciated.

Thanks,
Arnaud Schils

Neal Cardwell

unread,
Jul 31, 2013, 12:14:57 PM7/31/13
to arnaud...@gmail.com, packe...@googlegroups.com
Having packets flow over multiple interfaces is not currently
supported by packetdrill. I think it would be straightforward to
extend the tool to support this, at least for local mode using TUN
interfaces. For the most part I think it would involve...

- extending the config info to specify the configuration of multiple interfaces
- extending the parser to provide a syntax for the injected/expected
interface name
- extending all the spots in the code that reference state->netdev to
deal with multiple interfaces, instead of a single interface

If this is done in a clean way then we should probably be able to
merge it into the main packetdrill branch.

Sorry for the lack of examples and documentation. We will be adding
more test scripts and documentation as time allows.

As a down-payment, I just added a complete reference for the syntax of
the language:
https://code.google.com/p/packetdrill/wiki/Syntax

I also recommend reading the USENIX paper if you have not already done so:
http://research.google.com/pubs/pub41316.html

Hope that helps,
neal

arnaud...@gmail.com

unread,
Jul 31, 2013, 2:03:33 PM7/31/13
to packe...@googlegroups.com, arnaud...@gmail.com
Ok we will try ourselves to add multiple interfaces support in addition to the mptcp extension.
If we achieve to have a clean result we will send you a patch.

We have already read the USENIX paper. Thanks for the syntax guide, it could be useful.

Thanks for your help,
Arnaud

arnaud...@gmail.com

unread,
Aug 2, 2013, 6:50:33 AM8/2/13
to packe...@googlegroups.com, arnaud...@gmail.com

Hi,

We have an another question. We are for the moment trying to use multiple TCP connections (on a single interface), using different ports, in the same script (before trying to extend to multiple interfaces). We would like to listen on two TCP connections and specify from/to which tcp connection packets are sent / expected. I'm searching for quite a long time now and I don't achieve to find the way to do it. Furthermore I don't see anything in the Bison code / syntax guide to handle socket choice when writing packets in the script.

I tried to create two sockets and to bind them to differents ports using the sockaddr parameter. Despite the fact that the sockaddr parameter for the bind system call is implemented at the parser level it seems that it's not the case deeper in the code. In the syscall_bind function (run_system_call.c) code seems to reject parameter different from ellipsis for the sockaddr argument. The sockaddr structure given to bind is created from the "state structure", and this structure seems to manage only one port per script.

Could you please confirm
that these functionalities are not currently supported by packetdrill or explain me if I missed something.

Thank you a lot,
Arnaud

Neal Cardwell

unread,
Aug 2, 2013, 8:26:26 AM8/2/13
to arnaud...@gmail.com, packe...@googlegroups.com
Yes, that's correct. The packetdrill tool does not yet support
multiple concurrent open sockets or binding to a specific address
specified in the script. Both of these are on the long-term to-do
list, so if someone comes up with a good implementation of these we
can merge these into the main branch.

neal
Reply all
Reply to author
Forward
Message has been deleted
0 new messages