Tracing to the server. Route tracing: why is it needed? In the command line we find out the IP address for tracing

While surfing the Internet, problems may arise with connecting to some site, node or server. Such problems can have a different nature and cause, but in order to understand at what stage the problems arise, it is recommended to check the node’s ping or perform a full route trace, using this method to check the overall availability of the server at the current time. All these actions can be carried out using the command line.

Calling the command line in the Windows operating system

In order to determine as accurately as possible what the problem is in accessing the site, you should carry out steps to diagnose communication with the server using the command line. Call the command line in Windows system can be done in several ways:

  1. Launch the “Start” menu, then select “All programs/applications”, in which click on the “Utilities” sub-item and select the “Command Prompt” application.
  2. Launch the “Start” menu, select “Run”, in the dialog box that opens, type “cmd” and press Enter, thereby launching the command line window.

Network command to check server ping

In order to check the ping of a node on the Internet, you must use command line a specialized command “ping”, separated by a space after which you should enter the web address of the site of interest or its ip and press the Enter key. After this, the system will test exchange 32-byte packets with the designated node on the network, and display the exchange status for each packet and the transmission time in the results. Based on the data obtained, we can draw a conclusion regarding the availability of the server and the quality of communication with it. In systems Windows family 4 packets are exchanged.

Telnet network command

Special Telnet team allows the user to determine the possibility of establishing a connection with any remote server computer or site using a specified network port. For this command to work, you must Windows settings enable the appropriate component.
In order to execute this command, you must enter Telnet into the command line followed by the address separated by spaces server computer and the desired port number, and then press the Enter key.
If a blank screen and a blinking cursor appears, the connection to the required node was successful.
If the connection cannot be established, a corresponding message will appear in the window.

How to do a trace - Tracert network command

The specialized Tracert network command allows the user to find out the specifics of the request path, using this method to identify a specific route point where information transmission problems arise. In addition, using Tracert you can determine the data transfer rate at each stage of the request.
In order to initiate the execution of the command, you must enter “Tracert” in the command line, followed by a space, the address of the server computer of interest.
As a result, the window will display a table in which each line will be one route point: your gateway will appear as the first line, then the intermediate stages of the request, and at the very end - the required server.

Key Features of the Tracert Command

  1. This command can determine the exact path by sending ICMP messages and display information about each router traversed and the time of communication with them, but packet filtering by security gateways may prevent such information from being transmitted.
  2. If tracing a route using tracert fails, based on the results, you can figure out exactly which intermediate router is not forwarding information or is doing it slowly.
  3. In order to obtain detailed information regarding forwarding and packet loss on each of the routers through which the request is sent, you can use the special “pathping” command.
  4. To prevent tracert from displaying the names of all routers, you can use the “-d” parameter, which allows you to significantly simplify the view of the request path.

On the Internet, in particular on forums, if there is a problem connecting to any node (), it is recommended to check the ping or perform a route trace and thus check the availability of the server.

But what is ping and what is trace? Ping is a tool (utility) for checking the integrity of connections in TCP/IP-based networks. Tracing (traceroute or tracert command) is a program for determining data routes on TCP/IP networks.

However, it is not always possible to find information about exactly how this check is performed: how to ping or how to make a route.

Ping check

To check ping, use the same command ping, which must be entered on the command line. You can launch the command line in the following ways:

Windows:

1) Start -> All programs -> Standard -> Command line

2) Start -> Execute -> cmd

There are many terminals in this OS, so you can use any of those installed on your PC for these purposes. Usually, a standard terminal can be launched with a keyboard shortcut CTRL+ALT+T.

So, to ping a specific server, you need to run the command:

Ping

For example, to ping an address 11.222.33.44 you need to run the command:

Ping 11.222.33.44

Below is an example of the results of ping one of the IP addresses.

As can be seen from the results, 4 packets of 32 bytes were sent and received. The exchange time for one packet was 47 milliseconds.

