Cannot configure WLAN Client connection as WWAN

Hi all,

I have faced with the issue that I have WLAN Client Connection, but I cannot share it through LAN Ethernet Physical Interface on Lima Board (8Devices) ...

But what is interesting that ping 8.8.8.8 (Google server) works, ping facebook.com works, but I cannot share connection to Windows 10 machine ... (

Here is my network configuration:

root@Lima:~# cat /etc/config/network 

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

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0 eth1 radio0'
	option proto 'static'
	option ipaddr '192.168.1.2'
	option netmask '255.255.255.0'

config interface 'wan'
	option ifname 'eth0'
	option proto 'dhcp'

config interface 'wan6'
	option ifname 'eth0'
	option proto 'dhcpv6'

config interface 'wwan'
	option proto 'dhcp'

Here is my wireless configuration:

root@Lima:~# cat /etc/config/wireless 

config wifi-device 'radio0'
	option type 'mac80211'
	option hwmode '11g'
	option path 'platform/qca953x_wmac'
	option htmode 'HT20'
	option txpower '22'
	option country 'US'
	option channel '11'
	option disabled '0'

config wifi-iface
	option ssid <ssid>
	option encryption <encryption>
	option device 'radio0'
	option mode 'sta'
	option bssid <bssid>
	option key <key>
	option network 'lan wwan'

I tries to share connection to Windows 10 machine, but Windows 10 shows that this interface does not support Internet connection ...

Guys, have somebody faced with such issue ?

I've read official documentation (https://openwrt.org/docs/guide-user/network/wifi/ap_sta), but seems like I did not quite understand how properly configure interfaces in Linux, OpenWRT ... ((
Maybe you can also suggest some useful documentation ?

your sta interface is wwan only, remove the lan network from the iface section and reload your wireless config.

I did it, network is shown up, but when I try to ping from Windows 10 Lima Router it is pinged, but Google Server 8.8.8.8 is not ... Internet connection still missed ...
Seems like Lima router does not forward traffic though radio0 device ...

I don't think so ... your network config looks odd, too. You've bridged your lan/wan/radio0 all together ... that can't work, e.g. remove the 'bridge' from your 'lan' interface and remove 'eth0' and 'radio0'!? as well ... after that reload your network config (/etc/init,d/network reload) and doublecheck your firewall settings as well.

Okay,

Here is my new configuration:

config interface 'lan'
        option ifname 'eth0'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'

Also here is my new configuration for wireless:

config wifi-iface
        option ssid <ssid>
        option encryption <encryption>
        option device 'radio0'
        option mode 'sta'
        option bssid <bssid>
        option key <key>
        option network 'wwan'

And Firewall is disabled though LuCI Web Application ...

Seems like I configured properly as you suggested, but it still does not work ... (

A regular STA can only be connected to one network and that network can't be a bridge.

I suggest start over from a default configuration.

Do not create a wwan network or use the Join button. The existing wan network is already a DHCP client and has an apropriate firewall configuration, so use it.

Remove eth0 from wan. (you can place it into lan if you want an extra Ethernet port)

Manually create wireless STA interface and attach to wan.

Once you have connected to the wireless wan and obtained DHCP address, check that IP does not conflict. Change lan IP if necessary.

Could you please show what you mean though config example ? It is more understandable for me ...

Also I did not quite get why I cannot share connection though WiFI (WWAN) to LAN Ethernet connections ?

As it is being explained above, you have made a "mess" of your configuration. You need to reset your router to default config. Then you need to only change the WiFi config to connect your router to the main-internet-router (whatever that may be). Plus you will need to change your LAN IP of this repeater to something other than the main router. And after that everything should work just like normal.

This is one of two ways to set up a repeater router and is fairly a lot simple.

Edit: If for example your main router's gateway is 192.168.10.1 your repeater can be 192.168.11.1 or something like that.

You do not understand ...
I do not want that this issue magicaly disapeares, but instead I want to understand how to configure WWAN properly from ground up !!

I've already figured out how to share Internet using WLAN AP and connecting to some WAN network, and also figured out how to configure it properly ...

I've stuck only with sharing Internet between WLAN Client connection on my device and LAN Ethernet Interfaces ... On my board network is accessed, but it is not accessed from Ethernet cable on Windows 10 machine ... seems missed some small detail ... ((

A regular AP-STA link assumes there is only one device (one MAC address) on the STA side. And the AP network that you don't control only gives you one IP address. It's a very similar situation to what you get from the ISP with consumer-grade cable or DSL service.

If you need multiple users to share the connection you have to route and NAT them with your router.

Actually you just do not want to understand what we all tried to say above earlier. In a normal configuration when you configure any STA link (router - router) it provides internet access to both router and LAN clients. But since you have the configuration quite wrong it's being suggested that you redo everything from scratch and that is how you will make it work.

In a normal configuration internet just flows down to LAN freely and there is no problem between it unless you mess with the forwarding and it stops working. Your situation can be fixed in 3 ways depending on what your hardware is. One simplest of those ways is explained above already.

Okay, how to reset network configuration without resetting all board ?

Well I dont think if that is possible because AFAIK network configuration (at least a part of it) gets generated on the fly when router boots up the first time or after a reset. So if you want to retain your configuration then save a backup of it through sysupgrade -b /tmp/backup.tar.gz command and copy it somewhere else. Then use firstboot to reset it and after that once the router reboots you can manually update the configuration one by one to your liking but please don't restore the whole config.

Use these commands:

rm /etc/config/network
rm /etc/config/wireless
reboot

Upon next boot, the configurations will be recreated with defaults.

3 Likes

Thanks,

I did it and configuration was reset to default ...
But I still cannot share WWAN connection of STA WiFi to my LAN ... (

Here is my configs:

root@Lima:/# cat /etc/config/network 

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 'auto'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0 eth1'
	option proto 'static'
	option ipaddr '192.168.2.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

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

config interface 'wan6'
	option ifname 'eth1'
	option proto 'dhcpv6'

config interface 'wwan'
	option proto 'dhcp'

Only thing I changed in /etc/config/network is ipaddr from 192.168.1.1 to 192.168.2.1 and of course I added this IP address to Windows 10 Machine as the Gateway IP Address

Here is WiFi config:

root@Lima:/# cat /etc/config/wireless 

config wifi-device 'radio0'
	option type 'mac80211'
	option channel '11'
	option hwmode '11g'
	option path 'platform/qca953x_wmac'
	option htmode 'HT20'
	option disabled '0'
	option txpower '22'
	option country 'US'

config wifi-iface
	option network 'wwan'
	option ssid '**********'
	option encryption 'psk2'
	option device 'radio0'
	option mode 'sta'
	option bssid ''**********''
	option key ''**********''

And also Firewall config:

root@Lima:/# cat /etc/config/firewall 

config defaults
	option syn_flood '1'
	option input 'ACCEPT'
	option forward 'ACCEPT'
	option output 'ACCEPT'

config zone
	option name 'lan'
	option input 'ACCEPT'
	option forward 'ACCEPT'
	option network 'lan'
	option output 'ACCEPT'

config include
	option path '/etc/firewall.user'

config zone
	option input 'ACCEPT'
	option forward 'ACCEPT'
	option name 'wwan'
	option output 'ACCEPT'
	option network 'wwan'

config forwarding
	option dest 'lan'
	option src 'wwan'

config forwarding
	option dest 'wwan'option src 'lan'

Seems like I need somehow to configure routing from LAN for WWAN (WiFI STA Client) connection ?

Follow my instructions above. They do not call for creating a new 'wwan' network or altering anything in the firewall. Since you have altered the firewall, you need to set that back to default(*), and I strongly encourage resetting the whole router.

You only need the 'wan' network that exists by default. This is going to work just like a basic home router use case, except your link to the Internet is wireless instead of wired.

(*) which you could do independently by removing the overlay /etc/config/firewall file, but really what is in this router that you need to save?

Yes, it is exactly what I did ...

root@Lima:/# cat /etc/config/network 

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 'auto'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0 eth1'
	option proto 'static'
	option ipaddr '192.168.2.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config interface 'wan'
	option proto 'dhcp'

config interface 'wan6'
	option proto 'dhcpv6'

config interface 'wwan'
	option proto 'dhcp'
root@Lima:/# cat /etc/config/wireless 

config wifi-device 'radio0'
	option type 'mac80211'
	option channel '11'
	option hwmode '11g'
	option path 'platform/qca953x_wmac'
	option htmode 'HT20'
	option disabled '0'
	option txpower '22'
	option country 'US'

config wifi-iface
	option network 'wan'
	option ssid ''********''
	option encryption 'psk2'
	option device 'radio0'
	option mode 'sta'
	option bssid '********'
	option key ''********''
root@Lima:/# cat /etc/config/firewall 

config defaults
	option syn_flood '1'
	option input 'ACCEPT'
	option forward 'ACCEPT'
	option output 'ACCEPT'

config zone
	option name 'lan'
	option input 'ACCEPT'
	option forward 'ACCEPT'
	option network 'lan'
	option output 'ACCEPT'

config include
	option path '/etc/firewall.user'

config zone
	option input 'ACCEPT'
	option forward 'ACCEPT'
	option name 'wan'
	option output 'ACCEPT'
	option network 'wan'

config forwarding
	option dest 'lan'
	option src 'wan'

config forwarding
	option dest 'wan'
	option src 'lan'

I also change ip address of local network to 192.168.2.1 to prevent conflicts with WLAN Client Subnet ...
Bu it is still does not work ... more intresting that Windows 10 shows that You're connected to Internet but ping 8.8.8.8 does not work as well as Chrome Browsing ...
It seems like routing issue ?! Guys where can I configure it ?
My firewall settings is above ...

No.

Why is there an interface called wwan?

Your firewall does not have masq and mtu_fix set on the wan zone, which is necessary for NAT to the Internet to work. This is not the default firewall config.

rm /overlay/upper/etc/config/firewall will restore firewall to the default file in the ROM.

2 Likes