Tracing via the command line. Lost connection to the server. Tracing and ping. What about Linux?

To diagnose and find network problems, system administrators often use a handy tool called route tracing. 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 both in the local network and in 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 of the Linux family - Ubuntu, Fedora, CentOS, etc. - to start route tracing in you need to open the system console and enter the command:

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

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

    Utility for tracing a route to a given node TRACERT.EXE is one of the most commonly used network diagnostic tools. Its main purpose is to obtain a chain of nodes through which an IP packet passes, addressed to an end node whose name or IP address is specified by a command line parameter.

Command line format:

tracert [-d] [-h maxNumber] [-j Node list] [-w timeout] [-R] [-S Source address] [-4] [-6] finalName

Command line options:

-d- do not use resolution in host names.

-h maxNumber- the maximum number of hops when searching for a node.

-j listNodes- free choice of route from a list of nodes (IPv4 only).

-w timeout- timeout of each response in milliseconds.

-R- path tracing (IPv6 only).

-S source address- use the specified source address (IPv6 only).

-4 - forced use of IPv4.

-6 - forced use of IPv6.

The tracing is based on a method for analyzing responses when sequentially sending ICMP packets to a specified address with the TTL field increasing by 1. (“Time of Life” - Time To Live). In fact, this field has nothing to do with time, but is a counter of the number of possible transitions during the transmission of a routed packet. Each router, upon receiving a packet, subtracts one from this field stored in the packet header and checks the resulting TTL counter value. If the value becomes zero, the packet is discarded and an ICMP time-to-live message ("Time Exceeded" message, value 0x11 in the ICMP header) is sent to the sender.

If it were not for the inclusion of the TTL field in IP packets, then in the event of errors in the routes, a situation could arise where the packet would forever circulate in the network, forwarded by routers in a circle.

    When executing the tracert.exe command, it first sends an ICMP packet with the TTL field in the header equal to 1 and the first router in the chain (usually the main gateway from the network connection settings), subtracting one from the TTL, gets its zero value and reports that the lifetime has been exceeded. Thus, the TRACERT.EXE utility obtains the IP address of the first router involved in delivering packets to the end node. This sequence is repeated three times, so the result line generated by tracert.exe displays three response times after the transition number:
1     1 ms     1 - transition number (1 - first router)
1 ms 192.168.1.1 - its address (or name)

    Then the procedure is repeated, but the TTL is set to 2 - the first router will reduce it to 1 and send it to the next one in the chain, which, after subtracting 1, will reset the TTL and report that the lifetime has been exceeded. The TRACERT.EXE utility will obtain the second IP address of the node involved in delivering the packet to the recipient and its response time. The tracing process will continue until the end node whose name or address is specified as a command line parameter is reached, e.g. tracert yandex.ru, or until a fault is detected that prevents the package from being delivered. By default, the TRACERT.EXE utility uses a maximum hop count of 30, which should be enough to reach any node on the planet. If necessary, a different counter value can be set using the parameter -h

Example of execution results tracert google.com

tracert google.com- route tracing to the google.com node

Result:


Trace the route to google.com with a maximum number of hops of 30:
1 1 ms 2 498 ms 444 ms 302 ms ppp83-237-220-1.pppoe.mtu-net.ru
3 * * * .
4 282 ms * * a197-crs-1-be1-53.msk.stream-internet.net
5 518 ms 344 ms 382 ms ss-crs-1-be5.msk.stream-internet.net
6 462 ms 440 ms 335 ms m9-cr01-po3.msk.stream-internet.net
7 323 ms 389 ms 339 ms bor-cr01-po4.spb.stream-internet.net
8 475 ms 302 ms 420 ms anc-cr01-po3.ff.stream-internet.net
9 334 ms 408 ms 348 ms 74.125.50.57
10 451 ms 368 ms 524 ms 209.85.255.178
11 329 ms 542 ms 451 ms 209.85.250.140
12 616 ms 480 ms 645 ms 209.85.248.81
13 656 ms 549 ms 422 ms 216.239.43.192
14 378 ms 560 ms 534 ms 216.239.43.113
15 511 ms 566 ms 546 ms 209.85.251.9
16 543 ms 682 ms 523 ms 72.14.232.213
17 468 ms 557 ms 486 ms 209.85.253.141
18 593 ms 589 ms 575 ms yx-in-f100.google.com

