CN106453080B - Tracing method and device for link state clearing message - Google Patents

Tracing method and device for link state clearing message Download PDF

Info

Publication number
CN106453080B
CN106453080B CN201610840484.XA CN201610840484A CN106453080B CN 106453080 B CN106453080 B CN 106453080B CN 201610840484 A CN201610840484 A CN 201610840484A CN 106453080 B CN106453080 B CN 106453080B
Authority
CN
China
Prior art keywords
link state
identifier
message
packet
tlv
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610840484.XA
Other languages
Chinese (zh)
Other versions
CN106453080A (en
Inventor
晁军显
林长望
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201610840484.XA priority Critical patent/CN106453080B/en
Publication of CN106453080A publication Critical patent/CN106453080A/en
Application granted granted Critical
Publication of CN106453080B publication Critical patent/CN106453080B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/52Multiprotocol routers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/72Routing based on the source address

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention discloses a tracing method and a tracing device for a link state clearing message.A first device generates a TLV (threshold Length value) of the link state clearing message according to a first message identifier of the link state clearing message and a device identifier of a last hop device for a device (first device) receiving the link state clearing message; adding the TLV in a link state message to be sent; and sending the link state message. For the device (second device) receiving the link state message, the second device obtains the first message identifier and the device identifier from the TLV, and stores the record information of the link state clear message. When determining that the source device of the link state clear message is present, the third device searches the device identifier of the previous hop device in the stored recording information until finding the device identifier of the source device. Therefore, in the scheme, the identification TLV does not need to be added in the link state clearing message, and the problem of protocol standard incompatibility is avoided.

Description

Tracing method and device for link state clearing message
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for sending a link state packet with trace information, and a method and an apparatus for trace of a link state clear packet.
Background
The routing protocol based on the link state generally includes an Open Shortest Path First (OSPF) protocol, an Intermediate System-to-Intermediate System (IS-to-Intermediate) protocol, and the like. In a network applying a routing Protocol based on a Link State, each device generates a series of Link State messages (such as LSPDU (Link State Protocol Data Unit) in IS-IS Protocol and LSA (Link-State Advertisement, Link State broadcast) in OSPF Protocol) respectively, which are used for describing Link information of the device itself and neighbor devices; the link state message is sent to all the devices in the network through a diffusion mechanism in the network; in this way, all devices in the network obtain the full topology information of the network. Therefore, each device in the network can generate a loop-free optimal route according to the obtained topology information, thereby guiding data forwarding.
When the link state of a certain device is cancelled, the device generates a link state clearing message and sends the link state clearing message to the network so as to delete the link state. In general, a source device in a network (i.e., a device that generates a link state clear message) that needs to determine a link state clear message, for example, a link state clear message is flooded in the network to cause a routing oscillation, and in this case, a reason needs to be checked, so that the source device of the link state clear message needs to be determined.
In the existing scheme, when a device generates a link state clear packet, an identification TLV (type length Value, type-length-Value) is added to the packet, where the identification TLV includes identification information of the device, so that in a process of forwarding the packet, a source device of the packet can be determined according to the identification TLV.
However, in some protocol standards, other TLVs may be carried in the link state clear packet, for example, a certain security protocol may carry an authentication TLV in the link state clear packet, and at this time, it is not allowed to add another TLV in the link state clear packet. That is, in this case, the identification TLV cannot be added to the link status clear packet, and the above scheme is not compatible with such a protocol standard under which the above scheme cannot be implemented.
Disclosure of Invention
The embodiment of the invention aims to provide a method and a device for sending a link state message carrying traceability information, a method and a device for traceability of a link state clearing message, and a problem of protocol standard incompatibility.
In order to achieve the above object, an embodiment of the present invention discloses a method for sending a link state packet carrying traceability information, which is applied to a first device, and the method includes:
receiving a first link state clearing message;
sending the first link state clearing message, and generating a first TLV type-length-value of the first link state clearing message according to the first link state clearing message;
adding the first TLV in a first link state message to be sent;
and sending the first link state message, so that each device receiving the first link state message obtains a first message identifier of the first link state clear message and a device identifier of a last hop device from the first TLV, and stores record information of the first link state clear message, wherein the record information comprises the device identifier of the first device, the first message identifier recorded for the first device and the device identifier of the last hop device, and the last hop device is a device sending the first link state clear message to the first device.
Optionally, the method may further include:
receiving a second link state message sent by second equipment;
and obtaining the first packet identifier and the device identifier of the last hop device of the second device from a second TLV of the second link state packet, and storing record information of the first link state clear packet, where the record information includes the device identifier of the second device, and the first packet identifier and the device identifier of the last hop device of the second device, which are recorded for the second device.
Optionally, before the generating the first TLV of the first link state clear packet, the method further includes:
obtaining a first sequence number of the first link state clearing message;
judging whether the first serial number exists in the serial numbers of the received historical link state messages or not;
and if not, executing the step of generating the first TLV of the first link state clearing message.
In order to achieve the above object, an embodiment of the present invention further discloses a method for tracing a link state clear packet, which is applied to a third device, where the method includes:
acquiring a first message identifier of a first link state clearing message of a source to be traced;
in the stored record information of the first link state clearing message, searching the device identifier of the last hop device corresponding to the first message identifier according to the device identifier of the third device;
searching the equipment identifier of the next previous hop equipment corresponding to the first message identifier according to the equipment identifier of the previous hop equipment until the equipment identifier of the source equipment is searched; the recording information includes: the device identifier of each device that receives the first link state clear packet, and the first packet identifier recorded for each device that receives the first link state clear packet and the device identifier of the last hop device of the device.
Optionally, before the obtaining the first packet identifier of the first link state clear packet of the source to be traced back, the method may further include:
receiving at least one first link state message, wherein each first link state message comprises a first TLV (threshold value limit) of a first link state clearing message;
and obtaining a first message identifier of the first link state clear message and a device identifier of a previous hop device from a first TLV (threshold Length value) in each first link state message, and storing record information of the first link state clear message.
In order to achieve the above object, an embodiment of the present invention further discloses a device for sending a link state packet carrying traceability information, which is applied to a first device, and the device includes:
the first receiving module is used for receiving the first link state clearing message;
a first sending module, configured to send the first link status clear packet;
a generating module, configured to generate a first TLV type-length-value of the first link state clear packet according to the first link state clear packet;
an adding module, configured to add the first TLV to a first link state packet to be sent;
a second sending module, configured to send the first link state packet, so that each device that receives the first link state packet obtains a first packet identifier of the first link state clear packet and a device identifier of a previous hop device from the first TLV, and stores record information of the first link state clear packet, where the record information includes the device identifier of the first device, and the first packet identifier and the device identifier of the previous hop device that are recorded for the first device, and the previous hop device is a device that sends the first link state clear packet to the first device.
Optionally, the apparatus may further include:
the second receiving module is used for receiving a second link state message sent by the second equipment;
a first storage module, configured to obtain the first packet identifier and a device identifier of a previous-hop device of the second device from a second TLV of the second link state packet, and store record information of the first link state clear packet, where the record information includes the device identifier of the second device, and the first packet identifier and the device identifier of the previous-hop device, which are recorded for the second device.
Optionally, the apparatus may further include:
an obtaining module, configured to obtain a first sequence number of the first link status clear packet;
the judging module is used for judging whether the first serial number exists in the serial numbers of the received historical link state messages or not; if not, triggering the generation module.
In order to achieve the above object, an embodiment of the present invention further discloses a source tracing apparatus for a link state clear packet, which is applied to a third device, where the apparatus includes:
the acquisition module is used for acquiring a first message identifier of a first link state clearing message of a source to be traced;
the searching module is used for searching the device identifier of the previous hop device corresponding to the first message identifier according to the device identifier of the third device in the stored record information of the first link state clearing message; searching the equipment identifier of the next previous hop equipment corresponding to the first message identifier according to the equipment identifier of the previous hop equipment until the equipment identifier of the source equipment is searched; the recording information includes: the device identifier of each device that receives the first link state clear packet, and the first packet identifier recorded for each device that receives the first link state clear packet and the device identifier of the last hop device of the device.
Optionally, the apparatus may further include:
a third receiving module, configured to receive at least one first link state packet, where each first link state packet includes a first TLV of a first link state clear packet;
and the second storage module is configured to obtain the first packet identifier of the first link state clear packet and the device identifier of the previous hop device from the first TLV in each first link state packet, and store record information of the first link state clear packet.
By applying the embodiment of the present invention, in the process of forwarding the link state clear packet, for each device (hereinafter referred to as a first device) that receives the first link state clear packet, the first device generates the first TLV of the first link state clear packet according to the first packet identifier of the first link state clear packet and the device identifier of the previous hop device; adding a first TLV in a first link state message to be sent; and sending the first link state message. For other devices (hereinafter referred to as second devices) that receive the first link state packet, the second device obtains, from the first TLV, a first packet identifier of the first link state clear packet and a device identifier of a previous hop device, and stores record information of the first link state clear packet, where the record information includes the device identifier of the first device, and the first packet identifier and the device identifier of the previous hop device, which are recorded for the first device, and the previous hop device is a device that sends the first link state clear packet to the first device.
In this way, when tracing the link state clear message, for any device in the network (hereinafter referred to as a third device), the third device searches, in the stored record information of the first link state clear message, the device identifier of the previous hop device corresponding to the first message identifier according to the device identifier of the third device; and searching the equipment identifier of the next previous hop equipment corresponding to the first message identifier according to the equipment identifier of the previous hop equipment until the equipment identifier of the source equipment is searched. Therefore, in the scheme, the TLV of the link state clearing message is sent through the link state message, and the problem of protocol standard incompatibility can be avoided because an identification TLV does not need to be added in the link state clearing message.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for sending a link state packet with trace information according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a network structure applying a routing protocol based on a link state according to an embodiment of the present invention;
fig. 3 is a schematic format diagram of a TLV provided in an embodiment of the present invention;
fig. 4 is a schematic flowchart of a tracing method for a link state clear packet according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a link status message sending apparatus carrying traceability information according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a source tracing apparatus for a link state clear packet according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to solve the above technical problem, embodiments of the present invention provide a method and an apparatus for sending a link state packet carrying traceability information, and a method and an apparatus for tracing a link state clear packet. First, a detailed description is given below of a link state packet sending method with trace-to-source information according to an embodiment of the present invention, where the method is applied to a first device, where the first device may be any one device in a network that applies a routing protocol based on a link state, and the device may be a router, a switch, a gateway, or the like.
Fig. 1 is a schematic flow chart of a method for sending a link state packet with trace-to-source information according to an embodiment of the present invention, where the method includes:
s101: and receiving a first link state clearing message.
In the network shown in fig. 2, the network applies a routing protocol based on link states, and it is assumed that the device S generates a link state clearing message, which is referred to as a first link state clearing message. The packet carries a first packet identifier, which is assumed to be 0000.0000.0000.01-01. The device S diffuses the message from all its interfaces (S1-S3). Assume that device B is the first device and receives the first link state clear message.
S102: and sending the first link state clearing message.
In a network applying a routing protocol based on a link state, each device receiving a link state clear message forwards the message. After receiving the first link state clear message, the device B also forwards the first link state clear message. It should be noted that, in the present solution, when forwarding the link state clear packet, the packet is directly forwarded without any modification.
S103: and generating a first TLV type-length-value of the first link state clearing message according to the first link state clearing message.
The device B acquires a first message identifier 0000.0000.0000.01-01 from the received first link status clear message; in addition, the device B obtains 0000.0000.1000 a device identifier of a device (device S) that sends the first link state clear message to itself, where the device S is taken as a previous-hop device of the device B. It should be noted that the first link status clear message does not include the device identifier of the device S, and the device B can directly obtain the device identifier of the device in direct communication with itself.
And generating a first TLV (threshold Length value) of the first link state clearing message according to the first message identifier and the device identifier of the last hop device. That is, the first TLV including the first packet identifier of the first link state clear packet and the device identifier of the previous hop device may be {0000.0000.0000.01-01, 0000.0000.1000 }.
S104: and adding the first TLV in a first link state message to be sent.
After receiving the first link state clear packet, the device B adds the first TLV to the first link state packet to be sent, and the specific format may be as shown in fig. 3: the Type can be a value which is not adopted by other TLVs in the first link state message; length, i.e. the Length of the Value part, may be 14 bytes; value may contain two parts: LSPID and System ID, where the LSP ID is the first packet identifier of the received link status clear packet, here the first packet identifier of the first link status clear packet, and the length is 8 bytes, and the System ID is the device identifier of the device that sends the link status clear packet, here the device identifier of the previous hop device, that is, the device identifier of the device S.
S105: and sending the first link state message, so that each device receiving the first link state message obtains a first message identifier of the first link state clear message and a device identifier of a previous hop device from the first TLV, and stores record information of the first link state clear message, wherein the record information comprises the device identifier of the first device, the first message identifier recorded for the first device and the device identifier of the previous hop device. The previous-hop device is a previous-hop device of the first device, that is, a device that sends the first link state packet to the first device.
And the device B diffuses the first link state message from all interfaces of the device B. In the network shown in fig. 2, it is assumed that device a receives the first link state packet. Device a obtains the first packet identifier 0000.0000.0000.01-01 of the first link state clear packet and the device identifier 0000.0000.1000 of the last hop device (device S) of device B from the first TLV of the first link state packet.
Device a stores the record information for the first link state clear message, which may be 0000.0000.0002: {0000.0000.0000.01-01, 0000.0000.1000}, where 0000.0000.0002 is the device id of device B, and records, for device B, the first packet id and the device id of the last-hop device (device S) of device B.
It should be noted that, in a network applying a routing protocol based on a link state, a link state packet and a link state clearing packet are flooded over the entire network, and one device may receive a plurality of same link state clearing packets: for example, in fig. 2, the device a may receive the link state clearing message forwarded by the device B first, and then receive the link state clearing message sent by the device S.
In the above scheme, after receiving the link state clear packet, the device generates a TLV of the link state clear packet, and sends the link state packet to which the TLV is added. If the device receives a plurality of identical link state clear messages, the TLV of the link state clear message is generated each time, and the link state message added with the TLV is sent, on one hand, the device can frequently generate the TLV of the link state clear message and frequently send the link state message added with the TLV, and on the other hand, a plurality of unnecessary record information can be added in each device.
In this case, before generating the first TLV of the first link state clear packet, the device may obtain the sequence number of the first link state clear packet, specifically, the link state clear packet includes its own sequence number, and the device may read the sequence number of the packet from the first link state clear packet. The equipment judges whether the serial number exists in the serial numbers of the received historical LSP Purge messages or not; and if not, generating the first TLV of the first link state clearing message.
That is, the device may record the sequence number of the link state clear packet received by itself (that is, the sequence number of the received historical link state packet), compare the sequence numbers of the link state clear packets, determine whether itself has received the same link state clear packet, if so, no TLV of the link state clear packet is generated, and if not, the TLV of the link state clear packet is generated, and the subsequent operations are continuously performed.
In the whole network flooding process, each device except the source device sends a link state message generated by the device to other devices in the network, wherein the link state message comprises a first message identifier of a link state clearing message and a device identifier of a previous hop device. Finally, the recorded information stored by each device in the network except the source device is the same. It should be noted that the source device, i.e., the device S in the above example, may not store the recorded information, and may also store a piece of recorded information that is different from other devices and can indicate that the source device is the source device, which is not limited herein.
In the network shown in fig. 2, the record information stored in each device except the source device for the first link state clear packet may be as follows:
0000.0000.0002:{0000.0000.0000.01-01,0000.0000.1000}
0000.0000.0001:{0000.0000.0000.01-01,0000.0000.0002}
0000.0000.0004:{0000.0000.0000.01-01,0000.0000.0001}
0000.0000.0003:{0000.0000.0000.01-01,0000.0000.0004}
therefore, when the source of the first link state clear message is traced, the record information of the first link state clear message can be searched. Assuming a lookup is made from device a, device a's device id 0000.0000.0001 may be first looked up starting from device a to find a record: 0000.0000.0001: {0000.0000.0000.01-01, 0000.0000.0002}, that is, the device id of the last hop device of device a is 0000.0000.0002, and the last hop device of device a is device B. Then, the device id 0000.0000.0002 of device B is searched for a record: 0000.0000.0002: {0000.0000.0000.01-01, 0000.0000.1000}, that is, the device id of the last hop device of device B is 0000.0000.1000, and the last hop device of device B is device S. According to the above process, the source device of the first link state clear message can be determined to be the device S.
With the embodiment of fig. 1 of the present invention, in the process of forwarding the link state clear packet, for each device (hereinafter referred to as a first device) that receives the first link state clear packet, the first device generates a first TLV of the first link state clear packet according to the first packet identifier of the first link state clear packet and the device identifier of the previous hop device; adding a first TLV in a first link state message to be sent; and sending the first link state message. For other devices (hereinafter referred to as second devices) that receive the first link state packet, the second device obtains, from the first TLV, a first packet identifier of the first link state clear packet and a device identifier of a previous hop device, and stores record information of the first link state clear packet, where the record information includes the device identifier of the first device, and the first packet identifier and the device identifier of the previous hop device, which are recorded for the first device, and the previous hop device is a device that sends the first link state clear packet to the first device.
In this way, when tracing the link state clear message, for any device in the network (hereinafter referred to as a third device), the third device searches, in the stored record information of the first link state clear message, the device identifier of the previous hop device corresponding to the first message identifier according to the device identifier of the third device; and searching the equipment identifier of the next previous hop equipment corresponding to the first message identifier according to the equipment identifier of the previous hop equipment until the equipment identifier of the source equipment is searched. Therefore, in the scheme, the TLV of the link state clearing message is sent through the link state message, and the problem of protocol standard incompatibility can be avoided because an identification TLV does not need to be added in the link state clearing message.
The tracing method for the link state clear packet provided by the embodiment of the present invention is applied to a third device, where the third device may be any one device in a network applying a routing protocol based on a link state, and the device may be a router, a switch, a gateway, and the like. As shown in fig. 4, the method includes:
s401: and acquiring a first message identifier of a first link state clearing message of a source to be traced.
As described above, the link status clear packet carries the first packet identifier, and after receiving the first link status clear packet, the first packet identifier of the first link status clear packet may be obtained from the packet.
S402: in the stored record information of the first link state clearing message, searching the device identifier of the last hop device corresponding to the first message identifier according to the device identifier of the third device; searching the equipment identifier of the next previous hop equipment corresponding to the first message identifier according to the equipment identifier of the previous hop equipment until the equipment identifier of the source equipment is searched; the recording information includes: the device identifier of each device that receives the first link state clear packet, and the first packet identifier recorded for each device that receives the first link state clear packet and the device identifier of the last hop device of the device.
It should be noted that in the process of searching for the source device, when the device identifier of the previous hop device of a certain device is not found, it indicates that the search is completed, and the device is the source device.
According to the above embodiment, each device in the network except the source device stores the record information of the first link status clear packet:
0000.0000.0002:{0000.0000.0000.01-01,0000.0000.1000}
0000.0000.0001:{0000.0000.0000.01-01,0000.0000.0002}
0000.0000.0004:{0000.0000.0000.01-01,0000.0000.0001}
0000.0000.0003:{0000.0000.0000.01-01,0000.0000.0004}
therefore, when the source of the first link state clear message is traced, the record information of the first link state clear message can be searched. Assuming that the third device is device a, starting from device a, the device identifier 0000.0000.0001 of device a is first searched for a record: 0000.0000.0001: {0000.0000.0000.01-01, 0000.0000.0002}, that is, the device id of the last hop device of device a is 0000.0000.0002, and the last hop device of device a is device B. Then, the device id 0000.0000.0002 of device B is searched for a record: 0000.0000.0002: {0000.0000.0000.01-01, 0000.0000.1000}, that is, the device id of the last hop device of device B is 0000.0000.1000, and the last hop device of device B is device S. The device identifier of the previous hop device of the device S is not found in the stored record information, which indicates that the search is completed, and the device S is the source device of the first link state clear packet.
In this embodiment, before tracing the source of the link state clear packet, the record information of the link state clear packet is stored. The specific process can comprise the following steps:
receiving at least one first link state message, wherein each first link state message comprises a first TLV (threshold value limit) of a first link state clearing message; and obtaining a first message identifier of the first link state clear message and a device identifier of a previous hop device from a first TLV (threshold Length value) in each first link state message, and storing record information of the first link state clear message.
As an embodiment, an aging period may be set for the recording information, and when the aging period is reached, the apparatus deletes the recording information stored by itself. It can be understood that the storage resource of each device is limited, the record information cannot be stored without limitation, and the record information stored in the device can be cleaned regularly.
In the network shown in fig. 2, it is assumed that device D receives two link state messages: the link state message generated by device B and the link state message generated by device a. TLV included in the link state message generated by the device B is {0000.0000.0000.01-01, 0000.0000.1000 }; the TLV included in the link state message generated by device A is {0000.0000.0000.01-01, 0000.0000.0002 }.
The device D obtains the first message identifier (0000.0000.0000.01-01) of the link state clear message and the device identifier (0000.0000.1000 and 0000.0000.0002) of the previous hop device from the two link state messages respectively.
The device a stores record information for the link state clear message, which may include 0000.0000.0002: {0000.0000.0000.01-01, 0000.0000.1000} and 0000.0000.0001: {0000.0000.0000.01-01, 0000.0000.0002}, where 0000.0000.0002 is the device identifier of device B, records the first packet identifier and the device identifier of the device (device S) of the previous hop of device B for device B, and 0000.0000.0001 is the device identifier of device a, and records the first packet identifier and the device identifier of the device (device B) of the previous hop of device a for device a.
By analogy, through the flooding mechanism of the routing protocol based on the link state, finally, the record information stored by each device except the source device in the network is the same.
With the embodiment shown in fig. 4 of the present invention, in the process of forwarding the link state clear packet, for each device (hereinafter referred to as a first device) that receives the first link state clear packet, the first device generates a first TLV of the first link state clear packet according to the first packet identifier of the first link state clear packet and the device identifier of the previous hop device; adding a first TLV in a first link state message to be sent; and sending the first link state message. For other devices (hereinafter referred to as second devices) that receive the first link state packet, the second device obtains, from the first TLV, a first packet identifier of the first link state clear packet and a device identifier of a previous hop device, and stores record information of the first link state clear packet, where the record information includes the device identifier of the first device, and the first packet identifier and the device identifier of the previous hop device, which are recorded for the first device, and the previous hop device is a device that sends the first link state clear packet to the first device.
In this way, when tracing the link state clear message, for any device in the network (hereinafter referred to as a third device), the third device searches, in the stored record information of the first link state clear message, the device identifier of the previous hop device corresponding to the first message identifier according to the device identifier of the third device; and searching the equipment identifier of the next previous hop equipment corresponding to the first message identifier according to the equipment identifier of the previous hop equipment until the equipment identifier of the source equipment is searched. Therefore, in the scheme, the TLV of the link state clearing message is sent through the link state message, and the problem of protocol standard incompatibility can be avoided because an identification TLV does not need to be added in the link state clearing message.
Corresponding to the above method embodiment, the embodiment of the present invention further provides a link state message sending device carrying tracing information, and a tracing device for removing a message in a link state.
Fig. 5 is a schematic structural diagram of a link status packet sending apparatus carrying tracing information according to an embodiment of the present invention, including:
a first receiving module 501, configured to receive a first link status clear message;
a first sending module 502, configured to send the first link status clear packet;
a generating module 503, configured to generate a first TLV type-length-value of the first link state clear packet according to the first link state clear packet;
an adding module 504, configured to add the first TLV to a first link state packet to be sent;
a second sending module 505, configured to send the first link state packet, so that each device that receives the first link state packet obtains, from the first TLV, a first packet identifier of the first link state clear packet and a device identifier of a previous hop device, and stores record information of the first link state clear packet, where the record information includes the device identifier of the first device, and the first packet identifier and the device identifier of the previous hop device that are recorded for the first device, and the previous hop device is a device that sends the first link state clear packet to the first device.
In this embodiment, the apparatus may further include: a second receiving module and a first storing module (not shown in the figure), wherein,
the second receiving module is used for receiving a second link state message sent by the second equipment;
a first storage module, configured to obtain the first packet identifier and a device identifier of a previous-hop device of the second device from a second TLV of the second link state packet, and store record information of the first link state clear packet, where the record information includes the device identifier of the second device, and the first packet identifier and the device identifier of the previous-hop device, which are recorded for the second device.
In this embodiment, the apparatus may further include: an obtaining module and a judging module (not shown in the figure), wherein,
an obtaining module, configured to obtain a first sequence number of the first link status clear packet;
the judging module is used for judging whether the first serial number exists in the serial numbers of the received historical link state messages or not; if not, triggering the generation module.
With the embodiment of fig. 5 of the present invention, in the process of forwarding the link state clear packet, for each device (hereinafter referred to as a first device) that receives the first link state clear packet, the first device generates a first TLV of the first link state clear packet according to the first packet identifier of the first link state clear packet and the device identifier of the previous hop device; adding a first TLV in a first link state message to be sent; and sending the first link state message. For other devices (hereinafter referred to as second devices) that receive the first link state packet, the second device obtains, from the first TLV, a first packet identifier of the first link state clear packet and a device identifier of a previous hop device, and stores record information of the first link state clear packet, where the record information includes the device identifier of the first device, and the first packet identifier and the device identifier of the previous hop device, which are recorded for the first device, and the previous hop device is a device that sends the first link state clear packet to the first device.
In this way, when tracing the link state clear message, for any device in the network (hereinafter referred to as a third device), the third device searches, in the stored record information of the first link state clear message, the device identifier of the previous hop device corresponding to the first message identifier according to the device identifier of the third device; and searching the equipment identifier of the next previous hop equipment corresponding to the first message identifier according to the equipment identifier of the previous hop equipment until the equipment identifier of the source equipment is searched. Therefore, in the scheme, the TLV of the link state clearing message is sent through the link state message, and the problem of protocol standard incompatibility can be avoided because an identification TLV does not need to be added in the link state clearing message.
Fig. 6 is a schematic structural diagram of a source device determining apparatus according to an embodiment of the present invention, including:
an obtaining module 601, configured to obtain a first packet identifier of a first link state clear packet of a source to be traced;
a searching module 602, configured to search, in the stored record information of the first link status clear packet, a device identifier of a previous-hop device corresponding to the first packet identifier according to the device identifier of the third device; searching the equipment identifier of the next previous hop equipment corresponding to the first message identifier according to the equipment identifier of the previous hop equipment until the equipment identifier of the source equipment is searched; the recording information includes: the device identifier of each device that receives the first link state clear packet, and the first packet identifier recorded for each device that receives the first link state clear packet and the device identifier of the last hop device of the device.
In this embodiment, the apparatus may further include: a third receiving module and a second storing module (not shown in the figure), wherein,
a third receiving module, configured to receive at least one first link state packet, where each first link state packet includes a first TLV of a first link state clear packet;
and the second storage module is configured to obtain the first packet identifier of the first link state clear packet and the device identifier of the previous hop device from the first TLV in each first link state packet, and store record information of the first link state clear packet.
With the embodiment shown in fig. 6 of the present invention, in the process of forwarding the link state clear packet, for each device (hereinafter referred to as a first device) that receives the first link state clear packet, the first device generates a first TLV of the first link state clear packet according to the first packet identifier of the first link state clear packet and the device identifier of the previous hop device; adding a first TLV in a first link state message to be sent; and sending the first link state message. For other devices (hereinafter referred to as second devices) that receive the first link state packet, the second device obtains, from the first TLV, a first packet identifier of the first link state clear packet and a device identifier of a previous hop device, and stores record information of the first link state clear packet, where the record information includes the device identifier of the first device, and the first packet identifier and the device identifier of the previous hop device, which are recorded for the first device, and the previous hop device is a device that sends the first link state clear packet to the first device.
In this way, when tracing the link state clear message, for any device in the network (hereinafter referred to as a third device), the third device searches, in the stored record information of the first link state clear message, the device identifier of the previous hop device corresponding to the first message identifier according to the device identifier of the third device; and searching the equipment identifier of the next previous hop equipment corresponding to the first message identifier according to the equipment identifier of the previous hop equipment until the equipment identifier of the source equipment is searched. Therefore, in the scheme, the TLV of the link state clearing message is sent through the link state message, and the problem of protocol standard incompatibility can be avoided because an identification TLV does not need to be added in the link state clearing message.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Those skilled in the art will appreciate that all or part of the steps in the above method embodiments may be implemented by a program to instruct relevant hardware to perform the steps, and the program may be stored in a computer-readable storage medium, which is referred to herein as a storage medium, such as: ROM/RAM, magnetic disk, optical disk, etc.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A method for sending a link state message carrying tracing information is applied to a first device, and comprises the following steps:
receiving a first link state clearing message;
sending the first link state clearing message, and generating a first TLV type-length-value of the first link state clearing message according to the first link state clearing message;
adding the first TLV in a first link state message to be sent;
and sending the first link state message, so that each device receiving the first link state message obtains a first message identifier of the first link state clear message and a device identifier of a last hop device from the first TLV, and stores record information of the first link state clear message, wherein the record information comprises the device identifier of the first device, the first message identifier recorded for the first device and the device identifier of the last hop device, and the last hop device is a device sending the first link state clear message to the first device.
2. The method of claim 1, further comprising:
receiving a second link state message sent by second equipment;
and obtaining the first packet identifier and the device identifier of the last hop device of the second device from a second TLV of the second link state packet, and storing record information of the first link state clear packet, where the record information includes the device identifier of the second device, and the first packet identifier and the device identifier of the last hop device of the second device, which are recorded for the second device.
3. The method of claim 1, wherein before the generating the first TLV of the first link state clear packet, further comprising:
obtaining a first sequence number of the first link state clearing message;
judging whether the first serial number exists in the serial numbers of the received historical link state messages or not;
and if not, executing the step of generating the first TLV of the first link state clearing message.
4. A tracing method of a link state clearing message is applied to a third device, and the method comprises the following steps:
acquiring a first message identifier of a first link state clearing message of a source to be traced;
in the stored record information of the first link state clearing message, searching the device identifier of the last hop device corresponding to the first message identifier according to the device identifier of the third device;
searching the equipment identifier of the next previous hop equipment corresponding to the first message identifier according to the equipment identifier of the previous hop equipment until the equipment identifier of the source equipment is searched; the recording information includes: the device identifier of each device that receives the first link state clear packet, and the first packet identifier recorded for each device that receives the first link state clear packet and the device identifier of the last hop device of the device.
5. The method according to claim 4, wherein before the obtaining the first packet identifier of the first link state clear packet of the source to be traced, further comprising:
receiving at least one first link state message, wherein each first link state message comprises a first TLV (threshold value limit) of a first link state clearing message;
and obtaining a first message identifier of the first link state clear message and a device identifier of a previous hop device from a first TLV (threshold Length value) in each first link state message, and storing record information of the first link state clear message.
6. A kind of link state message sending device carrying tracing information, characterized by that, apply to the first apparatus, the said device includes:
the first receiving module is used for receiving the first link state clearing message;
a first sending module, configured to send the first link status clear packet;
a generating module, configured to generate a first TLV type-length-value of the first link state clear packet according to the first link state clear packet;
an adding module, configured to add the first TLV to a first link state packet to be sent;
a second sending module, configured to send the first link state packet, so that each device that receives the first link state packet obtains a first packet identifier of the first link state clear packet and a device identifier of a previous hop device from the first TLV, and stores record information of the first link state clear packet, where the record information includes the device identifier of the first device, and the first packet identifier and the device identifier of the previous hop device that are recorded for the first device, and the previous hop device is a device that sends the first link state clear packet to the first device.
7. The apparatus of claim 6, further comprising:
the second receiving module is used for receiving a second link state message sent by the second equipment;
a first storage module, configured to obtain the first packet identifier and a device identifier of a previous-hop device of the second device from a second TLV of the second link state packet, and store record information of the first link state clear packet, where the record information includes the device identifier of the second device, and the first packet identifier and the device identifier of the previous-hop device, which are recorded for the second device.
8. The apparatus of claim 6, further comprising:
an obtaining module, configured to obtain a first sequence number of the first link status clear packet;
the judging module is used for judging whether the first serial number exists in the serial numbers of the received historical link state messages or not; if not, triggering the generation module.
9. A tracing apparatus for clearing message in link state is applied to a third device, and the apparatus includes:
the acquisition module is used for acquiring a first message identifier of a first link state clearing message of a source to be traced;
the searching module is used for searching the device identifier of the previous hop device corresponding to the first message identifier according to the device identifier of the third device in the stored record information of the first link state clearing message; searching the equipment identifier of the next previous hop equipment corresponding to the first message identifier according to the equipment identifier of the previous hop equipment until the equipment identifier of the source equipment is searched; the recording information includes: the device identifier of each device that receives the first link state clear packet, and the first packet identifier recorded for each device that receives the first link state clear packet and the device identifier of the last hop device of the device.
10. The apparatus of claim 9, further comprising:
a third receiving module, configured to receive at least one first link state packet, where each first link state packet includes a first TLV of a first link state clear packet;
and the second storage module is configured to obtain the first packet identifier of the first link state clear packet and the device identifier of the previous hop device from the first TLV in each first link state packet, and store record information of the first link state clear packet.
CN201610840484.XA 2016-09-22 2016-09-22 Tracing method and device for link state clearing message Active CN106453080B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610840484.XA CN106453080B (en) 2016-09-22 2016-09-22 Tracing method and device for link state clearing message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610840484.XA CN106453080B (en) 2016-09-22 2016-09-22 Tracing method and device for link state clearing message

Publications (2)

Publication Number Publication Date
CN106453080A CN106453080A (en) 2017-02-22
CN106453080B true CN106453080B (en) 2020-06-05

Family

ID=58166823

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610840484.XA Active CN106453080B (en) 2016-09-22 2016-09-22 Tracing method and device for link state clearing message

Country Status (1)

Country Link
CN (1) CN106453080B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112558504B (en) * 2019-09-10 2021-11-02 中国电信股份有限公司 Method, device and system for forwarding critical path information based on OSPF protocol

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102143032A (en) * 2010-02-02 2011-08-03 杭州华三通信技术有限公司 Method for eliminating residual link state protocol data unit fragments and route equipment
CN104935513A (en) * 2015-04-30 2015-09-23 杭州华三通信技术有限公司 Method and apparatus of clearing link state advertisement
CN105553856A (en) * 2015-12-15 2016-05-04 瑞斯康达科技发展股份有限公司 Method and device for realizing link-state packet updating
CN105591937A (en) * 2015-09-30 2016-05-18 杭州华三通信技术有限公司 Network topology information acquisition method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8589573B2 (en) * 2006-03-08 2013-11-19 Cisco Technology, Inc. Technique for preventing routing loops by disseminating BGP attribute information in an OSPF-configured network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102143032A (en) * 2010-02-02 2011-08-03 杭州华三通信技术有限公司 Method for eliminating residual link state protocol data unit fragments and route equipment
CN104935513A (en) * 2015-04-30 2015-09-23 杭州华三通信技术有限公司 Method and apparatus of clearing link state advertisement
CN105591937A (en) * 2015-09-30 2016-05-18 杭州华三通信技术有限公司 Network topology information acquisition method and device
CN105553856A (en) * 2015-12-15 2016-05-04 瑞斯康达科技发展股份有限公司 Method and device for realizing link-state packet updating

Also Published As

Publication number Publication date
CN106453080A (en) 2017-02-22

Similar Documents

Publication Publication Date Title
US9800493B2 (en) Routing messages in a computer network using deterministic and probalistic source routes
WO2017092400A1 (en) Failure recovery method and device, controller, and software defined network
CN106603413B (en) Method and device for transmitting flow through designated path
US11405307B2 (en) Information transfer method and device
US8427970B2 (en) Apparatus and method for determining a service interruption time measurement
KR101457317B1 (en) Prioritization of routing information updates
CN108768796B (en) Link fault detection method and device
CN102075419B (en) Method for generating and transmitting three-layer virtual special network equative routing and edge router
US8824451B2 (en) Method and system for establishing an associated bidirectional label-switched path
CN112995040B (en) Message path tracing method and device based on equipment identification calculation
CN113055295A (en) Communication method, communication device and communication system
US8964749B2 (en) Method, device and system for establishing a pseudo wire
CN107786450A (en) A kind of data message transmission method, device and machinable medium
CN104144122A (en) Method, device and system for establishing label switched path
US20100027555A1 (en) Method for processing link state advertisement and routing device
CN106789673B (en) Link state synchronization method and device
US20210281507A1 (en) Parameter notification and obtaining methods and devices, and storage medium
CN106453080B (en) Tracing method and device for link state clearing message
CN105024866A (en) Detection system and method for routing configuration abnormity of IS-ISv6 network
CN107347034B (en) Link information processing method, device and system
CN111224870B (en) Fault repairing method, equipment and storage medium in SR-MPLS Anycast scene
CN106411729B (en) Method and device for realizing link state notification processing
WO2016054966A1 (en) Message routing method and apparatus
JPWO2008129637A1 (en) Signaling apparatus and signaling method
CN112311668B (en) Method, network device and system for processing BIER message

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
CB02 Change of applicant information

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant after: Xinhua three Technology Co., Ltd.

Address before: 310053 Hangzhou science and Technology Industrial Park, high tech Industrial Development Zone, Zhejiang Province, No. six and road, No. 310

Applicant before: Huasan Communication Technology Co., Ltd.

CB02 Change of applicant information
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant