Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use fake ip router program to work #170

Closed
pvc468 opened this issue Jan 31, 2015 · 3 comments
Closed

Unable to use fake ip router program to work #170

pvc468 opened this issue Jan 31, 2015 · 3 comments

Comments

@pvc468
Copy link

pvc468 commented Jan 31, 2015

Hi,
I doing my thesis on click with kernel mode and I cannot foward packets within two interfaces (eth0, eth1). I also tried to use Infinite source to generate packets from one source (eth0) to another interface. Nothing works. Whenever I use dmesg I can see packets are created but if I use tcpdump or wireshark like programs I have no packets to my other device (eth1). Do anyone have any suggestions. I tried different sources for tutoring me about Click but I end up at http://www.read.cs.ucla.edu/click/ as root source. I dont understand why there is only a single source for tutorials. Also I request Kohler or developers to make more detailed manual pages. Any programmer new (like me) to kernel programming cannot understand the manual pages.

@pallas
Copy link
Contributor

pallas commented Jan 31, 2015

Can you post a minimal click config please? There are two halves to each interface, the device side and the host side. For tcpdump to work, you need to make sure the packets reach the host side.

@pvc468
Copy link
Author

pvc468 commented Feb 1, 2015

InfiniteSource(DATA <
00 00 c0 ae 67 ef 00 00 00 00 00 00 08 00
45 00 00 28 00 00 00 00 40 11 77 c3 01 00 00 01 02 00 00 02
13 69 13 69 00 14 d6 41
55 44 50 20 70 61 63 6b 65 74 21 0a 04 00 00 00 01 00 00 00
01 00 00 00 00 00 00 00 00 80 04 08 00 80 04 08 53 53 00 00
53 53 00 00 05 00 00 00 00 10 00 00 01 00 00 00 54 53 00 00
54 e3 04 08 54 e3 04 08 d8 01 00 00

, LIMIT 600000, BURST 5, STOP true) -> Strip(14)
-> CheckIPHeader(BADSRC 18.26.4.255 2.255.255.255 1.255.255.255)
-> RED(10, 100, .5)
-> Queue
-> ToDevice(eth1);

I am trying to foward udp packets from eth0 to eth1. I wrote this as a test program to check whether I can foward them by using infinite source.

@pallas
Copy link
Contributor

pallas commented Feb 1, 2015

So, this config generates 600000 packets, cuts off the ethernet header, checks the IP header, performs RED, and then sends the packets to the eth1 MAC. If you want to see them via tcpdump, you need to send them to the host interface, i.e. ToHost(eth1). You should also look into whether it would be appropriate to set the SNIFFERS flag.

@pvc468 pvc468 closed this as completed Mar 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants