[Solved] How to configure a second router as unmanaged switch

Hi,

I have a TP-Link TL-WR841N, which I connected via the WAN port to my main router, and configured the wan port as DHCP-Client. I then bridged Wi-Fi with the wan port.

All devices that are connected via the TP-Links Wi-Fi are getting their IP from the main router.

So far so good. I have 4 additional LAN-ports in the router that I'd like to use. But I want to use them as a dumb (unmanaged) switch. So connecting a cable would just forward the packages to the WAN interface. DHCP would also be handled by my main router. But I don't know how to achieve this.

LAN is 'eth0 and WAN is 'eth1'. So I thought; just set LAN to unmanaged and bridge it to eth1. But that does not work. Clients connected via cable don't receive an IP-address. Can anybody help me out here?

Here is my current network config:

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fd7b:fe98:8ae7::/48'

config interface 'lan'
	option proto 'none'
	option type 'bridge'
	option ifname 'eth0 eth1'

config interface 'wan'
	option ifname 'eth1'
	option proto 'dhcp'
	option type 'bridge'

config interface 'wan6'
	option ifname 'eth1'
	option proto 'dhcpv6'
	option reqaddress 'try'
	option reqprefix 'auto'

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 0t'

Your WAN network is already a bridge, you do not need to configure a LAN network, just add both ethx interfaces there.

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fd7b:fe98:8ae7::/48'

config interface 'lan'
	option proto 'none'
	option type 'bridge'
	option ifname 'eth0 eth1'

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

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

Don't forget to disable the dnsmasq and odhcpd services.

Edit: the above config will actually remove all access from the router, you might want to change it to proto static with a fallback IP or to proto dhcp to have it obtain an IP from somewhere else.

2 Likes

Thanks allot. I had to set the option proto 'dhcp'though.

If you didn't need ALL of the LAN ports, you could have just left dafault config as they are, and plugged main router's cable to one of the LAN ports of TL-WR841N

That was what I did until now. But I needed that last port. :smiley: @jow pointed me into the correct direction.

1 Like

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