Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
79
rated 0 times [  79] [ 0]  / answers: 1 / hits: 78412  / 1 Year ago, fri, december 16, 2022, 9:14:45

I recently read a bit of an article on HowToGeek that has me scratching my head a little. I've got fairly little experience with Linux though, so forgive me if this is entry-level:



"The tracepath command is similar to traceroute, but it doesn’t require root privileges."


http://www.howtogeek.com/108511/how-to-work-with-the-network-from-the-linux-terminal-11-commands-you-need-to-know/



How do traceroute and tracepath perform a similar function, differently?


What does traceroute do, which requires root privileges, that tracepath doesn't?


Are there scenarios where one should prefer tracepath over traceroute, or vice-versa?


More From » networking

 Answers
0

How do traceroute and tracepath perform a similar function, differently?


Both programs essentially do one thing: send and receive certain IP packets.


A program can use the normal sockets API to do this, or it can manipulate the raw packets from the interface. The sockets API does not require root privileges, because it is fairly secure. There are mechanisms builtin to prevent one program from accessing IP packets that another program made.


Tracepath uses the sockets API for all it's functionality. Traceroute manipulates raw packets for some of its functionality.


What does traceroute do, which requires root privileges, that tracepath doesn't?


It manipulates raw packets.


To manipulate raw packets, you need root privileges because by doing this, you bypass the security mechanisms of the sockets API. You gain access to communications of all other processes and users using that interface. Just think about what a virus could do if it could manipulate raw packets.


Are there scenarios where one should prefer tracepath over traceroute, or vice-versa?



One advanced command available in Traceroute is the ability to run a
network trace using IPv4 or IPv6 protocol. It is also possible to
choose between ICMP, TCP or UDP data formats for a probe. Traceroute
can choose specific source routings for the probe and choose what port
to send from. It can set limits on the minimum and maximum TTL to
accept from an outbound probe. IN addition, Traceroute can show the
wait time for response pings as well as set how many packets are send
in each probe and how many probes to send. Some of these commands may
not be supported by networking hardware along the path, which could
terminate the probe before it reaches its target destination.



sources:
1
2
3


[#39777] Saturday, December 17, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mouedi

Total Points: 420
Total Questions: 109
Total Answers: 116

Location: Philippines
Member since Wed, Aug 19, 2020
4 Years ago
;