Community discussions

MikroTik App
 
mur
Member Candidate
Member Candidate
Topic Author
Posts: 105
Joined: Thu Feb 13, 2020 8:43 pm

How to connect a hap ac2 to an ISP router via wifi

Sun Apr 05, 2020 1:02 pm

Hi everyone,
I have a hap ac2 and I connected it to an ISP router/modem via WIFI in station mode. I set a dhcp client on it and a dhcp server for my LAN which is now on a different subnet.
Ok, it works great.
But, I was wonder if I can connected, apart from station mode, to the ISP router in another way, I mean to its same LAN.
I am confusing about which mode I should pick up (station bridge, pseudobridge etc) and why?
Thanks
 
andriys
Forum Guru
Forum Guru
Posts: 1395
Joined: Thu Nov 24, 2011 1:59 pm
Location: Kharkiv, Ukraine

Re: How to connect a hap ac2 to an ISP router via wifi

Sun Apr 05, 2020 1:17 pm

What would you like to achieve in the end?
 
mur
Member Candidate
Member Candidate
Topic Author
Posts: 105
Joined: Thu Feb 13, 2020 8:43 pm

Re: How to connect a hap ac2 to an ISP router via wifi

Sun Apr 05, 2020 1:20 pm

What would you like to achieve in the end?
making my LAN work on the same subnet and avoid double NAT.
Furthermore I'd like to understand how the different mode work.
Thanks
 
andriys
Forum Guru
Forum Guru
Posts: 1395
Joined: Thu Nov 24, 2011 1:59 pm
Location: Kharkiv, Ukraine

Re: How to connect a hap ac2 to an ISP router via wifi

Sun Apr 05, 2020 1:32 pm

Provided you have more then one client behind your Mikrotik router, you cannot really do that, unless your ISP router is also a Mikrotik product (in which case station-bridge mode is what you are looking for). Well, the station-pseudobridge mode may appear to work for you, but I doubt that MAC address translation is anything better than a traditional NAT.

Talking about different station modes in general, you can read about them on the official wiki here: Wireless Station Modes.
 
mur
Member Candidate
Member Candidate
Topic Author
Posts: 105
Joined: Thu Feb 13, 2020 8:43 pm

Re: How to connect a hap ac2 to an ISP router via wifi

Sun Apr 05, 2020 1:42 pm

Provided you have more then one client behind your Mikrotik router, you cannot really do that, unless your ISP router is also a Mikrotik product (in which case station-bridge mode is what you are looking for). Well, the station-pseudobridge mode may appear to work for you, but I doubt that MAC address translation is anything better than a traditional NAT.

Talking about different station modes in general, you can read about them on the official wiki here: Wireless Station Modes.
So, if I have more than one client, station mode is the only reliable way to go in my case. Did I get it right?
What if I want just one client being connected to the ISP router via WIFI?
Thank you.
 
andriys
Forum Guru
Forum Guru
Posts: 1395
Joined: Thu Nov 24, 2011 1:59 pm
Location: Kharkiv, Ukraine

Re: How to connect a hap ac2 to an ISP router via wifi

Sun Apr 05, 2020 2:54 pm

So, if I have more than one client, station mode is the only reliable way to go in my case. Did I get it right?
Yes, you got it right.

What if I want just one client being connected to the ISP router via WIFI?
In this case station-pseudobridge or station-pseudobridge-clone will work for you just fine.
 
mur
Member Candidate
Member Candidate
Topic Author
Posts: 105
Joined: Thu Feb 13, 2020 8:43 pm

Re: How to connect a hap ac2 to an ISP router via wifi

Sun Apr 05, 2020 6:57 pm

What if I want just one client being connected to the ISP router via WIFI?
In this case station-pseudobridge or station-pseudobridge-clone will work for you just fine.
if you don't mind, I still have a few questions:
as far as I've understood (I might've as well got it wrong; I'm still learning networking, and wireless stuff is kind of an ordeal :-))
1) a "real" L2 bridge connection (as that of any network ap/switch) is not possible, unless I have another mikrotik device as an AP
2) as for my case and many others, Station mode is the more advisable way to go, even though it is the "routed (NAT too?) way?
Thanks
 
