Force traceroutes to always respond from loopback IP

Im still working at getting traceroutes from any direction to reply from the same IP, would prefer it be the loopback that is used for OSPF router IDs too. There are two reasons, one is to conserver our ARIN allocation and to not have our internal IP space visible to customers (we are using 172. stuff)

with mangle in the prerouting chain I can identify it by looking at ttl of 1.

I can set the action to increment by one and get it to forward up to the next hop so the response of that and the second look duplicated.

Ive tried marking the packet and setting the gateway to the loopback ip, but it doesnt seem to work, depending on what i do it either continues to go to the next hop or it just kills the traceroute.

When I add the loopback IP as the gateway for the traceroute mark it says unreachable

I have read a couple “stupid router tricks” for cisco devices that detail how to do this, but i cant make sense of it

This is normally accomplished by adding a route filter in OSPF as follows:

/routing filter
add chain=ospf-in set-pref-src=[/routing ospf instance get default router-id]

However, this “broke” or changed somewhere between 6.3 and 6.30.4 (I didn’t test in which exact version it changed). Apparently it’s “fixed” in 6.33rc according to this thread: http://forum.mikrotik.com/t/when-fastpath-works-pref-src-not-work/91356/1

Joe