Community discussions

MikroTik App
 
piter
just joined
Topic Author
Posts: 2
Joined: Mon May 24, 2021 11:13 pm

hAP Lite as switch + AP Client

Mon May 24, 2021 11:34 pm

Hi!
I'd like to use hAP Lite for most of the time simply as switch: sharing one Ethernet socket in the wall (eg. lan1) into two devices (lan2, lan3) with static IP addresses: computer and printer. This is the switch part.
Occasionally I'd like to bring all of it out of the office, enable hotspot in phone and automatically provide internet for computer and printer, without even logging into router. It will be used by persons completely not familiar with all this stuff.

I think about setting AP Client configuration in hAP, looking for certain AP name and - if found - logging into it using certain password. If WiFi is available - both devices uses internet, having still the same static IP addresses (lan2, lan3).
If WiFi is not available - hAP works like a switch, described at the beginning.

I've tried to use Quickset, but changing from 'Home AP' to 'CPE' causes reconfiguration and I've lost connection.

What do you suggest?
 
piter
just joined
Topic Author
Posts: 2
Joined: Mon May 24, 2021 11:13 pm

Re: hAP Lite as switch + AP Client

Tue May 25, 2021 12:52 pm

I've tried to use Quickset, but changing from 'Home AP' to 'CPE' causes reconfiguration and I've lost connection.
Ok, I've upgraded router firmware to the latest and above problem disappeared.

Currently my hAP works in CPE configuration.
1. LAN router works ok: both devices with static IP works ok connected to the Ethernet socket in the wall.
2. WiFi router doesn't work: both devices can see themselves, Wifi is connected, but devices doesn't have internet.
Below screens from WebFig:
https://ibb.co/xL7xF3t
https://ibb.co/V39CYfp
https://ibb.co/c1RVZqr
What to to to have internet in case of Wifi connection?
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11433
Joined: Thu Mar 03, 2016 10:23 pm

Re: hAP Lite as switch + AP Client

Tue May 25, 2021 7:17 pm

The problem you have is that both devices have statically set default gateway (e.g. 192.168.88.1). But that host is not available when your little setup becomes island connected via phone hotspot.
If you want to have both machines working without any change, hAP would have to change its own IP address to the one of usual gateway (or add it to its usual one). I'm sure this could be achieved using some script which would check internet access via wireless interface and if there is access, add (or change) bridge address. And drop it (or change back) when internet via wireless is not available anymore. Ideally you would monitor availability of "real" gateway ... because if hAP would be connected to your usual LAN and with wireless connectivity to internet, it should use default gateway IP address as in this case two devices in the same network would use same address.

Who is online

Users browsing this forum: cmmike and 60 guests