It's worth noting that Windows only sends 4 packets by default. In Linux, packet exchange continues until the user independently stops the process with a keyboard shortcut CTRL+C. To run ping in a similar way on Windows, you must use the parameter -t. For example:

Ping -t 11.222.33.44

Stopping packet exchange is performed using the same key combination - CTRL+C.

Setting the number of packets to be sent

To set the maximum number of packets to be sent, you must use the following command:

Windows:

Ping -n<число_пакетов> < IP или домен >

For example:

Ping -n 5 11.22.33.44

Ping -c<число_пакетов> < IP или домен >

For example:

Ping -c 5 11.22.33.44

Changing the size of sent packets

To ping using a specific packet size (in bytes), you need to use the following command:

Windows:

Ping -l<размер_пакетов> < IP или домен >

For example:

Ping -l 64 11.22.33.44

Ping -s< размер_пакетов> < IP или домен >

For example:

Ping -s 64 11.22.33.44

In this case, packets of 64 bytes in size were sent.

A route trace can show the speed of packets between routers that connect the PC from which the requests are coming and the destination server.

The following command is used to perform tracing:

Windows:

Tracert

For example:

Tracert wikipedia.org

Traceroute

For example:

Traceroute wikipedia.org

It is worth noting that by default, tracing also performs a DNS query to resolve the IP address in Domain name for each passing router. This option can be disabled, thereby reducing the time it takes to obtain trace results.

To activate this option you must use the following type of command:

Windows:

Tracert -d

Traceroute -n

Imagine the situation: you are sitting on the Internet, not bothering anyone, and then your favorite site stops loading. The Internet has fallen, you think. But it turns out that other sites load normally. How to determine what happened? will help you route tracing.

Probably everyone knows that any website is located on a server - special computer. When we enter the website address in address bar browser and click on the “Go” button, we thereby send request to the server. On the way to the site, our request passes through several intermediate communication nodes, and if everything is in order with them, then the site is displayed in the browser.

If the site does not load, it means that our request did not reach due to problems on one of the communication nodes (intermediate computers or routers). The problem may be with you (for example, a problem with the cable; although this will not load other sites), with your Internet provider or on the side of the site host. Route tracing will help you determine exactly where in the communication channel your request is lost.

Route tracing is done using Traceroute/Tracert utility. This program is included in the delivery package of almost all modern network OS (operating systems that support work in computer networks). In OS Microsoft Windows this program is called tracert, and on Linux and Mac OS X - traceroute.

How this program works similar to the principle of operation of the program. Traceroute sends data to the server and at the same time records all intermediate routers through which this data passes on the way to the server (target node). If a problem occurs when delivering data to one of the nodes, the program determines the section of the network where the problem occurred.

How is route tracing done in Windows? The tracert program, like the ping program, is launched from the command line. Just in case, we remind you how to enter the command line in Windows. There are three main ways:

  1. Click on the Start button, select Run, in the Open field write cmd and click on the OK button or the Enter key.
  2. Press Win+R (Win is the button with the Windows logo on it), the same window opens as in the previous case, so we proceed in the same way.
  3. Click on the Start button, select All programs (or Programs for earlier versions of the OS), in it - the Standard item, in standard programs click on the Command Prompt item.

In the window that opens, type the command tracert site_name(for example, tracert yandex.ru) and press the Enter key. Instead of the site address, you can enter its IP address (if you know it, of course). By entering the address, we have thereby established a route to the final node. The command line window displays the tracing results in real time: the name and IP address of intermediate nodes, response time in milliseconds.

If you are not interested in intermediate host names, then route tracing should be done with the -d option, which hides router names, for example: tracert -d yandex.ru.

How to use this data to solve a problem? The response time shows how busy the channel is. But even if the response time is long, the site will load - albeit with difficulty. But if instead of the response time you see the inscription "Timed out request", this means that there is a loss of data at this communication node, which means that the problem lies there.

