OSPF Default Route

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

If you want this you have to return to static routing and use mangle to mark subnets

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

Do you have any link for this?

Is there possibility I only mangle one rule?

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.

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.