traceroute

Issues related to configuring your network
Post Reply
good_face
Posts: 39
Joined: 2019/10/15 13:29:09

traceroute

Post by good_face » 2020/10/14 07:10:18

There are two ip addresses on the Centos server. How do I know if I can access a different thread with the tracte command from both threads?

How can I run ttraceroute from both IP addresses on the same server
for example
first ip of centos 10.10.10.10

other ip address of centos 20.20.20.20

User avatar
TrevorH
Forum Moderator
Posts: 29693
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: traceroute

Post by TrevorH » 2020/10/14 07:59:39

man traceroute then look at the -i option.

More probably you also want to run ip route get $destination-ip to find out which interface it will be trying to use to route the packets since there is no point in attempting the traceroute via an interface that won't be used to send the packets.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

good_face
Posts: 39
Joined: 2019/10/15 13:29:09

Re: traceroute

Post by good_face » 2020/10/14 08:31:52

The question may be strange but I want to learn . I want to see if the following ip addresses reach the target ip address.

from 10.10.10.10 to 50.50.50.50
and
from 20.20.20.20. to 50.50.50.50 with traceroute command or or if there is a different way ?

What and how should I write command to the server

User avatar
jlehtone
Posts: 3101
Joined: 2007/12/11 08:17:33
Location: Finland

Re: traceroute

Post by jlehtone » 2020/10/14 09:46:35

Lets say that there are three subnets: 10/8, 20/8, and 50/8.
The 10.10.10.10 is in 10/8. The 20.20.20.20 is in 20/8 and 50.50.50.50 is in 50/8.

There is router A that has addresses in 10/8 and 50/8. For example 10.10.10.1 and 50.50.50.10.
Everybody in 10/8 is told that to reach outside of 10/8 one must send to router A (10.10.10.1).

There is router B that has addresses in 20/8 and 50/8. For example 20.20.20.1 and 50.50.50.20.
Everybody in 20/8 is told that to reach outside of 20/8 one must send to router B (20.20.20.1).

Everybody in 50/8 is told that to reach 10/8 one must send to router A (50.50.50.10).
Everybody in 50/8 is told that to reach 20/8 one must send to router B (50.50.50.20).


When your machine wants to send to 50.50.50.50, what should it do?
* Send via 10.10.10.1, i.e. toss packet out from 10.10.10.10?
* Send via 20.20.20.1, i.e. toss packet out from 20.20.20.20?

What is the default action that programs will use? One machine. One default.

It is possible to have exceptions, specific routes, but when no exception does match, then the one default will be used.


Diagnostic tools, like ping and traceroute let you set a temporary exception with their command line parameters, but "regular" programs can't do that. They rely on the systems routing. In other words, even if you can "connect" with traceroute, it might not be true for any other process.


The above three subnet case becomes simpler, if router B does not exists for your machine. The default out is then unambiguously via router A. To 10/8 and 20/8 you can talk directly.

Post Reply

Return to “CentOS 7 - Networking Support”