Zacharias
Forum Guru
Forum Guru
Posts: 2322
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: How to connect a hap ac2 to an ISP router via wifi

Sun Apr 05, 2020 7:15 pm

1) a "real" L2 bridge connection (as that of any network ap/switch) is not possible, unless I have another mikrotik device as an AP
2) as for my case and many others, Station mode is the more advisable way to go, even though it is the "routed (NAT too?) way?
Thanks
1. Yes...
2. If in your Second Router, the one in station mode, there is a src nat rule on your Firewall-> NAT for your Wireless interface then yes it will be NATed.. If no, it wont be NATed... It will be just routing...
 
User avatar
macsrwe
Forum Veteran
Forum Veteran
Posts: 976
Joined: Mon Apr 02, 2007 5:43 am
Location: Arizona, USA
Contact:

Re: How to connect a hap ac2 to an ISP router via wifi

Sun Apr 05, 2020 8:02 pm

Best explanation of this entire issue is here:

https://wiki.mikrotik.com/wiki/Manual:W ... tion_Modes

Once you understand section about "limitations of L2 bridging," you will understand how all the other modes work the way they do, and that the proprietary extensions like "station-bridge" that allow MikroTik gear to overcome that standards deficiency will only work between two MikroTik units.
 
mur
Member Candidate
Member Candidate
Topic Author
Posts: 105
Joined: Thu Feb 13, 2020 8:43 pm

Re: How to connect a hap ac2 to an ISP router via wifi

Sun Apr 05, 2020 8:52 pm

1) a "real" L2 bridge connection (as that of any network ap/switch) is not possible, unless I have another mikrotik device as an AP
2) as for my case and many others, Station mode is the more advisable way to go, even though it is the "routed (NAT too?) way?
Thanks
1. Yes...
2. If in your Second Router, the one in station mode, there is a src nat rule on your Firewall-> NAT for your Wireless interface then yes it will be NATed.. If no, it wont be NATed... It will be just routing...
1) Ok thanks!
2) Yes, there is a src-nat rule:
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=out,none out-interface-list=WAN
Can I do without it? I thought that NAT was necessary to separate my LAN (192.168.4.0/24) from ISP router's (192.168.0.0/24)

Last thing.
Can I bridge the wireless interface in station mode with another interface (ethernet port)?
Thank you very much
Last edited by mur on Sun Apr 05, 2020 9:11 pm, edited 3 times in total.
 
mur
Member Candidate
Member Candidate
Topic Author
Posts: 105
Joined: Thu Feb 13, 2020 8:43 pm

Re: How to connect a hap ac2 to an ISP router via wifi

Sun Apr 05, 2020 9:08 pm


Once you understand section about "limitations of L2 bridging," you will understand how all the other modes work the way they do, and that the proprietary extensions like "station-bridge" that allow MikroTik gear to overcome that standards deficiency will only work between two MikroTik units.
That is the big deal actually :-)
I'm still a newbie and it is hard for me not only to figure out how exactly this stuff works, but even make sense of specific reading about it.
I bought a Mikrotik device just to push me to study and learn it once and for all
anyway

"limitations of L2 bridging", meaning that there is this sort of limitation in any network "standard" device?
But I remember that I once set a DD-WRT mode up in client-bridge (routed) mode, meaning that the dd-wrt was kind of an extension of the ISP router LAN which handled the dhcp requests too.
The other setup was "Client" which is similar to Mikrotik station mode.
Maybe I misunderstood your point.
Thanks
 
andriys
Forum Guru
Forum Guru
Posts: 1395
Joined: Thu Nov 24, 2011 1:59 pm
Location: Kharkiv, Ukraine

Re: How to connect a hap ac2 to an ISP router via wifi

Sun Apr 05, 2020 10:07 pm

Can I do without it? I thought that NAT was necessary to separate my LAN (192.168.4.0/24) from ISP router's (192.168.0.0/24)
Yes, you can. But you need to add a static route on your ISP router so it knows where to forward traffic destined to your 192.168.4.0/24 network to.

