Step 3: Trace Links Visited During CSPF Computations
Purpose
The configuration of the
cspf-linkflag provides details in the log file about the links visited during CSPF computations. The link information is in addition to the overview information provided by thecspfflag, and the node information provided by thecpsf-nodeflag.Action
To run trace links visited during CSPF computations and examine the CSPF log file, enter the following JUNOS CLI commands:
[edit protocols mpls]user@R1#run monitor startfilenameuser@R1#run show logfilenameuser@R1#run show ted database
NOTE: To stop monitoring CSPF, issue the
monitor stopcommand. If you are working in configuration mode, as shown in the sample output, issue therun monitor stopcommand.Sample Output 1
[edit protocols mpls]user@R1#showtraceoptions {file cspf-link;flag cspf;flag cspf-link;}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;Sample Output 2
[edit protocols mpls]user@R1#run show log cspf-link | no-moreApr 29 13:29:52 trace_on:Tracing to "/var/log/cspf-link"startedApr 29 13:30:27 RPD_MPLS_LSP_DOWN: MPLS LSP R1-to-R6 down on primary()Apr 29 13:30:27 RPD_MPLS_PATH_DOWN: MPLS path down on LSP R1-to-R6Apr 29 13:30:27 CSPF adding path R1-to-R6(primary) to CSPF queue 1Apr 29 13:30:27 CSPF creating CSPF jobApr 29 13:30:27Apr 29 13:30:27 CSPF for path R1-to-R6(primary), begin at R1.00, startingApr 29 13:30:27 bandwidth: CT0=0bps; setup priority: 0; randomApr 29 13:30:27 CSPF final destination 10.0.0.6Apr 29 13:30:27 CSPF starting from R1.00 (10.0.0.1) to 10.0.0.6, hoplimit 254Apr 29 13:30:27Node R1.00 (10.0.0.1)metric 0, hops 0, avail 32000 32000 32000 32000Apr 29 13:30:27Link 10.1.13.1->10.1.13.2(R3.00/10.0.0.3) metric 10 color 0x00000000 bw 155.52MbpsApr 29 13:30:27 Reverse Link for 10.1.13.1->10.1.13.2 is 10.1.13.2->10.1.13.1Apr 29 13:30:27 link's interface switch capability descriptor #1Apr 29 13:30:27 encoding: Packet, switching: PacketApr 29 13:30:27link passes constraintsApr 29 13:30:27Link 10.1.12.1->10.1.12.2(R2.00/10.0.0.2) metric 10 color 0x00000000 bw 155.52MbpsApr 29 13:30:27 Reverse Link for 10.1.12.1->10.1.12.2 is 10.1.12.2->10.1.12.1Apr 29 13:30:27 link's interface switch capability descriptor #1Apr 29 13:30:27 encoding: Packet, switching: PacketApr 29 13:30:27link passes constraintsApr 29 13:30:27Link 10.1.15.1->10.1.15.2(R5.00/10.0.0.5) metric 10 color 0x00000000 bw 155.52MbpsApr 29 13:30:27 Reverse Link for 10.1.15.1->10.1.15.2 is 10.1.15.2->10.1.15.1Apr 29 13:30:27 link's interface switch capability descriptor #1Apr 29 13:30:27 encoding: Packet, switching: PacketApr 29 13:30:27link passes constraintsApr 29 13:30:27Node R3.00(10.0.0.3) metric 10, hops 1, avail 32000 32000 32000 32000Apr 29 13:30:27 Link 10.1.13.2->10.1.13.1(R1.00/10.0.0.1) metric 10 color 0x00000000 bw 155.52MbpsApr 29 13:30:27 skipped: end point already visitedApr 29 13:30:27 Link 10.1.34.1->10.1.34.2(R4.00/10.0.0.4) metric 10 color 0x00000000 bw 155.52MbpsApr 29 13:30:27 Reverse Link for 10.1.34.1->10.1.34.2 is 10.1.34.2->10.1.34.1Apr 29 13:30:27 link's interface switch capability descriptor #1Apr 29 13:30:27 encoding: Packet, switching: PacketApr 29 13:30:27 link passes constraintsApr 29 13:30:27 Link 10.1.23.2->10.1.23.1(R2.00/10.0.0.2) metric 10 color 0x00000000 bw 155.52MbpsApr 29 13:30:27 Reverse Link for 10.1.23.2->10.1.23.1 is 10.1.23.1->10.1.23.2Apr 29 13:30:27 link's interface switch capability descriptor #1Apr 29 13:30:27 encoding: Packet, switching: PacketApr 29 13:30:27 link passes constraintsApr 29 13:30:27 metric: 20 vs 10; hops: 2 vs 1; avail: 32000 32000 32000 32000Apr 29 13:30:27 Link 10.1.36.1->10.1.36.2(R6.00/10.0.0.6) metric 10 color 0x00000000 bw 155.52MbpsApr 29 13:30:27 Reverse Link for 10.1.36.1->10.1.36.2 is 10.1.36.2->10.1.36.1Apr 29 13:30:27 link's interface switch capability descriptor #1Apr 29 13:30:27 encoding: Packet, switching: PacketApr 29 13:30:27 link passes constraintsApr 29 13:30:27Node R5.00(10.0.0.5) metric 10, hops 1, avail 32000 32000 32000 32000Apr 29 13:30:27 Link 10.1.15.2->10.1.15.1(R1.00/10.0.0.1) metric 10 color 0x00000000 bw 155.52MbpsApr 29 13:30:27 skipped: end point already visitedApr 29 13:30:27 Link 10.1.45.2->10.1.45.1(R4.00/10.0.0.4) metric 10 color 0x00000000 bw 155.52MbpsApr 29 13:30:27 Reverse Link for 10.1.45.2->10.1.45.1 is 10.1.45.1->10.1.45.2Apr 29 13:30:27 link's interface switch capability descriptor #1Apr 29 13:30:27 encoding: Packet, switching: PacketApr 29 13:30:27 link passes constraintsApr 29 13:30:27 metric: 20 vs 20; hops: 2 vs 2; avail: 32000 32000 32000 32000Apr 29 13:30:27 Better path: random winsApr 29 13:30:27 Link 10.1.56.1->10.1.56.2(R6.00/10.0.0.6) metric 10 color 0x00000000 bw 155.52MbpsApr 29 13:30:27 Reverse Link for 10.1.56.1->10.1.56.2 is 10.1.56.2->10.1.56.1Apr 29 13:30:27 link's interface switch capability descriptor #1Apr 29 13:30:27 encoding: Packet, switching: PacketApr 29 13:30:27 link passes constraintsApr 29 13:30:27 metric: 20 vs 20; hops: 2 vs 2; avail: 32000 32000 32000 32000Apr 29 13:30:27 Old path is betterApr 29 13:30:27Node R2.00(10.0.0.2) metric 10, hops 1, avail 32000 32000 32000 32000Apr 29 13:30:27 Link 10.1.12.2->10.1.12.1(R1.00/10.0.0.1) metric 10 color 0x00000000 bw 155.52MbpsApr 29 13:30:27 skipped: end point already visitedApr 29 13:30:27 Link 10.1.23.1->10.1.23.2(R3.00/10.0.0.3) metric 10 color 0x00000000 bw 155.52MbpsApr 29 13:30:27 skipped: end point already visitedApr 29 13:30:27 Link 10.1.24.1->10.1.24.2(R4.00/10.0.0.4) metric 10 color 0x00000000 bw 155.52MbpsApr 29 13:30:27 Reverse Link for 10.1.24.1->10.1.24.2 is 10.1.24.2->10.1.24.1Apr 29 13:30:27 link's interface switch capability descriptor #1Apr 29 13:30:27 encoding: Packet, switching: PacketApr 29 13:30:27 link passes constraintsApr 29 13:30:27 metric: 20 vs 20; hops: 2 vs 2; avail: 32000 32000 32000 32000Apr 29 13:30:27 Old path is betterApr 29 13:30:27 Link 10.1.26.1->10.1.26.2(R6.00/10.0.0.6) metric 10 color 0x00000000 bw 155.52MbpsApr 29 13:30:27 Reverse Link for 10.1.26.1->10.1.26.2 is 10.1.26.2->10.1.26.1Apr 29 13:30:27 link's interface switch capability descriptor #1Apr 29 13:30:27 encoding: Packet, switching: PacketApr 29 13:30:27 link passes constraintsApr 29 13:30:27 metric: 20 vs 20; hops: 2 vs 2; avail: 32000 32000 32000 32000Apr 29 13:30:27 Old path is betterApr 29 13:30:27Node R4.00(10.0.0.4) metric 20, hops 2, avail 32000 32000 32000 32000Apr 29 13:30:27 Link 10.1.34.2->10.1.34.1(R3.00/10.0.0.3) metric 10 color 0x00000000 bw 155.52MbpsApr 29 13:30:27 skipped: end point already visitedApr 29 13:30:27 Link 10.1.24.2->10.1.24.1(R2.00/10.0.0.2) metric 10 color 0x00000000 bw 155.52MbpsApr 29 13:30:27 skipped: end point already visitedApr 29 13:30:27 Link 10.1.45.1->10.1.45.2(R5.00/10.0.0.5) metric 10 color 0x00000000 bw 155.52MbpsApr 29 13:30:27 skipped: end point already visitedApr 29 13:30:27 Link 10.1.46.1->10.1.46.2(R6.00/10.0.0.6) metric 10 color 0x00000000 bw 155.52MbpsApr 29 13:30:27 Reverse Link for 10.1.46.1->10.1.46.2 is 10.1.46.2->10.1.46.1Apr 29 13:30:27 link's interface switch capability descriptor #1Apr 29 13:30:27 encoding: Packet, switching: PacketApr 29 13:30:27 link passes constraintsApr 29 13:30:27 metric: 30 vs 20; hops: 3 vs 2; avail: 32000 32000 32000 32000Apr 29 13:30:27Node R6.00(10.0.0.6) metric 20, hops 2, avail 32000 32000 32000 32000Apr 29 13:30:27 CSPF Reached targetApr 29 13:30:27 CSPF completed in 0.001880sApr 29 13:30:27CSPF ERO for R1-to-R6(primary) (2 hops)Apr 29 13:30:27node 10.1.13.2/32Apr 29 13:30:27node 10.1.36.2/32Apr 29 13:30:27 CSPF for R1-to-R6 done!Apr 29 13:30:27 RPD_MPLS_PATH_UP: MPLS path up on LSP R1-to-R6Apr 29 13:30:27 RPD_MPLS_LSP_UP: MPLS LSP R1-to-R6 up on primary() Route 10.1.13.2 10.1.36.2Sample Output 3
user@R1#run show ted database | no-moreTED database: 6 ISIS nodes 6 INET nodesID Type Age(s) LnkIn LnkOut ProtocolR1.00(10.0.0.1)Rtr 148 3 3IS-IS(2)To: R3.00(10.0.0.3), Local: 10.1.13.1, Remote: 10.1.13.2To: R5.00(10.0.0.5), Local: 10.1.15.1, Remote: 10.1.15.2To: R2.00(10.0.0.2), Local: 10.1.12.1, Remote: 10.1.12.2ID Type Age(s) LnkIn LnkOut ProtocolOSPF(0.0.0.0)To: R3.00(10.0.0.3), Local: 10.1.13.1, Remote: 10.1.13.2To: R5.00(10.0.0.5), Local: 10.1.15.1, Remote: 10.1.15.2To: R2.00(10.0.0.2), Local: 10.1.12.1, Remote: 10.1.12.2ID Type Age(s) LnkIn LnkOut ProtocolR2.00(10.0.0.2)Rtr 580 4 4 IS-IS(2)To: R1.00(10.0.0.1), Local: 10.1.12.2, Remote: 10.1.12.1To: R3.00(10.0.0.3), Local: 10.1.23.1, Remote: 10.1.23.2To: R4.00(10.0.0.4), Local: 10.1.24.1, Remote: 10.1.24.2To: R6.00(10.0.0.6), Local: 10.1.26.1, Remote: 10.1.26.2ID Type Age(s) LnkIn LnkOut ProtocolOSPF(0.0.0.0)To: R1.00(10.0.0.1), Local: 10.1.12.2, Remote: 10.1.12.1To: R3.00(10.0.0.3), Local: 10.1.23.1, Remote: 10.1.23.2To: R4.00(10.0.0.4), Local: 10.1.24.1, Remote: 10.1.24.2To: R6.00(10.0.0.6), Local: 10.1.26.1, Remote: 10.1.26.2ID Type Age(s) LnkIn LnkOut ProtocolR3.00(10.0.0.3)Rtr 390 4 4 IS-IS(2)To: R1.00(10.0.0.1), Local: 10.1.13.2, Remote: 10.1.13.1To: R4.00(10.0.0.4), Local: 10.1.34.1, Remote: 10.1.34.2To: R2.00(10.0.0.2), Local: 10.1.23.2, Remote: 10.1.23.1To: R6.00(10.0.0.6), Local: 10.1.36.1, Remote: 10.1.36.2ID Type Age(s) LnkIn LnkOut ProtocolOSPF(0.0.0.0)To: R1.00(10.0.0.1), Local: 10.1.13.2, Remote: 10.1.13.1To: R4.00(10.0.0.4), Local: 10.1.34.1, Remote: 10.1.34.2To: R2.00(10.0.0.2), Local: 10.1.23.2, Remote: 10.1.23.1To: R6.00(10.0.0.6), Local: 10.1.36.1, Remote: 10.1.36.2ID Type Age(s) LnkIn LnkOut ProtocolR4.00(10.0.0.4)Rtr 677 4 4 IS-IS(2)To: R3.00(10.0.0.3), Local: 10.1.34.2, Remote: 10.1.34.1To: R5.00(10.0.0.5), Local: 10.1.45.1, Remote: 10.1.45.2To: R2.00(10.0.0.2), Local: 10.1.24.2, Remote: 10.1.24.1To: R6.00(10.0.0.6), Local: 10.1.46.1, Remote: 10.1.46.2ID Type Age(s) LnkIn LnkOut ProtocolOSPF(0.0.0.0)To: R3.00(10.0.0.3), Local: 10.1.34.2, Remote: 10.1.34.1To: R5.00(10.0.0.5), Local: 10.1.45.1, Remote: 10.1.45.2To: R2.00(10.0.0.2), Local: 10.1.24.2, Remote: 10.1.24.1To: R6.00(10.0.0.6), Local: 10.1.46.1, Remote: 10.1.46.2ID Type Age(s) LnkIn LnkOut ProtocolR5.00(10.0.0.5)Rtr 609 3 3 IS-IS(2)To: R1.00(10.0.0.1), Local: 10.1.15.2, Remote: 10.1.15.1To: R4.00(10.0.0.4), Local: 10.1.45.2, Remote: 10.1.45.1To: R6.00(10.0.0.6), Local: 10.1.56.1, Remote: 10.1.56.2ID Type Age(s) LnkIn LnkOut ProtocolOSPF(0.0.0.0)To: R1.00(10.0.0.1), Local: 10.1.15.2, Remote: 10.1.15.1To: R4.00(10.0.0.4), Local: 10.1.45.2, Remote: 10.1.45.1To: R6.00(10.0.0.6), Local: 10.1.56.1, Remote: 10.1.56.2ID Type Age(s) LnkIn LnkOut ProtocolR6.00(10.0.0.6)Rtr 633 4 4 IS-IS(2)To: R3.00(10.0.0.3), Local: 10.1.36.2, Remote: 10.1.36.1To: R4.00(10.0.0.4), Local: 10.1.46.2, Remote: 10.1.46.1To: R5.00(10.0.0.5), Local: 10.1.56.2, Remote: 10.1.56.1To: R2.00(10.0.0.2), Local: 10.1.26.2, Remote: 10.1.26.1ID Type Age(s) LnkIn LnkOut ProtocolOSPF(0.0.0.0)To: R3.00(10.0.0.3), Local: 10.1.36.2, Remote: 10.1.36.1To: R4.00(10.0.0.4), Local: 10.1.46.2, Remote: 10.1.46.1To: R5.00(10.0.0.5), Local: 10.1.56.2, Remote: 10.1.56.1To: R2.00(10.0.0.2), Local: 10.1.26.2, Remote: 10.1.26.1What It Means
Sample Output 1 shows the configuration of the
cspf-linkfile,cspfflag, andcspf-linkflag 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-linkfile in the/var/log/directory on ingress routerR1. Thecspf-linkfile contains the CSPF computations logged when thecspfandcspf-linkflags are configured at the [edit protocols mpls traceoptions] hierarchy level and after therun monitor start cspfandrun show log cspfcommands are issued.Each line of output describes the steps taken by the CSPF algorithm to calculate the shortest path between the ingress and egress routers. Because the
cspf-linkflag is configured, the output shows the node and link information included in the calculations performed by the CSPF algorithm. For example,R1(ingress router) has three links with three possible paths to the egress router (R6),Link 10.1.13.1->10.1.13.2,Link 10.1.12.1->10.1.12.2, andLink 10.1.15.1->10.1.15.2. In this instance, the CSPF algorithm selects the10.1.13.1->10.1.13.2link as the shortest path to the egress router.The result of the CSPF algorithm is formed into a strict-hop ERO. For example, the ERO for the LSP
R1-to-R6contains two hops that pass through nodes10.1.13.2/32and10.1.36.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 showsRPD_MPLS_LSP_UP, indicating that the LSP was established successfullySample Output 3 shows a brief summary of the contents of the traffic engineering database. (For more detailed information, use the
detailorextensiveoptions.) When CSPF tracing is configured, the contents of the specified CSPF log file should correlate to the contents of the traffic engineering database; that is, the links shown in the output for theshow logfilenamecommand should also appear in the output for theshow ted databasecommand. In the example network shown in Figure , the six nodes and all links associated with those nodes appear in the output of both commands.The traffic engineering database is built through link-state routing protocol extensions that allow for the flooding of information regarding available link bandwidth, link coloring, and so on. Also, the traffic engineering database includes information contained in the OSPF and IS-IS databases. For example, R1 has three links configured at IS-IS Level 2, and the same three links configured in OPSF area
0.0.0.0.For a more detailed examination of the traffic engineering database, see Examining a CSPF Failure.