Using the ping, traceroute, and telnet commandsIf you are unable to access your website or a specific service running on our servers, you can use the ping, traceroute, and telnet commands to investigate why that happens. What are the ping, traceroute, and telnet commands used for?The ping command allows you to check if a connection can be established between your device and a specific hostname or IP address. Another usage of the command is to determine to what IP address a specific hostname resolves on your device. The traceroute (tracert on Windows) command, as the name suggests, allows you to trace the route a network packet takes from your device to a specific hostname or IP address. Each hop from the route of the packet is presented on a new row, and three checks will be made for it. You can use this information to find which servers between your device and the target hostname/IP address are responding slowly. The result of the command can also help you determine if and where a connection may be blocked, so you can reach out to the correct service provider for assistance. With the telnet command, you will essentially use the telnet utility, which allows you to establish a connection from your device to a specific web service that works at a hostname or IP address on a specific port. For example, you can use this command to connect to an FTP or SMTP server. You can cancel a telnet connection by pressing Ctrl+] on your keyboard, and to exit the telnet utility, you will need to type quit and hit ↵ Enter. Where to execute the ping, traceroute, and telnet commands?You can execute the commands in the Command Prompt (for Windows) or Terminal (for macOS and Linux) applications. To open the Windows Command Prompt, press ⊞ Win+R on your keyboard to open the Run application feature and type cmd in the Run application window. You can copy information (e.g. command output) from the Command Prompt by selecting it and then pressing the ↵ Enter key. More details and screenshots on the process are available in our Copying text (traceroute or ping results for example) from a DOS prompt article. You can open the Terminal application on macOS by going to "Finder" > "Applications" > "Utilities" > "Terminal". If you want to open Terminal on Linux, you should press the Ctrl+Alt+T keys on your keyboard. Alternatively, you can press Alt+F2 and type terminal - you should see a list of available terminal applications. How to use the ping command?Note: On Linux, you may need to install additional packages to use the ping command, so please refer to your distribution's documentation if the command is not available by default. To use the ping command, you need to enter it in a Command Prompt or Terminal window as explained above. If you want to test your connection to a hostname (e.g. example.com) or an IP address (e.g. 8.8.8.8), you should run the following ping commands: You can also use the count (-c) option to specify the number of ping retries, or in other words, how many ping requests should be sent. This option may require additional privileges, so you may have open the Command Prompt or Terminal window as an administrator or a user with escalated privileges. In the below example, you can see the exact ping command for making 10 retries (connections) to example.com: How to use the traceroute command?Note: If the traceroute command is not available by default on a Linux device, additional packages may have to be installed. Please check your distribution's documentation for more details on that matter. To check the route of an internet packet from your device to a particular hostname (e.g. example.com) or an IP address (e.g. 8.8.8.8), you can run the following commands in a Command Prompt window for Windows: In some hops of a traceroute you may see "Request timed out." results. This is normal and should be of no concern as the device that handles your packet in that hop may not be accessible directly from your device. If the trace ends at such a hop, it could be indicative of a problem, and you should contact your internet or hosting service provider for assistance. The hosting Control Panel > Traceroute section allows you to run the traceroute command from the server of your hosting account to a hostname or an IP address of your choice. Your IP address will be prefilled by default, so you can easily test the connection from the server to your IP address. How to use the telnet command?Note: Telnet may not be available by default on all operating systems. For more recent versions of Windows, please refer to the official documentation on enabling telnet. Telnet is also not available on newer versions of macOS and some Linux distributions. It can be enabled by installing additional packages, so we would suggest that you search for the recommended telnet client/application for your operating system. Alternatively, you can use the netcat command for Linux, which is also available for macOS but shortened to just nc. To run the telnet and netcat commands, open the Windows Command Prompt or macOS/Linux Terminal application. In the commands, you will need to specify the hostname or IP address and port of the service that you wish to test from your device. The services running on our servers work on the default ports. Here is a brief list of the default ports that you are most likely to test for connection problems with the telnet or netcat command:
To test if you can connect to the mail server from your device, you can use the following telnet command: Should you prefer to use the netcat command to test your connection to the mail server, you should run the following command for Linux:
|