OpenWrt Forum Archive

Topic: Secondary router configuration

The content of this topic has been archived on 6 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi, I was happy with my OpenWRT as a main router but I got another one and I'd now like to use my OpenWRT as a simple switch to add ethernet ports.
I want to plug my OpenWRT WAN port to a LAN port of my new router and let openWRT LAN ports receive DHCP from main router.
Is there any way to achieve this ?
Thanks in advance smile

You do not want to use the WAN port, connect the LAN from the main device to LAN port on the secondary device and use this recipe:  https://wiki.openwrt.org/doc/recipes/dumbap

It may be possible to convert the WAN to another LAN port, but get this done first and if you need this include the make and model of your router

fgsav wrote:

Hi, I was happy with my OpenWRT as a main router but I got another one and I'd now like to use my OpenWRT as a simple switch to add ethernet ports.
I want to plug my OpenWRT WAN port to a LAN port of my new router and let openWRT LAN ports receive DHCP from main router.
Is there any way to achieve this ?
Thanks in advance smile

Lucky for you I needed the same thing and figured it out.

From base configuration  (be sure to click save on every page.  Use save and apply last).

1)  Disable both the WAN interfaces by turning off the process starting on boot.  You can delete them if you want.
2)  Go to LAN interfaces and add bridging WAN to it.  You should find Wifi and LAN already being bridged.
3)  Change Static IP to DHCP client in the LAN interface.
4)  Save and apply
5)  After 2 minutes so you make sure you don't power cycle it while something important is going on.   Power cycle the router.
This is hopefully clear.  If not I can add pictures.

(Last edited by Ryu945 on 13 Oct 2017, 17:26)

Thanks guys! Managed to do it playing with network interfaces and switch vlans.

config interface 'lan'
    option type 'bridge'
    option ifname 'eth0.1 eth1'
    option proto 'dhcp'

config switch
    option name 'switch0'
    option reset '1'
    option enable_vlan '1'

config switch_vlan
    option device 'switch0'
    option vlan '1'
    option ports '1 2 3 4 5 0'

The discussion might have continued from here.