Can I bridge the wireless interface in station mode with another interface (ethernet port)?
You might be able to do that configuration wise, but it won't work.

"limitations of L2 bridging", meaning that there is this sort of limitation in any network "standard" device?
This is a limitation of the 802.11 (WiFi) protocols as they are defined by the Internet standards. Various vendors implement their own extensions to the standard to tackle the limitation, but they are mostly very vendor-specific and not compatible with each other.
 
mur
Member Candidate
Member Candidate
Topic Author
Posts: 105
Joined: Thu Feb 13, 2020 8:43 pm

Re: How to connect a hap ac2 to an ISP router via wifi

Mon Apr 06, 2020 12:33 am

Yes, you can. But you need to add a static route on your ISP router so it knows where to forward traffic destined to your 192.168.4.0/24 network to.
hmms....Static route as adding a static dhcp record in the ISP router dhcp server or is it something different completely?
I set also a static IP for my WAN (wlan1) in address list (beloging to the ISP router subnet), is that what you are talking about? Would it be suffient to delete the NAT rule above?
Can I bridge the wireless interface in station mode with another interface (ethernet port)?

You might be able to do that configuration wise, but it won't work.
Ok, can I do it if I set the wlan interface in station-pseudobridge or station-pseudobridge-clone?
Thank you again
 
Zacharias
Forum Guru
Forum Guru
Posts: 2322
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: How to connect a hap ac2 to an ISP router via wifi  [SOLVED]

Mon Apr 06, 2020 12:45 am

Can I do without it? I thought that NAT was necessary to separate my LAN (192.168.4.0/24) from ISP router's (192.168.0.0/24)
Lets say your ISPs Router has the IP 192.168.0.1
The Mikrotik is connected to your ISP through Station Mode, has assigned by you the IP 192.168.0.2/24 on the Wlan Interface...
Since your Mikrotik Router has no NAT rule,packets will leave its interface with the Adress, 192.168.4.254, for example, or any other address in the 192.168.4.0/24...
That address will reach your ISPs Router, but when your ISP will try to reply back, it does not know how to reach the 192.168.4.254 address...
On the Mikrotik you do not need such a route because the address assigned on your Wlan Interface created a local connected route on your Mikrotik, meaning it know how to reach the 192.168.0.0/24...
The same does not apply for the ISPs Router, where you should make a route where when the destination address is the 192.168.4.0/24 the Gateway used must be the 192.168.0.2...

Or if you dont want to do that, just let the src nat rule enabled on your Mikrotik with out interface the wlan...
 
mur
Member Candidate
Member Candidate
Topic Author
Posts: 105
Joined: Thu Feb 13, 2020 8:43 pm

Re: How to connect a hap ac2 to an ISP router via wifi

Mon Apr 06, 2020 10:39 am

....
The same does not apply for the ISPs Router, where you should make a route where when the destination address is the 192.168.4.0/24 the Gateway used must be the 192.168.0.2...
Or if you dont want to do that, just let the src nat rule enabled on your Mikrotik with out interface the wlan...
We got the the main point which I want to make sure I understand correctly.
So, my ISP Router need to have the same "route list tab option" (or something like that) as any Mikrotik device in order to accomplish that, otherwise I have to make do with NAT, which, after all, it is not a big deal although it is better to avoid when we can.
Correct?
Thank you
 
andriys
Forum Guru
Forum Guru
Posts: 1395
Joined: Thu Nov 24, 2011 1:59 pm
Location: Kharkiv, Ukraine

Re: How to connect a hap ac2 to an ISP router via wifi

Mon Apr 06, 2020 11:47 am

Yes, correct.
 
mur
Member Candidate
Member Candidate
Topic Author
Posts: 105
Joined: Thu Feb 13, 2020 8:43 pm

Re: How to connect a hap ac2 to an ISP router via wifi

Mon Apr 06, 2020 1:05 pm

Yes, correct.
Thank you very much indeed :wink:

Who is online

Users browsing this forum: No registered users and 42 guests