Topic: How to connect two wireless networks to share internet?

Hello,

I have 2 devices:

Device A: Huawei E8231 emits wifi signal

Device B: Ravpower WD-02 device emits wifi signal

Device A has access to internet and is running stock firmware.

Device B doesn't have access to internet and is running Openwrt Attitude Adjustment. I followed instructions from https://wiki.openwrt.org/toh/ravpower/rp-wd02

I want device B to connect to A, wirelessly. So that when I connect to device B's wifi through computer or phone, I can access internet seamlessly.

(Just the way chromecast device's wifi network can easily join any other wifi network for internet given that network's SSID and password)

I have already looked up the option of WDS, which I think my device A doesn't support even if my device B supports it (as client). There isn't much I can do on the 3G dongle in terms of routing.

Any other way I can go about this?

Thanks.

Re: How to connect two wireless networks to share internet?

One solution, not the best but at least it hopefully works, is to configure a WiFi interface on device B as a WiFi client and use it as the WAN interface and enable NAT as usual. This results in double NAT, assuming the 3G dongle also does NAT.

(It requires that the Ravpower WD-02 can act as a WiFi access point and client at the same time.)

3 (edited by mk24 2017-03-20 14:05:33)

Re: How to connect two wireless networks to share internet?

Yes routed client is usually the best way to deal with a MiFi type device.  You may also be able to USB tether it.  Newer devices use CDC or RNDIS instead of the old ppp over a ttyUSB type connection, but this one may not be that new.  OpenWrt has drivers for both types.

Re: How to connect two wireless networks to share internet?

mikma wrote:

One solution, not the best but at least it hopefully works, is to configure a WiFi interface on device B as a WiFi client and use it as the WAN interface and enable NAT as usual. This results in double NAT, assuming the 3G dongle also does NAT.

(It requires that the Ravpower WD-02 can act as a WiFi access point and client at the same time.)

Thank you! how do I go about this, is there any tutorial you can link me to?

5 (edited by mk24 2017-03-21 03:41:53)

Re: How to connect two wireless networks to share internet?

The simplest way is like mikma said, create a wifi client interface set for the MiFi's SSID and encryption, and attach it to the 'wan' network.

Go to Network -- Wireless and click the button to add a new interface.
Set ESSID to the name of the 3G unit's signal
Pull down Mode and choose Client.
You can leave BSSID blank.
Check 'wan'.
Click the Security tab and select encryption type and password.

Save all this and then go to the main status you should now have an IPV4 wan connection.  If this does not work, go to Network -- Interfaces and select wan.  Click Physical settings and make sure Bridge is not checked, the only interface should be the wifi client.

6 (edited by sindhus 2017-03-21 06:07:15)

Re: How to connect two wireless networks to share internet?

I am still not able to access internet through the Device B's wifi signal. I understand that you referred to my Device B as "MiFi".

So,

device A == 3G unit (which has internet and a wifi signal)
device B == Mifi (ravpower which has only wifi, runs openwrt)

I made the changes as instructed on MiFi (ravpower running openwrt). Here are relevant screenshots:

Step 1: create a wifi client interface set for the MiFi SSID and encryption, and attach it to the 'wan' network.

http://i.imgur.com/pZUJly9.png

Step 2. Go to Network -- Wireless and click the button to add a new interface. Set ESSID to the name of the 3G unit's signal. Pull down Mode and choose Client. You can leave BSSID blank. Check 'wan'. Click the Security tab and select encryption type and password. Save all this and then go to the main status you should now have an IPV4 wan connection. 
http://i.imgur.com/VXtEi8Y.png

Step 3. If this does not work, go to Network -- Interfaces and select wan.  Click Physical settings and make sure Bridge is not checked, the only interface should be the wifi client.

http://i.imgur.com/0BmXBcu.png
http://i.imgur.com/AC90gK4.png

What am I doing wrong?

Re: How to connect two wireless networks to share internet?

When I try to connect to my device B's signal after all the above settings I get:

http://i.imgur.com/SgCZjSh.png

Am guessing I missed some step where I check or uncheck DHCP capabilities in device B. but I don't know for sure, if so please tell me where do I make what changes.

Re: How to connect two wireless networks to share internet?

I googled and saw this page; https://wiki.openwrt.org/doc/recipes/routedclient
which is the same as mk24's reference "routed client".  there are three methods there, I don't know networking so well and get confused with the terminology.

1. is that page relevant to me? are any of those methods what i want?
2. if so, which method in that page should I use?
3. if you are recommending a method on that page, can you please clear terminology for me.

What is device B (runs openwrt on ravpower-wd02 device)? Is device B's wifi a "Access point"?