Tracing is complete.

    Trace results may contain lines where an asterisk is displayed instead of the node address (node ​​number 3 in the example). This is not necessarily a sign of a faulty router, and most often indicates that the settings of this node prohibit the sending of ICMP messages for security reasons and to reduce the load on the channel in the event of certain types of DDoS attacks. For example, similar settings are used in Microsoft networks. The corporation's servers do not respond to ping and do not allow tracing the route to them.

Examples of using TRACERT

tracert google.com- trace the route to the node google.com.

tracert 8.8.8.8- trace the route to a node with an IP address 8.8.8.8

tracert -d yandex.ru- trace the route to the node yandex.ru without resolving IP addresses into hostnames. Tracing in this mode is faster.

tracert -d -6 ipv6.google.com- perform tracing using the IPv6 protocol.

Example of trace results using IPv6 protocol:

trace to ipv6.google.com (2a00:1450:4013:c00::71), 30 hops max, 40 byte packets 1 2a02:348:82::1 (2a02:348:82::1) 8.087 ms 8.063 ms 8.086 ms 2 te0-22.cr1.nkf.as49685.net (2001:4cb8:40b:1::1d01) 2.143 ms 2.129 ms 2.103 ms 3 amsix-router.google.com (2001:7f8:1::a501: 5169:1) 1.379 ms 1.415 ms 1.422 ms 4 (2001:4860::1:0:87ab) 1.437 ms (2001:4860::1:0:87aa) 2.157 ms (2001:4860::1:0:87ab ) 1.408 ms 5 (2001:4860::8:0:87b0) 1.494 ms 1.469 ms (2001:4860::8:0:87b2) 8.350 ms 6 (2001:4860::8:0:b1b7) 5.364 ms 5.321 ms 4.748 ms 7 (2001:4860::2:0:8651) 4.653 ms 6.994 ms (2001:4860::2:0:8652) 13.926 ms 8 ee-in-x71.1e100.net (2a00:1450:4013 :c00::71) 4.732 ms 4.733 ms 4.783 ms

Traceroute is a network diagnostic tool. With its help, you can find out the route, including intermediate nodes, from your computer to the site or IP address being checked.
If there is a problem accessing the site, tracing will allow you to identify the cause.

How to trace

You need to open the command line; in the Windows operating system this can be done in several ways.
For Windows XP
- On the menu Start section Standard open “Command Prompt”, or in the menu Start click on the line Execute, where write cmd and press Enter

