how/where to define next hop ip address for traceroute

hi i have multiple ip addresses on a router ..
When i do a traceroute from a client connected device over the router .. i always see the lowest ip address that is defined in a range.

for ex.

i have

1.1.1.5 ← natted public ip address used for a server
1.1.1.254 ← int ip address

When i do a traceroute from 2.2.2.1 to 3.3.3.1 i will always see 1.1.1.5 in my traceroute ..

How can i change this in mikrotik ?

thanks ..

The next hop IP address is defined by the routing table. Adding/Editing a route so that it matches the destination better will cause that route to be used rather then another… You can also add/edit a route such that it has a smaller (closer to 0) distance if there are two routes for the same destination.

The question regarding what you see in a traceroute is probably more about the standard behavior of a traceroute rather then how to change your routing table. Changing the routing table will not change which end of a link is reported as the hop.

Thanks for your answer but im probably not explaining it very well.

I have a system that has multiple public ip adresses on the same interface.

1.1.1.2
1.1.1.3

The routing protocol uses 1.1.1.3 as source ip.

But when i do a traceroute over that router i always see the lowest ip address.
For the record. I dont want to change anything regarding the routing only the traceroute source ip address.

check connected route. It has parameter pref-src (preferred source address). You can override this address by NAT rules.

This is difficult with a dynamic routing protocol?

/routing filter rules will allow you to change pref-src on dynamic routes quite easily.

I Think everybody is understanding me wrong.

The fact is that i have a core-router which has multiple ip’s in the same subnet.

When i do a traceroute .. the lowest ip of that router is always returned. I would like this to change this to the ip i want to see. Not the lowest.

for ex.

traceroute 3.4.5.6

hop1 1.1.1.1
hop2 2.2.2.2
hop3 3.3.3.3
router 3.4.5.1 (but the router also has the ip 3.4.5.254)
destination 3.4.5.6

You could probably NAT the reply to change the reply address.

The way a trace rout works is that multiple packets are sent to the final destination with too short of ttl times so the packet expires at each hop along the way. When the packet arrives expired at a router the router will generate a reply letting the originator know that the packet was dropped due to expiring.

So the thing your trying to do is control which source ip your router chooses when sending a message which is done using the route table.

You may get your desired outcome by setting a preferred source on the route.

Really? Have you tried?
/ routing filters to change pref-src. HINT: it specifies preferred sour****ce address to use for any new connection, including traceroute.

I also got the same issue. Please someone help to solved.(only one host viewed on the path)

C:\Users\ThinhGia>tracert 8.8.8.8

Tracing route to google-public-dns-a.google.com [8.8.8.8]
over a maximum of 30 hops:

1 5 ms 5 ms 7 ms 192.168.9.5
2 4 ms 6 ms 5 ms google-public-dns-a.google.com [8.8.8.8]
3 3 ms 2 ms 3 ms google-public-dns-a.google.com [8.8.8.8]
4 1 ms 1 ms 1 ms google-public-dns-a.google.com [8.8.8.8]
5 34 ms 210 ms 203 ms google-public-dns-a.google.com [8.8.8.8]
6 33 ms 32 ms 31 ms google-public-dns-a.google.com [8.8.8.8]
7 30 ms 31 ms 31 ms google-public-dns-a.google.com [8.8.8.8]
8 33 ms 30 ms 32 ms google-public-dns-a.google.com [8.8.8.8]
9 31 ms 33 ms 37 ms google-public-dns-a.google.com [8.8.8.8]
10 61 ms 61 ms 62 ms google-public-dns-a.google.com [8.8.8.8]
11 62 ms 61 ms 61 ms google-public-dns-a.google.com [8.8.8.8]
12 * * * Request timed out.
13 61 ms 62 ms 64 ms google-public-dns-a.google.com [8.8.8.8]

Trace complete.

Do someone has any idea on this master?

Thanks in advance
ThinhNguyen

Your NAT is messed up is my best guess.