Community discussions

MikroTik App
 
kcep4ek
just joined
Topic Author
Posts: 2
Joined: Fri Feb 18, 2022 11:17 am

Configuring local network

Fri Feb 18, 2022 11:29 am

Good day, everyone! Please help me with setting up Mikrotik Map Lite - I tried to search in Google, but I didn't find the answer.

In short - I need to configure that the printer, which is connected via Ethernet-cable to a Mikrotik (while Mikrotik in CPE mode is getting internet from main router ZTE670), would be reflected in the main LAN of main router.

To describe it a little more - I have HP M252N printer that does not have wi-fi, and i need to be able to print both over the local network (from a PC) and over the Internet (e.g. from a mobile phone). Printer is located in such place, so i can't connect it by wire with main ZTE-router.

The configuration is as follows:
1) the main router is ZTE 670, which is connected directly to the provider and distributes the Internet. A PC is connected to this router via an Ethernet-cable.
2) Mikrotik Map Lite, which is configured in CPE mode, receives the Internet from the main router via wi-fi and gives it to the printer via Ethernet-cable.

As a result, the printer has access to the Internet and can receive print-jobs via HP ePrint (forwarding what needs to be printed to the specific e-mail). But at the same time, the printer is not visible in the local network of main router (e.g. from my PC), so that means that tasks cannot be sent to it from a PC over the local network.

What I expect is that the "LAN" that mikrotik creates will be "visible" in the main LAN of the main router (or it will be even same LAN), meaning that printer will become available on the LAN.

I apologize in advance for my dummy-language, I don't understand much about terminology, but I try to figure it out as much as possible.

Thank you in advance for your time and help!

MikroTik's settings are following
Image
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 2978
Joined: Mon Apr 08, 2019 1:16 am

Re: Configuring local network

Fri Feb 18, 2022 11:50 am

But at the same time, the printer is not visible in the local network of main router (e.g. from my PC), so that means that tasks cannot be sent to it from a PC over the local network.
This is normal in this CPE , actually "Home AP style" configuration. The router configuration here creates it's own network (192.168.88.0/24) with DHCP server, DNS and router, and connects to the internet uplink with DHCP client, NAT and masquerade. Perfectly normal for this setup.

With what you describe as requirement the mAP Lite should be connected to your wireless LAN with "bridge" mode. (No own Local Network range , no DHCP server, but just DHCP client to get IP addresses from the local wireless DHCP server.) Then the wifi-ethernet connection will be transparant.

Don't know if Quickset with just "bridge" selected instead of "router" will give the correct config. As the uplink router is not MT, it may be required to change the "station" or "station bridge" mode in WLAN1 to "station - pseudobridge" if more than one device is connected to the mAP Lite. Sometimes "station-pseudobridge-clone" is what is needed for one connection to pass the MAC address of the printer.

Some experimenting is required. If all options with "bridge" fail, go back to "router" but without the NAT, and add the route to that subnet in the ZTE router. You have a routed network then. Printer discovery may fail for your computers, as broadcast/multicast discovery is not passed over a router.
 
kcep4ek
just joined
Topic Author
Posts: 2
Joined: Fri Feb 18, 2022 11:17 am

Re: Configuring local network

Fri Feb 18, 2022 1:00 pm

Don't know if Quickset with just "bridge" selected instead of "router" will give the correct config. As the uplink router is not MT, it may be required to change the "station" or "station bridge" mode in WLAN1 to "station - pseudobridge" if more than one device is connected to the mAP Lite. Sometimes "station-pseudobridge-clone" is what is needed for one connection to pass the MAC address of the printer.
I've changed quickset to bridge and then experimented:
1) with both "station bridge" and "station pseudobridge clone" my Mikrotik can't connect to ZTE-router
2) with "station pseudobridge" it does succesfully connects to ZTE, but for some reason, when i connect PC or Notebook with Mikrotik via Ethernet-cable, it does not have access to internet
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 2978
Joined: Mon Apr 08, 2019 1:16 am

Re: Configuring local network

Fri Feb 18, 2022 2:31 pm

DHCP address lease may have a problem with "station pseudobridge". Check if you really got an IP address via DHCP. (Not 169.254.x.x) on the PC.
If not, use a fixed IP address (and set gateway and DNS accordingly) on the PC (and printer)

"station bridge" may not connect to ZTE , because ZTE does not offer a MT compatible bridge. "Station" should work then (for the routed solution)
 
User avatar
Filo
newbie
Posts: 39
Joined: Thu Jan 13, 2022 2:37 pm
Location: Germany

Re: Configuring local network

Sun Feb 20, 2022 2:16 pm

Hi,
got the same configuration here with my hAP lite (which should be acting similar in this task).

1. Station Pseudobridge was correct for this
2. Check if the LAN-Interfaces are Member of the same bridge together with the WLAN-Interface
3. Bridge needs to be a DHCP-Client (IP -> DHCP-Client) in order to get IP from main-router
3. I needed to add a "DHCP Relay" in my configuration for the bridge (IP -> DHCP-Relay) which is pointing to the main-router

Hope this helps, I'm new here, too, but had a similar task.
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 2978
Joined: Mon Apr 08, 2019 1:16 am

Re: Configuring local network

Sun Feb 20, 2022 3:08 pm

