What's the correct configuration for using a WAP and cable modem?

Hey, first time setting up OpenWRT myself. I'm trying to replace my consumer router/ap with an RPI 3b. I want to use my existing router/ap in AP mode (it will request an ip with DHCP) and have my desktop wired directly into the RPI. There are 3 ethernet ports total on the RPI (one from modem, one from desktop, and one from AP).

To start, I have all eth{0,1,2} in the br-lan bridge.
The first interface I have is MODEM as a dhcp client and it successfully gets an IP from the modem. I have its device set to br-lan.
The second interface is LAN, static ip 192.168.1.1/24, br-lan device, and it picks up the gateway from MODEM.

DHCP was working with on the AP and desktop for a few minutes, but then stopped working. I don't even remember changing anything so idk what's going on there. I was able to get one successful ping to openwrt.org before it stopped working.

I can set a static ip on my desktop to get back into the rpi, but there's no internet access despite the gateway looking correct.

Where should I start to fix this?

The Pi has one built-in ethernet port (as you know). This is eth0.
The other two you mentioned are presumably USB adapters, right? those will be eth1 and eth2.

You should not have the ethernet port that is being used for WAN included in the br-lan bridge. It should be separate. If you use the on-board ethernet port (eth0), you want it to be directly associated with the wan network interface (which should, in turn, be assigned to the wan firewall zone).
The other two can be in a bridge, if you want. But you may get better performance with a regular ethernet switch instead of using 2 ethernet adapters.

Two likely causes - could be one or both:

  • the bridge, as mentioned earlier, is not correct. Remove the WAN ethernet port from the bridge.
  • if your modem is a modem+router, it may also be using 192.168.1.1 as its address. If so, you need to change the address on either that device or the LAN of your OpenWrt Pi to something that is in a different subnet.

The other two you mentioned are presumably USB adapters, right? those will be eth1 and eth2.

Yes that is correct, should have mentioned it.

If you use the on-board ethernet port (eth0), you want it to be directly associated with the wan network interface (which should, in turn, be assigned to the wan firewall zone).

I think it was on the LAN firewall, will change it to WAN.

if your modem is a modem+router, it may also be using 192.168.1.1 as its address. If so, you need to change the address on either that device or the LAN of your OpenWrt Pi to something that is in a different subnet.

That did cross my mind and I tried LAN on 10.0.0.1/24 with the same results. (I’m not sure if the router+ap disables its dhcp server while in AP mode, it’s also on 192.168.1.1/24 usually) But eth0 on br-lan may still be the issue, I’ll try removing it and trying again.

I’ll probably get around to trying these changes again tomorrow, I had to reset everything back to normal before the family came back home.

May be a silly question, but do you have the AP device set to be something else than 192.168.1.1?

I have found out the hard way that much mayhem can occur, even including working for a short time, when you have two devices on the same address, from my own AP setup experiments. It's also easy to forget when you do a non settings save update after a long time, that it will come up that way. :flushed:

The AP was supposed to get its IP over DHCP, but I never checked to see what address was assigned to it. I just tried again using the recommendations from @psherman, removing eth0 from br-lan and setting the wan interface's firewall zone to wan instead of lan. I also configured the AP to get a static address of 192.168.1.2/24 for good measure and everything is working flawlessly now.

Thanks @psherman !

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.