freifunk-berlin / firmware

DEPRECATED: Build system for Berlin firmware. Please user the pinned falter-repos instead
https://berlin.freifunk.net
GNU General Public License v3.0
74 stars 34 forks source link

Forwarding between MESH and DHCP Interface not working #550

Open theatischbein opened 6 years ago

theatischbein commented 6 years ago

Excepted behaviour:

A Node with only meshes with backbone should forward packages from the dhcp interface where the clients are connected to the mesh interface where is backbone is connected via olsr (and possible internet connection)

Actual behavior:

Packages are dropped (Notification: Destination Net unreachable) when trying to access a backbone node or internet server.

Setting:

lede-17.01 branch (git-18.056.25406-c1e6a3d) / Freifunk Berlin Hedy 1.0.0 v1.0.0

NanoStation M5 to BackBone meshed via LAN to Freifunk Router.

Workaround:

Adding IP route for Mesh Interface and Default route

ip route add LOCAL_MESH_IP/32 dev MESH_INTERFACE ip route add REMOTE_NEXT_HOP_MESH_IP dev MESH_INTERFACE ip route add default via REMOTE__NEXT_HOP_MESH_IP

Delete ip rule

ip rule del from all iif DHCP_INTERFACE unreachable ip rile del from all iif MESH_INTERFACE unreachable

Source of Error:

The blocking ip rule was added by bootup from the following file / patch

firmware/patches/701-luci-freifunk-policyrouting-berlin.patch

/etc/hotplug.d/iface/30-policyrouting

 +   # add unreachable rules (prevents using router's default route (without VPN))
 +   if [ "$strict" != 0 ] && [ ! "$(ip -$p rule show | egrep "from all iif ${DEVICE} (\[detached\] )?unreachable")" ]; then
 +           ip -$p rule add dev "${DEVICE}" unreachable prio 20001
theatischbein commented 6 years ago

I flashed a second router with hedy (same version, but WDR-3600 this time) but I have to same problem.

Is there a problem with hedy ? Any suggested procedure for fixing ? My workaround from above is not really working here because there are multiple possible routes.

ghost commented 6 years ago

Hi, forwarding works, if olsrd is installing the routes properly. Possibly you look up at the wrong place. We use multiple route tables which are looked up in a certain order, so you'll never see routes exported by others in route table 1/default.

Following commands might by useful: ip rule show ip route show table #number#

pmelange commented 6 years ago

Is this a "no-tunnel" version? Maybe it has something to do with #560, #547 #532 #542 or #545. Please try the suggestions in #561 and comment in that issue.

SvenRoederer commented 6 years ago

@JonnyTischbein How do you connect both routers? Are you using your backbone-router as uplink (via ffuplink interface)?

theatischbein commented 6 years ago

Sorry for answering that late. Thanks for giving the hint about the different ip tables!

Yes it should be a non-tunnel version. I'll try the fix in #561 ec75de6

@SvenRoederer Yes they are connected via ffuplink. Router1 <--Ethernet--> NanoStation <--Wifi--> Backbone

SvenRoederer commented 6 years ago

can you check if "Router1" or the "NanoStation" is giving the "Destination Net unreachable"-error

PolynomialDivision commented 5 years ago

Fix that worked for me

Everything works although I have rules like

20001:  from all iif tunl0 unreachable
20001:  from all iif wlan1-adhoc-2 unreachable
20001:  from all iif br-dhcp unreachable
20001:  from all iif eth0 unreachable

I think we can close.

SvenRoederer commented 5 years ago

SGW was always causing some problems from time to time somewhere. There have been serveral discussions on disabling sgw on the mailinglist with some instructions.

it shouls also work, to just disable the "dyn-gw" plugin of olsrd.

PolynomialDivision commented 5 years ago

SGW was always causing some problems from time to time somewhere. There have been serveral discussions on disabling sgw on the mailinglist with some instructions.

it shouls also work, to just disable the "dyn-gw" plugin of olsrd.

Are u sure? I think it is important to uncomment or delete

option RtTableTunnel '113'
option RtTableTunnelPriority '100000'

But maybe this is new with the new Hedy Version... Finally, everything is running smooth. :) I don't want to destroy my config right now. Maybe I will test this in the future...

Smart Gateway is routing my connections very very very bad... Eeverything is routed over phimel (or how it is called).