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

ping from homenode > extender node > ... > wan does not succeed #29

Open
jhpoelen opened this issue Apr 13, 2018 · 10 comments
Open

ping from homenode > extender node > ... > wan does not succeed #29

jhpoelen opened this issue Apr 13, 2018 · 10 comments

Comments

@jhpoelen
Copy link
Contributor

Using sudomesh testbed:

on dolphin node:

#ping 8.8.8.8
ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
^C
--- 8.8.8.8 ping statistics ---
69 packets transmitted, 0 packets received, 100% packet loss

Note 69 packets transmitted with 100% packet loss.

Note however, than on dolphin's extender node -

#tcpdump -i br-open | grep ICMP
listening on br-open, link-type EN10MB (Ethernet), capture size 65535 bytes
23:34:52.172113 IP google-public-dns-a.google.com > 100.65.42.1: ICMP echo reply, id 21619, seq 192, length 64
23:34:53.177926 IP google-public-dns-a.google.com > 100.65.42.1: ICMP echo reply, id 21619, seq 193, length 64
23:34:54.173353 IP google-public-dns-a.google.com > 100.65.42.1: ICMP echo reply, id 21619, seq 194, length 64

So, it seems like the packets are getting to the extender node, but for some reason, they are not getting routed back to the home node.

@Juul
Copy link
Member

Juul commented Apr 13, 2018

alright so either the routing tables on dolphin's extender node are messed up or the firewall rules on dolphin are messed up. If you insert an ACCEPT clause at the top of the INPUT chain on dolphin and that doesn't make it work then it probably wasn't a firewall issue:

iptables -I INPUT -j ACCEPT

of course it could be a NAT issue but that seems less likely. If running that command doesn't make the ping go through then i'd look at the routing table on dolphin's extender node and possibly also its firewall rules in the FORWARD chain.

@jhpoelen
Copy link
Contributor Author

I should probably mentioned that the pings for mesh ip addresses are fast .

@jhpoelen
Copy link
Contributor Author

e.g.,

# ping 100.64.0.42
PING 100.64.0.42 (100.64.0.42): 56 data bytes
64 bytes from 100.64.0.42: seq=0 ttl=60 time=34.268 ms
64 bytes from 100.64.0.42: seq=1 ttl=60 time=33.718 ms

@bennlich
Copy link
Collaborator

@Juul nice test! I verified that adding the permissive iptables rule to dolphin fixes the pings. So it seems like iptables rules on dolphin are broken.

One thing to note--even with the permissive rule, sometimes the first ~10 pings don't see replies. For now I'm assuming this is because there's a weak link somewhere in the chain of routers, but am including the note here in case it suggests something more specific. Yeesh!

@bennlich
Copy link
Collaborator

And it does not seem to matter whether the rule is appended or inserted. iptables -A INPUT -j ACCEPT works just as well. Surprisingly (to me), narrowing down the rule to the expected interface does not work. E.g. iptables -I INPUT -i eth0.1 -j ACCEPT does not help.

@bennlich
Copy link
Collaborator

Aha! How weird. The packets leave on interface eth0.1, and they return on interface eth0.10. Is that expected?

@Juul
Copy link
Member

Juul commented Apr 14, 2018 via email

@bennlich
Copy link
Collaborator

bennlich commented Apr 15, 2018

@Juul wow incredible breakdown! Thanks for this! This really helps me to understand the VLANs and interfaces on the home nodes. @jhpoelen @eemblam if node whisperers had to do exercises, maybe this would be one :-P

@Juul based on your description, it sounds like all traffic destined for a home node, passing through its extender, will arrive on the eth0.10 interface. Meanwhile, traffic destined to a home node by way of a wirelessly meshing home node will arrive on its eth0.1 interface. Does this sound right?

Back to the bug at hand--it appears to be a home node firewall bug since adding a permissive rule fixed the ping. But it doesn't seem like relevant changes have been made recently to https://github.com/sudomesh/makenode/commits/master/configs/ar71xx/home_nodes/templates/files/etc/init.d/meshrouting. Could this be an old bug? Or is there another place to look for firewall mischief?

@Juul
Copy link
Member

Juul commented Apr 15, 2018

it sounds like all traffic destined for a home node, passing through its extender, will arrive on the eth0.10 interface. Meanwhile, traffic destined to a home node by way of a wirelessly meshing home node will arrive on its eth0.1 interface. Does this sound right?

Yep. Until we get private networks working over extenders (which requires a small patch to wpa-supplicant I've been meaning to write) then this will be the case.

@eenblam
Copy link
Member

eenblam commented Apr 16, 2018

@bennlich agreed. This has been very enlightening. Thanks @Juul !

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

4 participants