15.3 Using the TRCROUTE Utility to Test Connectivity from the Client

The Trace Route Utility (TRCROUTE), in Linux and UNIX environments, enables administrators to discover the path or route that a connection takes from the client to the server.

If TRCROUTE encounters a problem, then it returns an error stack to the client instead of a single error. These additional error messages make troubleshooting easier.

TRCROUTE is different from TNSPING in that it travels as a special type of connect packet, and is routed as such. As it travels toward its destination, the TRCROUTE connect packet collects the TNS addresses of every node it travels through. If an error occurs, then TRCROUTE collects error information that shows where the error occurred. The TRCROUTE displays the information collected on the client screen. You can redirect the TRCROUTE output to a file, and print it.

The TRCROUTE uses minimal resources. It gathers information in the connect data of a special connect packet. Standard connect packets are not affected.

The server is not affected by TRCROUTE. The listener receives and processes the TRCROUTE connect packet. It returns the information to the client by putting it into a refuse packet. The server does not need to start any new processes or deal with dummy connections.

To use the TRCROUTE utility, enter the following command:
trcroute net_service_name

Example 15-4 shows a successful trace route packet that traveled from a client to a listener.

Example 15-4 Successful Trace Route

trcroute sales

Trace Route Utility for Linux: Version 23.4.0.0.0 - Production on 21-MAR-2024

Copyright (c) 1999, 2024 Oracle Corporation.  All rights reserved.

Route of TrcRoute:
------------------
 
Node: Client            Time and address of entry into node:
-------------------------------------------------------------
21-MAR-2024 21:48:48 ADDRESS= PROTOCOL=TCP  HOST=10.150.21.136  PORT=14001
 
Node: Server            Time and address of entry into node:
-------------------------------------------------------------
21-MAR-2024 21:48:05 ADDRESS= PROTOCOL=TCP  HOST=10.150.21.136  PORT=14001 

Example 15-5 shows an unsuccessful trace route packet that could not reach the listener because the listener was not up.

Example 15-5 Trace Route with Error

trcroute sales

Trace Route Utility for Linux: Version 23.4.0.0.0 - Production on 21-MAR-2024 

Copyright (c) 1999, 2024 Oracle Corporation.  All rights reserved.

Route of TrcRoute:
------------------

Node: Client            Time and address of entry into node:
-------------------------------------------------------------
21-MAR-2024 14:43:05 ADDRESS= PROTOCOL=TCP  HOST=10.9.7.5  PORT=1521

TNS-12543: TNS:unable to connect to destination
TNS-12541: TNS:Cannot connect. No Listener at host 10.9.7.5 port 1521
TNS-12560: TNS:Database communication protocol error
TNS-03601: Failed in route information collection