So, Route tracing helps identify the problem node. If the data flows normally and gets stuck at the destination itself, then the problem really is with the site. If the route trace stops midway, then the problem is in one of the intermediate routers. If the passage of packets stops within your provider’s network, then the problem needs to be solved “at the local level”.

If the route trace breaks on one of the intermediate routers, you can try access the site from another computer or even mobile phone - the route will change and the site may be accessible. To be sure, you can try tracing from another computer. And if there is no other computer at hand, special ones will come to the rescue online services. Thus, on the website traceroute.org you can trace the route to the site from different countries. You select a country and provider from the list, enter the website address and check the route.

To diagnose and find network problems system administrators Such a convenient tool as route tracing is often used. It allows you to determine all the nodes (routers, servers, computers) through which traffic passes on the way to its destination. If the connection with any remote host breaks down or disappears altogether, then tracing the network route will allow you to quickly find the area where problems arose as in local network, and on the global Internet.
To perform this procedure, every modern operating system has a corresponding tool.

On Windows OS this is the tracert utility. In XP it was available by default, but in all subsequent versions up to Windows 10 it must be additionally enabled through “Programs and Features”.

In operating systems of the *NIX family - Linux, FreeBSD, Android - traceroute program
The meaning of the route tracing algorithm is that three special requests are sent to each network node through which traffic goes to the desired host, then for each of them on the screen, next to its address, the response time is displayed. Based on these results, you can easily track in which part of the network the response delays begin to appear or it disappears altogether.

Tracing in Windows 10

To conduct network tracing in Windows 10, you need to press the Win+R key combination and type “cmd” in the “Run” window. This will open the Windows command line, in which you need to enter the command:

tracert

For example, let's take the site google.ru

Tracing in Linux

IN operating systems Linux families - Ubuntu, Fedora, CentOS, etc. - to start route tracing in you need to open the system console and enter the command:

traceroute<имя_сервера>

Attention! Use network route tracing to assess last mile quality ( subscriber line ADSL, FTTB or PON) is impossible, since this system program cannot and does not know how to assess the quality of the line in any way.

Today I will tell you how to trace to a site, i.e. run command in command line Windows line. Why might you need this?
Tracing is typically used by technicians to identify network problems. For example, suddenly, for no reason at all, a particular site in your browser stops opening or opens very slowly. You address this problem to the forum of your Internet provider. There you will almost certainly be asked right away make a trace to this site and post the result.

Tracing is performed using the command. This command allows you to find out the path of the request to the server on which the site is located, and identify at which point of the route there are problems with transmission.

How to do this tracing?

On your computer, go to “Start” - “Run” (or you can simultaneously press the keys on your keyboard Win+R). Recruiting a team cmd and click “OK”: In the black window that opens, write the command and, separated by a space, the name of the site we are interested in (instead of the site name, you can use its IP address):
After this, press the key Enter on keyboard.

With a command, we initiate sending data packets to a specific recipient (site). Sent packets pass through all intermediate nodes between your computer and the recipient (usually routers from different providers, depending on the location of the site). Thus, using tracing, the route to the site or IP you need is determined, and the response time of each intermediate node in milliseconds. The shorter the response time, the faster the packets are transmitted on this part of the route (that is, the data passes without interference).

If during the tracing process you see asterisks in any line, this means that the waiting interval for the request has been exceeded, and this is equivalent to the loss of packets on this section of the route. Those. There is a problem at this point in the chain. If the packets do not go beyond your provider's network, the problem is there.

As you can see, in my case the tracing did not go far - the stop occurred somewhere on the provider’s equipment:

We will probably need to provide the received data to the provider's forum. You can simply take a screenshot of this window, but it is better to copy this data as text. To do this, right-click right in this window - then select “Select All”:
Then press the key Enter on keyboard. Now all the text is on the clipboard - we can paste it into any text editor or immediately in response to the forum (by clicking the right mouse button – “Paste”, or by pressing Ctrl+V).