Community discussions

MikroTik App
 
ramirez
Member Candidate
Member Candidate
Topic Author
Posts: 157
Joined: Sun May 12, 2013 9:48 pm

Routing between 2 subnets

Tue Feb 04, 2020 12:50 pm

Hi everyone...I am going through a brain freeze so I'd like to ask for your advice...

I am running a DHCP client on eth1 and the port has received 192.168.0.27

I am running a DHCP server 192.168.10.0/24 on Wlan (its static address is 192.168.10.10)

I would like for devices connected on Wlan to be able to access the internet (eth1 has internet) and ping other devices on the 192.168.0.0/24 network, without bridging them together (Wlan and eth1)

It's probably a routing rule in ip/routes I need to include but like I said...brain freeze!

Thank you
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 13031
Joined: Thu Mar 03, 2016 10:23 pm

Re: Routing between 2 subnets

Tue Feb 04, 2020 2:45 pm

Unless devices in 192.168.0.0/xx (I assume xx is 24, could be some other value) network are aware of your RB (at least the upstream gateway would have to be aware of it) acting as gateway between the two subnets, you have to perform NAT on your RB exactly the same way as you would do it if ether1 was WAN (internet) interface.

The only problem with the above proposed solution is that devices from 192.168.0.0/xx subnet will not be able to ping devices on 192.168.10.0/24 subnet nor will they be able to initate connection towards devices in 192.168.10.0/24 subnet. All connections initiated by devices from 192.168.10.0/24 subnet will appear as if they originated from RB (192.168.0.27/32) ...
 
ramirez
Member Candidate
Member Candidate
Topic Author
Posts: 157
Joined: Sun May 12, 2013 9:48 pm

Re: Routing between 2 subnets

Tue Feb 04, 2020 5:00 pm

I see, thank you MKX, unfortunately I need both ways communication... between 192.168.10.0/24 and 192.168.0.0/24 :-(
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 13031
Joined: Thu Mar 03, 2016 10:23 pm

Re: Routing between 2 subnets

Tue Feb 04, 2020 6:08 pm

In that case, you'll have to add static route on default gateway of 192.168.0.0/xx network ... destination 192.168.10.0/24 gateway 192.168.0.27.

If you can't do that (e.g. you're not router administrator and that person won't do it), then it can't be done.

The only remaining option then would be to use your RB as switch, i.e. your devices will be in 192.168.0.0/xx subnet.

If limited communication is acceptable, you could follow the NAT path and configure some port forwarding ...
 
Sob
Forum Guru
Forum Guru
Posts: 9188
Joined: Mon Apr 20, 2009 9:11 pm

Re: Routing between 2 subnets

Tue Feb 04, 2020 7:55 pm

You could also add this route to individual devices in 192.168.0.0/24 network (if you'd have access to them but not to gateway), but it's not very practical solution (possibly too many places where it would have to be done).
 
ramirez
Member Candidate
Member Candidate
Topic Author
Posts: 157
Joined: Sun May 12, 2013 9:48 pm

Re: Routing between 2 subnets

Wed Feb 05, 2020 4:59 pm

Yeap that did the trick...Thanks a million!!!

Who is online

Users browsing this forum: jaclaz and 77 guests