Comments (6)
Hi Irina,
the sink
program simply receives and drops anything that comes on a given physical or virtual interface. This is ok for UDP, because the UDP sender does not need any response or acknowledgement packets from the receiver.
However, for a TCP connection to work, the receiver must send a SYN+ACK, and then ACK the packets sent by the sender. This does not happen, because sink just drops, without generating any return traffic.
Even before that, the sender machine must resolve the IP address of the receiver. This explains the ARP packets that you see. You need to make sure that ARP responses come back.
What you see with TCP dump is probably your sender trying to send ARP requests, but never getting responses.
from netmap-tutorial.
Hi Vincenzo,
Thanks so much for your response.
Yeah, upon attempting TCP-connect from another host, I was expecting a couple of ARP packets followed by that TCP rejection packet (similar to what I'm seeing in tcpdump) as I just wanted to see some TCP packets gong through netmap before moving on to something more full-featured.
I did achieve that however, by first establishing the handshake without netmap and then started netmap and started sending packets through the socket established outside -- they all got through my TCP-flavoured-sync
, no problem. So I guess I would need a complete TCP implementation for the entire thing to work end-to-end. If I figure out the full TCP example myself, I'd be happy to share.
from netmap-tutorial.
Correct. If you want to intercept traffic and let it go ahead you can look at the forward
program.
You can forward between two separate ports, e.g.
# ./forward -i netmap:eth0 -i netmap:eth1
You can also forward between rings belonging to the same port, and in particular between the hardware rings and the host rings, e.g.
# ./forward -i netmap:eth0 -i netmap:eth0^
which means that you let the traffic pass between the NIC (or virtual interface) to the host network stack, but you also intercept (and possibly drop or modify) all the packets. In this case you don't need a TCP implementation in your netmap program, because you reuse the host network stack.
from netmap-tutorial.
Actually, this was a separate, and more important question I had! ( I thought bridge
netmap app would do this for me but it didn't seem to work) forward
works however! That's priceless :) Thank you so much for this tip Vincenzo!
from netmap-tutorial.
Actually bridge
and forward
should both work. Maybe you have not disabled the offloadings as pointed out in LINUX/README
?
from netmap-tutorial.
That's right, I haven't! Will give it another try. Thank you so much again! :)
from netmap-tutorial.
Related Issues (4)
- typo error on vale-tutorial.pdf page 16 HOT 2
- Cannot load mymodule_lin.ko HOT 6
- make error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netmap-tutorial.