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 ..
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.
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.