NETWORK UTILITIES ( PING, TRACEROUTE, TRACERT )

 NETWORK UTILITIES

(PING, TRACEROUTE, TRACERT)

Table of Contents:-

 

1. Introduction.

2. Network Utilities. 

2.1. Ping. 

2.2. Traceroute. 

2.3. Tracert.    

 3. Interview  questions for Network Engineer L1 asked from Network Utilities.


Introduction:-


Network utilities are software tools that help network administrators and users manage, monitor, and troubleshoot their computer networks. These utilities provide various functions to help optimize network performance, diagnose connectivity issues, and ensure the security of the network.

 Network utilities- Ping, Traceroute, Tracert are used to troubleshoot Network Infra, validate the connectivity and trace the path of the traffic or the devices through which the traffic is passing. 


Following are the Network Utilities:-


1. PING (Packet Internet Gopher):-


Ping is such an important utility of a network, the purpose of ping is to check the connectivity between the devices or source and destination you can say. It checks the reachability to the network layer that is IP. 


- It also calculates RTT (Round Trip Time) value to reach the destination. RTT is the time taken by a packet to travel from the source to the destination and back again. It is a measure of the latency or delay in the network. Hence, ping is also used to calculate the latency in the network. 

When you run a ping command, it sends ICMP (Internet Control Message Protocol) packets to a specific destination and measures the time it takes for the packets to reach the destination and return to the source. The RTT is typically displayed in milliseconds (ms) and gives an indication of the responsiveness and speed of the network connection.

A lower RTT value indicates a faster and more responsive network, while a higher RTT value suggests slower communication and potential network issues.
- Ping utility is a application layer protocol and uses ICMP protocol at the Network Layer. 

- When the source try to ping a destination, it sends ICMP echo request to the destination IP address and the destination responds with a ICMP echo reply. 

- Echo request uses Type-8 and Code-0 whereas Echo reply uses Type-0 and Code-0. 


2. Traceroute:-


- Traceroute is another important utility which is used to Trace the path to reach the destination IP add. and find the RTT to reach the destination IP add.  

- Traceroute is also application layer utility and uses UDP protocol and has reserved port 33434 to 33523. It can trace path upto 30 hops. 

- Traceroute utility is available Unix, Linux systems. 

* Now the question arises that how does the traceroute know the IP add. of the devices it passes through ? 

To answer this lets understand the Flow or working of Traceroute. 

* Working/ Flow of Traceroute:-










1. R1 sends 3 UDP packets with TTL value 1. 

2. R2 receives the UDP packet, does a route lookup and try to forward the traffic towards R3 by reducing the TTL value by 1, but as it reduces the TTL value it becomes zero and if the TTL is zero the packet can't move forward to another device. Hence, R2 generates an ICMP error message- "TTL expired in transit" or "TTL expired" to inform originator R1 with Type- 11 and Code- 0 for each UDP packet. 

3. R1 receives the ICMP error message and comes to know about the 1st hop IP add. 

4. Now R1 sends 3 UDP packets with the TTL value set to 2 this time. 

5. As the Packets reach R2, R2 reduces the TTL value by 1( TTL becomes 1)  and forwards the packets to R3. After receiving R3 tries to forward the packets by reducing the TTL value by 1 but the value becomes zero and packets couldn't be forwarded. So, this time R3 generates the ICMP error message "TTL exceeded" or "TTL expired in transit" with Type- 11 and Code- 0 . This is how R1 comes to know about the IP add. of R3.

6. Now, R1 sends 3 UDP packets with TTL value 3. The packet reaches R4, does a route lookup and find the destination IP add. in the routing table but the UFP port is not open. Hence, generates ICMP error message to inform originator (R1) with Type- 3 (Destination Unreachable) and Code- 3 (Port Unreachable) for each packet. 

7. R1 comes to know about the 3rd Hop add. (R4) but ICMP error message with destination unreachable and port unreachable, R1 understands it has reached the destination and further no need to send any UDP packet with higher TTL value. 


3. Tracert:-



Tracert is basically used primarily in Windows operating systems to trace the path that packets take from a source computer to a destination host across a network. 

It uses the ICMP protocol instead of UDP. 

Working/ Flow of Tracert:-











1. PC1 sends 3 ICMP echo request packets with TTL value of 1. 

2. R1 received packets with TTL value 1 but cannot send it further as TTL value becomes zero. So, it generates ICMP error message Type=11, code=0. 

3. PC1 comes to know about the 1st Host address 10.1.1.2 (R1). 

.............................................................

Skipping to the final step-

4. PC1 sends 3 ICMP request packets with TTL value 4.

5. R4 received the ICMP echo packet with TTL value 1 and destination IP address is present in the routing table. So, it generates ICMP reply message Type 0 ( Echo reply) code 0 to originator. 

6. PC1 receives the ICMP reply message and comes to know about the 4th Hop address 10.1.34.4 (R4). PC1 understands that it has reached the destination and no need to send further ICMP echo request with Higher TTL value. 


l Interview  questions for Network Engineer L1 asked from Network Utilities:-

 

## DISCLAIMER:- The questions asked in the interview are all scenario based and indirect, So you should try to understand the concept instead of cramming. You will be fortunate if you receive a direct question from the interviewer.




1. What is the difference between Tracert and Traceroute?
2. What is TTL value?
3. Which protocol does Traceroute uses?
4. Which protocol does Tracert uses?
5. What is the purpose of Traceroute?
6. Describe the working of Traceroute?




Comments

Popular posts from this blog

OSI and TCP/IP Model

DNS (DOMAIN NAME SYSTEM)

ARP (Address Resolution Protocol)