OpenWrt Forum Archive

Topic: How to create a private network using a travel router? (dual band)

The content of this topic has been archived on 29 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello guys,

I was successfully able to install and upgrade OpenWRT on my TP-Link RE450 repeater. However, I am having trouble using it as a travel router. The application is when you have only 1 connection available to a hotel wifi network and want to rebroadcast it to create your own private network such that all your devices can connect via that same connection without losing bandwidth (exploiting dual radio).

My goal is to have a configuration as follows:
* Repeater connected as a client to main router's WiFi on the 2.4 GHz band.
* DHCP lease provided by main router to repeater.
* Repeater broadcasts a new private network with different SSID on the 5 GHz band (to prevent throughput loss).
* DHCP is enabled on the repeater and any client that connects to the private 5 GHz network is assigned its lease by the repeater.
* Ideally, a VPN configured onto my private network once all of the above is done as well.

In essence, as far as the main router is concerned it only sees 1 device (the repeater) connected to its 2.4 GHz network. But, the private 5 GHz network is allowing multiple devices to be connected through that connection. **The private network is completely invisible to the main router or its direct clients! A picture is worth a thousand words so here is the configuration:
preview.ibb.co/hiB0BR/Untitled_Diagram.jpg

I could only find a Wiki page that shows how to setup a repeater using relayed with bridge configuration (lede-project.org/docs/user-guide/relay_configuration). Unfortunately, this configuration cannot be used for this application because in this case:
* DHCP is enabled only on the main router and it is responsible for assigning leases to new clients.
* All devices on both: the repeater network and router network are connected via LAN and can see each other.

Thank you for the help! Much appreciated! smile

(Last edited by openwrt_newbie999 on 20 Oct 2017, 04:26)

Thank you for the reply!

Yes I did see that page but it does not mention any implementation for dual band. It is only applicable to single band (either or 2.4 or 5 GHz). I want to use both.

(Last edited by openwrt_newbie999 on 20 Oct 2017, 14:28)

The routed client is exactly what a conventional router does except that the connection to the Internet is wireless instead of wired.  Thus the default configuration does what you need, once you configure a wireless wan connection.

Create a client (STA) interface on the 2.4 GHz radio which will connect to the hotel wifi network.  Attach it to the wan interface which should be part of the default configuration.  On the wan physical settings make sure that it is the only device in the wan network, and the "bridge" box is not checked.

At this point you should see an ipv4 WAN connection on the main status page.  Check that the address does not conflict with the LAN address range.   If it does, you need to change your LAN IP.

Generally you will need to use a device on the LAN side with a web browser to log into the hotel before Internet is available.  You are actually logging in your router's MAC address, so any devices on the other side of the router look to the hotel like only one device is connected.

You can then go on and open a 5 GHz AP (in the lan network), install VPN, etc.

You can also open an AP on the 2.4 radio but be aware that it will go off the air if the client loses contact with the hotel network.  This is not so much of a deal with dual band since you can always log in on 5 GHz and reconfigure your client.  Packages like travelmate are designed to help with that situation.

(Last edited by mk24 on 20 Oct 2017, 14:55)

NOTE:
Please read next reply for current status. Thank you!
------------------------------------------------------------------------------------------------------------------------------------------------------

Hey there @mk24,

Thanks for the help.

My network file looks like follows:

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

config interface 'wan'
        option proto 'dhcp'
        option ifname 'eth0'
        option macaddr 'random:mac'

My wireless file looks like follows:

config wifi-device 'radio1'
        option type 'mac80211'
        option channel '11'
        option hwmode '11g'
        option path
        option htmode
        option country 'US'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option network 'wan'
        option mode 'sta'
        option ssid 'network_name'
        option encryption 'psk2'
        option key 'network_password'
        option bssid 'network_bssid'
        option disabled '0'

However there are some issues:
1. I can see that I am connected to the network on the 'Network -> Wireless' page but on the Overview page it still shows that I am not connected.
2. My main router shows the original MAC address of the repeater although I have assigned a new one to the WAN interface.
3. The WAN interface should appear green on 'Network -> Interfaces' but it still appears red.

Not sure whats going on.

Any thoughts? Btw, I am using LEDE.

UPDATE:
Some progress...I removed the following line from the interface config:

option ifname 'eth0'

Now its shows on my overview page that I am connected to the main router with the wan interface. However, it is still connecting with the original repeater mac address rather than the one I have assigned.

UPDATE 2:
Was successfully able to connect to the WiFi with the new mac address. To others who maybe following, I added the following line to the wireless config below wifi-iface (the same one as i assigned the wan interface):

option macaddr 'mac:addr:ess'

PENDING:
Now just need help with broadcasting the WiFi through the 5 GHz channel smile

Thanks for your help! U awesome smile

(Last edited by openwrt_newbie999 on 22 Oct 2017, 08:20)

Thought I'd create a new reply to give a status update.

I have managed to have a 5 GHz WiFi hotspot available as well.
However, when I connect to the AP, I do not get any internet on the device connected to it.
https://preview.ibb.co/dQAd1R/Screen_Shot_2017_10_21_at_11_33_20_PM.jpg

My configs:
Network:

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

config interface 'wan'
        option proto 'dhcp'

Wireless:

config wifi-device 'radio0'
        option type 'mac80211'
        option channel 
        option hwmode 
        option path 
        option htmode 
        option disabled '0'
        option country 'US'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option mode 'ap'
        option ssid 'ssid'
        option encryption 'psk2'
        option key 'key'
        option network 'lan wan'

config wifi-device 'radio1'
        option type 'mac80211'
        option channel 
        option hwmode 
        option path 
        option htmode 
        option country 'US'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option network 'wan'
        option mode 'sta'
        option ssid 'ssid'
        option encryption 'psk2'
        option key 'key'
        option bssid 'bssid'
        option disabled '0'
        option macaddr 'macaddr'

(Last edited by openwrt_newbie999 on 22 Oct 2017, 04:46)

The discussion might have continued from here.