pkelsey / libuinet

a library version of FreeBSD's TCP/IP stack plus extras
750 stars 198 forks source link

Cannot connet to libuinet echo/echo++ server #30

Open alim1975 opened 9 years ago

alim1975 commented 9 years ago

I am trying to benchmark user-space TCP stack (libuinet+netmap) on Linux. I have successfuly built netmap including device drivers and libuinet with netmap. I have tested netmap alone using pkt-gen utitlity and it works. However, I cannot not connect to libuinet echo server. I start 'echo' server on a machine and then try to connect to it from another machine. I have added an ARP entry for the server IP address on the client machine. I use telnet/nc/iperf to connect to 'echo' server but nothing works. Please note that 'echo' starts successfully and says listenning on the socket.

It seems to me that netmap does not invoke the interface callback function to deliver packets. Can any tell me why I cannot connect to 'echo' server? Thank you very much.

Cheers,

Abdul Alim

caladri commented 9 years ago

Abdul Alim,

Thanks for submitting this bug; it sounds like you've done some of the initial checks needed. I'm sure @pkelsey has noticed your bug as have I, and so you don't need to submit this report multiple times, or paste your submission into other, unrelated bugs.

So, first, can you paste echo's output when you start running it, as well as ifconfig output for the interface you're using for netmap? Also, are there any messages from netmap in dmesg that might be relevant? Additionally, please include the full commands that you are running both when invoking echo and when trying to connect from your client machine.

Can you also run tcpdump on the client while it is trying to connect (please keep it simple and capture exactly one connection attempt using nc) and show the results, or save and attach a pcap file? Likewise, without echo running, can you run tcpdump on the system you're using for echo and see if the packets are making it to the physical interface, ignoring the question for the moment of whether and how netmap is working?

Lastly, can you describe your network layout? Is there a switch between the client and the system running echo, or are they directly connected? You might also want to include the output of ifconfig on the client interface that you expect to be used.

Thanks, Juli.

deepakys commented 8 years ago

Current version of libuinet only supports one queue on interface. You can check the number of queues on interface using 'ethtool' as below.

ethtool --show-channels eth3

If total number of queues is more than one, reduce it with following command.

ethtool -L eth3 combined 1

Further connecting to the 'echo' program using 'telnet' should work.

echo -i eth3 -l 192.168.1.1 -p 5001 -v telnet 192.168.1.1 5001