Modem access over LAN setup through LuCI

Hi,

I recently setup OpenWRT/LuCI on an Rpi4 and it's working pretty well. One thing that I haven't gotten to work quite yet is accessing my cable modem web interface over LAN yet. I've seen a couple of guides but they don't quite pertain and the last I tried to set the modem to bridged mode I couldn't access it at all until I hit the factory reset on it. The modem is a TP-Link Archer CR700 modem/router/wifi AP I've already turned off DHCP and wireless. I'm trying to pretty much just use it as a modem but still be able to access the web interface over LAN.

The OpenWRT current setup is:

Built in rpi4 NIC for LAN iface -> Static IP 192.168.2.1 running DHCP server, gateway 192.168.1.1, connected to managed switch

rpi4 USB3 NIC for WAN iface -> Static IP 192.168.1.2, gateway 192.168.1.1, connected to cable modem

CableModem -> Static IP 192.168.1.1, set to "router mode" DHCP disabled

Not sure if I have to setup another interface, or my LAN gateway is wrong or what. Otherwise it's working well.

Any special reson for using two subnets ?

you should be able to run everything on 192.168.1, provided by router.

Yes, bridge mode is preferred if the modem supports it.

Set up the WAN interface as needed for internet access, most likely DHCP (depends on your provider).
Remove the default gateway settings from both WAN and LAN, unless your provider recommends a static IP configuration for WAN.

Then follow this guide:

Indeed, but if the modem serves 192.168.1 on the LAN side I figured it was already NATed.

In my world, a bridged unit will present the public IP on the LAN side.

If the modem cannot be set to bridge mode, you get double NAT, but my advice should still work.
I notice you disabled DHCP on the modem. In this case, keep the default gateway setting on OpenWrt's WAN interface, but remove it from LAN.

(Update: replying to @blazini36)

Literally every guide I've seen do this puts LAN on a different subnet. I initially did try using the same subnet but I possibly was doing something else wrong at the time

Actually I misspoke above, this was already the case. Luci displays a suggested gateway in the textbox if it's empty and that's what I was looking at, LAN didn't actually have a gateway set.

I tried setting the modem to bridge mode and I lost it again then played with some settings in luci. So I hit the reset again and set everything back as I explained above in luci and reset the pi, now I can connect to the modem interface from LAN. So I'm not really sure what's going on now.

The only thing I may have done differently is I notice that IPV6 DHCP server is a separate section in the modem interface and it may have been turned on previously. Not sure if that makes a difference but now it's disabled along with all wifi and ipv4 DHCP and it seems I can reach 192.168.1.1(modem) from 192.168.2.x

According to the CR700 User guide, the device does support Bridge mode. See section 4.3 for details.

If you want to try that again, I suggest the following steps:

  • connect a PC directly to the cable modem
  • enable the DHCP server and configure bridge mode on the modem
  • renew IPv4 address (DHCP lease) on the PC (this may happen automatically)
  • try to access the modem
  • if it works, take a note (*) of your PC's IPv4 configuration received from the modem via DHCP
  • otherwise (no access to the modem), note 192.168.100.2/24 instead. You might want to configure your PC with this static IPv4 address temporarily to check that it works for accessing the modem.
  • now restore the previous network wiring (modem - RPi4 - PC)
  • again, renew IPv4 address (DHCP lease) on the PC to match the RPi4 LAN (may happen automatically)
  • configure OpenWrt for accessing the modem according to the guide from the OpenWrt wiki, using the IPv4 configuration noted at (*)
  • again try to access the modem, disable its DHCP server
  • set up Internet access on OpenWrt as prescribed by your ISP