Community discussions

MikroTik App
 
amoktik
just joined
Topic Author
Posts: 7
Joined: Sun Nov 03, 2019 9:22 pm

Can't route between local Subnets. (One router).

Mon Nov 04, 2019 4:43 am

Hi I Dont know if i am missing some setting RB3011 UiASarm, because I cant route between two local subnets connected to a router. (I have reviewed several posts and videos without finding the solution.)
If you can help me please.
I will paste the configuration I have here.

Ether 1: wan
Ether 2: lan 1.
Ether 3: lan 2.


I have two problems that I would like to solve.
1. Ping between subnets.
2. View computers between subnets by their pc name. (\\ pc-example).

These problems only occur between different subnet computers. Computers from the same subnet work ok.

//// ROUTER CONFIGURATION /////

/ip pool
add name=dhcp_pool0 ranges=192.168.2.2-192.168.2.254
add name=dhcp_pool1 ranges=192.168.3.2-192.168.3.254
/ip dhcp-server
add address-pool=dhcp_pool0 disabled=no interface=ether2 name=dhcp1
add address-pool=dhcp_pool1 disabled=no interface=ether3 name=dhcp2
/ip address
add address=192.168.1.80/24 interface=ether1 network=192.168.1.0
add address=192.168.2.1/24 interface=ether2 network=192.168.2.0
add address=192.168.3.1/24 interface=ether3 network=192.168.3.0
/ip dhcp-server network
add address=192.168.2.0/24 gateway=192.168.2.1
add address=192.168.3.0/24 gateway=192.168.3.1
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1
/ip route
add distance=1 gateway=192.168.1.1

////////

Saludos.
Bolivia.
 
User avatar
xvo
Forum Guru
Forum Guru
Posts: 1237
Joined: Sat Mar 03, 2018 1:12 am
Location: Moscow, Russia

Re: Can't route between local Subnets. (One router).

Mon Nov 04, 2019 11:15 am

If that is the whole config, nothing is preventing clients in one subnet from access to the other.
But I believe it's only a part of it, so maybe there's something in the part, that you didn't post.
For example in firewall rules.

As for seeing computers by the names in different subnet - you need a nameserver for that.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11627
Joined: Thu Mar 03, 2016 10:23 pm

Re: Can't route between local Subnets. (One router).

Mon Nov 04, 2019 12:04 pm

As @xvo indicated: most windows firewalls are set so that it only accepts pings from same subnet. So you'll have to adjust firewall rules for that.

Similar thing goes for windows sharing: using \\somepc in windows explorer only works inside same subnet (windows hosts search for other windows hosts using broadcasts, but those work within same subnet). If that doesn't work, then windows uses DNS to find out IP of target host.
 
amoktik
just joined
Topic Author
Posts: 7
Joined: Sun Nov 03, 2019 9:22 pm

Re: Can't route between local Subnets. (One router).

Mon Nov 04, 2019 5:15 pm

If that is the whole config, nothing is preventing clients in one subnet from access to the other.
But I believe it's only a part of it, so maybe there's something in the part, that you didn't post.
For example in firewall rules.

As for seeing computers by the names in different subnet - you need a nameserver for that.
thanks for answering.
Some say you don't need to add anything to the firewall, but by adding these NAT firewall rules I can ping between subnets, (red colour font)

/ip pool
add name=dhcp_pool0 ranges=192.168.2.2-192.168.2.254
add name=dhcp_pool1 ranges=192.168.3.2-192.168.3.254
/ip dhcp-server
add address-pool=dhcp_pool0 disabled=no interface=ether2 name=dhcp1
add address-pool=dhcp_pool1 disabled=no interface=ether3 name=dhcp2
/ip address
add address=192.168.1.80/24 interface=ether1 network=192.168.1.0
add address=192.168.2.1/24 interface=ether2 network=192.168.2.0
add address=192.168.3.1/24 interface=ether3 network=192.168.3.0
/ip dhcp-server network
add address=192.168.2.0/24 gateway=192.168.2.1
add address=192.168.3.0/24 gateway=192.168.3.1
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1
add action=masquerade chain=srcnat out-interface=ether2
add action=masquerade chain=srcnat out-interface=ether3

/ip route
add distance=1 gateway=192.168.1.1
/system clock

But I can't see even the computers by name.


Can you tell me if the configuration is correct please.


Greetings from Bolivia.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11627
Joined: Thu Mar 03, 2016 10:23 pm

Re: Can't route between local Subnets. (One router).

Mon Nov 04, 2019 5:28 pm

When you add the two red NAT rules, connections from the other LAN will appear as if coming from router. Hence appearing from same subnet and firewalls on PCs won't block them.

I'm not sure about file browsing, the originating PC will still have to find server's IP address somehow...

Again, check the PCs firewalls and start with internal DNS server ...
 
User avatar
xvo
Forum Guru
Forum Guru
Posts: 1237
Joined: Sat Mar 03, 2018 1:12 am
Location: Moscow, Russia

Re: Can't route between local Subnets. (One router).

Mon Nov 04, 2019 6:13 pm

You don't need those two rules, they are not a solution but a workaround for you problem (if you have a problem at all).
Try to disable firewall on your windows machines, as mkx suggests.
 
amoktik
just joined
Topic Author
Posts: 7
Joined: Sun Nov 03, 2019 9:22 pm

