Community discussions

MikroTik App
 
badluck13
just joined
Topic Author
Posts: 2
Joined: Wed Jun 01, 2011 1:00 pm

Quick routing question [its kinda urgent]

Wed Jun 01, 2011 2:00 pm

Hi all,

I need your help.

I have 2 networks: subnets 192.168.1.0/24 and 192.168.2.0/24 - each one has it own internet router that is set up as default gateway on host computers(win pc's)

Now I have 2 mikrotik router OS machines, and I want to use them to connect this 2 networks.

So for test I created this model

Host1: ipaddress: 192.168.1.10/24 gateway 192.168.1.1 also added static route - 192.168.2.0 mask 255.255.255.0 192.168.1.100

Router1: Interface1 - ip: 192.168.1.100
interface2 - ip: 10.10.20.1

Router2: Interface1 - ip: 192.168.2.100
interface2 - ip: 10.10.20.2

Host1: ipaddress: 192.168.2.10/24 gateway 192.168.2.1 also added static route - 192.168.1.0 mask 255.255.255.0 192.168.2.100

Then I created OSPF
Router1 OSPF networks 192.168.1.0/24 and 10.10.20.0/24

And Router2 OSPF networks 192.168.2.0/24 and 10.10.20.0/24

Now I cannot ping from host1 to host2!!!

I can ping from host1 to router2, and I can ping from router2 to host2, same thing from other side.

Then I also tested if gateway for host are microtik router and then I can ping from Host1 to Host2

What can I do? Becouse I cant use microtik as default gateway :(

And this is urgent so please help! :)
 
User avatar
petrn
Member Candidate
Member Candidate
Posts: 180
Joined: Thu Jul 29, 2010 3:56 am
Location: Dubai

Re: Quick routing question [its kinda urgent]

Wed Jun 01, 2011 6:59 pm

quick answer:
What can I do? Becouse I cant use microtik as default gateway :(
you don't have to ...
And this is urgent so please help! :)
Be polite, smillies wont help. This is free forum.

Unless you change attitude, RTFM - preferably how OSPF works.
 
badluck13
just joined
Topic Author
Posts: 2
Joined: Wed Jun 01, 2011 1:00 pm

Re: Quick routing question [its kinda urgent]

Thu Jun 02, 2011 10:52 pm

I'm kind :)

So here is solution to this problem for future reference of people who go to this free forum

If you want to connect 2 networks and to be able to ping between them, its not enough to RTFM of OSPF, because there are no FM that have all answers.

Setting OSPF is piece of cake and I did it ok in first place, but smillies wont help here :P

So if you have 2 networks 192.168.1.0/24 and 192.168.2.0/24

Find free IP to put your mikrotik box like R1 eth1 192.168.1.100 and R2 eth1 192.168.2.100

Then you will need to connect 2 mikrotik boxes, so you will need more Ethernet ports, and to put them in same network like 10.10.10.0/24 (I used /24 because I will add lot more routers later to same subnet)

So now you have 2 mikrotik boxes, connected to 2 networks and between each other:

Network 192.168.1.0/24 ---- eth1 192.168.1.100 R1 eth2 10.10.10.1 --- eth2 10.10.10.2 R2 eth1 192.168.2.100 ---- network 192.168.2.0/24

OSPF is easy, R1 - just go to winbox in routing then OSPF and in networks tab add 10.10.10.0/24 and 192.168.1.0/24 networks
and on R2 - just go to winbox in routing then OSPF and in networks tab add 10.10.10.0/24 and 192.168.2.0/24 networks

So now you have all routes and everything setup but you cant ping!!!

That's because your hosts are not configured to redirect traffic to mikrotik boxes.

And this is also simple, just go to your windows console (cmd) and add routes:
HOST on 192.168.1.0 network should insert command - route add 192.168.2.0 mask 255.255.255.0 192.168.1.100
and
HOST on 192.168.2.0 network should insert command - route add 192.168.1.0 mask 255.255.255.0 192.168.2.100

Basicly you are telling your computer to redirect traffic trough mikrotik box (192.168.x.100)

And now you can ping!!!

Hope that this can help some people even if I use smillies :D

and petrn its also free for you to not reply to my post.
 
User avatar
petrn
Member Candidate
Member Candidate
Posts: 180
Joined: Thu Jul 29, 2010 3:56 am
Location: Dubai

Re: Quick routing question [its kinda urgent]

Fri Jun 03, 2011 1:55 am

Hi,

let me write short manual:
on both routers you need:
/routing ospf network
add area=backbone disabled=no network=10.10.10.0/24
then check neighbors:
/routing ospf neighbor print
you should see other router in both, then:
/routing ospf instance
set default disabled=no name=default redistribute-connected=as-type-1
explanation: "/routing ospf network" specifies where OSPF protocol will be running (in my understanding you want to run OSPF only on R1 and R2), not what networks are going to be propagated/redistributed, this is done in " /routing ospf instance", try "/ip routes print" before and after setting "redistribute-connected=as-type-1" (give OSPF few seconds to settle).

And of course both Host1 and Host2 needs route entry for remote network.

Edit: I can enable Karma in my profile for you, in case you looking for "-" button.

Who is online

Users browsing this forum: No registered users and 10 guests