I have tried a bunch of different settings in luci... Messing with firewall zones, traffic rules (but these are lan addresses so I thought they didn't hit the firewall zones), custom DNS server (192.168.1.1) on lan zone, custom DNS server (192.168.1.1) on eth1 zone, accept packets with local source address in the bridge device as well as eth1 device. local domain on dhcp general settings is lan.
I think this is an easy fix but I don't know enough about openwrt to figure it out.
The firewall and routing engine will not be involved assuming you have a single subnet/lan.
Let's start with the following:
How are you trying to access the host at 192.168.1.10? Is it from another host in the 192.168.1.0/24 network?
Is either (or both) hosts wireless? Or are they wired? Or one each?
What is the address of the host that is trying to access 192.168.1.10?
Have you verified that the host you believe to be at 192.168.1.10 is actually using that address?
And is that host listening for incoming http (port 80) requests? (Pro-tip: if it is a windows machine, you may need to turn off the firewall)
Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
Name resolution works (using default dhcp/ dns settings) if you either:
set up a static DHCP lease (with option dns '1')
if there is no static lease, if the client requested a DHCP lease and provided its hostname to the DHCPd during the DHCP request (this is optional, not all clients do)
this also means if you just replaced routers without making the clients request a DHCP lease (e.g. by rebooting them), the router won't know about it until they do (may take hours to half a day+).
The static DHCP lease is preferred.
For anything beyond these, you will have to provide more information (as indicated by psherman).
made the changes, rebooted and everything is still the same. can access outside wan. can ping 192.168.1.10, tracert rpi shows rpi.lan [192.168.1.10] but I still can't access http://192.168.1.10. I can't ssh to 192.168.1.10 either. systemctl status NetworkManager shows active on rpi (using monitor/keyboard) and ifconfig shows eth0 ip 192.168.1.10 with packets moving through it.
You mentioned that both hosts are wired... how are these things all connected to each other... do you have a switch? Can you draw a quick network diagram (a photo of a sketch on paper is sufficient here).
you're right, 192.168.1.10.
accessing 192.168.1.10 from pc connected to the same router through eth1 (connected to switch). pc ip is 192.168.1.40.
both hosts wired.
have verified rpi is using 192.168.1.10. Yes, verified listening on port 80 by plugging into my other router without rebooting and can access http://192.168.1.10.
lol, draw a diagram. i guess I can try. this is probably faster though:
cable modem -> eth0 rpi -> openwrt -> eth1 -> usb eth adapter -> cat5 -> 5 port unmanaged switch -> rpi (192.168.1.10) & pc (192.168.1.40)
I can draw a diagram if that would help though. let me know.
The OpenWrt Pi is absolutely not involved in any of the connections here. That is guaranteed because the PC (192.168.1.40) and the other Pi (192.168.1.10) connected to the same switch and are on the same subnet. This means connections between hosts happens at L2 (switching) and will never reach the router. The router doesn't even know that these connections are happening.
If you plug in your other router, are you changing this part or does it remain the same:
my other router has 4 eth ports so I don't need the switch. plug directly to router.
so pi and pc aren't getting their ip from dhcp? the switch is handing them off?
is there a way for devices connected to the switch to pull from dhcp?
wifi is setup on rpi... I can connect to that and see if I can access rpi.
ya, pc on wlan0, tracert rpi shows the same thing -> rpi.lan [192.168.1.10].
The problem, then, can be narrowed down to the switch. I have 99.99% confidence that this is the problem.
They are getting their IP address from the OpenWrt Pi, yes... but that is all it really needs to do... you could have a DHCP server that is stand-alone (i.e. not part of a router)... it just simply assigns addresses. Once obtained, the devices are able to communicate with each other at layer 2 (you could even simply set static IP addresses if you wanted).
The simple test to prove this is as follows:
Take this:
And replace the OpenWrt router with your other one...
cable modem -> wan port on old router -> [router] -> lan port on old router -> cat5 -> 5 port unmanaged switch -> rpi (192.168.1.10) & pc (192.168.1.40)
When you do this, you will see that the problem remains since the 5 port unmanaged switch is the issue.
i'm guessing the solution is a managed switch, huh? to pass off the routes?
of course. i asked what kind of switch I should get for this config in the raspberrypi forum and was quickly told unmanaged is fine. fantastic.
i've set rpi to have 192.168.1.10 as static based on mac and gave it rpi hostname, which should resolve to rpi.lan.
I would never discourage the use of a managed switch, but no, you don't actually need one.
Your existing switch isn't working properly... or maybe it is actually a low end managed switch with a form of port isolation enabled...
What model is your switch?
And, for the record, it's not "passing off the routes" -- host-to-host connections on the same network are switched, which involves forwarding of packets at layer 2. It's not routed. Traffic that is going to other networks (i.e. the internet) is routed, though.
A switch will internally directly forward packets between the two machines that need to talk to each other, or between a host and the router so that you can reach the internet.
D-Link switches are usually fine, but try another brand... Netgear, TP-Link, ZyXel, etc. Unmanaged is fine unless you might want to use VLANs in the future.
Edit: if that dlink switch is relatively new, or under warranty, get a replacement unit.
I'm just returning it. I bought it last week. Netgear 305E is about same price as 305. I guess I don't need to use managed right? Alrighty 305E on the way... amz is going to get pissed at me pretty soon with all of the returns i've had lately. finding a usb wifi 5+ adapter/extender that works with openwrt/rpi4 has been a challenge. onboard wifi works ok but I've heard maxes out at 150 Gbs, which seems to be the case.
All of this nonsense because I can't find a decently priced (under $200) high speed router that uses openwrt. but its too late now, I'm committed to making my rpi a high speed router.
I really appreciate your help. you've saved me a lot of time this weekend.
Edit: in the meantime solution, I guess I can have the pi node connect via wifi and it should route fine.
I actually recommend against the low end netgear and tp link managed switches. They are really bad. I have experienced the tp- link tl-sg1xxe series and can tell you first hand that they should be avoided. I have not used the netgear equivalent, but I’ve heard the same about those.
As for WiFi - don’t use a usb stick. You will get so much better performance by using a proper ap. There are many to choose from, and you don’t have to limit yourself to openwrt for the APs - I have unifi APs and they are great. Tp-link’s omada series is apparently also really good. And several other options are out there that are worth considering. Even an order ap will outperform the usb sticks.
is the netgear GS305E low end? i think it's normally $35. should I look for higher model numbers? 405, 505, etc?
I don't know much about APs. I was hoping to stay simple but with each new challenge I'm forced to get some other piece of hardware. I'll check out the unifi APs.