How OSPF route outbound traffic ?

My network using OSPF for redistribute default gateway.

I need to route some clients to use other gateway.
What I can do is using static route or routing mark, but I want to use dynamic routing protocol to do this job.

Anybody know how to route some clients to use other gateway with Routing Filter (dynamic route) ?

Thanks in advance.

I could be dead wrong in my understanding of your question so my answer might be irrelevant.
From what you noted, you are redistributing the default route in your OSPF network but you now want to give other clients a different default route.
From the top of my head, place the other clients in a different area and instance then add an ospf-out filter that propagates the Default Route that you would like to give the different clients
Hope that makes sense, if not m sure the other experts will pitch in.(I havent actually ever tried this I’m saying it as it comes to my head haha will lab this up though)

OSPF really isn’t designed to make policy-based routing like this possible.

Linkstate protocols (like OSPF) are primarily concerned with finding the fastest route between any given source/destination on your network, and does not include any kind of policy-based decision making metrics. They view your network holistically, and make decisions holistically. Areas do come into play, but these are mostly there to reduce the scope of topology change information flooding throughout the network - i.e. whenever some link in Taiwan fails, does a router in Frankfurt really need this information? Taiwan is still basically in the same direction, so there’s no need to bother the Frankfurt router…

But that’s not the same as policy routing.