A topology link discovery method based on LLDP
Through the topology link discovery method based on LLDP, the system identification linked list is used to determine the topology path, which solves the problems of difficulty in topology discovery of OpenFlow protocol in large-scale wide area networks and security risks of SR protocol, and achieves efficient topology discovery and secure network management.
Patent Information
- Application Number
- CN202211696351.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-28
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2042-12-28
AI Technical Summary
The existing OpenFlow protocol is difficult to adapt to large-scale WAN deployments, resulting in difficulty in topology discovery and maintenance, high signaling pressure, and security risks in the SR protocol, and the source routing mechanism may be exploited for attacks.
It adopts the topology link discovery method based on LLDP, sends topology information query messages to transit nodes and edge nodes through the central node, uses the system identification linked list to determine the topology path, and abandons the source routing mechanism. It is suitable for any three-layer network scenario and reduces the network cost. cost.
It achieves efficient topology discovery, reduces operation and maintenance difficulties and signaling pressure, adapts to large-scale WAN deployment, avoids security risks, and reduces network costs.
Smart Images

Figure CN116032770B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of data communication, and in particular relates to a topology link discovery method based on LLDP. Background Art
[0002] Currently, the discovery and maintenance of topology in DCN networks mainly adopts the OpenFlow protocol. However, the OpenFlow protocol is not abstract enough for the network and cannot adapt to large-scale wide area network deployment scenarios. In addition, the network controlled by OpenFlow often requires the controller to control multiple key devices in the path, which leads to difficult operation and maintenance, increased signaling pressure, and poor scalability. Another protocol, SR, although it solves the problem of insufficient network abstraction of the network OpenFlow, SR is currently only applicable to MPLS networks and IPV6 networks. At the same time, the source routing mechanism adopted by SR requires network devices to forward in sequence according to the forwarding table. If the forwarding next hop is not in the directly connected subnet of the network device, the data packet will be discarded and an ICMP message will be sent to the source host. When the source host receives the ICMP failure message, the network topology path is updated. However, this mechanism has security risks. Some network devices respond to source routing packets by using their specified routes and using reverse routes to transmit response data. In this way, intruders can impersonate hosts to obtain certain protected data, thereby achieving the purpose of attacking or stealing confidential data. Summary of the invention
[0003] The purpose of the embodiments of the present invention is to provide a method and device for topology link discovery based on LLDP, so as to solve the performance bottleneck problem and security risk related problems of topology link discovery in large-scale wide area networks.
[0004] In order to solve the above-mentioned technical problems, the present invention is achieved as follows:
[0005] In a first aspect, an embodiment of the present invention provides a topology link discovery method based on LLDP, characterized in that the method includes:
[0006] Sending a topology information query message to the first transit node through the central node;
[0007] Determining, by the first transit node, whether the first transit node and the central node have the same domain identifier;
[0008] When the first transit node determines whether the first transit node and the central node have the same domain identifier, adding the system identifier of the first transit node to the first system identifier field of the topology information query message;
[0009] Sending the topology information query message to the first node;
[0010] In the case where the first node is an edge node, adding the system identifier of the edge node to the first system identifier field of the topology information query message;
[0011] Adding the system identification linked list in the first system identification field to the topology query information reply message;
[0012] Sending the topology query information reply message to the central node, so that the central node obtains the topology path information through the system identification linked list;
[0013] Among them, the system identifier linked list is all system identifiers in the first system identifier field with a first order, the first order is the order of adding all the system identifiers, the topology information query message and the topology query information reply message are LLDP messages, and the target field of the LLDP message is defined with a system identifier field.
[0014] Optionally, after sending the topology information query message to the first node, the method further includes:
[0015] When the first node is a second transit node, obtaining a system identification linked list in the first system identification field;
[0016] When the system identifier of the second transit node is different from the system identifiers in the system identifier linked list, the system identifier of the second transit node is added to the first system identifier field, and the topology information query message is sent to the next node.
[0017] Optionally, after obtaining the system identification linked list in the first system identification field, the method further includes:
[0018] When the system identifier of the second transit node is the same as at least one system identifier in the system identifier linked list in the first system identifier field, the topology information query message is not sent to the second transit node but is sent to the next node.
[0019] Optionally, the sending the topology query information reply message to the central node includes:
[0020] Determine the corresponding node according to the system identifier in the system identifier chain table, and send the topology query information reply message to the corresponding node in sequence according to the second order, so as to send the topology query information to the central node;
[0021] The second order is opposite to the first order.
[0022] Optionally, adding the system identifier linked list in the first system identifier field to the topology query information reply message includes:
[0023] Adding the system identification linked list in the first system identification field to the second system identification field in the topology query information reply message;
[0024] After sending the topology query information reply message to the central node, the method further includes:
[0025] The central node parses the second system identification field of the topology query information reply message so that the central node obtains the system identification linked list, and obtains the topology path information through the system identifications in the system identification linked list and the first sequence.
[0026] Optionally, after enabling the central node to obtain the topology path information through the system identification linked list, the method further includes:
[0027] Periodically sending a topology information synchronization request message to the central node through the standby central node;
[0028] When the standby central node receives the topology information synchronization confirmation message replied by the central node, the standby central node synchronizes the topology path information.
[0029] Optionally, after the periodic sending of the topology information synchronization request message to the central node through the standby central node, the method further includes:
[0030] In the case that the standby central node does not receive the topology information synchronization confirmation message replied by the central node, it is confirmed that the central node is faulty, and the standby central node is switched to the central node.
[0031] Optionally, after confirming that the central node fails, the method further includes:
[0032] When detecting that the LLDP state of the central node is enabled, sending a topology information synchronization request message to the standby central node switched to the central node;
[0033] Sending a topology information synchronization confirmation message through the standby central node that has switched to the central node;
[0034] When the central node receives the topology information synchronization confirmation message, the central node is switched to a standby central node.
[0035] Optionally, before sending the topology information query message to the first transit node through the central node, the method further includes:
[0036] LLDP is enabled between the central node and the backup central node, between the central node and the first transit node, between the first transit node and the first node, and between the first node and the host.
[0037] Optionally, the target field of the LLDP message further defines a domain identification field, a message type field and a node type field, and the domain identification field is used to indicate an area range;
[0038] The message type field is used to indicate the type of the message, and the message types include topology information synchronization request message, topology information synchronization confirmation message, topology information query message and topology query information reply message;
[0039] The node type field is used to indicate the type of the node, and the node types include a central node, a backup central node, a transit node, and an edge node.
[0040] In a second aspect, a topology link discovery device based on LLDP is characterized by comprising:
[0041] A first sending module, used to send a topology information query message to the first transit node through the central node;
[0042] A judging module, configured to judge, through the first transit node, whether the first transit node and the central node have the same domain identifier;
[0043] A first adding module, configured to add the system identifier of the first transit node to the first system identifier field of the topology information query message when the first transit node determines whether the first transit node and the central node have the same domain identifier;
[0044] A second sending module, used to send the topology information query message to the first node;
[0045] A second adding module, configured to add a system identifier of the edge node to a first system identifier field of the topology information query message when the first node is an edge node;
[0046] A third adding module, used to add the system identification linked list in the first system identification field to the topology query information reply message;
[0047] A third sending module is used to send the topology query information reply message to the central node, so that the central node obtains the topology path information through the system identification chain table;
[0048] Among them, the system identifier linked list is all system identifiers in the first system identifier field with a first order, the first order is the order of adding all the system identifiers, the topology information query message and the topology query information reply message are LLDP messages, and the target field of the LLDP message is defined with a system identifier field.
[0049] Optionally, the LLDP-based topology link discovery device further includes:
[0050] an acquisition module, configured to acquire a system identification linked list in the first system identification field when the first node is a second transit node;
[0051] The fourth sending module is used to add the system identifier of the second transit node to the first system identifier field and send the topology information query message to the next node when the system identifier of the second transit node is different from the system identifiers in the system identifier linked list.
[0052] Optionally, the fourth sending module is specifically configured to:
[0053] Used to not send the topology information query message to the second transit node and send the topology information query message to the next node when the system identifier of the second transit node is the same as at least one system identifier in the system identifier linked list obtained in the first system identifier field.
[0054] Optionally, the third sending module is specifically used to:
[0055] Determine the corresponding node according to the system identifier in the system identifier chain table, and send the topology query information reply message to the corresponding node in sequence according to the second order, so as to send the topology query information to the central node;
[0056] The second order is opposite to the first order.
[0057] Optionally, the third adding module is specifically used to:
[0058] Adding the system identification linked list in the first system identification field to the second system identification field in the topology query information reply message;
[0059] The LLDP-based topology link discovery device also includes:
[0060] The parsing module is used to parse the second system identification field of the topology query information reply message through the central node, so that the central node obtains the system identification linked list, and obtains the topology path information through the system identification in the system identification linked list and the first sequence.
[0061] Optionally, the LLDP-based topology link discovery device further includes:
[0062] A fifth sending module, configured to periodically send a topology information synchronization request message to the central node through the standby central node;
[0063] The synchronization module is used to synchronize the topology path information when the standby central node receives a topology information synchronization confirmation message replied by the central node.
[0064] Optionally, the LLDP-based topology link discovery device further includes:
[0065] The first switching module is used to confirm that the central node is faulty and switch the backup central node to the central node when the backup central node does not receive the topology information synchronization confirmation message replied by the central node.
[0066] Optionally, the LLDP-based topology link discovery device further includes:
[0067] A sixth sending module, configured to send a topology information synchronization request message to the standby central node switched to the central node when detecting that the LLDP state of the central node is enabled;
[0068] Sending a topology information synchronization confirmation message through the standby central node that has switched to the central node;
[0069] The second switching module is used to switch the central node to a standby central node when the central node receives the topology information synchronization confirmation message.
[0070] Optionally, the LLDP-based topology link discovery device further includes:
[0071] The startup module is used to enable LLDP between the central node and the standby central node, the central node and the first transit node, the first transit node and the first node, and the first node and the host.
[0072] Optionally, the LLDP-based topology link discovery device further includes: the target field of the LLDP message further defines a domain identification field, a message type field and a node type field, and the domain identification field is used to indicate an area range;
[0073] The message type field is used to indicate the type of the message, and the message types include topology information synchronization request message, topology information synchronization confirmation message, topology information query message and topology query information reply message;
[0074] The node type field is used to indicate the type of the node, and the node types include a central node, a backup central node, a transit node, and an edge node.
[0075] An embodiment of the present invention provides a topology link discovery method based on LLDP, the method comprising: sending a topology information query message to a first transit node through a central node, judging through the first transit node whether the first transit node and the central node have the same domain identifier, adding the system identifier of the first transit node to the first system identifier field of the topology information query message when the first transit node judges whether the first transit node and the central node have the same domain identifier, sending the topology information query message to the first node, and when the first node is an edge node, adding the system identifier of the edge node to the first system identifier field of the topology information query message, adding a system identifier linked list in the first system identifier field to a topology query information reply message, and sending the topology query information reply message to the central node, so that the central node obtains topology path information through the system identifier linked list, wherein the system identifier linked list is all system identifiers in the first system identifier field having a first order, the first order is the order of adding all system identifiers, the topology information query message and the topology query information reply message are LLDP messages, and the target field of the LLDP message is defined with a system identifier field. The embodiment of the present invention is based on the automatic discovery of topological links of LLDP. LLDP is a standard RFC protocol. The embodiment of the present invention only implements simple transformation and innovation on its option tlv, so that the management granularity is specific and the purpose of efficient topological discovery is achieved. The topological discovery structure of central node-transit node-edge node is adopted, adhering to the idea of SDN centralized control. All controls are carried out in the central node, and the remaining transit nodes and edge nodes are only responsible for forwarding protocol messages, so the transit nodes and edge nodes are stateless. Compared with openflow, it only needs to maintain the topological path information of the central node, and there is no need to maintain multiple key nodes, thereby solving the problems of difficult operation and maintenance, high signaling pressure, poor scalability, etc., and because of its specific management granularity, it can adapt to large-scale wide area network deployment scenarios. Compared with SR, first of all, it is a link layer topology discovery protocol, so it does not care about the three-layer network, so that the topology discovery protocol is applicable to any three-layer network scenario, not just MPLS network and IPV6 network. Secondly, the present invention adopts the form of system id linked list and query confirmation mechanism to record the topological path, abandoning the SR source routing mechanism, thereby avoiding security risks. Finally, since the present invention does not adopt a source routing mechanism, there is no need to add an additional IPS device, thus saving network costs to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] Figure 1 It is a schematic diagram of a modified LLDP Option TLV message field provided by an embodiment of the present invention;
[0077] Figure 2 It is a flowchart of a topology link discovery method based on LLDP provided by an embodiment of the present invention;
[0078] Figure 3 is a topology link discovery flow chart provided by an embodiment of the present invention;
[0079] Figure 4 It is a schematic diagram of an application scenario of a topology link discovery method based on LLDP provided by an embodiment of the present invention;
[0080] Figure 5 It is a schematic diagram of the central node synchronization process and post-failure recovery process provided by an embodiment of the present invention;
[0081] Figure 6 It is a structural schematic diagram of a topology link discovery device based on LLDP provided in an embodiment of the present invention;
[0082] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0083] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0084] The terms "first", "second", etc. in the specification and claims of the present invention are used to distinguish similar objects, rather than to describe a specific order or precedence. It should be understood that the terms used in this way can be interchangeable where appropriate, so that the embodiments of the present invention can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more.
[0085] In order to clearly understand the present invention, the following are explanations of the relevant definitions mentioned in the present invention:
[0086] LLDP: Link Layer Discovery Protocol;
[0087] TLV: Type Length Value, the format type of the information in LLDPDU;
[0088] DCN: Data Center Network;
[0089] SDN: Software Defined Networking;
[0090] OpenFlow: SDN control protocol that separates forwarding and control;
[0091] SR: Segment Routing;
[0092] OVS: virtual switch;
[0093] IPS: Attack prevention equipment.
[0094] The LLDP-based topology link discovery method provided by the embodiment of the present invention is described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios.
[0095] Embodiment 1
[0096] Reference Figure 1 , shows a schematic diagram of a modified LLDP Option TLV message field provided by an embodiment of the present invention, the target field of the LLDP message is further defined with a domain identification field, a message type field and a node type field, and the domain identification field is used to indicate the area range;
[0097] The message type field is used to indicate the type of the message, and the message types include topology information synchronization request message, topology information synchronization confirmation message, topology information query message and topology query information reply message;
[0098] The node type field is used to indicate the type of the node, and the node types include a central node, a backup central node, a transit node, and an edge node.
[0099] For example, the newly added option tlv field is clearly defined as follows:
[0100] Domain Id: The automatic discovery area of the topology link, that is, the topology discovery object is a network device with the same Domain Id. The length of this field is 8 bits.
[0101] System ID: The unique ID of each network device. The length of this field is 8 bits.
[0102] Message type field (Type Id): Figure 2There are 4 message types, the current possible values are 00, 01, 10, and 11. 00 represents a topology information synchronization request message, 01 represents a topology information synchronization confirmation message, 10 represents a topology information query message, and 11 represents a topology query information reply message. The length of this field is 2 bits.
[0103] Node type field (Code Id): There are 4 types of node types, with values of mc, bc, tc, and ec. mc represents the central node, bc represents the backup central node, tc represents the transit node, and ec represents the edge node. The length of this field is 2 bits. Central node: Maintains the entire network topology and link information in the region. All 4 protocol messages can be transmitted at this node. Backup central node: Mainly serves as a backup for the central node. When the central node fails, the backup central node is converted to a central node. There are 2 protocol messages, 00 and 01, that can be transmitted at this node. Protocol messages 10 and 11 are directly discarded after being received. Transit node: Refers to other nodes in the region except the central node, backup edge node, and edge node. Logically, there is a network connection between the transit node and the central node, between the transit node and the transit node, and between the transit node and the edge node. There are 2 protocol messages, 10 and 11, that can be transmitted at this node. Protocol messages 00 and 01 are directly discarded after being received. Edge node: refers to the physical network device or OVS that connects the logical network to the cloud host or physical machine. There are two types of protocol messages, 10 and 11, that can be transmitted at this node. 00 and 01 protocol messages are directly discarded after receiving them, and the edge node no longer forwards 10 messages.
[0104] Based on the modified LLDP Option TLV message field, refer to Figure 2 , shows a schematic flow chart of a topology link discovery method based on LLDP provided in an embodiment of the present invention.
[0105] The present invention provides a flow chart of a topology link discovery method based on LLDP, wherein the method comprises:
[0106] S201: Sending a topology information query message to a first transit node through a central node;
[0107] Optionally, before sending the topology information query message to the first transit node through the central node, the method further includes:
[0108] LLDP is enabled between the central node and the backup central node, between the central node and the first transit node, between the first transit node and the first node, and between the first node and the host.
[0109] Specifically, the network planning architect defines the area identifier, system identifier, node type and globally enables lldp according to the requirements, including between the central node and the backup central node, the central node and the transit node, the transit node and the transit node, and the edge node and the cloud host or the physical machine.
[0110] S202: Determine, through the first transit node, whether the first transit node and the central node have the same domain identifier;
[0111] S203: When the first transit node determines whether the first transit node and the central node have the same domain identifier, add the system identifier of the first transit node to the first system identifier field of the topology information query message;
[0112] Specifically, the first system identification field in the topology information query message, that is, the system identification field (System ID) in the topology information query message, is used to place the system identification. The central node sends a topology information query message to the transit node. The transit node checks whether it has the same Domain Id as the central node. If they are the same, it continues to forward it downward, otherwise it discards the message. The following steps assume that the relevant nodes belong to the same area.
[0113] S204: Sending the topology information query message to the first node;
[0114] S205: When the first node is an edge node, add the system identifier of the edge node to the first system identifier field of the topology information query message;
[0115] Optionally, when the first node is a second transit node, obtaining a system identifier linked list in the first system identifier field;
[0116] When the system identifier of the second transit node is different from the system identifiers in the system identifier linked list, the system identifier of the second transit node is added to the first system identifier field, and the topology information query message is sent to the next node.
[0117] Specifically, the central node sends a topology information query message to the transit node. After receiving the protocol message, the transit node adds the system id of the transit node after the initial system id of the message, and forwards the message to other transit nodes or edge nodes connected to it. When other transit nodes receive the topology information query message, they also add the system id of their own network devices after the received topology information query message, and the process is repeated until it reaches the edge node.
[0118] S206: Add the system identifier linked list in the first system identifier field to the topology query information reply message;
[0119] Specifically, when the edge node receives the topology information query message sent by the transit node, it adds the system id of its own network device after the received topology information query message, and fills the entire system id linked list into the system id field of the topology query information reply message.
[0120] S207: Sending the topology query information reply message to the central node, so that the central node obtains the topology path information through the system identifier linked list;
[0121] Among them, the system identifier linked list is all system identifiers in the first system identifier field with a first order, the first order is the order of adding all the system identifiers, the topology information query message and the topology query information reply message are LLDP messages, and the target field of the LLDP message is defined with a system identifier field.
[0122] Specifically, after filling the entire system id linked list into the system id field of the topology query information reply message, the topology query information reply message is sent back to the central node. When the central node receives the topology query information reply message, it parses out the system id link field. According to the order of the entire system id linked list, the entire topology path information in the area can be known.
[0123] Reference Figure 3 and Figure 4, shows a topology link discovery flow chart provided by an embodiment of the present invention and a schematic diagram of an application scenario of a topology link discovery method based on LLDP. An embodiment of the present invention provides a topology link discovery method based on LLDP, wherein a topology information query message is sent from a central node to a first transit node, and the first transit node determines whether the first transit node and the central node have the same domain identifier. When the first transit node determines whether the first transit node and the central node have the same domain identifier, the system identifier of the first transit node is added to the first system identifier field of the topology information query message, and the topology information query message is sent to the first node. In the first section When the node is an edge node, the system identifier of the edge node is added to the first system identifier field of the topology information query message, the system identifier linked list in the first system identifier field is added to the topology query information reply message, and the topology query information reply message is sent to the central node, so that the central node obtains the topology path information through the system identifier linked list, wherein the system identifier linked list is all system identifiers in the first system identifier field with a first order, the first order is the order of adding all the system identifiers, the topology information query message and the topology query information reply message are LLDP messages, and the target field of the LLDP message is defined with a system identifier field. The embodiment of the present invention is based on the automatic discovery of topological links of LLDP. LLDP is a standard RFC protocol. The embodiment of the present invention only implements a simple transformation and innovation on its option tlv, so that the management granularity is specific, and the purpose of efficient topology discovery is achieved. The topology discovery structure of central node-transit node-edge node is adopted, adhering to the idea of centralized control of SDN. All controls are performed in the central node, and the remaining transit nodes and edge nodes are only responsible for forwarding protocol messages, so the transit nodes and edge nodes are stateless. Compared with openflow, it only needs to maintain the topological path information of the central node, and does not need to maintain multiple key nodes, thereby solving the problems of difficult operation and maintenance, high signaling pressure, poor scalability, etc., and because of its specific management granularity, it can adapt to large-scale wide area network deployment scenarios. Compared with SR, first of all, it is a link layer topology discovery protocol, so it does not care about the three-layer network, so that the topology discovery protocol is applicable to any three-layer network scenario, not just MPLS network and IPV6 network. Secondly, the present invention adopts the form of system id linked list and query confirmation mechanism to record the topological path, abandoning the SR source routing mechanism, thereby avoiding security risks. Finally, since the present invention does not adopt the source routing mechanism, it does not need to add additional IPS equipment, which saves network costs to a certain extent.
[0124] In a possible implementation manner, after obtaining the system identification linked list in the first system identification field, the method further includes:
[0125] When the system identifier of the second transit node is the same as at least one system identifier in the system identifier linked list in the first system identifier field, the topology information query message is not sent to the second transit node but is sent to the next node.
[0126] Specifically, when a transit node receives a topology information query message sent by a central node to a transit node, it adds the system id of the transit node to the initial system id of the message, and forwards the message to other transit nodes or edge nodes connected to it. At this time, if it is sent to other transit nodes, in order to ensure that the transit nodes do not send topology information query messages to each other repeatedly, the transit node needs to check the system id linked list each time before sending a topology information query message. If it is found that the system id linked list already contains the system id of the receiving end, the topology information query message will not be sent to the transit node.
[0127] In a possible implementation manner, step S207 may be specifically performed by step S2071:
[0128] S2071: Determine a corresponding node according to the system identifier in the system identifier linked list, and send the topology query information reply message to the corresponding node in sequence according to the second sequence, so as to send the topology query information to the central node;
[0129] The second order is opposite to the first order.
[0130] Specifically, when the edge node fills the entire system id linked list into the system id field of the topology query information reply message, it then sends a topology query information reply message to the transit node (the network device with the previous system id) according to the system id linked list. After the transit node receives the topology query information reply message sent by the edge node, it queries the system id linked list and continues to forward the message, and so on, until it is forwarded to the central node.
[0131] Optionally, adding the system identifier linked list in the first system identifier field to the topology query information reply message includes:
[0132] Adding the system identification linked list in the first system identification field to the second system identification field in the topology query information reply message;
[0133] Specifically, the second system identification field in the topology query information reply message, ie, the system identification field (System ID) in the topology query information reply message, is used to place a system identification.
[0134] After sending the topology query information reply message to the central node, the method further includes:
[0135] The central node parses the second system identification field of the topology query information reply message so that the central node obtains the system identification linked list, and obtains the topology path information through the system identifications in the system identification linked list and the first sequence.
[0136] That is, when the transit node receives the topology query information reply message sent by the edge node, it continues to forward the message, and so on, until it is forwarded to the central node. The central node receives the topology query information reply message and can parse out the system id link field through the query information reply message. Then, according to the order of the entire system id linked list, the entire topology path information in the area can be known.
[0137] In a possible implementation, referring to Figure 5 , shows a schematic diagram of the central node synchronization process and post-failure recovery process provided by an embodiment of the present invention. After step S207, the method further includes steps S208-S209:
[0138] S208: Periodically sending a topology information synchronization request message to the central node through the standby central node;
[0139] That is, the central node periodically sends topology information query messages to ensure that the topology links maintained by the central node are the latest. The period is configurable.
[0140] S209: When the standby central node receives the topology information synchronization confirmation message replied by the central node, the standby central node synchronizes the topology path information.
[0141] Optionally, after the periodic sending of the topology information synchronization request message to the central node through the standby central node, the method further includes:
[0142] In the case that the standby central node does not receive the topology information synchronization confirmation message replied by the central node, it is confirmed that the central node is faulty, and the standby central node is switched to the central node.
[0143] Specifically, the standby central node periodically sends a topology information synchronization request message to the central node. When the standby central node receives a topology information synchronization confirmation message in reply, the topology link information is successfully synchronized. If the standby central node does not receive a topology information synchronization confirmation message in reply from the central node, or does not receive a topology information synchronization confirmation message in reply from the central node for a preset number of times (such as three times in a row), the central node is considered to be faulty, and the standby central node is switched to the central node.
[0144] Optionally, after confirming that the central node fails, the method further includes:
[0145] When detecting that the LLDP state of the central node is enabled, sending a topology information synchronization request message to the standby central node switched to the central node;
[0146] Sending a topology information synchronization confirmation message through the standby central node that has switched to the central node;
[0147] When the central node receives the topology information synchronization confirmation message, the central node is switched to a standby central node.
[0148] That is, if the original faulty central node recovers, after detecting that lldp is up, it first sends a topology information synchronization request message to the central node. After the central node returns a topology information synchronization confirmation message, the original faulty central node sets itself as a standby central node.
[0149] The embodiment of the present invention adopts a central node-backup central node architecture, which increases high reliability. In addition, the central node can also be migrated within the region, which increases high availability.
[0150] Embodiment 2
[0151] Reference Figure 6 , shows a schematic diagram of the structure of a topology link discovery device 60 based on LLDP provided in an embodiment of the present invention, including:
[0152] The first sending module 601 is used to send a topology information query message to the first transit node through the central node;
[0153] A judgment module 602 is used to judge whether the first transfer node and the central node have the same domain identifier through the first transfer node;
[0154] A first adding module 603 is used to add the system identifier of the first transit node to the first system identifier field of the topology information query message when the first transit node determines whether the first transit node and the central node have the same domain identifier;
[0155] The second sending module 604 is used to send the topology information query message to the first node;
[0156] A second adding module 605 is used to add the system identifier of the edge node to the first system identifier field of the topology information query message when the first node is an edge node;
[0157] A third adding module 606, configured to add the system identification linked list in the first system identification field to the topology query information reply message;
[0158] The third sending module 607 is used to send the topology query information reply message to the central node, so that the central node obtains the topology path information through the system identification linked list;
[0159] Among them, the system identifier linked list is all system identifiers in the first system identifier field with a first order, the first order is the order of adding all the system identifiers, the topology information query message and the topology query information reply message are LLDP messages, and the target field of the LLDP message is defined with a system identifier field.
[0160] Optionally, the LLDP-based topology link discovery device 60 further includes:
[0161] An acquisition module 608, configured to acquire a system identification linked list in the first system identification field when the first node is a second transit node;
[0162] A fourth sending module 609, configured to add the system identifier of the second transit node to the first system identifier field and send the topology information query message to the next node when the system identifier of the second transit node is different from the system identifiers in the system identifier linked list;
[0163] Optionally, the fourth sending module 609 is specifically configured to:
[0164] Used to not send the topology information query message to the second transit node and send the topology information query message to the next node when the system identifier of the second transit node is the same as at least one system identifier in the system identifier linked list obtained in the first system identifier field.
[0165] Optionally, the third sending module 607 is specifically configured to:
[0166] Determine the corresponding node according to the system identifier in the system identifier chain table, and send the topology query information reply message to the corresponding node in sequence according to the second order, so as to send the topology query information to the central node;
[0167] The second order is opposite to the first order.
[0168] Optionally, the third adding module 606 is specifically used to:
[0169] Adding the system identification linked list in the first system identification field to the second system identification field in the topology query information reply message;
[0170] The LLDP-based topology link discovery device 60 further includes:
[0171] The parsing module 610 is used to parse the second system identification field of the topology query information reply message through the central node, so that the central node obtains the system identification linked list, and obtains the topology path information through the system identification in the system identification linked list and the first sequence.
[0172] Optionally, the LLDP-based topology link discovery device 60 further includes:
[0173] The fifth sending module 611 is used to periodically send a topology information synchronization request message to the central node through the standby central node;
[0174] The synchronization module 612 is used to synchronize the topology path information when the standby central node receives a topology information synchronization confirmation message replied by the central node.
[0175] Optionally, the LLDP-based topology link discovery device 60 further includes:
[0176] The first switching module 613 is used to confirm that the central node is faulty and switch the backup central node to the central node when the backup central node does not receive the topology information synchronization confirmation message replied by the central node.
[0177] Optionally, the LLDP-based topology link discovery device 60 further includes:
[0178] The sixth sending module 614 is used to send a topology information synchronization request message to the standby central node switched to the central node when detecting that the LLDP state of the central node is enabled;
[0179] Sending a topology information synchronization confirmation message through the standby central node that has switched to the central node;
[0180] The second switching module 615 is configured to switch the central node to a standby central node when the central node receives the topology information synchronization confirmation message.
[0181] Optionally, the LLDP-based topology link discovery device 60 further includes:
[0182] The startup module 616 is used to enable LLDP between the central node and the backup central node, the central node and the first transit node, the first transit node and the first node, and the first node and the host.
[0183] Optionally, the LLDP-based topology link discovery device 60 further includes: the target field of the LLDP message further defines a domain identification field, a message type field and a node type field, and the domain identification field is used to indicate an area range;
[0184] The message type field is used to indicate the type of the message, and the message types include topology information synchronization request message, topology information synchronization confirmation message, topology information query message and topology query information reply message;
[0185] The node type field is used to indicate the type of the node, and the node types include a central node, a backup central node, a transit node, and an edge node.
[0186] The VXLAN message forwarding device 60 based on the OVS neighbor table provided in the embodiment of the present invention can implement each process implemented in the above method embodiment. To avoid repetition, it will not be repeated here.
[0187] In an embodiment of the present invention, a first sending module is used to send a topology information query message to a first transit node through a central node, a judgment module is used to judge whether the first transit node and the central node have the same domain identifier through the first transit node, a first adding module is used to add the system identifier of the first transit node to the first system identifier field of the topology information query message when the first transit node judges whether the first transit node and the central node have the same domain identifier, a second sending module is used to send the topology information query message to the first node, and a second adding module is used to add the system identifier of the edge node to the first system identifier field of the topology information query message when the first transit node judges whether the first transit node and the central node have the same domain identifier. The first system identification field added to the topology information query message, the third adding module is used to add the system identification linked list in the first system identification field to the topology query information reply message, and the third sending module is used to send the topology query information reply message to the central node, so that the central node obtains the topology path information through the system identification linked list, wherein the system identification linked list is all system identifications in the first system identification field with a first order, and the first order is the order of adding all the system identifications, the topology information query message and the topology query information reply message are LLDP messages, and the target field of the LLDP message is defined with a system identification field. The embodiment of the present invention is based on the automatic discovery of topological links of LLDP. LLDP is a standard RFC protocol. The embodiment of the present invention only implements a simple transformation and innovation on its option tlv, so that the management granularity is specific, and the purpose of efficient topology discovery is achieved. The topology discovery structure of central node-transit node-edge node is adopted, adhering to the idea of centralized control of SDN. All controls are performed in the central node, and the remaining transit nodes and edge nodes are only responsible for forwarding protocol messages, so the transit nodes and edge nodes are stateless. Compared with openflow, it only needs to maintain the topological path information of the central node, and does not need to maintain multiple key nodes, thereby solving the problems of difficult operation and maintenance, high signaling pressure, poor scalability, etc., and because of its specific management granularity, it can adapt to large-scale wide area network deployment scenarios. Compared with SR, first of all, it is a link layer topology discovery protocol, so it does not care about the three-layer network, so that the topology discovery protocol is applicable to any three-layer network scenario, not just MPLS network and IPV6 network. Secondly, the present invention adopts the form of system id linked list and query confirmation mechanism to record the topological path, abandoning the SR source routing mechanism, thereby avoiding security risks. Finally, since the present invention does not adopt the source routing mechanism, it does not need to add additional IPS equipment, which saves network costs to a certain extent.
[0188] The virtual system in the embodiment of the present invention may be a device, or a component, an integrated circuit, or a chip in a terminal.
[0189] In addition, it should be noted that the device embodiments described above are merely illustrative and do not limit the scope of protection of the present invention. In practical applications, technicians in this field can select some or all of the modules according to actual needs to achieve the purpose of the present embodiment, and no restrictions are made here.
[0190] In addition, for technical details not fully described in this embodiment, reference can be made to the intelligent cognition method and system provided in any embodiment of the present invention, and they will not be repeated here.
[0191] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A topology link discovery method based on LLDP, characterized in that: The method comprises: Sending a topology information query message to the first transit node through the central node; Determining, by the first transit node, whether the first transit node and the central node have the same domain identifier; When the first transit node determines that the first transit node and the central node have the same domain identifier, adding the system identifier of the first transit node to the first system identifier field of the topology information query message; Sending the topology information query message to the first node; In the case where the first node is an edge node, adding the system identifier of the edge node to the first system identifier field of the topology information query message; Adding the system identification linked list in the first system identification field to the topology query information reply message; Sending the topology query information reply message to the central node, so that the central node obtains the topology path information through the system identification linked list; The system identifier linked list is all system identifiers in the first system identifier field having a first order, the first order is the order in which all the system identifiers are added, the topology information query message and the topology query information reply message are LLDP messages, and the target field of the LLDP message is defined with a system identifier field; The sending of the topology query information reply message to the central node includes: Determine the corresponding node according to the system identifier in the system identifier chain table, and send the topology query information reply message to the corresponding node in sequence according to the second order, so as to send the topology query information to the central node; The second order is opposite to the first order.
2. The topology link discovery method according to claim 1, characterized in that: After sending the topology information query message to the first node, the method further includes: In the case where the first node is a second transit node, obtaining a system identification linked list in the first system identification field; When the system identifier of the second transit node is different from the system identifiers in the system identifier linked list, the system identifier of the second transit node is added to the first system identifier field, and the topology information query message is sent to the next node.
3. The topology link discovery method according to claim 2, characterized in that: After obtaining the system identification linked list in the first system identification field, the method further includes: When the system identifier of the second transit node is the same as at least one system identifier in the system identifier linked list in the first system identifier field, the topology information query message is not sent to the second transit node but is sent to the next node.
4. The topology link discovery method according to claim 1, characterized in that: The adding the system identifier linked list in the first system identifier field to the topology query information reply message includes: Adding the system identification linked list in the first system identification field to the second system identification field in the topology query information reply message; After sending the topology query information reply message to the central node, the method further includes: The central node parses the second system identification field of the topology query information reply message so that the central node obtains the system identification linked list, and obtains the topology path information through the system identifications in the system identification linked list and the first sequence.
5. The topology link discovery method according to claim 1, characterized in that: After enabling the central node to obtain the topology path information through the system identification linked list, the method further includes: Periodically sending a topology information synchronization request message to the central node through the standby central node; When the standby central node receives the topology information synchronization confirmation message replied by the central node, the standby central node synchronizes the topology path information.
6. The topology link discovery method according to claim 5, characterized in that: After the standby central node periodically sends a topology information synchronization request message to the central node, the method further includes: In the case that the standby central node does not receive the topology information synchronization confirmation message replied by the central node, it is confirmed that the central node is faulty, and the standby central node is switched to the central node.
7. The topology link discovery method according to claim 6, characterized in that: After confirming that the central node fails, the method further includes: When detecting that the LLDP state of the central node is enabled, sending a topology information synchronization request message to the standby central node switched to the central node; Sending a topology information synchronization confirmation message through the standby central node that has switched to the central node; When the central node receives the topology information synchronization confirmation message, the central node is switched to a standby central node.
8. The topology link discovery method according to claim 5, characterized in that: Before sending the topology information query message to the first transit node through the central node, the method further includes: LLDP is enabled between the central node and the standby central node, between the central node and the first transit node, between the first transit node and the first node, and between the first node and the host.
9. The topology link discovery method according to claim 1, characterized in that: The target field of the LLDP message further defines a domain identification field, a message type field and a node type field, wherein the domain identification field is used to indicate an area range; The message type field is used to indicate the type of the message, and the message types include topology information synchronization request message, topology information synchronization confirmation message, topology information query message and topology query information reply message; The node type field is used to indicate the type of the node, and the node types include a central node, a backup central node, a transit node, and an edge node.