A universal way for Windows 7; Windows 8, and Windows 10
— Press the keyboard shortcut Win+R write in the window that opens cmd
A black window will open where you need to enter the command:
tracert your-domain.ru
and press Enter on keyboard
In order to copy the result, you need to right-click “ Mark» (« Select" or " Flag"), select the text and press Enter.

Executing the command tracert Data packets are sent to a specific recipient (site or ip). Sent packets pass through all intermediate nodes between your computer and the recipient (usually routers from different providers). Thus, using tracing, the route to the site or IP address 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 along this section of the route.
If the command returns asterisks * on some hosts, there is a problem with packet tracing to that host. For a more detailed analysis of the tracing route, you can use mtr.

Instructions

A program for tracing the routes of information packets is included in almost every network operating system. In Windows OS it is tracert, and in GNU/Linux and Mac OS it is traceroute. The operating principle of this program is as follows: The program sends packets of information to the address specified to it, setting deliberately impossible delivery conditions - a very short packet lifetime (TTL - Time To Live). When the first packet is sent, it is 1 second. Each server on the way from your computer to the desired address must reduce this value by at least one. Therefore, the packet’s lifetime will expire on the first node and it will not transmit it further, but will send a notification to the sender about the impossibility of delivery. In this way, the tracer will obtain information about the first intermediate node. It will then increase the packet lifetime by one and resend the packet. This request will live until the second node and the situation is . Thus, the tracing program will compile a list of all intermediate nodes, and if it does not receive notification from any one, then this will mean one of two things - either the packet was still delivered to the recipient, or this node does not execute. To find out, it will send a request with another defect - a obviously non-existent port number will be indicated. If this packet returns indicating an error, then the node is working normally and it is the recipient, and if not, then there is a break in the packet delivery chain on this node. In any case, the tracing procedure will be completed.

In Windows OS, the executable file of this program (tracert.exe) is stored in the WINDOWSsystem32 folder on the system drive of your computer. But to run the program there is no need to search for the file. This program is controlled from the command line only, so you must first launch a command line terminal. To do this, in the main menu (on the “Start” button), select “Run” to open the “Run a program” dialog box. You can also open it by pressing the WIN + R key combination. Then type “cmd” (without quotes) and press the “OK” button (or the Enter key). In the terminal that opens, type tracert and, separated by a space, the address of the node on the network to which you want to trace. This can be either an IP address or a domain name. The http protocol does not need to be specified. After the tracing is completed, the result can be copied - press CTRL + A to select everything and Enter to copy the selection to RAM. Then you can paste what you copied into any document in any text editor.

The trace operation writes to an operating system file specific SQL statements and their associated information (query plans and event waits) that are executed while the script is running. You can trace any arbitrary session in the Oracle database.

Instructions

Before that, you need to enable statistics collection, otherwise files with zero times will appear. To do this you need: alter system set timed_statistics=true If you need to run tracing in the current session, then the system parameter should be replaced with session.

Make sure that the maximum dump file size attribute is set to a sufficient value. To do this, run the corresponding SQL query: SELECT value FROM v$param p WHERE name=’max_dump_file_size’The $param value can be set both at the database level (alter system) and at the session level (alter session).

To start tracing, event 1046 must be set in the appropriate session. Run the sys.dbms_system.set_ev procedure, and then pass the resulting sid and serial values ​​as integer parameters: BEGIN sys.dbms_system.set_ev(sid, serial#, 10046, 8, ''); END

To turn off tracing, change the level value of event 10046 from 8 to 0.

The trace file appears in the Oracle database dump directory (Oracle/admin/databaseSID/udump). The name of this file contains the identifier of the OS process in which the operation was performed, and the extension is .trc. In order to process the information into a readable form, process the trace file in the tkprof:cd utility C:ORACLEadmindatabaseSIDudump
tkprof file.trc output=my_file.prf The processed file will contain a list of all commands that were executed during the session.

Helpful advice

The minimum level for executing command 10046 is 1, and the maximum is 12, at which the values ​​of all process-related variables are added, as well as information about expectations.

Websites on the network do not appear by themselves - they are created and maintained by computers called servers, and these servers are managed by an organization - a provider or hosting provider. And so that everything is clearly and accurately reproduced for everyone, the provider monitors its network equipment, servers, communication channels through which information and other various data are transmitted directly to users. In turn, the user can diagnose his Internet connection if he cannot obtain this information in order to determine whether the hosting or the provider through which the Internet access is provided is at fault. Tracing the route from a personal computer to the required site helps in such diagnostics.

Instructions

Perform a trace using the traceroute command in Windows-tracert. To trace a route, do the following: open the “Start” menu – “Run”. Type cmd.exe and select OK.

In the command line, type the command tracert server_name (the server name is indicated in the welcome email when ordering the service). Wait for the command to complete, then right-click in the Command Prompt window, select Select All, then (once selected) press Enter. Next, in order to see the trace, right-click, then click “Insert” in the message input field.

With the tracert command, you send data packets to the address you specify - this can be a server address, a computer name on the network, or an IP address. In this case, packets pass through special routers - network devices between the personal computer and the recipient. With this action, you determine the route to the final destination and, most importantly, calculate the response time (value in milliseconds) of each intermediate node.

In those sections where the response time is shortest, transmission is carried out as quickly as possible - this means that the channel is free and information is delivered without any interference. In the place where the response time reaches a maximum of some standardized value, we see the consequence “The waiting interval for the request has been exceeded,” which is equivalent to the loss of information packets.

In this way, it is possible to calculate at which specific connection point the problem exists. If the data does not reach the recipient itself, then the problem lies with him. If the connection stops in the middle, the problem is in one of the intermediate network devices. At the same time, from another PC or along a different route (if there is one), your site that has not opened may turn out to be quite accessible. If the information does not leave the boundaries of your provider's network, then the problem is with it.

Video on the topic

Tracing completes the design of the electronic equipment and defines the lines that connect the components that make up the designed device. It includes specific steps to execute a program and stop at commands, lines. Tracing tasks are labor-intensive due to the variety of technological methods for making connections.

Instructions

Use a special tracing program that probably already exists on your network operating system. If it's Windows, then the program is called tracert; On GNU/Linux and Mac OS operating systems, tracing can be done using traceroute. In this case, the packet information is sent to the address specified for it. Specifically set delivery parameters that are not feasible, for example, the packet lifetime is too short. For the first packet, it is better to set it to one second.

Make sure that each server located on the segment from your computer to the given address necessarily reduces this value by one. Thus, the packet's lifetime expires immediately at the first node of the route, which will then automatically send a notification that it is impossible to deliver the packet containing the data. Thanks to this circumstance, the tracing program will have access to information about the first intermediate node.

Increase the information packet life by one and try again. Now the second intermediate node will not be able to send it further and will be forced to send a non-delivery report. Repeat these steps, increasing the packet's life by one each time. Using these steps, the tracing program will compile a list of all nodes contained in the interval from the computer to the final address.

Check the correct functioning of all intermediate points. If the program does not receive notification from one of the points, it will send a request with the following defect: the port number does not exist. When the packet returns indicating an error, this will indicate normal operation of the node. If this does not happen, there is a break at the node. End the tracing program.

Video on the topic

converting a raster (pixel) image into a vector one (where the image is described using mathematical formulas).

Tracing can be carried out either automatically or manually. Some vector graphics editors have built-in automatic tracing functions, but the result is a file with a large number of control points that is difficult to use. However, if you have a raster file that needs to be printed at a large size (for example, stretching a regular photo for a poster on the wall of a building), then auto-tracing followed by upscaling will be the only solution. Manual tracing is tracing the contours of the desired image using the tools available in the program for creating Bezier curves.

Tracing in programming

Step-by-step execution of a program with changes in all parameters or stopping at each operation is also traced. It may be needed if you are debugging your own code. Sometimes the algorithm is correct, but for some reason it doesn’t work. It is the tracing that allows you to understand at what stage the error occurs. The tracing method also helps to understand someone else's code.

Ray tracing

Ray tracing, or path tracing, is a rendering technique (creating an image from a 3D model) in computer graphics that is related to geometric optics. It allows you to construct an image based on knowledge of the laws of how individual rays of light interact with existing surfaces. In ray tracing, the software's algorithm sends rays out of a "camera" and they bounce off different surfaces until they are absorbed or scattered. The more rays were traced, the better quality the result will be.

This rendering method produces images of the best quality, but requires powerful computing resources. However, some effects simply cannot be recreated using other rendering methods, so sometimes ray tracing is the only possible solution.

Tracing as building connections

Tracing also means finding lines that will connect the nodal points of a system. If you are designing a computer board (for example, a video card), then tracing in this process is finding the lines that will connect the contacts of the board elements.

Instructions

Start checking the trace in Windows. Launch cmd command processor. To do this, click on the “Start” button located in the taskbar on the desktop or press the Win button on the keyboard. From the displayed menu, select Run. Enter cmd in the “Run a program” dialog that appears. Click OK.

Review the command line options of the tracert utility. In the shell window, type: tracert /? and press Enter. Review the information displayed.

Check the trace in Windows using the tracert utility. In the console, enter a command like: tracert<имя цели>and press Enter. Wait for the trace result to be displayed. Here as a parameter<имя цели>The IP address of the target machine or the corresponding symbolic name (domain) that can be resolved to the IP using DNS must be specified. If necessary, use tracing with arbitrary parameters. For example, to speed up the process, use the -d option. In this case, symbolic names of intermediate nodes will not be determined by their IP addresses. Use the -h option to increase the maximum number of hops possible if the goal was not reached in 30 hops (the default value of this option). If there are a large number of errors on intermediate nodes, increase the waiting time for a response about them using the -w switch.

Start the trace verification process on Linux-like systems. Complete the login procedure with your credentials. If necessary, launch the graphical shell and wait until it finishes loading. You can also continue working in the text console. If the graphical shell was loaded, launch a terminal emulator (konsole, xterm, etc.).

Get traceroute's built-in help. In the console, enter the command: traceroute --help and press Enter. Review the information displayed.

Get help with traceroute using the corresponding man documentation package, if installed. Type the command:man traceroute and press Enter. Check out the information. To exit reading mode, press the q key.

Check the trace using the traceroute utility on Linux-like systems. To perform a trace with default parameters, enter a command like this in the console: traceroute<имя цели>and press Enter. Wait for the process to complete. Purpose of the parameter<имя цели>similar to what was described in the third step. To change the behavior of traceroute, use the appropriate command line options.