Traceroute: A computer Network Diagnostic Tool πŸ› οΈ

How does it work! πŸ€”

Ping works fine but not traceroute! 🀨

What are the stars in traceroute output! *⃣*⃣*⃣

#Linux #Networking

A Thread πŸ‘‡ PC: n-able.com
What is traceroute ?

traceroute tracks the route packets take across an IP network on their way to a given host.

It assists you in troubleshooting nw connectivity issues from your Destination to a Remote destination by using echo packets (ICMP) to visually trace the route.
The syntax -

The cmd traceroute <x> (x here being an IP or hostname) is d most basic version & it will begin to send packets to d designated target. This result will allow u to trace d path of d packets sent from ur machine to each of d systems b/n u & ur desired destination.
How does it work?

Traceroute uses TTL (Time to Live) field in d IP pkt header. TTL is used to prevent pkts from being forwarded forever when der is a routing loop. Whenever an IP pkt is forwarded by a router, d TTL is decreased by 1. When d TTL is 0, d IP pkt will be discarded. PC: wikimedia
As the packet hops from one router to router through to get to its destination, each router is required to decrement the echo packets TTL by a minimum of 1 before proceeding to forward the packet to the next router.

In other words, Time-To-Live is a Hop Counter by design.
Let’s look at an example.

Let’s say that from H1 (192.168.1.1) we send a trace to S1 (192.168.3.1). The first IP packet that H1 sends, will have a TTL of 1: PC: networklessons
When R1 receives the IP packet, it will want to forward it to R2 but it has to decrease the TTL from one to zero, as a result, the IP packet will be dropped and R1 will respond to H1 with a TTL exceeded message. H1 will now send a second packet with a TTL of 2: PC: networklessons
R1 will decrease the TTL from two to one, forwards it and now R2 has to drop it. R2 will respond with a TTL exceeded message. H1 will now send another IP packet with a TTL of 3: PC: networklessons
R1 will decrease the TTL from three to two, R2 decrease it from two to one and R3 will have to drop it. R3 sends the TTL exceeded message to R1. The last IP packet that H1 will send will have a TTL of four: PC: networklessons
Each router will decrease the TTL by one, our server on the other end will receive an IP packet with a TTL of one and replies with an ICMP reply to H1. We now know that the destination is reachable and we have learned all routers in our path.
Each IP packet that we send is called a probe. Traceroute can be used with ICMP, UDP and TCP, depending on your operating system.
In Windows the command name is - tracert

To use tracert, type the tracert command followed by the host name of the computer to which you want to trace the route. Image
Time Outs - The most likely problem that you'll encounter when you use tracert is a timeout during one of the hops. Timeouts are indicated by asterisks where you'd expect to see a time.
Possible Reason - Sometimes, timeouts are caused by temporary problems, so you should try the tracert again to see if the problem persists. If you keep getting timeouts at the same router, the router could be having a genuine problem.
The traceroute cmd on Linux works similar to Windows. One important difference is that it doesn’t use ICMP but UDP. It also allows u to specify the no of IP pkts (probes) you want to send.

For e.g.

# traceroute -N 1 -q 1 192.168.3.1

Where -q sets d no. of probe pkts per hop.
Traceroute, by default, measures 30 hops of 60-byte packets.
You can tell here where hop one actually landed, and then there are three numerical values. These are known as the Round-Trip Time (RTT), which refers to the amount of time that a given packet takes to reach its destination and route back an ICMP message to the source. Image
Every packet routes an ICMP error message back to the source when it reaches a device on the network. This action allows traceroute to determine the RTT of that packet and does not necessarily indicate an error.
Sometimes We see only stars (*).

What does that mean?

What do these stars (asterisks) mean?
Were the packets dropped?
Are they timed out?
The same time ping works fine. What could be the reason!
Let me explain.

There r two possibilities -
1st, ICMP/UDP may not be configured. If d traceroute cmd completes successfully & u see these stars, most likely d device dat was hit wasnt configured to reply to ICMP/UDP traffic. This result doesnt mean that d traffic wasn't passed.
The second possibility is that the packets were dropped due to an issue on the network. These results are usually packet timeouts, or the traffic has been blocked by a firewall.
In the traceroute cmd output few additional annotation can be printed:

!H, !N, !P (host, nw or protocol unreachable)
!S (source route failed)
!F (fragmentation needed)
!X (communication administratively prohibited)
!V (host precedence violation)
!C (precedence cutoff in effect)

β€’ β€’ β€’

Missing some Tweet in this thread? You can try to force a refresh
γ€€

Keep Current with Rakesh Jain

Rakesh Jain Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @devops_tech

29 Oct
Everything you need to know about Virtualization, VMs , Containers, Pods, Clusters ..

A Mega Thread πŸ‘‡ PC: production-cci-com.imgi...
What is Virtualization?

Virtualization is the act of dividing shared computational resources: CPU, RAM, Disk, and Networking into isolated resources that are unaware of the original shared scope. PC: cloud4y
What is a virtual machine?

A VM is a virtual env that functions as a virtual computer system with its own CPU, memory, nw interface, & storage, created on a physical hw system (located off- or on-prem).

It uses sw instead of a physical computer to run programs & deploy apps. PC: nakivo
Read 26 tweets
25 Oct
Cyber Security Basics!

#infosec

A Mega Thread πŸ‘‡ PC: cyberoregon
What is Cyber Security?

Cybersecurity is a way of protecting the network, computers, and other electronic gadgets from cybercriminals. The Malicious attackers might delete, modify or leak confidential information posing a huge threat to a business or an individual. PC: abacustechnologies
What is Cyber Crime?

Here are some examples of Cyber Crime:

1. Identity Theft

2. Online Predators

3. BEC ("Business Email Compromise")

4. Ransomware

4. Stealing of sensitive intellectual property
Read 33 tweets
22 Oct
What is Kubernetes and How it works!

A Short Thread πŸ‘‡πŸ‘‡ Image
Use case ->

You have created an application and want to share it with the world. Image
Docker comes into the picture to package the application. Image
Read 10 tweets
18 Oct
Securing Linux Servers!

Everything about Iptables - The Linux Firewall.

#infosec

A Mega Thread πŸ‘‡
Iptables is a command-line firewall utility for Linux. It monitors traffic from & to ur server using tables.
These tables contain sets of rules, called chains, that will filter incoming & outgoing data packets. PC: linuxkamarada
When someone tries to establish connection to and from your system iptables immediately looks for a rule in its list to match it and If it doesn’t find a matching one, it resorts to the default action (either DROP or Accept).
Read 45 tweets
13 Oct
Copying files and directories remotely.

Keeping Linux files and directories in sync.

Everything about "rsync"

A Thread πŸ‘‡
What Is Rsync?

Rsync, or Remote Sync, is a fast, versatile and free command-line tool that lets you transfer and sync files and directories to local and remote destinations in an efficient and secure way. .
Why use Rsync?

When copying or moving large no. of files using tools like cp and mv may leave ur data in inconsistent state with part of it still in the original location and part of it in the target destination in case of any interruptions.
Read 29 tweets
9 Oct
These days we are hearing a lot about #web3.

What's that?

A short thread πŸ‘‡
What was web1 or web?
The very first stage of development on the World Wide Web where only simple static websites used to exist.

Those were the times when Personal web pages (mostly static pages) used to be hosted on ISP-run web servers, or on free web hosting services.
What is web2?

Today's internet is all about web2. As per @Wikipedia Web 2.0 refers to websites that emphasize user-generated content, ease of use, participatory culture and interoperability for end users where websites and apps allow anyone to create content and share.
Read 5 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(