Re: Can't route between local Subnets. (One router).

Mon Nov 04, 2019 6:27 pm

You don't need those two rules, they are not a solution but a workaround for you problem (if you have a problem at all).
Try to disable firewall on your windows machines, as mkx suggests.
Effectively, disable the windows firewall and I can now ping between subnets.
But I still can't access a computer by name.
You can tell me what documentation I have to read in order to do it please.
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: Can't route between local Subnets. (One router).

Mon Nov 04, 2019 6:53 pm

You do not need to disable a whole firewall so that you can accept ping in your computer... just enable the icmpv4 echo request in your incoming rules of your windows firewall...

Disabling a firewall means that you just don't know what blocks you...
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11627
Joined: Thu Mar 03, 2016 10:23 pm

Re: Can't route between local Subnets. (One router).

Mon Nov 04, 2019 7:04 pm

But I still can't access a computer by name.
You can tell me what documentation I have to read in order to do it please.

Google up "DNS server" ... if you think it's a complication, then reconsider the decission to have two LAN subnets with need for connectivity between them. I'm not saying that decission is not valid, but it comes with some complications and you have to decide if this decission is worth the complications. And then live with them the best way you can.
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: Can't route between local Subnets. (One router).

Mon Nov 04, 2019 7:31 pm

You can not access a computer by host name because it is on a different subnet...

I guess if you specify the domain name inside your dhcp server, then if you type the domain name.hostname from any subnet you will have a successfull communication.. you can try that...
 
User avatar
Znevna
Forum Guru
Forum Guru
Posts: 1348
Joined: Mon Sep 23, 2019 1:04 pm

Re: Can't route between local Subnets. (One router).

Mon Nov 04, 2019 7:48 pm

Sheesh.
It's not a routing problem.
It's not a DNS problem, workgroups work a little different, read: wins server.
Assign static IP's to your machines so they don't change overnight.
Access them by \\192.168.x.xx.
Setup shares properly, use network drives (map network drives where you need to) \\192.168.x.xx\sharex
Done.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11627
Joined: Thu Mar 03, 2016 10:23 pm

Re: Can't route between local Subnets. (One router).

Mon Nov 04, 2019 8:03 pm

Nowadays windows uses different ways to discover IP address of a named server: nmbd (uses broadcasts), wins (depends on domain/AD controller) and DNS.

While solution by @Znevna will work it's far from being elegant.
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: Can't route between local Subnets. (One router).

Mon Nov 04, 2019 8:11 pm

Exactly mkx... it uses broadcast thats why there is no access to another subnet... mkx what do you think about setting dns domain in the dhcp ? Do you think that would work ?
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11627
Joined: Thu Mar 03, 2016 10:23 pm

Re: Can't route between local Subnets. (One router).

Mon Nov 04, 2019 8:17 pm

DHCP settings alone won't happen.

The easiest solution would be to use ROS built-in DNS server. But might not be feasible, depends on OP's reasons to have two subnets. If it was feasible, then DHCP address leases would have to be static and mappings between names and addresses would be set in DNS server.
After the above is done .. only then setting of domain name (and pointing to RB as DNS server) would help ...
 
User avatar
Znevna
Forum Guru
Forum Guru
Posts: 1348
Joined: Mon Sep 23, 2019 1:04 pm

Re: Can't route between local Subnets. (One router).  [SOLVED]

Mon Nov 04, 2019 8:36 pm

Elegant or not it's the easiest solution. The DNS based one isn't that far off.
While there is a script here:https://github.com/Tolaris/mikrotik-dns ... hcp.script (among others i've tested, this is the finest of them all) to aid in completing mikrotiks dns implementation (creating dns entries from dhcp leases) THIS is what I don't consider elegant.

And he'll need to add the PC's that are manually configured (not getting a lease from router), well, manually in the list.
So... yeah.
And again, it is not a routing issue nor something regarding RouterOS.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11627
Joined: Thu Mar 03, 2016 10:23 pm

Re: Can't route between local Subnets. (One router).

Mon Nov 04, 2019 8:47 pm

And again, it is not a routing issue nor something regarding RouterOS.

Indeed. Hence my suggestion in one if my previous posts that OP should learn some about DNS... Or prrhaps he should really hire a consultant to revise network layout and implement all the necessary services.
 
amoktik
just joined
Topic Author
Posts: 7
Joined: Sun Nov 03, 2019 9:22 pm

Re: Can't route between local Subnets. (One router).

Tue Nov 05, 2019 6:30 pm

Elegant or not it's the easiest solution. The DNS based one isn't that far off.
While there is a script here:https://github.com/Tolaris/mikrotik-dns ... hcp.script (among others i've tested, this is the finest of them all) to aid in completing mikrotiks dns implementation (creating dns entries from dhcp leases) THIS is what I don't consider elegant.

And he'll need to add the PC's that are manually configured (not getting a lease from router), well, manually in the list.
So... yeah.
And again, it is not a routing issue nor something regarding RouterOS.
Thanks for your answers, obviously it is not possible through mikrotik to be able to see the equipment by names, it is a topic more related to windows.
Thank you for your comments and suggestions helped resolve other concerns simultaneously.
Thanks for your time.

Who is online

Users browsing this forum: jaclaz, McSee, r0nzzibb, Thisced1952 and 204 guests