The cspf flag provides an overview of the CSPF computations performed and the resulting ERO for the LSP. Details about nodes or links visited during CSPF computations are not included in this log file.
To run trace CSPF computations and examine the CSPF log file, enter the following JUNOS command-line interface (CLI) commands:
![]() |
Note: To stop monitoring CSPF, issue the monitor stop command. If you are working in configuration mode, issue the run monitor stop command. |
[edit protocols mpls]
user@R1# show
traceoptions {
file cspf;
flag cspf;
}
label-switched-path R6-to-R1 {
to 10.0.0.1;
}
interface so-0/0/0.0;
interface so-0/0/1.0;
interface so-0/0/2.0;
interface so-0/0/3.0;[edit protocols mpls] user@R1> show log cspf Apr 29 11:35:59 trace_on: Tracing to “/var/log/cspf” started Apr 29 13:22:52 RPD_MPLS_LSP_DOWN: MPLS LSP R1-to-R6 down on primary() Apr 29 13:22:52 RPD_MPLS_PATH_DOWN: MPLS path down on LSP R1-to-R6 Apr 29 13:22:52 CSPF adding path R1-to-R6(primary) to CSPF queue 1 Apr 29 13:22:52 CSPF creating CSPF job Apr 29 13:22:52 Apr 29 13:22:52 CSPF for path R1-to-R6(primary), begin at R1.00, starting Apr 29 13:22:52 bandwidth: CT0=0bps; setup priority: 0; random Apr 29 13:22:52 CSPF final destination 10.0.0.6 Apr 29 13:22:52 CSPF starting from R1.00 (10.0.0.1) to 10.0.0.6, hoplimit 254 Apr 29 13:22:52 CSPF Reached target Apr 29 13:22:52 CSPF completed in 0.000106s Apr 29 13:22:52 CSPF ERO for R1-to-R6(primary) (2 hops) Apr 29 13:22:52 node 10.1.15.2/32 Apr 29 13:22:52 node 10.1.56.2/32 Apr 29 13:22:52 CSPF for R1-to-R6 done! Apr 29 13:22:52 RPD_MPLS_PATH_UP: MPLS path up on LSP R1-to-R6 Apr 29 13:22:52 RPD_MPLS_LSP_UP: MPLS LSP R1-to-R6 up on primary() Route 10.1.15.2 10.1.56.2 monitor stop
Sample Output 1 shows the configuration of the cspf file and cspf flag at the [edit protocols mpls traceoptions] hierarchy level. See Configuring CSPF Tracing for steps to configure CSPF tracing.
Sample Output 2 shows the contents of the cspf file in the /var/log/ directory on ingress router R1. The cspf file contains the CSPF computations obtained when the cspf flag is configured at the [edit protocols mpls traceoptions] hierarchy level and after the run monitor start cspf and run show log cspf commands were issued.
Each line of output describes the steps taken by the CSPF algorithm to calculate the shortest path between the ingress and egress routers. The result of the CSPF algorithm is formed into a strict-hop ERO that details each hop along the calculated path. For example, the ERO for the LSP R1-to-R6 contains two hops that pass through nodes 10.1.15.2/32 and 10.1.56.2.32. When the ERO is completed, CSPF for R1-to-R6 done!, the ERO is passed to the RSVP protocol process, where it is used for signaling and establishing the LSP in the network. The output shows RPD_MPLS_LSP_UP, indicating that the LSP was established successfully.