Working on a new setup and I've probably made it more complicated than necessary but I am struggling to make it work the way I want.
Router A - PFSense serving DHCP to 192.168.1.x via 802.11
Router B - OpenWRT in dumb AP mode, connected via LAN to C.
Router C - OpenWRT handling DHCP for B on 192.168.100.x -- WAN via LTE.
Connected to Router B. I've setup a wireless relayd bridge from B to A and can ping my 192.168.1.x hosts through SSH but not from a wifi client or from router C. Seems like I need to setup static routes for the 192.168.1.1/24 subnet but I've been unable to figure out the right combination of settings that will work.
Here's my config on router B:
config interface 'lan'
option type 'bridge'
option ifname 'eth0.1'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option ipaddr '192.168.100.2'
config interface 'relay_bridge'
option proto 'relay'
option ipaddr '192.168.1.188'
list network 'lan'
list network 'wwan'
config route
option target '192.168.1.0/24'
option netmask '255.255.255.0'
option gateway '192.168.1.1'
option interface 'lan'
In relayd mode the IP address of lan is used for management of the router from its lan.
If you want every device to be in the same network, router C must not provide dhcp, only router A.
Otherwise you can have a layer 3 link from B to A and layer 2 from B to C.
Do not use relayd. It transfers DHCP traffic between networks which is not what you want here. B should make a regular STA connection to A.
Router B has two interfaces holding IP addresses on the A and C networks. A packet sent to one of those will automatically be forwarded to the other network, as long as the firewall allows it. It is not necessary to add any routes to B.
The main router for network A needs to be set with a route to the C network via the A interface IP on router B. And vise versa.
Ummm, unless I'm missing something serious, this route is...useless (if not invalid), you already specified an interface at which 192.168.1.0/24 is located
You failed to specify a subnet here, this config is probably incomplete
Also, you placed the CIDR notation and the subnet mask notation
This device is a dumb AP anyway!
You lost me here, why are you placing a route here?
I've successfully created the static route/gateway pairing on my pfsense router (Router A.) I can now access Router B and Router C when connected to that the WiFi on Router A -- this was my goal and it's working!
But I can't make vice versa work. While connected to Router C, I'm not finding a route to Router A. It appears to be routing through the WAN interface when I do a tracert?
It's worth noting that I'm running OpenMPTCPRouter on Router C -- if my rule above seems correct there must be something in it's settings that is routing this traffic?
OK now it appears to be routing through the correct gateway of Router B but not being forwarded from there -- do I need to bridge the two lan interfaces on Router B somehow?
Tracing route to 192.168.1.1 over a maximum of 30 hops
1 2 ms 3 ms 2 ms OpenMPTCProuter.lan [192.168.100.1]
2 4 ms 1 ms 1 ms 192.168.100.2
3 * * * Request timed out.
4 * * * Request timed out.
The firewall in B needs to allow forwarding. The easiest way to do that is to put both interfaces in the lan zone and make sure the default forward is accept.
Please run the following commands (copy-paste the whole block) and paste the output here, using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have
ubus call system board; \
uci export network; uci export wireless; \
uci export dhcp; uci export firewall; \
head -n -0 /etc/firewall.user; \
iptables-save -c; \
ip -4 addr ; ip -4 ro li tab all ; ip -4 ru
I don't mind so much, although you could split it in 2 posts. The issue is that you are running OpenMPTCProuter distro, which is modified OpenWrt. I suppose this is router C.
The only weird thing I could see is the the mangle rule which marks the packets for the lan doesn't have any hits: [0:0] -A omr-bypass -m set --match-set omr_dst_bypass_eth0 dst -j MARK --set-xmark 0x5398/0xffffffff