Setup OpenWrt as a Network Switch

Hello, I installed OpenWRT on my old router and want to use it in place of my dying Network Switch. I have tried searching online and have been unsuccessful in finding a guide to do this. I don't know how to setup this up and am new to OpenWRT. I would like some help to set it up as a Network switch because for what ever reason my new router does not like devices with a certain network controller and it appears that I have multiple devices with that exact network controller. My old router never had issues and that is why I want to use it as a switch.

https://openwrt.org/docs/guide-user/base-system/basic-networking

Switch configuration can also be done through LuCI (another can probably guide you better on that than I could).

In most cases, if you just ignore the WAN port and connect the upstream router to one of the LAN port you would effectively be using the device as a switch.

You will likely want to disable DHCP on the device if you have the upstream router handling DHCP, and will of course want to set the IP address of the device's LAN side in the main router's network (e.g. 192.168.1.2 if the main router is 192.168.1.1).

To set that up, before connecting the two devices together, set your PC IP to a static IP (e.g. 192.168.1.10), connect to OpenWrt device and open http://192.168.1.1/cgi-bin/luci/admin/network/network/lan set the LAN IP of the router to 192.168.1.2 and disable DHCP.

Then you can connect the two devices together and reset your PC IP to automatic.

That should be the minimum configuration you need to have the devices connected as a switch.

When you are hapoy with the setup, you can look into disabling services and/or interfaces you don't need.

@dudefoxlive, welcome to the community!

Follow the section to make a managed switch.

1 Like

@dudefoxlive
What @lleachii said above is for "changing" the WAN port to work as a LAN port (if you need to increase the number of LAN ports), but obviously in all cases you would still need to configure the IP of the LAN interface to be in the main router's subnet, as described earlier.

If you don't need a fifth LAN port then you can just leave the WAN port unused (and unchanged).

1 Like