What are Traceroute, Ping, Telnet and Nslookup commands?
- Category : Tips and Tricks
- Posted on : Nov 01, 2021
- Views : 1,126
- By : HostSEO
Traceroute
Traceroute is one of the most common utilities built into most operating systems. It is useful for diagnosing network connections. It shows the path of a packet going from your host/computer through each of the individual routes that handle the packet and time required for it to go from one router to another up to the final host/destination.
How it works
When you start the traceroute command, it sends a packet (using the Internet Control Message Protocol or ICMP) with a time limit value (known as the 'time to live' - TTL). The first packet has a TTL of 1, the second packet has a TTL of 2, etc. Increasing TTL in such a manner, it resends the packet so that you can reach the first, the second and other routers on the way to the destination. When a router receives the packet, it sends a Time Exceeded message, which provides an opportunity to determine the time required for the hop to the router. Each time a packet is passed to a new router, the TTL is decreased by 1. When it reaches 0, the packet is discarded, and the router returns an error message.
Traceroute determines that the packet has reached the destination by including a port number that is outside the normal range. When itâ$™s reached, the Port Unreachable message is sent in return, which defines the time length of the final hop. Traceroute provides you with the information hop by hop. Each hop is determined three times. When a website is unreachable or slow, traceroute allows you to see where the connection fails or has delays.
How to use traceroute
- For Windows
1. Select the Start button > click on the Run option.
tracert *******
- For macOS
1. From your hard drive, open the Applications folder and click to open the Utilities folder.
traceroute -I -e *******
You need to use the domain name, the server's name or its IP instead of *******.
- For iPhone
Once it is uploaded, navigate to the Trace Route menu :
- For Android
Traceroute can be checked on Android in the Network Utilities app.
After installing, click on the three-horizontal-lines menu icon in the left upper corner to see the list of utilities the application provides:
Here are the most common examples of a traceroute output, which can help to investigate the issue:
- Example 1
As we can see, traceroute to nctest.info (162.213.255.51) means that we are trying to reach the nctest.info domain which resolves to 162.213.255.51 IP address.
- Example 2
When you canâ$™t access your website, cPanel or email account and results look like this, it means that your computer canâ$™t reach the server. It usually happens because your IP is blocked on the server. You need to contact our hosting support via live chat or the ticket system in order to check the IP.
- Example 3
When your website is slow and you get *** Request timed out and high latency from the beginning, it means that the connection to the server is unstable.
When you see a trace like this, it means overall poor quality of connection, and you can try connecting to cPanel/website using another ISP/different connection.
Understanding errors
Unable to resolve target system name domain.com | Domain is not registered or does not exist. |
Unknown host domain.com | |
Timeout Tracing route to domain.com [64.13.192.208] over a maximum of 30 hops: Â1    <1 ms    <1 ms    <1 ms  72.10.62.1 2    <1 ms    <1 ms    <1 ms  10.101.248.1 3        *        *        *  Request Time Out 4        *        *        *  Request Time Out 5        *        *        *  Request Time Out 6        *        *        *  Request Time Out | A network/firewall issue that is preventing you from reaching your server, or your local ISP may drop ICMP traffic. |
A or !X | Administratively prohibited (example, access-list). The network administrator has blocked traceroute at this router. |
Q | Source quench (destination too busy). |
I | User interrupted test. |
U | Port unreachable. |
H | Host unreachable. The router has no route to the target system. |
N | Network unreachable. |
P | Protocol Unreachable. |
T | Timeout. |
? | Unknown packet type. |
!S | Source route failed. You tried to use source routing, but the router is configured to block source-routed packets. |
!F | Fragmentation needed. This indicates that the router is misconfigured. |
Ping
The ping command is used to determine the ability of a userâ$™s computer to reach a destination computer.
The main purpose of using this command is to verify if the computer can connect over the network to another computer or network device. It also helps to find out the IP address using the host name:
- For Windows
1. Select the Start button > click on the Run option.
ping domain.tld ping IP_address
- For macOS
1. From your hard drive, open the Applications folder and click to open the Utilities folder.
ping domain.tld ping IP_address
- For iPhone
In order to run the Ping command, go to the menu list in the iNetTools app and choose the Ping option. Enter the domain name or the server`s IP address and click the Start button to get the output:
- For Android
To get the result of the Ping command on your Android phone, access the Network Utilities application and navigate to the Ping menu option. Paste your details, i.e. domain name, server name, or IP address and press the Ping button:
Telnet
The telnet command is used for connection and communication with a remote or local host via the Telnet TCP/IP protocol.
You can enter a domain or IP address and try connecting to it via the chosen port. In case the port is not specified, telnet utility tries to connect via the default port 23. Â
The command is really useful in cases when you need to check whether the needed port is open on your computer and on the side of the remote host.
- For Windows
Telnet is disabled on Windows by default. To enable it, perform these steps:
1. Press the Start button > Control Panel:
2. Go to the Programs section:
3. Select Programs and Features > Turn Windows Features on or off:
4. Scroll down the list available in the Windows Features window > check Telnet Client option > press OK > wait a few moments for the changes to be applied:
5. Telnet is enabled now, so we can run it in the same way as other commands:
- Select the Start button > click on the Run option.
- In the command line, type in cmd and press Enter.
- After that, type in the following and press Enter:
telnet [domain name or IP] [port number]
for example:
telnet namecheap.com 80
If you see the blank output after that, you have connected successfully. To quit you can press CTRL + C or any key:
As a result of successful telnet, we can conclude, that the entered domain or IP exists, and the chosen port is open on your computer and on the side of the target host.
If connection has not been established, the following error will appear:
Possible reasons for it are:
- domain or IP does not exist/not available/entered with a typo
- the chosen port is closed by a security software or via network configurations on your computer or on the side of the host you connect to
- connection/networking issue has occurred
- For macOS
1. Select Go menu > Applications:
2. Find and press Utilities:
3. Go to Terminal:
4. Now you can run the command:
telnet [domain name or IP] [port number]
for example:
telnet namecheap.com 80
NOTE: telnet command was removed in High Sierra version. However, macOS provided built in nc (netcat) option that can be used instead of telnet:
nc [domain name or IP] [port number]
Successful connection will look this way:
To close the session, type quit and press Enter.
- Connection refused. telnet: Unable to connect to remote host
- nodename nor servname provided, or not known
The error is displayed, when you entered
- an unregistered domain
- a domain with a typo
- local domain not available in your local network
- a domain, which does not have proper nameservers or A-record set.
Nslookup
The Nslookup command is a DNS lookup utility. You can use the following commands to look up the information for a selected hostname:
- nslookup hostname - provides an A record for the hostname:
- nslookup -type=RecordType hostname - gives the specified record for the set hostname (i.e., if you enter nslookup -type=txt hostname it will provide you with the txt record, etc.):
- nslookup hostname nameserver (nameserver address or nameserver IP address) - provides you with a DNS record stored in the specified DNS server:
That's it!
Categories
- cPanel Question 47
- cPanel Software Management 29
- cPanel Tutorials 13
- Development 29
- Domain 13
- General 19
- Linux Helpline (Easy Guide) 156
- Marketing 47
- MySQL Question 13
- News 2
- PHP Configuration 14
- SEO 4
- SEO 42
- Server Administration 84
- SSL Installation 54
- Tips and Tricks 24
- VPS 3
- Web Hosting 44
- Website Security 22
- WHM questions 13
- WordPress 148
Subscribe Now
10,000 successful online businessmen like to have our content directly delivered to their inbox. Subscribe to our newsletter!Archive Calendar
Sat | Sun | Mon | Tue | Wed | Thu | Fri |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
Recent Articles
-
Posted on : Sep 17
-
Posted on : Sep 10
-
Posted on : Aug 04
-
Posted on : Apr 01
Tags
- ts
- myisam
- vpn
- sql
- process
- kill
- tweak
- server load
- attack
- ddos mitigation
- Knowledge
- layer 7
- ddos
- webmail
- DMARC
- Development
- nginx
- seo vpn
- Hosting Security
- wireguard
- innodb
- exim
- smtp relay
- smtp
- VPS Hosting
- cpulimit
- Plesk
- Comparison
- cpu
- encryption
- WHM
- xampp
- sysstat
- optimize
- cheap vpn
- php-fpm
- mariadb
- apache
- Small Business
- Error
- Networking
- VPS
- SSD Hosting
- Link Building
- centos
- DNS
- optimization
- ubuntu