Community discussions

MikroTik App
 
User avatar
hknet
Member Candidate
Member Candidate
Topic Author
Posts: 126
Joined: Sun Jul 17, 2016 6:05 pm
Location: Vienna, Austria
Contact:

set next-hop anyhow?

Mon Jul 23, 2018 6:23 pm

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
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7044
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: set next-hop anyhow?

Tue Jul 24, 2018 12:05 pm

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.
 
JimmyNyholm
Member Candidate
Member Candidate
Posts: 248
Joined: Mon Apr 25, 2016 2:16 am
Location: Sweden

Re: set next-hop anyhow?

Sat Aug 04, 2018 9:36 am

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.

Who is online

Users browsing this forum: No registered users and 8 guests