set next-hop anyhow?

Hi
on a cisco router we do something like this:

route-map RK permit 50
match ip address RK
set ip next-hop 192.168.1.1

this route-map is then bound to an interface that is the incoming gateway for packets like
interface vl10
ip policy route-map RK

in other words if the source IP matches the RK address the packet gets a new next-hop set to go its specific way.

now my obvious question is has anyone implemented something like this on RouterOS (and if yes, how)?

thx
hk

If you want to change nexthop for dynamic routes then it can be done with routing filters.

But from your description it looks like you want to reroute the traffic not change the route. In this case use mangle and routing marks. See policy routing examples in wiki.

What I have discovered is: If you override the nexthop in a filter on the incoming it will not be reflected that way if you not also have a filter to the respective outgoing. This is unintuitive i’d say but once you realise this it gets a bit clearer in the RouterOS Space. (This is not Currently doable in OSPF as ospf only have inFilters currently But BGP works)

This Could be a BUG or just how RouterOS is supposed to work so once I sorted it through i accepted the fact.