If network-wide OSPF LSA flush causes network instability, source tracing must be implemented as soon as possible to locate and isolate the fault source. However, OSPF itself does not support source tracing. A conventional solution is to isolate nodes one by one until the fault source is located, but the process is complex and time-consuming and may compromise network services. To solve the preceding problem, OSPF introduces a proprietary protocol, namely, the source tracing protocol. This protocol supports the flooding of flush source information. When the preceding problem occurs, you can quickly query the flush source information on any device on the network to quickly locate the fault source.
Source tracing
Supports query of the node that flushed LSAs on any of the devices after source tracing packets are flooded on the network, which speeds up fault locating and faulty node isolation.
Flush
Network-wide OSPF LSAs are deleted.
PS-Hello packets
Packets used to negotiate the OSPF flush source tracing capability between OSPF neighbors.
PS-LSA
When a device flushes an OSPF LSA, it generates a PS-LSA carrying information about the device and brief information about the OSPF LSA.
PS-LSU packets
OSPF flush LSA source tracing packets that carry PS-LSAs.
PS-LSU ACK packets
Acknowledgment packets used to improve OSPF flush source tracing packets.
OSPF flush source tracing port
ID of the UDP port that receives and sends OSPF flush source tracing packets. The default port ID is 50133, which is configurable.
Source tracing capability negotiation
After an OSPF neighbor relationship is established between two devices, they need to negotiate the source tracing capability through PS-Hello packets.
PS-LSA generation and flooding
When a device flushes an OSPF LSA, it generates a PS-LSA carrying information about the device and brief information about the OSPF LSA, adds the PS-LSA to a PS-LSU packet, and floods the PS-LSU packet to source tracing-capable neighbors, which helps other devices locate the fault source and perform isolation.
Only router-LSAs, network-LSAs, and inter-area-router-LSAs can be flushed. Therefore, a device generates a PS-LSA only when it flushes a router-LSA, network-LSA, or inter-area-router-LSA.
The source tracing protocol uses UDP to carry source tracing packets and listens to the UDP port, which is used to receive and send source tracing packets. If a source tracing-capable Huawei device sends source tracing packets to a source tracing-incapable Huawei device or non-Huawei device, the source tracing-capable Huawei device may be incorrectly identified as an attacker. Therefore, the source tracing capability needs to be negotiated between the devices. In addition, the source tracing-capable device needs to send source tracing information on behalf of the source tracing-incapable device, which also requires negotiation.
Source tracing capability negotiation depends on OSPF neighbor relationships. Specifically, after an OSPF neighbor relationship is established, the local device initiates source tracing capability negotiation. Figure 1 shows the negotiation process.
Whether Source Tracing Is Supported |
Source Tracing Capability Negotiation Process |
---|---|
Devices A and B both support source tracing. |
|
DeviceA supports source tracing, but DeviceB does not. |
|
Devices A and B both support source tracing, but source tracing is disabled from DeviceB. |
|
DeviceA does not support source tracing, and source tracing is disabled from DeviceB. |
|
If a device flushes an OSPF LSA, it generates and floods a PS-LSA to source tracing-capable neighbors.
If a device receives a flush LSA from a source tracing-incapable neighbor, the device generates and floods a PS-LSA to source tracing-capable neighbors. If a device receives the same flush LSA (with the same LSID and sequence number) from more than one source tracing-incapable neighbor, the device generates only one PS-LSA.
If a device flushes a router-LSA, network-LSA, or inter-area-router-LSA, it generates a PS-LSA, adds the PS-LSA to a PS-LSU packet, and floods the PS-LSU packet to all source tracing-capable neighbors.
PS-LSA generation rules
PS-LSU packet sending rules
PS-LSU packet sending is independent among neighbors.
PS-LSU packet receiving rules
The source tracing protocol uses a UDP port to receive and send source tracing packets. Therefore, the security of the port must be taken into consideration.
The source tracing protocol inevitably increases packet receiving and sending workload and intensifies bandwidth pressure. To minimize its impact on other protocols, the number of source tracing packets must be controlled.
The following security measures are available:
Security Measures for Source Tracing |
Fundamentals |
---|---|
Authentication |
Source tracing is embedded in OSPF, inherits existing OSPF configuration parameters, and uses OSPF authentication parameters to authenticate packets. |
GTSM |
GTSM is a security mechanism that checks whether the time to live (TTL) value in each received IP packet header is within a pre-defined range. Source tracing packets can only be flooded as far as one hop. Therefore, GTSM can be used to check such packets by default.
|
CPU-CAR |
Interface boards can check the packets to be sent to the CPU for processing and prevent the main control board from being overloaded by a large number of packets that are sent to the CPU. The source tracing protocol needs to apply for an independent CAR channel and has small CAR values configured. |
Scenario where all nodes support source tracing
All nodes on the network support source tracing, and DeviceA is the faulty source. Figure 3 shows the networking.
When DeviceA flushes an OSPF LSA, it generates a PS-LSA that carries DeviceA information and brief information about the flush LSA. Then the PS-LSA is flooded on the network hop by hop. After the fault occurs, maintenance personnel can log in to any node on the network to locate DeviceA that keeps sending flush LSAs and isolate DeviceA from the network.
Scenario where source tracing-incapable nodes are not isolated from source tracing-capable nodes
All nodes on the network except DeviceC support source tracing, and DeviceA is the fault source. In this case, the PS-LSA can be flooded on the entire network, and the fault source can be accurately located. Figure 4 shows the networking.
When DeviceA flushes an OSPF LSA, it generates a PS-LSA that carries DeviceA information and brief information about the flush LSA. Then the PS-LSA is flooded on the network hop by hop. When DeviceB and DeviceE negotiate the source tracing capability with DeviceC, they find that DeviceC does not support source tracing. Therefore, after DeviceB receives the PS-LSA from DeviceA, DeviceB sends the PS-LSA to DeviceD, but not to DeviceC. After receiving the flush LSA from DeviceC, DeviceE generates a PS-LSA that carries information about the advertisement source (DeviceE), flush source (DeviceC), and the flush LSA, and floods the PS-LSA on the network.
After the fault occurs, maintenance personnel can log in to any device on the network except DeviceC to locate the faulty node. Two possible faulty nodes can be located in this case: DeviceA and DeviceC, and they both send the same flush LSA. In this case, DeviceA takes precedence over DeviceC when the maintenance personnel determine the most possible faulty source. After DeviceA is isolated, the network recovers.
Scenario where source tracing-incapable nodes are isolated from source tracing-capable nodes
All nodes on the network except DeviceC and DeviceD support source tracing, and DeviceA is the faulty source. In this case, the PS-LSA cannot be flooded on the entire network. Figure 5 shows the networking.
When DeviceA flushes an OSPF LSA, it generates a PS-LSA that carries DeviceA information and brief information about the flush LSA. However, the PS-LSA can reach only DeviceB because DeviceC and DeviceD do not support source tracing.
During source tracing capability negotiation, DeviceE finds that DeviceC does not support source tracing, and DeviceF finds that DeviceD does not support source tracing. After DeviceE receives the flush LSA from DeviceC, DeviceE generates and floods a PS-LSA on behalf of DeviceC. Similarly, after DeviceF receives the flush LSA from DeviceD, DeviceF generates and floods a PS-LSA on behalf of DeviceD.