A method and device for obtaining network topology
By allowing non-root nodes to actively report topology information in the XLDP network topology, the problem of slow topology discovery in the existing technology is solved, and faster network topology information collection and transmission are achieved.
Patent Information
- Application Number
- CN202110827059.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-21
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2041-07-21
AI Technical Summary
When conducting topology discovery, the existing XLDP protocol architecture requires the root node to initiate active detection, while the non-root node does not report it actively, resulting in large messages and slow speed. A method that can improve the speed of topology discovery is urgently needed.
By allowing non-root nodes to actively report topology information in the XLDP network topology, the number of inquiries from root nodes is reduced and the speed of information collection is improved. The specific implementation method is that after receiving the information of the root node, the non-root node actively generates and reports its own topology information, including its own identity, neighbor node identity and communication port identity.
Through the active reporting of non-root nodes, the number of signaling transmissions during the topology discovery process is significantly reduced, the speed of collecting network topology information is improved, and the overall speed of topology discovery is improved.
Smart Images

Figure CN115701044B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and in particular to a method and device for acquiring network topology. Background Art
[0002] With the development of communication technology, a large number of communication devices have been deployed in various parks or office areas. In order to facilitate the management of devices, the X-Lean Discovery Protocol (XLDP) architecture is introduced. The XLDP protocol architecture is a minimalist centralized topology discovery technology under the X-Lean architecture. The XLDP protocol architecture can be used as follows Figure 1 As shown: the root node is the central node of the entire network, responsible for centralized topology discovery of the entire network, channel maintenance from the root node to each non-root node (including the root port and downstream path of each non-root node), protocol state machine, and protocol message sending and receiving mechanism. The functional modules of non-root nodes include protocol message sending and receiving, protocol state machine, and device information acquisition / configuration agent. The core process is mainly: the root node conducts topology discovery centrally, the non-root node only responds and reports the most basic link status, and the control message is centrally forwarded through topology calculation identification and designated port roles (all control messages initiated by non-root nodes are sent from the root port to the root node, and all control messages initiated by the root node specify the egress port along the way, and the non-root node directly forwards the source routing).
[0003] Based on this architecture, the current XLDP protocol architecture requires active detection initiated by the root node when performing topology discovery, and non-root nodes do not actively report. Each non-root topology discovery requires at least 4 messages, two round trips. The message volume is large and the speed is slow.
[0004] Therefore, there is an urgent need for a method to improve the speed of topology discovery. Summary of the invention
[0005] The embodiments of the present application provide a method and device for obtaining network topology, which are used to accelerate the collection of topology information and improve the speed of topology discovery.
[0006] In a first aspect, an embodiment of the present application provides a method for obtaining network topology, which is specifically applied to an XLDP network topology structure, wherein the network topology structure includes multiple nodes, including a first node and a second node for obtaining the network topology; at the initial operation of the network topology structure, the first node obtains information of the second node; then the first node reports a first message to the second node based on the information of the second node, wherein the first message is used to inform the second node of the topology status of the first node, that is, the first message includes at least an identifier of the first node, an identifier of a third node as a neighbor node of the first node, and an identifier of a first port for the first node to communicate with the third node.
[0007] In this embodiment, the second node used to obtain the network topology structure can also be called a root node (i.e., a root node), and the first node can also be called a non-root node (i.e., a non-root node). The root node is the central node of the entire network topology, responsible for centralized discovery of the entire network topology, channel maintenance from the root node to each non-root node (including the root port (i.e., port for uplink) and downlink path of each non-root node), protocol state machine, and protocol message sending and receiving mechanism. The non-root node is mainly responsible for protocol message sending and receiving, protocol state machine, and device information acquisition / configuration agent. The specific process is: the root node conducts centralized network topology discovery, the non-root node only responds and reports the most basic link status, and the control message is centrally forwarded through topology calculation identification and designated port roles (all control messages initiated by non-root nodes are sent from the root port to the root node, and all control messages initiated by the root node specify the outbound ports along the way, and the non-root node directly forwards by source routing).
[0008] In this embodiment, after the first node for data transmission obtains the information of the second node, it can actively report its own topology information to the second node. Therefore, when the network topology contains multiple nodes for data transmission, it avoids the second node from querying the topology information of each node for data transmission one by one, thereby accelerating the collection of the network topology information and improving the topology discovery speed.
[0009] Optionally, the information of the second node may include multiple situations, and based on the different information of the second node, the first node may have different operations:
[0010] In one possible implementation, the information of the second node includes an identification and indication information of the second node, and the indication information is only used to identify the second node for obtaining the network topology. The first node obtains a second port for receiving the second node information, and determines that the second port is a port for forwarding uplink messages (that is, the root port of the first node); then the first node sends the first message to the second node through the second port.
[0011] In another possible implementation, the information of the second node includes an identifier of the second node, indication information, and an identifier of a third port through which the first node communicates with the second node, wherein the indication information is used to identify the second node for obtaining the network topology. At this time, the first node can send the first message to the second node through the port corresponding to the identifier of the third port based on the information of the second node.
[0012] Optionally, when the first node obtains the information of the second node, the first node may specifically adopt the following possible implementation methods:
[0013] In one possible implementation, the first node obtains the information of the statically configured second node, that is, after determining the second node as the central node in the network topology, the information of the second node is pre-stored in the first node directly through configuration. In the process of obtaining the network topology, the first node can directly read the information of the second node from its own memory.
[0014] In another possible implementation, the first node receives a second message sent by the second node, and the second message includes information about the second node. It can be understood that the second message can be a link discovery message or a root node announcement message in this embodiment. If the second message is a root node announcement message provided by this embodiment, the root node announcement message can use a root node identification field to indicate information about the two nodes.
[0015] Optionally, after the first node reports the first message to the second node and the second node receives the first message, the second node sends a third message to the first node, where the third message is used to notify the first node that the second node confirms receipt of the first message.
[0016] Optionally, after the first node obtains the information of the second node, the first node may also send a fourth message to its neighboring node, wherein the fourth message includes the information of the second node; then the first node receives the fifth message sent by the third node, wherein the fifth message includes the identifier of the third node, the identifier of the fourth node as the neighboring node of the third node, and the port identifier for the third node to communicate with the fourth node. That is, in this embodiment, the first node may notify the information of the second node to its neighboring node, the third node sends the fifth message for notifying its own port information to the first node, and then the first node forwards the information of the third node to the second node. In this way, there is no need to wait until the second node sends an inquiry message to the third node, and then the third node reports its own topology information to the second node, which can reduce the number of signaling transmissions of the second node in obtaining the network topology.
[0017] Based on the above solution, if the fifth message also includes indication information, and the indication information is used to identify that the fifth message belongs to an uplink message, the first node will obtain the port for communicating with the second node according to the indication information included in the fifth message; then the first node sends the fifth message from the port for communicating with the two nodes. In this way, the first node can forward the fifth message only according to the indication information in the fifth message, without the need to perform data processing, thereby reducing the processing load of the first node.
[0018] Based on the above method for obtaining network topology, in this method, if there is a communication failure between the first node and the second node, that is, when the first node loses the root node in the network topology, the first node will send a sixth message to the third node, and the sixth message is used to notify the communication failure between the first node and the second node. That is, after losing the root node, the first node will notify its neighboring nodes of the communication failure in real time, thereby preventing its neighboring nodes from continuing to send uplink messages.
[0019] Optionally, if the third node has a neighboring node in a lower layer, after the third node learns that there is a communication failure between the third node and the second node, the third node will also send a message to its neighboring node in a lower layer to inform the neighboring node that there is a communication failure between the third node and the second node.
[0020] Optionally, if the first node has at least two ports (i.e., the first port and the fourth port) that can communicate with the second node, then after the communication between the first node and one of the ports (i.e., the first port) of the second node fails, the first node will communicate with the second node through another port (i.e., the fourth port). For example, when the first node and the second node communicate, they include a primary port and a backup port. At the first moment, the first node and the second node communicate through the primary port; at the second moment, when the link through which the first node and the second node communicate through the primary port fails, the first node will switch to the backup port to communicate with the second node. In this way, the switching of the network topology can be realized in real time to ensure the normal network communication.
[0021] In a second aspect, the present application provides a communication device having a function of implementing the first node behavior in the first aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0022] In a possible implementation, the device includes a unit or module for executing each step of the first aspect above. For example, the device includes: an acquisition module, configured to acquire information of a second node for acquiring a network topology;
[0023] A sending module is used to send a first message to the second node according to the information of the second node, wherein the first message includes an identifier of the first node, an identifier of a third node that is a neighbor node of the first node, and an identifier of a first port for communication between the first node and the third node.
[0024] Optionally, a storage module is also included for storing necessary program instructions and data of the communication device.
[0025] In a possible implementation, the communication device includes: a processor and a transceiver, the processor being configured to support the communication device to perform the corresponding functions in the method provided in the first aspect. The transceiver is used to indicate the communication between the first node, the second node, and the third node, and to send the first message involved in the method to the second node, and to send the fourth message involved in the method to the third node. Optionally, the communication device may also include a memory, which is coupled to the processor and stores program instructions and data necessary for the communication device.
[0026] In a possible implementation, when the communication device is a chip in the communication device, the chip includes: a processing module and a transceiver module. The transceiver module may be, for example, an input / output interface, a pin or a circuit on the chip, and the transceiver module obtains information of a second node used to obtain a network topology; sends a first message to the second node according to the information of the second node, and the first message includes an identifier of the first node, an identifier of a third node as a neighbor node of the first node, and an identifier of a first port for the first node to communicate with the third node. The processing module may be, for example, a processor, and the processor is used to generate the first message and transmit the first message generated by the processor to other chips or modules coupled to the chip. The processing module may execute computer-executable instructions stored in a storage unit to support the communication device to execute the method provided in the first aspect above. Optionally, the storage unit may be a storage unit in the chip, such as a register, a cache, etc., and the storage unit may also be a storage unit located outside the chip, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.
[0027] In a possible implementation, the communication device includes: a processor, a baseband circuit, a radio frequency circuit and an antenna. The processor is used to control the functions of each circuit part, and the baseband circuit is used to generate the first message, which is processed by the radio frequency circuit for analog conversion, filtering, amplification and up-conversion, and then sent to the second node via the antenna. Optionally, the device also includes a memory, which stores program instructions and data necessary for the communication device.
[0028] In one possible implementation, the device includes a communication interface and a logic circuit, the communication interface is used to obtain information of a second node used to obtain a network topology; the logic circuit is used to generate the first message; the communication interface is also used to send a first message to the second node based on the information of the second node, the first message including an identifier of the first node, an identifier of a third node that is a neighbor node of the first node, and an identifier of a first port for communication between the first node and the third node.
[0029] Among them, the processor mentioned in any of the above places can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of programs of the above-mentioned methods for obtaining network topology.
[0030] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to execute any possible implementation method of any of the above aspects.
[0031] In a fourth aspect, an embodiment of the present application provides a computer program comprising instructions, which, when executed on a computer, enables the computer to execute the method of any one of the above aspects.
[0032] In a fifth aspect, the present application provides a chip system, which includes a processor for supporting a communication device to implement the functions involved in the above aspects, such as generating or processing the data and / or information involved in the above methods. In one possible design, the chip system also includes a memory, which is used to store the necessary program instructions and data of the communication device to implement the functions of any of the above aspects. The chip system can be composed of chips, or it can include chips and other discrete devices.
[0033] In a sixth aspect, an embodiment of the present application provides a communication system, which includes the first node, the second node and the third node of the above aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 A schematic diagram of the XLDP structure;
[0035] Figure 2 is another schematic diagram of the XLDP structure;
[0036] Figure 3 is another schematic diagram of the XLDP structure;
[0037] Figure 4 A schematic diagram of an embodiment of a method for obtaining a network topology in an embodiment of the present application;
[0038] Figure 5 A schematic diagram of the format of a topology notification message in an embodiment of the present application;
[0039] Figure 6 A schematic diagram of the format of a topology confirmation message in an embodiment of the present application;
[0040] Figure 7 A schematic diagram of another embodiment of the method for obtaining network topology in an embodiment of the present application;
[0041] Figure 8 A schematic diagram of the format of a root node notification message in an embodiment of the present application;
[0042] Fig. 9 A schematic diagram of another embodiment of the method for obtaining network topology in an embodiment of the present application;
[0043] Fig.10 This is a schematic diagram of an embodiment of discovering a network topology when a network topology failure occurs in an embodiment of the present application;
[0044] Fig.11 A schematic diagram of a network topology failure in an embodiment of the present application;
[0045] Fig.12 This is another schematic diagram of an embodiment of discovering a network topology when a network topology failure occurs in an embodiment of the present application;
[0046] Fig.13 This is another schematic diagram of a network topology failure in an embodiment of the present application;
[0047] Fig.14 A schematic diagram of another embodiment of the method for obtaining network topology in an embodiment of the present application;
[0048] Fig.15 A schematic diagram of an embodiment of a communication device in an embodiment of the present application;
[0049] Fig.16 This is another schematic diagram of a communication device in an embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solutions and advantages of the present application more clear, the embodiments of the present application are described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. It is known to those skilled in the art that with the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0051] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described here can be implemented in an order other than that illustrated or described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The naming or numbering of steps in this application does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The process steps that have been named or numbered can change the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved. The division of units in this application is a logical division. There may be other division methods when it is implemented in actual applications. For example, multiple units can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection between units can be electrical or other similar forms, which are not limited in this application. In addition, the units or sub-units described as separate components may or may not be physically separated, may or may not be physical units, or may be distributed in multiple circuit units, and some or all of the units may be selected according to actual needs to achieve the purpose of the present application.
[0052] For ease of understanding, some terms in the embodiments of the present application are explained:
[0053] XLDP (X-Lean Discovery Protocol): It is a simplified centralized topology discovery technology under the X-Lean architecture. The central device initiates the topology discovery message, and other devices only need to respond very simply to automatically build the topology, automatically discover the upstream and downstream, and maintain no table and no state, thus making the campus switch free of regulations and configuration, plug-and-play, and truly decoupling the business and equipment, simplifying campus management. An exemplary architecture can be shown as follows: Figure 1 As shown, the network topology under the X-Lean architecture includes root nodes and non-root nodes (also referred to as Figure 1 node1 and node2 in it).
[0054] Root node: Also known as the root node. The root node is the central node of the network topology under the entire X-Lean architecture. It is responsible for centralized discovery of the entire network topology, channel maintenance from the root node to each non-root node (including the root port (i.e., port for uplink) and downlink path of each non-root node), protocol state machine, and protocol message sending and receiving mechanism.
[0055] Non-root node: also called child node. This non-root node is mainly responsible for protocol message sending and receiving, protocol state machine, and device information acquisition / configuration agent.
[0056] Root port: also known as the root port, that is, the port that receives downlink messages sent by the root node.
[0057] Non-root port: The port that receives uplink messages sent by non-root nodes.
[0058] Based on this Figure 1 The architecture shown in FIG. 1 shows, the communication process between the root node and the non-root node can be as follows: the root node centrally performs network topology discovery, and the non-root node only responds and reports the most basic link status, and implements control messages (such as Figure 1 XLDP message shown in ) is centrally forwarded (all control messages initiated by non-root nodes are sent from the root port to the root node, all control messages initiated by the root node specify the outgoing ports along the way, and the non-root nodes directly forward the source routing). In an exemplary solution, the structure between the root node and the non-root node can be as follows Figure 2 and Figure 3 As shown:
[0059] In such Figure 2 In the XLDP structure shown, the root node is S1, which includes non-root ports: port1 and port2. The non-root nodes include S2, S3 and S4, wherein S2 includes root port port3 and non-root port port4, S3 includes root port port5, and S4 includes root port port6. S1, S2 and S4 form a link, wherein S2 and S4 are neighboring nodes, and S4 needs to communicate with S1 through S2; and S3 and S1 form another link. If S1 needs to send a downlink message to S4, S1 sends the downlink message to S2 through port1, and S2 receives the downlink message through port3, then S2 sends the downlink message to S4 through port4, and S4 receives the downlink message through port6.
[0060] In such Figure 3 In the XLDP structure shown, the root node is S1, and the root node includes non-root ports: port1 and port2. The non-root node includes S2, S3 and S4, wherein S2 includes root port port3 and non-root port port4, S3 includes root port port5 and non-root port port6, and S4 includes root port port7 and root port port8, wherein only one of the port port7 and the port port8 will work at the same time, that is, the port port7 and the port port8 can be set as the primary and backup root ports, such as Figure 3 As shown, port 7 is the primary root port, and port 8 is the backup root port. S1, S2, and S4 form a link, where S2 and S4 are neighboring nodes, and S4 communicates with S1 through S2; and S1, S3, and S4 form another link, where S3 and S4 are also neighboring nodes, and S4 can also communicate with S1 through S3. Figure 3 As shown, when the port port7 is the main root port, if the S1 needs to send a downstream message to the S4, the S1 sends the downstream message to S2 through port1, and the S2 receives the downstream message through port3, and then the S2 sends the downstream message to S4 through port4, and the S4 receives the downstream message through port6.
[0061] Based on the above-mentioned XLDP architecture, an embodiment of the present application provides the following technical solution: the XLDP network topology structure includes multiple nodes, including a first node and a second node for obtaining the network topology; at the initial operation of the network topology structure, the first node obtains the information of the second node; then the first node reports a first message to the second node based on the information of the second node, wherein the first message is used to inform the second node of the topology status of the first node, that is, the first message includes at least the identifier of the first node, the identifier of a third node as a neighbor node of the first node, and the identifier of the first port for the first node to communicate with the third node.
[0062] It can be understood that the technical solutions of the embodiments of the present application can be applied to various communication systems, such as: Global System of Mobile Communication (GSM) system, Code Division Multiple Access (CDMA) system, Wideband Code Division Multiple Access (WCDMA) system, Long Term Evolution (LTE) system, LTE Frequency Division Duplex (FDD) system, LTE Time Division Duplex (TDD), Universal Mobile Telecommunication System (UMTS), 5G communication system, and future wireless communication systems, etc.
[0063] In the present application, the first node, the second node or the third node may be a user device or a network device. The user equipment (UE) may also refer to a terminal device, an access terminal, a user unit, a user station, a mobile station, a mobile station, a remote station, a remote terminal, a mobile device, a user terminal, a terminal, a wireless communication device, a user agent or a user device. The access terminal may be a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA), a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a wearable device, a terminal device in a 5G network or a terminal device in a future evolved PLMN network, etc. The network device can be a device for communicating with a user device, for example, it can be a base station (Base Transceiver Station, BTS) in a GSM system or CDMA, it can be a base station (NodeB, NB) in a WCDMA system, it can also be an evolved base station (Evolutional Node B, eNB or eNodeB) in an LTE system, or the network device can be a relay station, an access point, a vehicle-mounted device, a wearable device, a network side device in a 5G network, or a network device in a future evolved public land mobile network (Public Land Mobile Network, PLMN) network, etc.
[0064] The following is a description of the method for obtaining network topology in the present application with reference to the diagram.
[0065] by Figure 2 The structure shown in FIG. 1 is used as an example for explanation, wherein S2 is the first node, S1 is the second node, and S4 is the third node. Figure 4 As shown, an embodiment of the method for obtaining network topology of the present application includes:
[0066] 401. The first node obtains information of the second node through static configuration.
[0067] After the XLDP network structure is constructed and the second node is determined to be a communication device for acquiring the network topology, the first node directly pre-stores the information of the second node in the memory of the first node by static configuration.
[0068] In this embodiment, the information of the second node includes an identifier of the second node and indication information, where the indication information is used to identify the second node for obtaining the network topology;
[0069] or,
[0070] The information of the second node includes an identifier of the second node, indication information, and an identifier of a third port through which the first node communicates with the second node.
[0071] by Figure 2 As shown, after S1 is confirmed as the root node, the user can statically configure the information of S1 to S2. At this time, the information of S1 includes the identifier of S1 (in this embodiment, the identifier of S1 can be a device identifier or a reference identifier of S1 in the network structure) and indication information. Alternatively, the information of S1 includes the identifier of S1 (in this embodiment, the identifier of S1 can be a device identifier or a reference identifier of S1 in the network structure), indication information, and the port information for communication between S1 and S2 (such as Figure 2 port1 and port3 as shown in the figure).
[0072] 402. The first node sends a first message to the second node, where the first message includes an identifier of the first node, an identifier of a third node that is a neighbor node of the first node, and an identifier of a first port for the first node to communicate with the third node.
[0073] After the second node triggers to obtain the network topology, the first node reads the pre-stored information of the second node; then reports the first message to the second node according to the information of the second node. The first message is mainly used to report the topology information of the first node in the network topology to the second node. Therefore, the first message may include the identifier of the first node, the identifier of the third node as the neighbor node of the first node, and the identifier of the first port of the first node communicating with the third node.
[0074] In this embodiment, the operation of the first node sending the first message according to the information of the second node may be as follows:
[0075] In a possible implementation, the first node confirms that the port through which the information of the second node is received is the port for communicating with the second node, and then the first node sends the first message to the second node according to the port for communicating with the second node. Figure 2 As shown, when the information of S1 includes the identifier of S1 (in this embodiment, the identifier of S1 can be a device identifier or a reference identifier of S1 in the network structure) and indication information, S2 confirms that port3 of the S1 information is received, which is the port for communication between S2 and S1; then S2 reports the first message to S1 through port3.
[0076] In another possible implementation, the first node obtains the communication port between the first node and the second node according to the information of the second node, and then reports the first message to the second node through the communication port. Figure 2 As shown, when the information of S1 includes the identifier of S1 (in this embodiment, the identifier of S1 can be a device identifier or a reference identifier of S1 in the network structure), indication information and an indication that port3 and port1 are ports between the first node and the second node, S2 confirms through the information of S1 that port3 is the port for communication between S2 and S1; then S2 reports the first message to S1 through port3.
[0077] 403. The second node sends a third message to the first node, where the third message is used to confirm receipt of the first message.
[0078] After receiving the first message sent by the first node, the second node sends a confirmation response to the first node, that is, the second node sends a third message to the first node, and the third message is used to confirm receipt of the first message.
[0079] In this embodiment, the first message can be named as topology notification message (TNM), and the third message can be named as topology notification acknowledgement message (TNAM). It is understandable that the first message and the third message can also have other possible naming methods, which are not specifically limited here.
[0080] In this embodiment, the first message includes at least the following fields:
[0081] Dev_ID: It can be identified using 32 bytes and is specifically used to indicate the unique identifier of the device that sends this TNM message.
[0082] Nbr_Dev_ID: It can be identified by 32 bytes. It is used to indicate the unique device identifier of the neighbor node of the device that sends this TNM message. Among them, the indication value FFFFFFFF can be used to indicate an illegal Nbr_Dev_ID.
[0083] Port_ID: It can be identified by 2 bytes. It is used to indicate the port identifier in the forwarding table and to encapsulate the path information of the downlink message. It is used to indicate the port identifier for communication between the device sending this TNM message and its neighbor node. For example, Figure 2 In the structure shown, when S2 reports topology information to S1, the communication port between S2 and S4 can be identified as port4.
[0084] It is understandable that the first message may also include other fields, and the specific format thereof may be as follows: Figure 5 As shown:
[0085] DMAC: It can be identified by 6 bytes. It is specifically used to indicate the destination media access control address (MAC). In an exemplary solution, its indication value can be 01-80-C2-00-00-0E.
[0086] SMAC: It can be identified by 6 bytes. It is specifically used to indicate the source MAC, that is, the MAC of the device that generates this protocol message.
[0087] Eth_Type: It can be identified by 2 bytes. It is used to indicate the XLDP protocol identifier. In an exemplary solution, its indication value can be 0x88DD.
[0088] Path_Type: It can be identified by 2 bytes. It is used to indicate the uplink message identification. In an exemplary solution, its indication value can be 0xA002.
[0089] Msg_Type: It can be identified by 7 bits. It is used to indicate that this message requires the other party's device to support the XLDP protocol type. In an exemplary solution, the indication value can be 18 to indicate that this message is a TNM message.
[0090] Length: It can be identified by 9 bits, which is used to indicate the length of the message after the length field.
[0091] Seq_Num: It can be identified by 4 bytes. It is specifically used to number the messages sent by the non-root node. Different sequence numbers identify different messages sent by the non-root node.
[0092] Dev_Type: It can be identified by 1 byte. It is used to indicate the device type of the device that sends this TNM message. For example, 1 identifies a switch, and 2 identifies an AP.
[0093] Port_Sum: It can be identified by 2 bytes, indicating how many ports the device sending this TNM message has.
[0094] Port_Name: It can be identified using 32 bytes and is used to identify the name of one of the ports of the device that sends this TNM message.
[0095] Port_State: It can be identified by 1 byte. It is used to indicate the state of the port of the device sending this TNM message. In an exemplary solution, the indication value 1 can be used to indicate that the port is used for uplink, and the indication value 0 can be used to indicate that the port is used for downlink.
[0096] XLDP_ENABLED: It can be identified by 1 byte. It is used to indicate whether the port peer device of the device sending this TNM message supports the XLDP protocol. In an exemplary solution, the indication value 1 can be used to indicate support, and the indication value 0 can be used to indicate non-support.
[0097] Nbr_Port_Name: It can be identified by 32 bytes. It is used to indicate the port name in the neighbor node of the device sending this TNM message that communicates with the device sending this TNM message. For example, Figure 2 In the structure shown, when S2 reports topology information to S1, it can be used to identify the communication port between S2 and S4 as port4, and the port at which S4 receives the downlink message sent by S2 is port6.
[0098] The third message includes at least the following fields:
[0099] Msg_Type: It can be identified by 7 bits. It is used to indicate that this message requires the other party's device to support the XLDP protocol type. In an exemplary solution, the indication value can be 19 to indicate that this message is a TNAM message.
[0100] It is understandable that the third message may also include other fields, and its specific format may be as follows: Figure 6 As shown:
[0101] DMAC: It can be identified by 6 bytes. It is specifically used to indicate the destination media access control address (MAC). In an exemplary solution, its indication value can be 01-80-C2-00-00-0E.
[0102] SMAC: It can be identified by 6 bytes. It is specifically used to indicate the source MAC, that is, the MAC of the device that generates this protocol message.
[0103] Eth_Type: It can be identified by 2 bytes. It is used to indicate the XLDP protocol identifier. In an exemplary solution, its indication value can be 0x88DD.
[0104] Path_Type: It can be identified by 2 bytes. It is used to indicate the downlink message identification. In an exemplary solution, its indication value can be 0xA001.
[0105] Length: It can be identified by 9 bits, which is used to indicate the length of the message after the length field.
[0106] Seq_Num: It can be identified by 4 bytes and is specifically used to number the message sent by the root node, which corresponds to the sequence number of the TNM information.
[0107] Dev_ID: It can be identified using 32 bytes and is specifically used to indicate the unique identification of the device receiving this TNAM message.
[0108] Dev_Type: It can be identified by 1 byte. It is used to indicate the device type of the device receiving this TNM message. For example, 1 identifies a switch, and 2 identifies an AP.
[0109] Please refer to Figure 7 As shown, another embodiment of the method for obtaining network topology of the present application includes:
[0110] 701. The first node and the second node send neighbor advertisement messages to each other to confirm that the first node and the second node are neighbor nodes.
[0111] After the device is powered on, neighboring devices (root node and non-root node, non-root node and non-root node) send neighbor notification messages (NNM) to each other to notify the other end that they have XLDP capability. Therefore, the first node and the second node send NNM to each other to notify the other end that they have XLDP capability.
[0112] 702. The second node sends a second message to the first node, where the second message includes information of the second node.
[0113] When the second node confirms that the first node is a non-root node and the first node is its neighbor node, the second node sends the second message to the first node, where the second message includes information about the second node.
[0114] In this embodiment, the information of the second node includes an identifier of the second node and indication information, where the indication information is used to identify the second node for obtaining the network topology;
[0115] or,
[0116] The information of the second node includes an identifier of the second node, indication information, and an identifier of a third port through which the first node communicates with the second node.
[0117] by Figure 2 As shown, after S1 is confirmed as the root node, S1 sends the information of S1 to S2. At this time, the information of S1 includes the identifier of S1 (in this embodiment, the identifier of S1 can be a device identifier or a reference identifier of S1 in the network structure) and indication information. Alternatively, the information of S1 includes the identifier of S1 (in this embodiment, the identifier of S1 can be a device identifier or a reference identifier of S1 in the network structure), indication information, and the port information for communication between S1 and S2 (such as Figure 2 port1 and port3 as shown in the figure).
[0118] 703. The first node sends a first message to the second node, where the first message includes an identifier of the first node, an identifier of a third node that is a neighbor node of the first node, and an identifier of a first port for communicating between the first node and the third node.
[0119] After the first node obtains the information of the second node through the second message sent by the second node, the first node reports the first message to the second node according to the information of the second node. The first message is mainly used to report the topology information of the first node in the network topology to the second node. Therefore, the first message may include the identifier of the first node, the identifier of the third node as the neighbor node of the first node, and the identifier of the first port of the first node communicating with the third node.
[0120] In this embodiment, the operation of the first node sending the first message according to the information of the second node may be as follows:
[0121] In a possible implementation, the first node confirms that the port through which the information of the second node is received is the port for communicating with the second node, and then the first node sends the first message to the second node according to the port for communicating with the second node. Figure 2 As shown, when the information of S1 includes the identifier of S1 (in this embodiment, the identifier of S1 can be a device identifier or a reference identifier of S1 in the network structure) and indication information, S2 confirms that port3 of the S1 information is received, which is the port for communication between S2 and S1; then S2 reports the first message to S1 through port3.
[0122] In another possible implementation, the first node obtains the communication port between the first node and the second node according to the information of the second node, and then reports the first message to the second node through the communication port. Figure 2 As shown, when the information of S1 includes the identifier of S1 (in this embodiment, the identifier of S1 can be a device identifier or a reference identifier of S1 in the network structure), indication information and an indication that port3 and port1 are ports between the first node and the second node, S2 confirms through the information of S1 that port3 is the port for communication between S2 and S1; then S2 reports the first message to S1 through port3.
[0123] 704. The second node sends a third message to the first node, where the third message is used to confirm receipt of the first message.
[0124] After receiving the first message sent by the first node, the second node sends a confirmation response to the first node, that is, the second node sends a third message to the first node, and the third message is used to confirm receipt of the first message.
[0125] In this embodiment, the second message may be named as a root notification message (RNM). It is understandable that the second message may also have other possible naming methods, which are not specifically limited here.
[0126] In this embodiment, the second message includes at least the following fields:
[0127] Root_Dev_ID: It can be identified using 32 bytes. It is specifically used to indicate the unique device identifier of the root node. Among them, the indicator value FFFFFFFF can be used to indicate an illegal Root_Dev_ID (that is, it indicates that there is a communication failure on the link, such as Figure 2 In the structure shown, when the S2 notifies the S4 of the root node information, the indication value of the Root_Dev_ID is FFFFFFFF, indicating that there is a communication failure between the S2 and the S1).
[0128] It is understandable that the second message may also include other fields, and its specific format may be as follows: Figure 8 As shown:
[0129] DMAC: It can be identified by 6 bytes. It is specifically used to indicate the destination media access control address (MAC). In an exemplary solution, its indication value can be 01-80-C2-00-00-0E.
[0130] SMAC: It can be identified by 6 bytes. It is specifically used to indicate the source MAC, that is, the MAC of the device that generates this protocol message.
[0131] Eth_Type: It can be identified by 2 bytes. It is used to indicate the XLDP protocol identifier. In an exemplary solution, its indication value can be 0x88DD.
[0132] Path_Type: It can be identified by 2 bytes. It is used to indicate the XLDP capability negotiation message. In an exemplary solution, its indication value can be 0xA003.
[0133] Msg_Type: It can be identified by 7 bits. It is used to indicate that this message requires the other party's device to support the XLDP protocol type. In an exemplary solution, the indication value can be 4 to indicate that this message is a RNM message.
[0134] Length: It can be identified by 9 bits, which is used to indicate the length of the message after the length field.
[0135] Dev_ID: It can be identified using 32 bytes. It is specifically used to indicate the unique identifier of the device that sends the RNM message. For example, Figure 2 In the structure shown, when the S1 sends the RNM information to the S2, the device identifier is used to identify the S1.
[0136] Root_Port_Name: It can be identified using 32 bytes. It is specifically used to indicate the root port name. For example Figure 2 In the structure shown, when the S2 sends the RNM information to the S4, it is used to identify the port identifier of the S2 for receiving the downlink message sent by the S1.
[0137] Nbr_Dev_ID: It can be identified using 32 bytes. It is specifically used to indicate the unique identifier of the neighbor device connected to the root port of the device that sends the RNM information. Among them, the indicator value FFFFFFFF can be used to indicate an illegal Nbr_Dev_ID. For example, Figure 2 In the structure shown, when the S2 sends the RNM information to the S4, the device identifier of the S1 is used to identify the S1.
[0138] Nbr_Port_Name: It can be identified using 32 bytes. It is specifically used to indicate the neighbor port name of the neighbor device connected to the root port of the device sending the RNM information. For example Figure 2 In the structure shown, when the S2 sends the RNM information to the S4, it is used to identify the port1.
[0139] Please refer to Fig. 9 As shown, another embodiment of the method for obtaining network topology of the present application includes:
[0140] 901. The first node and the third node send neighbor advertisement messages to each other to confirm that the first node and the third node are neighbor nodes.
[0141] After the device is powered on, neighboring devices (root nodes and non-root nodes, non-root nodes and non-root nodes) send neighbor notification messages (NNM) to each other to notify the other end that they have XLDP capabilities. Therefore, the first node and the third node send NNM to each other to notify the other end that they have XLDP capabilities.
[0142] 902. The first node sends a fourth message to the third node, where the fourth message includes information of the second node.
[0143] When the first node confirms that the second node is a non-root node and the third node is its neighbor node, the first node sends the fourth message to the third node, where the fourth message includes the information of the second node.
[0144] In this embodiment, the information of the second node includes an identifier of the second node and indication information, where the indication information is used to identify the second node for obtaining the network topology;
[0145] or,
[0146] The information of the second node includes an identifier of the second node, indication information, and an identifier of a third port through which the first node communicates with the second node.
[0147] by Figure 2 As shown, after S2 confirms that S1 is the root node, S2 sends the information of S1 to S4. At this time, the information of S1 includes the identifier of S1 (in this embodiment, the identifier of S1 can be a device identifier or a reference identifier of S1 in the network structure) and indication information. Alternatively, the information of S1 includes the identifier of S1 (in this embodiment, the identifier of S1 can be a device identifier or a reference identifier of S1 in the network structure), indication information, and the port information for communication between S2 and S4 (such as Figure 2 port4 and port6 as shown in the figure).
[0148] 903. The third node sends a fifth message to the first node, where the fifth message includes an identifier of the third node, an identifier of a fourth node that is a neighbor node of the third node, and an identifier of a port through which the third node communicates with the fourth node.
[0149] After the third node obtains the information of the second node through the fourth message sent by the first node, the third node reports the fifth message to the first node according to the information of the second node. The fifth message is mainly used to report the topology information of the third node in the network topology to the second node. Therefore, the fifth message may include the identifier of the third node, the identifier of the fourth node as the neighbor node of the third node, and the port identifier of the third node communicating with the fourth node. It can be understood that the fourth node includes at least the first node and may also include other nodes.
[0150] In this embodiment, the operation of the third node sending the fifth message according to the information of the second node may be as follows:
[0151] In a possible implementation, the third node confirms that the port receiving the information of the second node is the port used to communicate with the second node (i.e., the port for sending uplink messages), and then the third node sends the fifth message through the port for sending uplink messages. Figure 2 As shown, when the information of S1 includes the identifier of S1 (in this embodiment, the identifier of S1 can be a device identifier or a reference identifier of S1 in the network structure) and indication information, S4 confirms that port6 of the S1 information is received, which is the port for S4 to send an uplink message; then S4 sends the fifth message to S21 through port6.
[0152] In another possible implementation, the third node obtains the communication port between the third node and the second node according to the information of the second node, and then reports the fifth message to the second node through the communication port. Figure 2 As shown, when the information of S1 includes the identifier of S1 (in this embodiment, the identifier of S1 can be a device identifier or a reference identifier of S1 in the network structure), indication information and an indication that port6 sends an uplink message for the third node, S4 confirms through the information of S1 that port6 is the port for S4 to send the uplink message; then S4 sends the fifth message to S21 through the port6.
[0153] 904. The first node receives the fifth message, and forwards the fifth message to the second node.
[0154] In this embodiment, the fifth message may also include indication information, wherein the indication information is used to indicate the port identifier of the first node to forward the fifth message. In this case, after receiving the fifth message, the first node forwards the fifth message to the second node based on the port indicated in the fifth message.
[0155] like Figure 2 In the structure shown, after obtaining the information of S1, S4 generates a fifth message for reporting the topology information of S4, and indicates in the fifth message that S2 can forward the fifth message through the port2. After receiving the fifth message, S2 forwards the fifth message to S1 according to the port2 indicated in the fifth message.
[0156] 905. The second node sends a seventh message to the first node, where the seventh message is used to confirm receipt of the fifth message.
[0157] After receiving the fifth message sent by the third node, the second node sends a confirmation response to the third node, that is, the second node sends a seventh message to the third node, and the seventh message is used to confirm the receipt of the first message. Since the first node is located between the third node and the second node, the second node needs to send the seventh message to the first node first.
[0158] 906. The first node receives the seventh message, and forwards the seventh message to the third node.
[0159] Similarly, the seventh message may also include indication information, wherein the indication information is used to indicate the port identifier of the first node to forward the seventh message. After receiving the seventh message, the first node forwards the seventh message to the third node based on the port indicated in the seventh message.
[0160] like Figure 2 In the structure shown, after obtaining the topology information of S4, S1 generates a seventh message for confirming the receipt of the fifth message of the topology information of S4, and indicates in the seventh message that S2 can forward the seventh message through the port4. After receiving the seventh message, S2 forwards the seventh message to S4 according to the port4 indicated by the seventh message.
[0161] In this embodiment, the format of the fourth message is the same as that of the second message, the format of the fifth message is the same as that of the first message, and the format of the seventh message is the same as that of the third message, which will not be repeated here.
[0162] The above mainly describes the method for obtaining the network topology in the embodiment of the present application. Based on the above scheme, the scheme when a communication failure occurs in the network topology is described below.
[0163] by Figure 2 The structure shown in FIG. 1 is used as an example for explanation, wherein S2 is the first node, S1 is the second node, and S4 is the third node. Fig.10 As shown, an embodiment of the method for obtaining network topology of the present application includes:
[0164] 1001. When the first node confirms that there is a communication failure between the first node and the second node, the first node sends a sixth message to the third node, where the sixth message is used to notify that there is a communication failure with the second node.
[0165] When there is a communication failure between the first node and the second node, the first node confirms that the root node has been lost, and the first node will send a sixth message to the third node, and the sixth message is used to notify the third node that there is a communication failure between the first node and the second node. Fig.11 As shown, if there is a communication failure between S1 and S2, S2 will notify S4 that there is a communication failure between S1 and S2. At this time, the root port (port3) of S1 will be restored to a non-root port.
[0166] 1002. The third node confirms that there is a fault in the communication with the second node.
[0167] After receiving the sixth message, the third node confirms that there is a failure in the communication with the second node on this link. Fig.11 As shown, at this time, the root port (port6) of S4 will be restored to a non-root port.
[0168] by Figure 3 The structure shown in FIG. 1 is used as an example for explanation, wherein S2 is the first node, S1 is the second node, and S4 is the third node. Fig.12 As shown, an embodiment of the method for obtaining network topology of the present application includes:
[0169] 1201. When the first node confirms that there is a communication failure between the first node and the second node, the first node sends a sixth message to the third node, where the sixth message is used to notify that there is a communication failure with the second node.
[0170] When there is a communication failure between the first node and the second node, the first node confirms that the root node has been lost, and the first node will send a sixth message to the third node, and the sixth message is used to notify the third node that there is a communication failure between the first node and the second node. Fig.13 As shown, if there is a communication failure between S1 and S2, S2 will notify S4 that there is a communication failure between S1 and S2. At this time, the root port (port3) of S1 will be restored to a non-root port.
[0171] 1202. The third node confirms that there is a fault in the communication with the second node, and obtains a backup root port to communicate with the second node.
[0172] After receiving the sixth message, the third node confirms that there is a failure in the communication with the second node on this link, and thus switches to the backup link to communicate with the second node. Fig.13 As shown, at this time, the primary root port (port7) of S4 will be restored to a non-root port, and the backup root port (port8) will be switched to the primary root port.
[0173] Please refer to Fig.14 As shown, an embodiment of the method for obtaining network topology of the present application includes:
[0174] 1401. The first node obtains information of the second node.
[0175] In this embodiment, the first node can use the above Figures 4 to 13 The information of the second node is obtained by any of the methods described above, and the details are not repeated here.
[0176] 1402. The first node sends a first message to the second node based on the information of the second node, and the first message includes an identifier of the first node, an identifier of a third node that is a neighbor node of the first node, and an identifier of a first port for communication between the first node and the third node.
[0177] In this embodiment, the first node can use the above Figures 4 to 13 The first message is reported to the second node in any of the above-mentioned ways. Detailed description is omitted here.
[0178] The above describes the method for obtaining the network topology in the embodiment of the present application. The following describes the communication device in the embodiment of the present application.
[0179] Please refer to Fig.15 As shown, in the embodiment of the present application, the communication device 1500 includes: an acquisition module 1501 and a sending module 1502, wherein the acquisition module 1501 and the sending module 1502 are connected via a bus. The communication device 1500 can be the first node in the above method embodiment, or it can be configured as one or more chips in the first node. The communication device 1500 can be used to perform some or all of the functions of the first node in the above method embodiment.
[0180] In an exemplary solution, the acquisition module 1501 can be used to execute step 401 or step 702 in the above method embodiment. For example, the acquisition module 1501 is used to acquire information of a second node used to acquire a network topology; the sending module 1502 can be used to execute step 402, step 703, or step 902 in the above method embodiment, for example, the sending module 1502 sends a first message to the second node according to the information of the second node, the first message including an identifier of the first node, an identifier of a third node as a neighbor node of the first node, and an identifier of a first port for the first node to communicate with the third node.
[0181] Optionally, the communication device 1500 further includes a storage module and a processing module, and the storage module is coupled to the processing module so that the processing module can execute the computer-executable instructions stored in the storage module to implement the functions of the terminal in the above method embodiment. In an example, the storage module optionally included in the communication device 1500 can be a storage unit in the chip, such as a register, a cache, etc., and the storage module can also be a storage unit located outside the chip, such as a ROM or other types of static storage devices that can store static information and instructions, RAM, etc. The processing module in the communication device 1500 is used to generate the first message or the fourth message.
[0182] It should be understood that the above Fig.15The processes executed between the modules of the communication device in the corresponding embodiment are the same as those in the above Figures 4 to 14 The process executed by the first node in the corresponding method embodiment is similar, and the details will not be repeated here.
[0183] Fig.16 A possible structural diagram of a communication device 1600 in the above embodiment is shown, and the communication device 1600 can be configured as the aforementioned first node. The communication device 1600 may include: a processor 1602, a computer-readable storage medium / memory 1603, a transceiver 1604, an input device 1605 and an output device 1606, and a bus 1601. Among them, the processor, the transceiver, the computer-readable storage medium, etc. are connected via a bus. The embodiment of the present application does not limit the specific connection medium between the above components.
[0184] In one example, the transceiver 1604 obtains information of a second node for obtaining a network topology;
[0185] The processor 1602 generates the first message;
[0186] The transceiver 1604 sends a first message to the second node according to the information of the second node, where the first message includes an identifier of the first node, an identifier of a third node that is a neighbor node of the first node, and an identifier of a first port for communication between the first node and the third node.
[0187] In one example, the processor 1602 obtains information of a second node used to obtain a network topology; generates the first message; the transceiver 1604 sends a first message to the second node based on the information of the second node, wherein the first message includes an identifier of the first node, an identifier of a third node that is a neighbor node of the first node, and an identifier of a first port for communication between the first node and the third node.
[0188] In one example, the processor 1602 may include a baseband circuit, for example, to generate the first message or the fourth message. The transceiver 1604 may include a radio frequency circuit to modulate and amplify the first message or the fourth message and then send it to the second node or the third node.
[0189] In another example, the processor 1602 may run an operating system to control functions between various devices and components. The transceiver 1604 may include a baseband circuit and a radio frequency circuit. For example, the first message or the fourth message may be processed by the baseband circuit and the radio frequency circuit and then sent to the second node or the third node.
[0190] The transceiver 1604 and the processor 1602 can implement the above Figures 4 to 14 The corresponding steps in any of the embodiments will not be described in detail here.
[0191] Understandably, Fig.16 Only a simplified design of the communication device is shown. In actual applications, the communication device may include any number of transceivers, processors, memories, etc., and all communication devices that can implement the present application are within the protection scope of the present application.
[0192] The processor 1602 involved in the above-mentioned communication device 1600 can be a general-purpose processor, such as a CPU, a network processor (NP), a microprocessor, etc., or an ASIC, or one or more integrated circuits for controlling the execution of the program of the present application. It can also be a digital signal processor (DSP), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The controller / processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of DSP and microprocessors, etc. The processor usually performs logical and arithmetic operations based on program instructions stored in a memory.
[0193] The bus 1601 mentioned above may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.16 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0194] The computer-readable storage medium / memory 1603 involved above may also store an operating system and other application programs. Specifically, the program may include a program code, and the program code includes computer operation instructions. More specifically, the above-mentioned memory may be a ROM, other types of static storage devices that can store static information and instructions, RAM, other types of dynamic storage devices that can store information and instructions, disk storage, etc. The memory 1603 may be a combination of the above-mentioned storage types. And the above-mentioned computer-readable storage medium / memory may be in the processor, or may be outside the processor, or distributed on multiple entities including a processor or a processing circuit. The above-mentioned computer-readable storage medium / memory may be specifically embodied in a computer program product. For example, a computer program product may include a computer-readable medium in a packaging material.
[0195] Alternatively, the embodiment of the present application also provides a general processing system, such as a chip, which includes: one or more microprocessors that provide processor functions; and an external memory that provides at least a portion of the storage medium, all of which are connected to other supporting circuits through an external bus architecture. When the instructions stored in the memory are executed by the processor, the processor executes the first communication device in Figures 4 to 14 Part or all of the steps in the method for acquiring network topology in this embodiment, and / or other processes used for the technology described in this application.
[0196] The steps of the method or algorithm described in conjunction with the disclosure of the present application can be implemented in a hardware manner, or can be implemented by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a mobile hard disk, a CD-ROM or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a terminal. Of course, the processor and the storage medium can also be present in a communication device as discrete components.
[0197] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0198] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0199] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0200] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0201] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.
Claims
1. A method for obtaining network topology, characterized in that: include: The first node acquires information of a second node used to acquire a network topology, where the information of the second node includes: indication information, where the indication information is used to identify that the second node is used to acquire a network topology; The first node sends a first message to the second node according to the information of the second node, where the first message includes an identifier of the first node, an identifier of a third node that is a neighbor node of the first node, and an identifier of a first port for communication between the first node and the third node; After a communication failure occurs between the first node and the second node, the first node sets the port in the first node where the communication failure occurs with the second node as a non-root port, and sends a sixth message to the third node, wherein the sixth message is used to notify the third node of the communication failure with the second node, and the non-root port is a port for receiving uplink messages sent by the non-root node.
2. The method according to claim 1, characterized in that The information of the second node also includes an identifier of the second node, and the first node sending a first message to the second node according to the information of the second node includes: The first node acquires a second port for receiving information of the second node; The first node sends the first message to the second node through the second port.
3. The method according to claim 1, characterized in that The information of the second node further includes: an identifier of the second node and an identifier of a third port for the first node to communicate with the second node, and the first node sending a first message to the second node according to the information of the second node includes: The first node sends the first message to the second node through a port corresponding to the identifier of the third port based on the information of the second node.
4. The method according to any one of claims 1 to 3, characterized in that The first node acquiring information of the second node used to acquire the network topology includes: The first node acquires information of the statically configured second node; or The first node receives a second message from the second node, where the second message includes information of the second node.
5. The method according to any one of claims 1 to 3, characterized in that The method further comprises: The first node receives a third message from the second node, where the third message is used to confirm receipt of the first message.
6. The method according to any one of claims 1 to 3, characterized in that The method further comprises: The first node sends a fourth message to the third node, where the fourth message includes information about the second node; The first node receives a fifth message sent by the third node, where the fifth message includes an identifier of the third node, an identifier of a fourth node that is a neighbor node of the third node, and an identifier of a port through which the third node communicates with the fourth node; The first node sends the fifth message to the second node.
7. The method according to claim 6, characterized in that The fifth message further includes indication information, where the indication information is used to identify that the message belongs to an uplink message, and the first node sending the fifth message to the second node includes: The first node acquires, according to the indication information included in the fifth message, a port for communicating with the second node; The first node sends the fifth message from the port for communicating with the second node.
8. The method according to any one of claims 1 to 3, characterized in that The method further comprises: The first node communicates with the second node through the fourth port after a communication failure occurs between the first node and the second node.
9. A communication device, characterized in that: include: An acquisition module, configured to acquire information of a second node used to acquire a network topology, wherein the information of the second node includes: indication information, wherein the indication information is used to identify that the second node is used to acquire a network topology; a sending module, configured to send a first message to the second node according to the information of the second node, wherein the first message includes an identifier of the first node, an identifier of a third node that is a neighbor node of the first node, and an identifier of a first port for communication between the first node and the third node; The sending module is also used to set the port in the first node where the communication with the second node fails as a non-root port after a communication failure occurs between the first node and the second node, and send a sixth message to the third node, wherein the sixth message is used to notify that there is a communication failure with the second node, and the non-root port is a port for receiving uplink messages sent by the non-root node.
10. The communication device according to claim 9, characterized in that The information of the second node includes an identifier of the second node, and the acquisition module is specifically used to acquire a second port for receiving the information of the second node; The sending module is specifically configured to send the first message to the second node through the second port.
11. The communication device according to claim 9, characterized in that The information of the second node includes: an identifier of the second node and an identifier of a third port for the first node to communicate with the second node. The sending module is specifically used to send the first message to the second node through a port corresponding to the identifier of the third port based on the information of the second node.
12. The communication device according to any one of claims 9 to 11, characterized in that: The acquisition module is specifically used to acquire the information of the second node configured statically; or The communication device further includes a receiving module, and the receiving module is configured to receive a second message from the second node, where the second message includes information of the second node.
13. The communication device according to any one of claims 9 to 11, characterized in that: The communication device further includes a receiving module, wherein the receiving module is configured to receive a third message from the second node, wherein the third message is used to confirm receipt of the first message.
14. The communication device according to any one of claims 9 to 11, characterized in that: The sending module is further used to send a fourth message to the third node, where the fourth message includes information about the second node; The communication device further includes a receiving module, the receiving module being configured to receive a fifth message sent by the third node, the fifth message including an identifier of the third node, an identifier of a fourth node as a neighbor node of the third node, and an identifier of a port through which the third node communicates with the fourth node; The sending module is further used to send the fifth message to the second node.
15. The communication device according to claim 14, characterized in that The fifth message further includes indication information, where the indication information is used to identify that the message belongs to an uplink message, and the acquisition module is specifically used to acquire a port for communicating with the second node according to the indication information included in the fifth message; The sending module is specifically configured to send the fifth message from the port for communicating with the second node.
16. The communication device according to any one of claims 9 to 11, characterized in that: The sending module is further configured to communicate with the second node through a fourth port after a communication failure occurs between the first node and the second node.
Citation Information
Patent Citations
Topological information transmission method and device
CN108259340A