debugging ospf spf

Function

The debugging ospf spf command enables debugging of the shortest path tree calculation and next hops of all OSPF processes.

The undo debugging ospf spf command disables debugging of the shortest path tree calculation and next hops of all OSPF processes.

By default, the debugging of the shortest path tree calculation and next hops of all OSPF processes is disabled.

Format

debugging ospf process-id spf

undo debugging ospf [ process-id ] spf

Parameters

Parameter Description Value
process-id

Specifies the ID of an OSPF process.

The value is an integer ranging from 1 to 4294967295.

Views

User view

Default Level

3: Management level

Task Name and Operations

Task Name Operations
ospf debug

Usage Guidelines

Usage Scenario

After the process-id parameter is specified, the debugging ospf spf command enables debugging of the shortest path tree calculation and next hops of the specified OSPF process.

Example

# Enable the debugging of the shortest path trees and next hops in all OSPF processes after SR is enabled.
<HUAWEI> debugging ospf spf
Sep 14 2017 11:53:02.852 HUAWEI %%01OSPF/6/OSPF_DEBUG(d):CID=0x8085043f;
FileID: 0x22 Line: 1516 Level: 0x5 OSPF 1
Area: 0 MT: 0 SEGR nexthop calculation started.
Sep 14 2017 11:53:02.852 HUAWEI %%01OSPF/6/OSPF_DEBUG(d):CID=0x8085043f;
FileID: 0x22 Line: 1524 Level: 0x5 OSPF 1
Area: 0 MT: 0 SEGR nexthop calculation completed.
Sep 14 2017 11:53:02.852 HUAWEI %%01OSPF/6/OSPF_DEBUG(d):CID=0x8085043f;
FileID: 0x31 Line: 570 Level: 0x5 OSPF 1
SEGR Nexthop if_index: 9 ip_address: 10.1.1.2 if_type: 2, pathRange: 10001, phpflag:1,
neighbor_routerid: 10.2.2.2,noderouterid: 10.3.3.3.
# Enable debugging of the shortest path tree calculation and next hops of all OSPF processes.
<HUAWEI> debugging ospf spf
2011-07-27 03:01:39 HUAWEI %%01OSPFV2COMM/6/OSPF_DEBUG(d):CID=0x80852787;FileID: 0x22 Line: 811 Level: 0x5 OSPF 1  Area: 1 MT: 0 basemt SPF calculation started.
2011-07-27 03:01:39 HUAWEI %%01OSPFV2COMM/6/OSPF_DEBUG(d):CID=0x80852787;FileID: 0x1 Line: 145 Level: 0x5 OSPF 1  Area: 1 MT: 0 ver_type: 1 ver_id: 0x1010101 Add root vertex to SPF tree
2011-07-27 03:01:39 HUAWEI %%01OSPFV2COMM/6/OSPF_DEBUG(d):CID=0x80852787;FileID: 0x1 Line: 686 Level: 0x5 OSPF 1  Area: 1 MT: 0 vertex_type: 1 vertex_id: 10.1.1.1 vertex_option: 0 vertex_teif_cnt: 0     spf_cost: 0 spf_clc_num: 4 te_cost_diff: 0 path_cost: 0 Add vertex to SPF.
2011-07-27 03:01:39 HUAWEI %%01OSPFV2COMM/6/OSPF_DEBUG(d):CID=0x80852787;FileID: 0x1 Line: 745 Level: 0x5 OSPF 1  Area: 1 MT: 0 ver_type: 2 ver_id: 0x6060602  cost: 1 Add vertex to candidate list.
2011-07-27 03:01:39 HUAWEI %%01OSPFV2COMM/6/OSPF_DEBUG(d):CID=0x80852787;FileID: 0x1 Line: 787 Level: 0x5 OSPF 1  Area: 1 MT: 0 vertex_type: 2 vertex_id: 10.6.6.2 vertex_option: 0 vertex_teif_cnt: 0     spf_cost: 1 spf_clc_num: 4 te_cost_diff: 0 path_cost: 16777215 Add vertex to SPF.
2011-07-27 03:01:39 HUAWEI %%01OSPFV2COMM/6/OSPF_DEBUG(d):CID=0x80852787; NON-TE Nexthop if_index: 6  ip_address: 10.6.6.1  if_type: TRANSIT.
2011-07-27 03:01:39 HUAWEI %%01OSPFV2COMM/6/OSPF_DEBUG(d):CID=0x80852787;FileID: 0x1 Line: 838 Level: 0x5 OSPF 1  Area: 1 MT: 0 ver_type: 1 ver_id: 0x1010102  cost: 1 Add vertex to candidate list.
2011-07-27 03:01:39 HUAWEI %%01OSPFV2COMM/6/OSPF_DEBUG(d):CID=0x80852787;FileID: 0x1 Line: 686 Level: 0x5 OSPF 1  Area: 1 MT: 0 vertex_type: 1 vertex_id: 10.1.1.2 vertex_option: 0 vertex_teif_cnt: 0     spf_cost: 1 spf_clc_num: 4 te_cost_diff: 0 path_cost: 16777215 Add vertex to SPF.
2011-07-27 03:01:39 HUAWEI %%01OSPFV2COMM/6/OSPF_DEBUG(d):CID=0x80852787; NON-TE Nexthop if_index: 6  ip_address: 10.6.6.2  if_type: TRANSIT.
2011-07-27 03:01:39 HUAWEI %%01OSPFV2COMM/6/OSPF_DEBUG(d):CID=0x80852787;FileID: 0x22 Line: 820 Level: 0x5 OSPF 1  Area: 1 MT: 0 basemt SPF calculation completed
Table 1 Description of the debugging ospf spf command output
Item Description
ver_type
  • 1: router node.
  • 2: network node.
ver_id

Node ID.

vertex_option

Node option (the same as the option in LSA).

spf_cost

Cost of the calculated node.

spf_clc_num

Number of calculation times of this node.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >