How to route different prefixes...

on different default route instances dynamically? I mean…

A - B - C

Router A have 2 OSPF instances, one for MPLS and other traffic and both instances have redistribute default route enabled. Between Router B and C there is a BGP peer. I would like to know if there is a way to route packets from C through one specific default route in B while all other packets go through another default route in B. Thought I could use route filters, but didn’t figured it out. There are two OSPF networks between A and B. Please help?

Ive found a way at the cost of two static rules on router B, but I’m not sure if it is correct or if there is a way to get the same result without those static rules.

/routing filter
add action=accept chain=alpha-in comment=“” disabled=no invert-match=no prefix=0.0.0.0/0 prefix-length=0-128 set-routing-mark=alpha

/ip firewall mangle
add action=mark-routing chain=prerouting comment=“” disabled=no in-interface=eoip-tunnel1 new-routing-mark=alpha passthrough=no

Would be nice if a OSPF instance on router A redistribute default route with routing mark matches, then I could skip the first rule. But couldn’t figure how the second rule could dynamically be added, i.e. configuring something like “new routing mark” for traffic coming from that BGP between router B and C.

I just didn’t understand why traceroute returns the incorrect address… :frowning: The route is correct also the number of hops, but the router respond with another of its address but not the address that the route points for. I mean, running a traceroute to 10.128.0.10 there is a route on router A that points to 10.128.0.2 on router B, but router B respond with 10.128.0.13… why? default route on A points to 10.128.0.1

hostX on some network — A — 10.128.0.0/30 and 10.128.0.12/30 — B — 10.128.0.8/30

??? Its the order where it was added?

Flags: X - disabled, I - invalid, D - dynamic

ADDRESS NETWORK BROADCAST INTERFACE

0 10.128.0.13/30 10.128.0.12 10.128.0.15 ether1
1 10.128.0.1/30 10.128.0.0 10.128.0.3 ether1
2 192.168.0.1/30 192.168.0.0 192.168.0.3 ether2

edit guess im so dumb with such a basic networking…