What is device A (3g unit with internet and wifi signal)? is device A's wifi a "Client"?

Another info: My 3g unit (device A)'s router page is on 192.168.8.1. I know that it gives out ip addresses to connecting devices (192.168.8.*) which probably means DHCP is enabled on it right?

What does my device A become? device A has internet and emits a wifi signal. there isn't much I can change on it.

9 (edited by mk24 2017-03-21 12:57:55)

Re: How to connect two wireless networks to share internet?

You're doing it backwards.   Your Ravpower (Device B) will be a client of the Huawei (Device A). 

3G network --> (3G interface) [Huawei] (AP interface) --> (client interface: wan) [Ravpower] (AP interface or Etherner : lan) --> your PC's (clients)

Re: How to connect two wireless networks to share internet?

Previously you instructed: "Step 2. Go to Network -- Wireless and click the button to add a new interface. Set ESSID to the name of the 3G unit's signal. Pull down Mode and choose Client. You can leave BSSID blank. Check 'wan'. Click the Security tab and select encryption type and password. Save all this and then go to the main status you should now have an IPV4 wan connection. 
"

mk24 wrote:

You're doing it backwards.   Your Ravpower (Device B) will be a client of the Huawei (Device A). 

3G network --> (3G interface) [Huawei] (AP interface) --> (client interface: wan) [Ravpower] (AP interface or Etherner : lan) --> your PC's (clients)

This is not very clear to me, can you please reiterate? sad

Re: How to connect two wireless networks to share internet?

Still confused........!

Re: How to connect two wireless networks to share internet?

@mk24 ?

Re: How to connect two wireless networks to share internet?

Reset your OpenWrt WD-02 to default configuration.  Log in using the lan cable.  Go to the wireless page and set up a client mode interface with the credentials needed to connect to the Huawei's wifi.  Attach this interface to the 'wan' network.

By default, wan will use DHCP to get an address (which in this case will be a 192.168.8.X from the Huawei).  If you look on the main page you should see an ipv4 wan connection has been made.  You should now be able to reach the Internet through the WD-02.

Re: How to connect two wireless networks to share internet?

On the step 1 image tick lan not wan.
Verify if 192.168.1.1 is used on one router

Re: How to connect two wireless networks to share internet?

thank you so much @mk24 and mh3g for pointing that out. I have the setup I want now, yay!! smile smile

Re: How to connect two wireless networks to share internet?

Thank you it also very helpful for me.

17 (edited by thr07 2017-10-04 14:20:58)

Re: How to connect two wireless networks to share internet?

Hi there, i followed the instructions above and i was able to get on the status page

IPv4 WAN Status   

wlan0     Type: dhcp
Address: 192.168.1.27
Netmask: 255.255.255.0
Gateway: 192.168.1.1
DNS 1: 192.168.1.1
DNS 2: 192.168.1.1
Connected: 0h 17m 25s4 address as follows:

but i still can't access the Internet from my RavPower?

What am i doing wrong? Have set up my wireless network as client under interface wan and openwrt embedded network in the device as Access Point.

FIXED: Amateur hour....i had the same Openwrt wifi default Master IP as my router that had connection to Internet that was i was trying to connect to....192.168.1.1, so i changed this default in openwrt installation to 192.168.2.1 for the Master Wifi on the device and it all worked as it should...Elementary Mr. Watson...no comments!

18 (edited by mk24 2017-10-04 11:36:07)

Re: How to connect two wireless networks to share internet?

The wan and lan have to be different subnets.  Change the LAN IP to something outside the 192.168.1.x range for example 192.168.2.1.

19 (edited by thr07 2017-10-04 14:22:21)

Re: How to connect two wireless networks to share internet?

mk24 wrote:

The wan and lan have to be different subnets.  Change the LAN IP to something outside the 192.168.1.x range for example 192.168.2.1.

Exactly apols amateur hour from my side...fixed now and edited my original. post...doing this at 2am doesn't quite help...!!

Re: How to connect two wireless networks to share internet?

Got a different question now...have formatted using Ubuntu in Ext4 a 32GB micro SD card but i'm not able to mount it on my Ravpower? No matter what i have tried i can't see it....any ideas? My ultimate setup is the following: to put media files in 2 directories, one for TV Shows and one for Movies and to access them on the Rav microsd card via Kodi from my ipad using NFS...will i be able this way to view say video files >4GB, or does Ext4 has limitations? Which commands do i use to create those (once i mount successfully that is...) in my sd card via SSH? I'm using Terminal on my mac to access via SSh my Ravpower with openwrt)? ps: Originally the card was formatted in exFat but i read somewhere that it's not supported by Openwrt, correct? Can i format even 64GB card via Ext4?