Community discussions

MikroTik App
 
stanelie
newbie
Topic Author
Posts: 30
Joined: Sun Jun 03, 2012 9:32 pm

routing between 2 subnets, again

Fri Oct 01, 2021 10:18 pm

Hello.
I have this setup where router 1 has a network 10.8.0.0/24 and an IP address on a bridge 10.8.0.1. I have several computers connected to the physical posts, all using 10.8.0.0/24 adresses, everyone is talking to each other, all good.

Now, I want to add another subnet (10.11.7.0/24) on a physical port (from another router that is connected to many other devices on that other subnet). I managed to create a secondary bridge inside the mikrotik primary router, give it an IP address within the secondary subnet (10.11.7.2), and the mikrotik router itself can ping and scan IP addresses on the remote router fine.

However, the computers on the first subnet are unable to ping or talk to computers on the secondary network and I would like them to be able to. What am I missing? Some route? The Mikrotik router already added a dynamic route when I added an IP address in that subnet :
#      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
1   ADC  10.11.7.0/24       10.11.7.2       bridge2        0
It looks like routing between the two networks is not happening.
Thanks for the help!
 
stanelie
newbie
Topic Author
Posts: 30
Joined: Sun Jun 03, 2012 9:32 pm

Re: routing between 2 subnets, again

Fri Oct 01, 2021 10:39 pm

Well,

Just solved it by adding a masquerade rule.

However, I'd still like to know how to do the same thing using routing.
 
User avatar
Hominidae
Member
Member
Posts: 309
Joined: Thu Oct 19, 2017 12:50 am

Re: routing between 2 subnets, again

Fri Oct 01, 2021 10:57 pm

...you already have the answer right before you.
By using a NAT rule, clients from net #1, when reaching out to others on net #2 do not appear as being in net #1 but from the IP 10.11.7.2.

Router #2 does not know anything about how to reach clients on net #1 and you are missing a corresponding route to net #1 in router #2, hence.
 
stanelie
newbie
Topic Author
Posts: 30
Joined: Sun Jun 03, 2012 9:32 pm

Re: routing between 2 subnets, again

Fri Oct 01, 2021 10:59 pm

The thing is :

On a different router, I have several subnets created using several bridges, and they are connected to different physical ports.
The weird thing is that these subnets can "talk" to each other, no problems, even if no NAT rules are present.

What's the difference?

Thanks
 
aesmith
Member Candidate
Member Candidate
Posts: 264
Joined: Wed Mar 27, 2019 6:43 pm

Re: routing between 2 subnets, again

Mon Oct 04, 2021 10:22 am

Most likely the problem is on the "different router". This has a number of subnets directly attached, and therefore it knows about them and in the absence of any firewall rules blocking traffic, it will be able to route freely between those subnets. One of those directly connected subnets is 10.11.7.0/24
However unless you have specifically configured this, it does not know about your original subnet 10.8.0.0/24
To resolve this your "different router" needs a route to 10.8.0.0/24 via 10.11.7.2 (assuming 10.11.7.2 is the Mikrotik host address on that subnet
The reason this worked with a masquerade is that this made any traffic from 10.8.0.0 appear as if it came from 10.11.7.2, which is one of the subnets that the "different router" knows about.

Whenever you have a fault reported along the lines of "Host A can't talk to Host B" it's important to remember that the fault may lie along the path in either direction.

Who is online

Users browsing this forum: No registered users and 67 guests