I have a ZTE MC801a in bridge mode providing my WAN over LTE/5G. The device has two LAN ports, as well as WIFI. In bridge mode, one of the LAN ports provides a gateway IPv4 address of 192.0.0.1 as well as IPv6 address space. The second port and also WiFi, has DHCP permanently running with whatever IP range may have been configured in non bridged mode (currently 192.168.1.x) and also provides a gateway to the internet. The only means of accessing the web gui on the MC801a is via its own WiFi, or the second LAN port. It looks unlikely that Openwrt can support the MC801a, so I'm stuck with the stock Three/Hutchinson firmware.
The network is configured as Openwrt 23.05 on my main router/AP serving DHCP in the range 192.168.0.x and other services, and then a dumb AP 22.03.2 for WiFi coverage. Due to DHCP clashes with the MC801a, its WiFi has been disabled, and the LAN conection is currently physically isolated from the rest of the network.
Here is a schematic of the current scenario:
What I would like to do, is to be able to still have access the web gui (no SSH sadly) of the bridge via its second LAN port, but prevent DHCP clashes with my own subnet, and prevent internet traffic being routed via its gateway. I have not been able to determine is if the second interface is VLAN tagged.
What is the best way of solving this problem? VLAN and Policy Based Routing seem like the obvious choices, but all of the examples that I've managed to find do not seem to cater for my particular scenario, nor am I sure that I'm setting them up correctly when I try. The result seems to end up with no web gui access, a network crash due to IP clashes, no internet access at all, or connecting via IPv6 only.
I have reset, and largely left Openwrt in its default configuration except for the changes to IP ranges, and setting up the dumb AP. I'll refrain from posting any of my configuration attempts simply because they didn't work, and may only serve to confuse.
The main router has its WAN interfaces (ipv4 and ipv6) as DHCP clients via LAN to the bridged port of the MC801a. The remaining four ports and two radios are bridged with a static IP of 192.168.0.1 and serving DHCP 192.168.0.100-150. The dumb AP has a static IP of 192.168.0.2. Gateway and DNS point to 192.168.0.1. This is working currently albeit without access to the web gui of the bridge unless I conect to this second port via the LAN port on my main PC.
Main router:
# ifconfig
br-lan Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::xxxx:xxxx:xxxx:xxxx/64 Scope:Link
inet6 addr: fdc7:xxxx:xxxx::1/60 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:69953958 errors:0 dropped:121879 overruns:0 frame:0
TX packets:126366198 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6509317159 (6.0 GiB) TX bytes:158402700908 (147.5 GiB)
eth0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet6 addr: fe80::b4d2:xxxx:xxxx:xxxx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1508 Metric:1
RX packets:162410555 errors:0 dropped:0 overruns:0 frame:0
TX packets:120856134 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2843351975 (2.6 GiB) TX bytes:3918548525 (3.6 GiB)
lan1 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:262741 errors:0 dropped:175 overruns:0 frame:0
TX packets:627745 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:24241830 (23.1 MiB) TX bytes:131705668 (125.6 MiB)
lan2 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:9381 errors:0 dropped:0 overruns:0 frame:0
TX packets:13007 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6051858 (5.7 MiB) TX bytes:9349860 (8.9 MiB)
lan3 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:32208296 errors:0 dropped:0 overruns:0 frame:0
TX packets:51089245 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2885648421 (2.6 GiB) TX bytes:63889510812 (59.5 GiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:806115 errors:0 dropped:0 overruns:0 frame:0
TX packets:806115 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:65279342 (62.2 MiB) TX bytes:65279342 (62.2 MiB)
wan Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:192.0.0.2 Bcast:192.0.0.31 Mask:255.255.255.224
inet6 addr: fe80::xxxx:xxxx:xxxx:xxxx/64 Scope:Link
inet6 addr: 2a04:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:126893727 errors:0 dropped:33 overruns:0 frame:0
TX packets:64658835 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:157247076760 (146.4 GiB) TX bytes:6798695641 (6.3 GiB)
wlan0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:11679621 errors:0 dropped:0 overruns:0 frame:0
TX packets:23148585 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1429265596 (1.3 GiB) TX bytes:28912378611 (26.9 GiB)
wlan1 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet6 addr: fe80::xxxx:xxxx:xxxx:xxxx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17414118 errors:0 dropped:0 overruns:0 frame:0
TX packets:36190900 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2006214229 (1.8 GiB) TX bytes:45782602500 (42.6 GiB)
# cat config/network
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fdc7:xxxx:xxxx::/48'
config dsl 'dsl'
option annex 'a'
option tone 'av'
option ds_snr_offset '0'
config device
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
config device
option name 'lan1'
option macaddr 'xx:xx:xx:xx:xx:xx'
config device
option name 'lan2'
option macaddr 'xx:xx:xx:xx:xx:xx'
config device
option name 'lan3'
option macaddr 'xx:xx:xx:xx:xx:xx'
config device
option name 'lan4'
option macaddr 'xx:xx:xx:xx:xx:xx'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option ipaddr '192.168.0.1'
list ip6class 'local'
config interface 'wan'
option proto 'dhcp'
option device 'wan'
config interface 'wan6'
option device '@wan'
option proto 'dhcpv6'
config device
option type 'bridge'
option name 'config'
list ports 'lan4'
Could one of you gurus please give me some pointers on how to realise my setup goal?
[Edited for clarity images and config)