Community discussions

 
nmaton
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 72
Joined: Fri Feb 18, 2011 12:31 am

how/where to define next hop ip address for traceroute

Mon Mar 18, 2013 8:42 pm

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 ..
Nicolas Maton
nicolasmaton@gmail.com

CCNA/ CCDA
MTCNA / MTCTCE

Available for Mikrotik Consulting
 
User avatar
joshaven
Member
Member
Posts: 439
Joined: Fri May 06, 2011 1:50 am
Location: USA
Contact:

Re: how/where to define next hop ip address for traceroute

Mon Mar 18, 2013 9:24 pm

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.
Joshaven Potter
Consulting and Business Services Available http://joshaven.com
 
nmaton
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 72
Joined: Fri Feb 18, 2011 12:31 am

Re: how/where to define next hop ip address for traceroute

Mon Mar 18, 2013 9:41 pm

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.
Nicolas Maton
nicolasmaton@gmail.com

CCNA/ CCDA
MTCNA / MTCTCE

Available for Mikrotik Consulting
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 5942
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: how/where to define next hop ip address for traceroute

Tue Mar 19, 2013 3:35 pm

check connected route. It has parameter pref-src (preferred source address). You can override this address by NAT rules.
 
nmaton
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 72
Joined: Fri Feb 18, 2011 12:31 am

Re: how/where to define next hop ip address for traceroute

Tue Mar 19, 2013 11:24 pm

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?
Nicolas Maton
nicolasmaton@gmail.com

CCNA/ CCDA
MTCNA / MTCTCE

Available for Mikrotik Consulting
 
User avatar
sten
Forum Veteran
Forum Veteran
Posts: 920
Joined: Tue Jun 01, 2004 12:10 pm

Re: how/where to define next hop ip address for traceroute

Sun Jun 23, 2013 8:45 pm

/routing filter rules will allow you to change pref-src on dynamic routes quite easily.
Move along. Nothing to see here.
 
nmaton
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 72
Joined: Fri Feb 18, 2011 12:31 am

Re: how/where to define next hop ip address for traceroute

Mon Jun 24, 2013 1:23 am

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
Nicolas Maton
nicolasmaton@gmail.com

CCNA/ CCDA
MTCNA / MTCTCE

Available for Mikrotik Consulting
 
User avatar
joshaven
Member
Member
Posts: 439
Joined: Fri May 06, 2011 1:50 am
Location: USA
Contact:

Re: how/where to define next hop ip address for traceroute

Mon Jun 24, 2013 4:26 am

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.
Joshaven Potter
Consulting and Business Services Available http://joshaven.com
 
User avatar
sten
Forum Veteran
Forum Veteran
Posts: 920
Joined: Tue Jun 01, 2004 12:10 pm

Re: how/where to define next hop ip address for traceroute

Mon Jun 24, 2013 11:06 am

I Think everybody is understanding me wrong.
Really? Have you tried?
/ routing filters to change pref-src. HINT: it specifies preferred source address to use for any new connection, including traceroute.
Move along. Nothing to see here.
 
thinhnguyenduy79
just joined
Posts: 2
Joined: Fri Oct 09, 2015 12:21 pm

Re: how/where to define next hop ip address for traceroute

Fri Oct 09, 2015 12:26 pm

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.
 
thinhnguyenduy79
just joined
Posts: 2
Joined: Fri Oct 09, 2015 12:21 pm

Re: how/where to define next hop ip address for traceroute

Mon Oct 12, 2015 6:06 am

Do someone has any idea on this master?

Thanks in advance
ThinhNguyen
 
User avatar
sten
Forum Veteran
Forum Veteran
Posts: 920
Joined: Tue Jun 01, 2004 12:10 pm

Re: how/where to define next hop ip address for traceroute

Mon Oct 12, 2015 2:57 pm

Your NAT is messed up is my best guess.
Move along. Nothing to see here.
 
eliemacho
just joined
Posts: 15
Joined: Thu May 02, 2019 12:20 pm

Re: how/where to define next hop ip address for traceroute

Fri Nov 08, 2019 10:51 am

I Think everybody is understanding me wrong.

1- go to the routing table
2- change/specify the preferred source to the ip desired (the ip which you wish that the desired router to be replying from at your queries.. as the tracert/ping etc..)

Who is online

Users browsing this forum: No registered users and 5 guests