Community discussions

MikroTik App
 
aarango
Member Candidate
Member Candidate
Topic Author
Posts: 158
Joined: Wed Nov 30, 2016 7:55 am

Join two subnet - Different range - two Mikrotik

Mon Feb 20, 2017 2:54 pm

Hi,

I am using a main router Mikrotik for daily use, 192.168.150.0/24. After I have another router Mikrotik connected on a switch on same net but this new Mikrotik has wifi and his subnet is 192.168.88.0/24 (this is the cause for that I want to connect this new Mikrotik)

If I connect to this last Mikrotik (wifi) I can do ping 192.168.150.0/24 without problem, in this subnet there is a printer, but I can't do ping from 192.168.150.0/24 -> 192.168.88.0/24.

I want to join both subnet to use the printer which uses Wifi and main Mikrotik Router hasn't Wifi.

Thanks
 
User avatar
pukkita
Trainer
Trainer
Posts: 3051
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: Join two subnet - Different range - two Mikrotik

Mon Feb 20, 2017 3:13 pm

You need to tell both routers where the "other" LANs are.

192.168.88.0/24 router already should have a default gateway (0.0.0.0/0 route through its 192.168.150.x IP address) and that's the reason you can ping 192.168.150.x addresses while connected wirelessly.

You need to tell the wired router, how to reach 192.168.88.0/24 network; let's say wireless router IP on .150 range is 192.168.150.254:
/ip route add dst-address 192.168.88.0/24 gateway=192.168.150.254
 
aarango
Member Candidate
Member Candidate
Topic Author
Posts: 158
Joined: Wed Nov 30, 2016 7:55 am

Re: Join two subnet - Different range - two Mikrotik

Mon Feb 20, 2017 3:33 pm

Hi,

Thanks you for fast reply.

I created that route but I can't reach that subnet. (I can ping wireless router - 192.168.150.58)

$ ping 192.168.150.58
PING 192.168.150.58 (192.168.150.58) 56(84) bytes of data.
64 bytes from 192.168.100.58: icmp_seq=1 ttl=64 time=0.219 ms

Router is created on wired router -> A S 192.168.88.0/24 192.168.150.58
And its reachable.

Here a traceroute log:
$ traceroute 192.168.88.200 (printer)
traceroute to 192.168.88.200 (192.168.88.200), 30 hops max, 60 byte packets
1 192.168.150.1 (192.168.150.1) 0.192 ms 0.156 ms 0.161 ms
2 * * *
3 * * *
4 * * *
5 * * *
6 * * *

Thanks
 
User avatar
pukkita
Trainer
Trainer
Posts: 3051
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: Join two subnet - Different range - two Mikrotik

Mon Feb 20, 2017 3:53 pm

Please issue on .150.1 router and copy & paste results:
/ip export
 
aarango
Member Candidate
Member Candidate
Topic Author
Posts: 158
Joined: Wed Nov 30, 2016 7:55 am

Re: Join two subnet - Different range - two Mikrotik

Wed Feb 22, 2017 8:21 am

Sorry for late reply. Here export main router (150.1)

/ip firewall nat
add action=masquerade chain=srcnat
/ip route
add distance=1 dst-address=192.168.88.0/24 gateway=192.168.150.51 (IP that main Router gives wireless router)
/ip route rule
add dst-address=192.168.150.0/24 src-address=192.168.88.0/24 table=main

I try creating that router that if I (connected with IP range 150) can access subnet .88 throught 150.51 (IP router wireless), isn't it?

thanks.
 
User avatar
pukkita
Trainer
Trainer
Posts: 3051
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: Join two subnet - Different range - two Mikrotik

Wed Feb 22, 2017 12:37 pm

I asked for a full /ip export. Editing out details won't help; shooting this blindly...
/ip firewall nat
add action=masquerade chain=srcnat
First action that needs to be taken: modify that src-nat rule, specifiying the output (WAN) interface.
/ip route
add distance=1 dst-address=192.168.88.0/24 gateway=192.168.150.51 (IP that main Router gives wireless router)
On previous post you wireless AP IP was 192.168.150.58, on this export is .51???
/ip route rule
add dst-address=192.168.150.0/24 src-address=192.168.88.0/24 table=main
Remove that.
 
aarango
Member Candidate
Member Candidate
Topic Author
Posts: 158
Joined: Wed Nov 30, 2016 7:55 am

Re: Join two subnet - Different range - two Mikrotik

Wed Feb 22, 2017 2:30 pm

Hi,

Im sorry for changes but I was changing some values and for that motive the IP has changed, I need delete some values from full export for security.
Last edited by aarango on Wed Feb 22, 2017 3:30 pm, edited 1 time in total.
 
aarango
Member Candidate
Member Candidate
Topic Author
Posts: 158
Joined: Wed Nov 30, 2016 7:55 am

Re: Join two subnet - Different range - two Mikrotik

Wed Feb 22, 2017 3:29 pm

Finally I solved creating what you said me in first post:

A rule on IP -> route to reach subnet 88.

192.168.88.0/24 192.168.158.58 (IP that main router mikrotik gaves to wireless router)

Thanks.

Who is online

Users browsing this forum: dioeyandika and 54 guests