Create a WIFI to Ethernet Bridge with OpenWrt

I am using this firmware and want to create a bridge between the WIFI using it as a client which I was able to do and then bridge to the Ethernet which does not seem to work.
Every time I change the default IP from 192.168.1.1 to anything else the changes FAIL and REVERT back this looks like a major bug in the firmware.
I Can make some minor changes but I can not disable the DHCP Server and put the default IP into the same network OR add a gateway ip or DNS ip to the network virtually making this firmware useless

This looks more like a failed build than a user configuration issue.
Any help to resolve this would be great.
The device is shown at this link https://www.wavlink.com/en_us/product/WL-WN570HA1.html
Thank you for the help.

Model

Wavlink WL-WN570HA1

Architecture

MediaTek MT7688 ver:1 eco:2

Firmware Version

OpenWrt 19.07.3 r11063-85e04e9f46 / LuCI openwrt-19.07 branch git-20.136.49537-fb2f363

Kernel Version

4.14.180

When you attempt to change the LAN IP address using LuCI, a popup window should appear after 30 seconds, giving you the option to click on 'Apply Unchecked' to proceed. This feature was introduced from OpenWrt 18.

Unfortunately in practise, this popup some times does not appear. There is no way of disabling this annoying feature.

You can change the IP address by SSH into the router and executing UCI commands, or alternatively, by editing the /etc/config/network file and rebooting. (If you are a Windows user, you can use WinSCP to edit the file)

1 Like

I am not strong in CLI commands using SSH.
I was able to mess it up beyond working and then restore it to the previously sorta connected state, I am not able to get a bridge between the ETH and the WIFI so many different interfaces installed by default.
What I need is a script to set this i think.

How would I edit it in putty as NANO does not seem to be installed?

If you are using PuTTY, does this mean you have Windows ?

You can use VI, or WinSCP in Windows to edit the file, or UCI command. See this recent thread:

https://forum.openwrt.org/t/luci-cant-change-ip-or-set-time/74936

Section 10 within the installation guide for HH5A describes the basics of VI editor, and using WinSCP btw.

1 Like
config interface 'lan'
	option type 'bridge'
	option ifname 'eth0.1'
	option proto 'static'
	option ipaddr '192.168.3.9'
	option netmask '255.255.255.0'
	option igmp_snooping '1'
	option delegate '0'

OK I figured out how to edit it in winscp
Yes I have windows
So i am missing gateway and dns settings it looks like.
I want to bridge the wireless to the ethernet not sure that the config is right for that

OK that fixed the default ip error issue. To bad the gui does not work to do that,
Now I need to figure out the bridge.

Your posts are not clear. What wifi are you trying to bridge to what ethernet?

config wifi-device 'radio0'
	option type 'mac80211'
	option hwmode '11g'
	option path 'platform/10300000.wmac'
	option htmode 'HT20'
	option txpower '20'
	option channel 'auto'

config wifi-device 'radio1'
	option type 'mac80211'
	option hwmode '11a'
	option path 'pci0000:00/0000:00:00.0/0000:01:00.0'
	option txpower '14'
	option channel 'auto'
	option htmode 'VHT20'

config wifi-iface 'wifinet0'
	option ssid 'Owen Technology Solutions'
	option device 'radio1'
	option mode 'sta'
	option key '88888888888'
	option encryption 'psk2'
	option ifname 'WIFI-AC'
	option network 'wwan lan'

config wifi-iface 'wifinet1'
	option ssid 'Owen Technology Solutions'
	option device 'radio0'
	option mode 'sta'
	option key '88888888888'
	option encryption 'psk2'
	option ifname 'WIFI-N'
	option network 'wwan lan WWAN'

Wireless config file

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 'fdb6:6204:ad1c::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0.1'
	option proto 'static'
	option ipaddr '192.168.3.9'
	option netmask '255.255.255.0'
	option igmp_snooping '1'
	option delegate '0'

config device 'lan_eth0_1_dev'
	option name 'eth0.1'
	option macaddr '80:3f:5d:c5:13:b4'

config device 'wan_eth0_2_dev'
	option name 'eth0.2'
	option macaddr '80:3f:5d:c5:13:b5'

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

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '4 6t'

config interface 'wwan'
	option proto 'dhcp'

config interface 'WWAN'
	option proto 'dhcp'

Network config file

The WIFI Radios is what I want to bridge giving them a static IP of .7 .8 on my network with a .3 for the ETH port.

Unless I am mistaken, that is simply not possible.

By openwrt default (eg. after factory reset), the radios are bridged to the LAN interface, and would be on same LAN IP ending .3 in your example.

LuCI > Network > Wireless > Edit selected radio
4openwrt

1 Like


My network resembles this. The main network is a 3.x network with its own service provider as the primary connection with an AP

The Openwrt (192.168.3.7/8) needs to Client WIFI to the ETH on 192.168.3.9 which will connect to a dual wan router that also gets an input from a cellular modem when the main network is offline via another provider IP. The mobile router has its own internal IP of 99.x for the devices hosted on that segment.
I am not wanting any firewall setup on the openwrt and think that is shut off. I do not need a dhcp server as the connections will all be static via the link.

Yes the openwrt connects via the ETH to the dual wan

Mine showed both wifi and lan when I removed it to show just lan the connection to the main wifi ap disconnected I rescanned and now the network shows wwan only and is connected.......??

What is the LAN IP of the dual-wan router? (eg. 192.168.99.x ?)

A regular STA can only be connected to one network, and that network can't be a bridge. This is a fundamental limitation of 802.11 because the MAC address of the final destination is not transmitted on a regular AP-STA link. It is assumed to be the MAC of the STA itself, which works when only one level 2 device is on the STA side of the link.

Options are:

  • WDS. This requires that the AP you're connecting to be in WDS mode.
  • Routed client. Access to the other network is limited then.
  • Relay psuedo-bridge.

The last 2 are described in the OpenWrt wiki.

2 Likes

Here is the WDS description.

1 Like

192.168.99.1 is the dual wan routers IP and pool of ips.
There are a few devices that also are using that pool in the .99.x range.
The WIFI needs to be on the same network as the primary bridge the cellular modem is on 192.168.1.1 internally but should be in pass thru mode to the external public IP.

Must be a limitation of OPENWRT
I have done this with a Linskys WRT using DDWRT.
It was something to do with the vlan settings.

TBH, openwrt is not a solution for everything.

Personally, I still use Tomato running on several inexpensive very old Broadcom routers for a number of different 'non-router' wireless bridging tasks, as it does it so much better and easier, than DDwrt and OpenWrt.

Perhaps I suggest you return to using DDwrt if it works for you? I presume you were using a Broadcom device where I believe wireless bridging is more 'flexible' than when using openwrt.

1 Like

I understand the W-LAN (Client) is a Wavlink WL-WN570HA1.

But which model is the W-LAN (AP)?

1 Like