I needed to add a "DHCP Relay" in my configuration for the bridge (IP -> DHCP-Relay) which is pointing to the main-router
Interesting work around, have to try this.
I used to add a local DHCP server with a small pool of IP addresses in the same subnet but not in the original pool.
Problem is that this needs to be updated with different subnets in uplink networks. (A list of known wifi networks is added in the "Connect list" with the proper security profile)
Another option might be to use the smartphone "thetering" like setup. NAT gateway with local subnet, but with optional dst-nat to the first (or only) lease address, for accessability from the upstream network.
 
User avatar
Filo
newbie
Posts: 39
Joined: Thu Jan 13, 2022 2:37 pm
Location: Germany

Re: Configuring local network

Sun Feb 20, 2022 3:22 pm

Interesting work around, have to try this.
DHCP-Relay works like a charm, I also was curious if this will work, but main-router gives away addresses just fine.

Just add it to the bridge (where local ports and uplink come together).
This makes the small routerboard the same network but with a filtered / firewalled bridge for me.
No problem with Multicast or Printer- / service-detection (I run a Minecraft server for local network and it is discovered (Multicast) by the clients + secured by the board's firewall).
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 2978
Joined: Mon Apr 08, 2019 1:16 am

Re: Configuring local network

Sun Feb 20, 2022 7:22 pm

OK I have done the tests. Conclusion: The "DHCP relay" setup with pseudobridge works indeed very well.

But the tests were confusing at first for the following reasons:
- "station" WLAN, with NAT and local DHCP server works (is my default setup), also when life switching between different wireless networks as uplink
- "station pseudobridge", with no DHCP server on the mAP and no DHCP relay also worked! What's this now? It works with "renew" when the previous IP address from the same subnet is still in the PC.
- "station pseudobridge", with no DHCP relay in the mAP, does not give an IP address to the PC after "ipconfig /release" (the known issue)
- "station pseudobridge", with DHCP relay refering to the correct DHCP server does work
- now start to switch uplink WISP networks. This is automatic with the "connect list". But where to find the DHCP server for the DHCP relay?
- added all known DHCP servers for all the known networks. It (/renew) did NOT work when switching networks and a still connected PC. Did the PC or DHCP relay try to use only the previous DHCP server ?????
- After "ipconfig /release" the DHCP relay used all the DHCP servers for the request, and that worked. (The DHCP relay interaction was logged and interesting)
 
User avatar
Filo
newbie
Posts: 39
Joined: Thu Jan 13, 2022 2:37 pm
Location: Germany

Re: Configuring local network

Mon Feb 21, 2022 5:55 pm

DHCP is a miracle... ;)
- "station pseudobridge", with no DHCP server on the mAP and no DHCP relay also worked! What's this now? It works with "renew" when the previous IP address from the same subnet is still in the PC.
A "renew" may trigger a multicast to 255.255.255.255 from the client detecting the active DHCP-Server - this could be verified with a firewall-rule on UDP ports 67 and 68.
The IP sending this request (Src. Address) should then be 0.0.0.0 (as the client has none at this moment). Port 67 should be the request, Port 68 the "offer" iirc.

I saw this, too, in my configuration as this triggered the last "Block all" rule and I needed to add an additional rule before this.
(192.168.178.1 is my main router issuing the addresses)
dhcp.jpg
Would be great if you can confirm / check :)

ipconfig /release... well don't mind. This just puts the client into "dumb"-mode... confirmed.
You do not have the required permissions to view the files attached to this post.
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 2978
Joined: Mon Apr 08, 2019 1:16 am

Re: Configuring local network

Mon Feb 21, 2022 9:14 pm

DHCP is confusing when combined with wifi :-)

During the tests above, the PC was not reset or disconnected from the mAP ethernet. So it still had the DHCP lease even as the DHCP server was disconnected from the mAP at the other end.
A bit special caused by the sequence of little tests. This is not realistic for a normal new connection. However it is quite clear that DHCP renewal happens at half the lease time, resetting the timer at the DHCP server. This lease timer is not reset when roaming from one AP to another, or when reconnecting to the same SSID on the AP.

When I was looking deep into this "pseudo bridge" , years ago, it was clear that the answer (DHCPoffer) from the DHCP server was not reaching the client. The client request was not the problem. The lease was in state "offered" for a time-out time, and never reached "bound". viewtopic.php?t=116963#p734225

The working request via the DHCP relay was indeed with 0.0.0.0 , as I visually remember the LOG output for DHCP Relay.[/system logging topics=DHCP] My mAP setup has already been restored to my usual "station+NAT gateway", so the log details are gone.
 
User avatar
Filo
newbie
Posts: 39
Joined: Thu Jan 13, 2022 2:37 pm
Location: Germany

Re: Configuring local network

Tue Feb 22, 2022 9:32 am

Interesting findings - thanks for sharing!
Hopefully OP is fine with his setup now, too - sorry for hijacking this thread for some in-depth-analysis :)
 
veegee
just joined
Posts: 2
Joined: Wed Apr 26, 2023 11:47 pm

Re: Configuring local network

Thu Apr 27, 2023 12:17 am

Can you guys please post your working configuration for the DHCP relay? I did what you guys described, but wasn't able to get it to work in station-pseudobridge mode.
Last edited by veegee on Thu Apr 27, 2023 12:17 am, edited 1 time in total.

Who is online

Users browsing this forum: Ellaham and 52 guests