Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


Example: Tracing Global Routing Protocol Operations

This example shows how to list and view files that are created when you enable global routing trace operations.


You must have the view privilege.


To configure global routing protocol tracing, include the traceoptions statement at the [edit routing-options] hierarchy level:

The flags in a traceoptions flag statement are identifiers. When you use the set command to configure a flag, any flags that might already be set are not modified. In the following example, setting the timer tracing flag has no effect on the already configured task flag. Use the delete command to delete a particular flag.

This example shows how to configure and view a trace file that tracks changes in the routing table. The steps can be adapted to apply to trace operations for any Junos OS hierarchy level that supports trace operations.


To view a list of hierarchy levels that support tracing operations, enter the help apropos traceoptions command in configuration mode.


CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level.

Configuring Trace Operations

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.

To configure the trace operations:

  1. Configure trace operations.

  2. Configure a static route to cause a change in the routing table.

  3. If you are done configuring the device, commit the configuration.

Viewing the Trace File

Step-by-Step Procedure

To view the trace file:

  1. In operational mode, list the log files on the system.

  2. View the contents of the routing-table-changes file.

  3. Filter the output of the log file.

  4. View the tracing operations in real time by running the monitor start command with an optional match condition.

  5. Deactivate the static route.

  6. Halt the monitor command by pressing Enter and typing monitor stop.

  7. When you are finished troubleshooting, consider deactivating trace logging to avoid any unnecessary impact to system resources.

    When configuration is deactivated, it appears in the configuration with the inactive tag.

  8. To reactivate trace operations, use the activate configuration-mode statement.


From configuration mode, confirm your configuration by entering the show routing-options command. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.


Confirm that the configuration is working properly.

Verifying That the Trace Log File Is Operating


Make sure that events are being written to the log file.