Hi,
I am trying to use a raspberry pi ... to create a routed link
between two access points ... so I can access the monitoring port ...
from homeassistant.
Both AP's connect ok from the rpi but the routing is wrong - I can
ping in both directions from the rpi, but only sometimes from devices
further hops away - can openrc even do this?
My experimenting so far is hit and miss. Trying to static route
or override the default routes doesn't survive a network glitch,
and half the time doesn't seem to "take" at all.
A working example I could adapt would be great!
I do know that the DHCP protocol supports adding additional options / definitions / parameters (?term?) to specify ... static routes.
On 3/31/22 7:21 AM, William Kenworthy wrote:
Hi,
Hi,
I am trying to use a raspberry pi ... to create a routed link
between two access points ... so I can access the monitoring port
... from homeassistant.
I'm distilling this down to a Gentoo system participating in two two
LANs, both of which are connected as DHCP clients. -- Correct me if
I've distilled too much. -- And you want other systems on either LAN
to use this system as a communications path to systems on the opposing
LAN.
Both AP's connect ok from the rpi but the routing is wrong - I can
ping in both directions from the rpi, but only sometimes from devices
further hops away - can openrc even do this?
This seems like a classic routing issue. To me, it's not even an
OpenRC issue in any way other than how to add static routes /after/
the network is brought up via DHCP.
My experimenting so far is hit and miss. Trying to static route or
override the default routes doesn't survive a network glitch, and
half the time doesn't seem to "take" at all.
Ya. At a higher level, this can be non-obvious how to do this as it's
niche routing configuration.
A working example I could adapt would be great!
I don't have an example off hand. -- Seeing as I use static IPs on
almost all of my machines, I don't even know if OpenRC supports adding
a static route /after/ bringing an interface up with DHCP.
I do know that the DHCP protocol supports adding additional options / definitions / parameters (?term?) to specify -- what I've been
describing as -- static routes. That way DHCP clients will learn
about these additional routes and install them in their local routing
table. Though I don't know if you will have the necessary control over
/both/ DHCP servers that's needed to do this.
Presuming that you don't have control over /both/ DHCP servers (as
control over /both/ will be needed), I'm going to fall back and
suggest what I call the "Customer Interface Router".
Specifically, set up port forwarding on the Pi such that when clients
on LAN1 connect to $PORT on the Pi, the traffic is DNATed to the HomeAssistant on LAN2 /and/ the traffic is SNATed to the LAN2
interface on the Pi. Thus every system on each LAN thinks that it's
talking to a directly attached system in the same LAN. There is no
need for routing in this case.
I typically only use the C.I.R. when there are reasons that more
proper routing can't be configured. The C.I.R. is an abstraction
layer that allows either side to operate almost completely
independently of each other, save for IP conflicts between each
directly attached LAN.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 303 |
Nodes: | 16 (2 / 14) |
Uptime: | 86:00:49 |
Calls: | 6,808 |
Calls today: | 4 |
Files: | 12,328 |
Messages: | 5,401,640 |