[clug] multiple network ports on one machine

Daniel Pittman daniel at rimspace.net
Tue Mar 31 00:02:41 GMT 2009

Adrian <adrian.blake at ieee.org> writes:

> To do some testing I wish to send UDP packets out on one Ethernet
> interface, through a switch, and back in on another interface of a 4
> port machine.  What would be the basic server and client code to do this
> or point me to some basic docs.

Michael and Robert have already identified the main problem you will
encounter with this, as well as one solution.  I would also point you to
libnet, or similar solutions, for talking to raw sockets in other

I think the main question, which no one has asked yet, is why do you
want to do this?

Whatever problem you are trying to solve, this almost certainly isn't
it.  If you tell us the problem, rather than asking for help with the
solution you selected, we might be able to assist you in solving it more


More information about the linux mailing list