Hi all. Pardon my network vernacular if I use it incorrectly. Here's what I'm looking to do and would appreciate a recipe or some guidance.
I have an OpenWRT router that I want to use behind my ISP Gateway + router. ISP unit has LAN with DHCP and I am unable to change any of that. The OpenWRT router is has it's WAN port connected to a LAN port on the ISP router. I'd like to setup the OpenWRT router to use 2 of it's Ethernet ports for it's own LAN (yes, double NAT) and have the remaining two ports act as a switch(?) where any devices connected to them are on the ISP router's LAN and get their addresses from it's DHCP server. Internet access is rquired on all devices connected to the OpenWRt router. I'm somewhat familiar with VLANs and can isolate the 2 LAN configurations but I'm not sure how to have the first 2 ports as as a switch? TIA
We need to know which ports you want to act as a switch on the upstream (i.e. the ISP router's lan connects to the OpenWrt wan; what other port(s) do you want to assign to effectively 'pass through' as a switch on the ISP router's lan).
We also need to see the following from your config:
Please connect to your OpenWrt device using ssh and 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:
ubus call system board
cat /etc/config/network
ifstatus wan | grep address
I'll do that when I get home tonight but it's a mostly out-of-the-box Openwrt configuration and I'm flexible with which LAN ports are upstream and which ones have their own LAN. Would simply removing 2 LAN ports from br-lan and assigning them to the wan interface do the trick?
Your device uses swconfig. The solution is pretty simple...
These are the things that need to be modified:
VLAN 2 is the wan, and VLAN 1 is the lan. We'll remove one of the ports from VLAN 1 and put it into VLAN 2.
The ports listed are logical ports -- they don't necessarily map 1:1 to the physical position/label on the device itself. Logical port 4 is the wan port, logical port 5 is the CPU. We'll take logical port 3 (which will hopefully be physically adjacent to the wan port) and assign that to VLAN 2:
Then reboot and test the physical ports. One of them will connect you through to the upstream router, while the others will be your OpenWrt lan.
As an aside:
The version of OpenWrt you are using is EOL and unsupported now. It may have security vulnerabilities and will never be patched. Normally, the advice is to upgrade to the latest firmware, but your device is no longer supported in 23.05 and later. So, I would recommend you consider new hardware as soon as reasonably possible.
I have a similar question. I have another OpenWRT router which is wirelessly connected to the ISP router as a client, that I want to use as a wireless switch. I'd like to setup the OpenWRT router to use it's LAN port as upstream switch to the ISP router. Here is the current configuration -
If your uplink is coming from a wireless connection, routing (to a unique subnet) is trivially easy. However, if you wish to make it a wireless repeater or a wireless > wired bridge, you need to use relayd (WDS or mesh/802.11s are better, but require that you have an OpenWrt device upstream; your ISP router won't work with these methods).