Community discussions

MikroTik App
 
manish
newbie
Topic Author
Posts: 39
Joined: Fri Jun 23, 2006 8:57 pm

OSPF Default Route

Tue Jan 05, 2021 8:29 am

Hello,

I have configured single OSPF network with a default route pointing to the internet which is via Ether1, how can I route a single range, lets say 192.168.1.0/24 through another interface ether 2?

Is there a way to have default gateway routed per subnet? everything will go through our standard gateway which is on 10.10.0.1 and this range 192.168.1.0/24 go via different gateway 10.10.0.2?

Thank you
 
User avatar
ingdaka
Trainer
Trainer
Posts: 452
Joined: Thu Aug 30, 2012 3:06 pm
Location: Albania
Contact:

Re: OSPF Default Route

Tue Jan 05, 2021 9:02 am

If you want this you have to return to static routing and use mangle to mark subnets
 
manish
newbie
Topic Author
Posts: 39
Joined: Fri Jun 23, 2006 8:57 pm

Re: OSPF Default Route

Tue Jan 05, 2021 9:35 am

Thank you for your response, there are many subnets mangle will mess up I think as I will eventually forget a static route :)

Do you have any link for this?

Is there possibility I only mangle one rule?
 
joegoldman
Forum Veteran
Forum Veteran
Posts: 766
Joined: Mon May 27, 2013 2:05 am

Re: OSPF Default Route

Tue Jan 05, 2021 11:02 pm

Depending on the setup - VRF's are also another option, where if the (many) subnets are on their own subinterfaces you could potentially have vrf1 using gw1, vrf2 using gw2, and assign the sub interface to the appropriate vrf based on which gateway they need to use.

This introduces other issues such as inter-vrf routing if required etc (i.e. if the subnets need to be able to speak to each other) - but we can't tell you best solution without knowing the overall picture of network design.
 
terafirma
just joined
Posts: 8
Joined: Fri Aug 23, 2019 9:49 am

Re: OSPF Default Route

Tue Jan 12, 2021 11:38 pm

In your route setup you can add a rule (PBR) that states traffic from subnet "x" uses gateway "y" you can limit this to a set destination or leave it for all traffic.

In Winbox in the IP -> routes window go to the rules tab.

Who is online

Users browsing this forum: No registered users and 15 guests