Bridge ISP modem Ethernet Connection over OpenWrt router WiFi

Hi Folks
im a starter to OpenWrt and i need some ideas to accomplish this
My network topology is Main ISP modem running on DHCP 192.168.2.1 and my TPLink OpenWrt router running on DHCP192.168.1.1

what I'm trying to accomplish is, I need to create a second wifi network that bridges the connection with IP range 192.168.2.1 from Main ISP to my devices connected to this WiFi from my OpenWrt router

the reason behind this is that I need to be able to detect devices connected to my main ISP Modem when I'm connected to the OpenWrt router wifi

hence, the ISP modem and the OpenWrt router are far from each other so I can't use WDS, I only can connect them using Ethernet

thanks for your help in advance

Isolate one of the OpenWrt router's LAN ports from the others.

  • swconfig - create a new vlan and assign the port to it
  • DSA - remove the port from the default br-lan bridge

Create a new bridge device and select that port in the Bridge Ports tab.
Create a new interface using the newly created bridge device and set the protocol to Unmanaged.
Create the second wireless network and attach the newly created interface to it.
Connect the isolated LAN port of the OpenWrt router to some of the LAN ports of the ISP modem.

Тhe clients of the second wifi should be served directly by the ISP device.

2 Likes

Thanks @pavelgl , i appreciate your response, so i will need 2 Ethernet cables to be coming from the ISP main modem the OpenWrt router?

Yes, but by asking me about the second cable, I realized that there is a better solution.

Create a new bridge device br-wan selecting the wan interface in the Bridge Ports tab.
Change the the wan interface device to br-wan.
Attach the second wifi network to the wan interface and you should get the same result with just one cable.

@pavelgl so I will do this step extra to the above steps, or only this step?excuse my ignorance I'm new to open wrt

Just the steps from my second post. It should be easier.

@pavelgl thanks

ok so here is what i did from your second post
created a bridge device br-wan as shown below

and created an unmanaged interface WAN2 using the newly created bridge device

and created a second WiFi and attached the new created interface WAN2

but when I try to connect to the second WiFi Delta VLAN it fails to obtain an IP address

any ideas?

You don't need a second wan interface. Delete it.
Just change the device of the existing wan interface from eth0.2 to br-wan.
Do not modify the protocol (Static or DHCP) and attach the wan interface to the second wifi network.

If it still doesn't work, please SSH into the router and post the output of uci show network redacting the MAC addresses.

@pavelgl

when i changed the existing WAN interface to br-wan I lost the internet connection

here is the output of uci show network while the device is selected to br-wan

 OpenWrt 22.03.0-rc6, r19590-042d558536
 -----------------------------------------------------
root@OpenWrt:~# uci show network
network.loopback=interface
network.loopback.device='lo'
network.loopback.proto='static'
network.loopback.ipaddr='127.0.0.1'
network.loopback.netmask='255.0.0.0'
network.globals=globals
network.globals.ula_prefix='fddb:709b:0822::/48'
network.@device[0]=device
network.@device[0].name='br-lan'
network.@device[0].type='bridge'
network.@device[0].ports='eth0.1'
network.lan=interface
network.lan.device='br-lan'
network.lan.proto='static'
network.lan.ip6assign='60'
network.lan.ipaddr='192.168.1.1/24'
network.@device[1]=device
network.@device[1].name='eth0.2'
network.@device[1].macaddr='e4:c3:2a:47:64:35'
network.wan=interface
network.wan.proto='dhcp'
network.wan.type='bridge'
network.wan.device='br-wan'
network.wan6=interface
network.wan6.device='eth0.2'
network.wan6.proto='dhcpv6'
network.wan6.type='bridge'
network.@switch[0]=switch
network.@switch[0].name='switch0'
network.@switch[0].reset='1'
network.@switch[0].enable_vlan='1'
network.@switch_vlan[0]=switch_vlan
network.@switch_vlan[0].device='switch0'
network.@switch_vlan[0].vlan='1'
network.@switch_vlan[0].vid='1'
network.@switch_vlan[0].ports='0t 2 3 4 5'
network.@switch_vlan[1]=switch_vlan
network.@switch_vlan[1].device='switch0'
network.@switch_vlan[1].vlan='2'
network.@switch_vlan[1].ports='0t 1'
network.@switch_vlan[1].vid='2'
network.@device[2]=device
network.@device[2].type='bridge'
network.@device[2].name='br-wan'
network.@device[2].ports='eth0.2'
root@OpenWrt:~#

Run the following commands:

uci delete network.wan.type
uci delete network.wan6.type
uci set network.wan6.device='br-wan'
uci commit network
/etc/init.d/network restart
2 Likes

@pavelgl thanks a lot man it's working now as expected, you are the best, thanks again for your time

1 Like

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