Configure Routing Protocol Process Tracing
Purpose
Routing protocol process (rpd) tracing tracks all general routing operations and records them in a log file.
To configure routing protocol process (rpd) tracing and monitor trace file messages, follow these steps:
- Configure Routing Protocol Process Tracing
- Configure Routing Protocol Tracing for a Specific Routing Protocol
- Monitor Trace File Messages Written in Near-Real Time
- Stop Trace File Monitoring
Configure Routing Protocol Process Tracing
Action
To configure routing protocol process (rpd) tracing, follow these steps:
- In configuration mode, go to the following hierarchy level:[edit]user@host# edit routing-options traceoptions
- Configure the file, file size, number, and flags:[edit routing-options traceoptions]user@host# set file filename size size file number [edit routing-options traceoptions]user@host# set flag flag
For example:
[edit routing-options traceoptions]user@host# set file daemonlog size 10240 files 10 [edit routing-options traceoptions]user@host# set flag general - Verify the configuration:user@host# show
For example:
[edit routing-options traceoptions]user@host# show file daemonlog size 10k files 10;flag general; - Commit the configuration:user@host# commit
![]() | Note: Some traceoptions flags generate an extensive amount of information. Tracing can also slow down the operation of routing protocols. Delete the traceoptions configuration if you no longer require it. |
- View the contents of the file containing the detailed
messages:user@host# run show log filename
For example:
[edit routing-options traceoptions]user@pro4-a# run show log daemonlog Sep 17 14:17:31 trace_on: Tracing to "/var/log/daemonlog" startedSep 17 14:17:31 Tracing flags enabled: generalSep 17 14:17:31 inet_routerid_notify: Router ID: 10.255.245.44Sep 17 14:17:31 inet_routerid_notify: No Router ID assignedSep 17 14:17:31 Initializing LSI globalsSep 17 14:17:31 LSI initialization completeSep 17 14:17:31 Initializing OSPF instancesSep 17 14:17:31 Reinitializing OSPFv2 instance masterSep 17 14:17:31 OSPFv2 instance master running[...Output truncated...]
Meaning
Table 1 lists tracing flags and example output for Junos-supported routing protocol daemon tracing.
Table 1: Routing Protocol Daemon Tracing Flags
Tracing Flag | Description | Example Output |
---|---|---|
all | All operations | Not available. |
general | Normal operations and routing table change | Not available. |
normal | Normal operations | Not available. |
policy | Policy operations and actions | Nov 29 22:19:58 export: Dest 10.0.0.0 proto Static |
route | Routing table changes | Nov 29 22:23:59 |
state | State transitions | Not available. |
task | Interface transactions and processing | Nov 29 22:50:04 foreground dispatch running job task_collect for task Scheduler |
timer | Timer usage | Nov 29 22:52:07 task_timer_hiprio_dispatch: ran 1 timer |
Configure Routing Protocol Tracing for a Specific Routing Protocol
Action
To configure routing protocol tracing for a specific routing protocol, follow these steps:
- In configuration mode, go to the following hierarchy level:[edit] user@host# edit protocol protocol-name traceoptions
- Configure the file, file size, number, and flags:[edit protocols protocol name traceoptions] user@host# set file filename size size files number [edit protocols protocol name traceoptions]user@host# set flag flag
For example:
[edit protocols ospf traceoptions]user@host# set file ospflog size 10240 files 10 [edit protocols ospf traceoptions]user@host# set flag general - Verify the configuration:user@host# show
For example:
[edit protocols ospf traceoptions]user@host# show file ospflog size 10k files 10;flag general; - Commit the configuration:user@host# commit
- View the contents of the file containing the detailed
messages:user@host# run show log filename
For example:
[edit protocols ospf traceoptions]user@pro4-a# run show log ospflog Sep 17 14:23:10 trace_on: Tracing to "/var/log/ospflog" startedSep 17 14:23:10 rt_flash_update_callback: flash OSPF (inet.0) startSep 17 14:23:10 OSPF: multicast address 224.0.0.5/32, route ignoredSep 17 14:23:10 rt_flash_update_callback: flash OSPF (inet.0) doneSep 17 14:23:10 CHANGE 10.255.245.46/32 gw 10.10.208.67 OSPF pref 10/0 metric 1/0 fe-0/0/0.0 <Delete Int>Sep 17 14:23:10 CHANGE 10.255.245.46/32 gw 10.10.208.67 OSPF pref 10/0 metric 1/0 fe-0/0/0.0 <Active Int>Sep 17 14:23:10 ADD 10.255.245.46/32 gw 10.10.208.67 OSPF pref 10/0 metric 1/0 fe-0/0/0.0 <Active Int>Sep 17 14:23:10 CHANGE 10.255.245.48/32 gw 10.10.208.69 OSPF pref 10/0 metric 1/0 fe-0/0/0.0 <Delete Int>Sep 17 14:23:10 CHANGE 10.255.245.48/32 gw 10.10.208.69 OSPF pref 10/0 metric 1/0 fe-0/0/0.0 <Active Int>Sep 17 14:23:10 ADD 10.255.245.48/32 gw 10.10.208.69 OSPF pref 10/0 metric 1/0 fe-0/0/0.0 <Active Int>Sep 17 14:23:10 rt_close: 4/4 routes proto OSPF[...Output truncated...]
Meaning
Table 2 lists standard tracing options that are available globally or that can be applied to specific protocols. You can also configure tracing for a specific BGP peer or peer group. For more information, see the Junos System Basics Configuration Guide.
Table 2: Standard Trace Options for Routing Protocols
Tracing Flag | Description |
---|---|
all | All operations |
general | Normal operations and routing table changes |
normal | Normal operations |
policy | Policy operations and actions |
route | Routing table changes |
state | State transitions |
task | Interface transactions and processing |
timer | Timer usage |
Monitor Trace File Messages Written in Near-Real Time
Purpose
To monitor messages in near-real time as they are being written to a trace file.
Action
To monitor messages in near-real time as they are being written to a trace file, use the following Junos OS command-line interface (CLI) operational mode command:
Sample Output
user@host> monitor start isis
user@host> *** isis *** Sep 15 18:32:21 Updating LSP isis5.02-00 in database Sep 15 18:32:21 Updating L2 LSP isis5.02-00 in TED Sep 15 18:32:21 Adding a half link from isis5.02 to isis6.00 Sep 15 18:32:21 Adding a half link from isis5.02 to isis5.00 Sep 15 18:32:21 Adding a half link from isis5.02 to isis6.00 Sep 15 18:32:21 Adding a half link from isis5.02 to isis5.00 Sep 15 18:32:21 Scheduling L2 LSP isis5.02-00 sequence 0xd87 on interface fxp2.3 Sep 15 18:32:21 Updating LSP isis5.00-00 in database Sep 15 18:32:21 Updating L1 LSP isis5.00-00 in TED Sep 15 18:32:21 Sending L2 LSP isis5.02-00 on interface fxp2.3 Sep 15 18:32:21 sequence 0xd87, checksum 0xc1c8, lifetime 1200
Stop Trace File Monitoring
Action
To stop monitoring a trace file in near-real time, use the following Junos OS CLI operational mode command after you have started monitoring:
Sample Output
user@host> monitor start isis
user@host> *** isis *** Sep 15 18:32:21 Updating LSP isis5.02-00 in database Sep 15 18:32:21 Updating L2 LSP isis5.02-00 in TED Sep 15 18:32:21 Adding a half link from isis5.02 to isis6.00 Sep 15 18:32:21 Adding a half link from isis5.02 to isis5.00 Sep 15 18:32:21 Adding a half link from isis5.02 to isis6.00 Sep 15 18:32:21 Adding a half link from isis5.02 to isis5.00 Sep 15 18:32:21 Scheduling L2 LSP isis5.02-00 sequence 0xd87 on interface fxp2.3 Sep 15 18:32:21 Updating LSP isis5.00-00 in database Sep 15 18:32:21 Updating L1 LSP isis5.00-00 in TED Sep 15 18:32:21 Sending L2 LSP isis5.02-00 on interface fxp2.3 Sep 15 18:32:21 sequence 0xd87, checksum 0xc1c8, lifetime 1200 monitor stop isis user@host>