CN112751697A - Network topology discovery method and node equipment - Google Patents

Network topology discovery method and node equipment Download PDF

Info

Publication number
CN112751697A
CN112751697A CN201911053346.7A CN201911053346A CN112751697A CN 112751697 A CN112751697 A CN 112751697A CN 201911053346 A CN201911053346 A CN 201911053346A CN 112751697 A CN112751697 A CN 112751697A
Authority
CN
China
Prior art keywords
port
node device
child node
link
role
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911053346.7A
Other languages
Chinese (zh)
Other versions
CN112751697B (en
Inventor
沈利
魏含宇
胡寅亮
范多亮
吕云屏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201911053346.7A priority Critical patent/CN112751697B/en
Priority to PCT/CN2020/124378 priority patent/WO2021083208A1/en
Priority to EP20880534.1A priority patent/EP4047877A4/en
Publication of CN112751697A publication Critical patent/CN112751697A/en
Priority to US17/731,686 priority patent/US11855875B2/en
Application granted granted Critical
Publication of CN112751697B publication Critical patent/CN112751697B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • H04L45/124Shortest path evaluation using a combination of metrics
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/26Route discovery packet
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/42Centralised routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/48Routing tree calculation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports

Abstract

The application discloses a network topology discovery method and node equipment. In the application, a root node device sends a link discovery message to a child node device through a first port; receiving a link discovery response message sent by the child node device through the second port of the child node device, wherein the link discovery response message includes an identifier of the child node device and an identifier of the second port; and determining a first link based on the link discovery response message, the first link being a link between the first port and the second port. By adopting the scheme of the application, when the node equipment detects that the link of the port is connected, the existing topological relation is discovered through the interaction of the messages, and the discovery of the network topology can be realized.

Description

Network topology discovery method and node equipment
Technical Field
The present application relates to the field of computers, and in particular, to a network topology discovery method and a node device.
Background
As the network scale increases, the network application scenarios based on the topology are more and more, and therefore, the topology is the core of the whole network operation. However, as the number of network nodes increases, the number of ports increases, and it becomes difficult to configure or discover the topology manually.
Disclosure of Invention
The application provides a network topology discovery method and node equipment, so as to realize topology discovery.
In a first aspect, a method for discovering a network topology is provided, including: transmitting a link discovery message to the child node device through the first port; receiving a link discovery response message sent by the child node device through a second port of the child node device, wherein the link discovery response message includes an identifier of the child node device and an identifier of the second port; and determining a first link based on the link discovery response message, wherein the first link is a link between the first port and the second port.
When the node device detects that the link of the port is connected, the existing topological relation is discovered through message interaction, and the discovery of the network topology can be realized.
In one implementation, the method further comprises: before the sending the link discovery message to the child node device through the first port, the method further includes: and detecting that the link corresponding to the first port is connected.
The discovery of the link may be triggered by the root node device when detecting that the link corresponding to its port is connected, and the root node device does not need to perform network topology discovery all the time.
In yet another implementation, the method further comprises: and instructing the child node device to set the second port as an uplink port based on the first link.
For the discovered network topology, at least one port of the child node device needs to be indicated as an upstream port in order to communicate with the root node device.
In yet another implementation, said instructing the child node device to set the second port as an upstream port based on the first link comprises: sending a port role updating message to the child node device through the first port, wherein the port role updating message comprises the identifier of the child node device, the identifier of a second port and the role information of the second port, and the port role updating message is used for indicating the child node device to perform role setting according to the role information of the second port; and receiving a port role update response message sent by the child node equipment through the second port.
In yet another implementation, the method further comprises: if the child node device is a first discovery device, sending a device discovery message to the child node device through the first port, wherein the device discovery message includes an identifier of the child node device; and receiving a device discovery response message sent by the child node device through the second port, wherein the device discovery response message includes the identifier of the child node device, and the identifiers, the states and the port capabilities of all the ports of the child node device.
Through device discovery, the root node device can learn the identity, status, and port capabilities of all the ports of the new device to communicate with the new device.
In yet another implementation, before a first child node device is directly connected to the root node device and a second child node device is not directly connected to the root node device, and before the link discovery message is sent to the child node device through the first port, the method further includes: receiving a port state change message sent by the first child node device, where the port state change message is used to indicate that a link connection exists between a third port of the first child node device and a fourth port of the second child node device.
When the direct connection device detects that the port state between the direct connection device and the non-direct connection device changes, the direct connection device reports the port state to the root node device, so that the root node device discovers the topological relation between the root node device and the non-direct connection device.
In yet another implementation, the link discovery message includes an identification of at least one egress port, the port role update message includes an identification of at least one egress port, and the device discovery message includes an identification of at least one egress port.
When a child node device (which may be a direct connection device or a non-direct connection device) forwards a message, a root node device carries an identifier of at least one egress port in the message to indicate that the child node device forwards the message according to the identifier of the egress port without processing the message by itself.
In yet another implementation, the method further comprises: when the state of the first link is detected to be changed, determining child node equipment needing to update the port role; sending a port role updating message to the child node device needing role updating through the second link, wherein the port role updating message comprises an identifier of an outlet port of an intermediate child node device between the root node device and the child node device needing role updating; and receiving a port role update response message.
When the root node device detects that the link state changes, the role of the port of the child node device on the link can be revised again through calculation, and the topological structure is refreshed.
In a second aspect, a method for discovering a network topology is provided, including: receiving a link discovery message sent by a root node device, wherein the link discovery message comprises an identifier of a third port; forwarding the link discovery message to a second child node device through the third port; receiving a link discovery response message sent by the second child node device through a fourth port, where the link discovery response message includes an identifier of the second child node device and an identifier of the fourth port; and sending the link discovery reply message to the root node device.
In one implementation, the method further comprises: detecting that a link connection exists between a third port of the first sub-node device and a fourth port of the second sub-node device; and sending a port state change message to the root node device, wherein the port state change message is used for indicating that the third port has link connection
In yet another implementation, the method further comprises: receiving a port role update message sent by the root node device, where the port role update message includes an identifier of the second child node device, an identifier of the third port, an identifier of the fourth port, and role information of the fourth port, and the port role update message is used to instruct the second child node device to perform role setting according to the role information of the fourth port; sending the port role update message to the second child node device through the third port; receiving, by the fourth port, a port role update response message sent by the second child node device; and sending the port role update response message to the root node device.
In yet another implementation, the method further comprises: if the second child node device is a first discovery device, receiving a device discovery message sent by the root node device, where the device discovery message includes an identifier of the second child node device and an identifier of the third port; sending the device discovery message to the second child node device through the third port; receiving, through the fourth port, a device discovery response message sent by the second child node device, where the device discovery response message includes an identifier of the second child node device, and identifiers, states, and port capabilities of all ports of the second child node device; and sending the device discovery response message to the root node device.
In a third aspect, a method for discovering a network topology is provided, including: receiving a link discovery message sent by a root node device through a first port; and sending a link discovery response message to the root node device through the second port, the link discovery response message including the identifier of the child node device and the identifier of the second port.
In one implementation, the method further comprises: receiving a port role update message sent by the root node device through the first port, wherein the port role update message comprises an identifier of the child node device, an identifier of a second port and role information of the second port, and the port role update message is used for indicating the child node device to perform role setting according to the role information of the second port; setting the role of the second port according to the role information of the second port; and sending a port role update response message to the root node device through the second port.
In yet another implementation, the method further comprises: if the child node device is a first discovery device, receiving a device discovery message sent by the root node device through the first port, wherein the device discovery message includes an identifier of the child node device; and sending a device discovery response message to the root node device through the second port, wherein the device discovery response message includes the identifier of the child node device, and the identifiers, the states and the port capabilities of all the ports of the child node device.
In yet another implementation, a first child node device is directly connected to the root node device, and a second child node device is not directly connected to the root node device, the method further comprising: and sending a port state change message to the root node device, where the port state change message is used to indicate that a link connection exists between the third port of the first child node device and the fourth port of the second child node device.
In yet another implementation, the link discovery message includes an identification of at least one egress port, the port role update message includes an identification of at least one egress port, and the device discovery message includes an identification of at least one egress port.
In a fourth aspect, a node device is provided, where the node device is configured to implement a behavior function of a root node device in the method in any implementation of the first aspect or the first aspect. The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-described functions.
In a fifth aspect, a child node device is provided, where the child node device is configured to implement a behavior function of an intermediate node device in the method in any implementation of the second aspect or the second aspect. The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-described functions.
In a sixth aspect, a child node device is provided, where the child node device is configured to implement a behavior function of a child node device in the method in any implementation of the third aspect or the third aspect. The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-described functions.
In a seventh aspect, a node device is provided, including: a processor for performing the method of the first aspect or any of the implementations of the first aspect.
In an eighth aspect, a node device is provided, including: a processor for performing the method of any of the implementations of the second aspect or the second aspect described above, and a physical interface.
In a ninth aspect, there is provided a node apparatus comprising: a processor for performing the method in any implementation of the third aspect or the third aspect above, and a physical interface.
In a tenth aspect, a computer-readable storage medium is provided, having stored therein instructions, which, when run on a computer, cause the computer to perform the method of the above aspects.
In an eleventh aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the above aspects.
In a twelfth aspect, a communication system is provided, which includes the above node device.
Drawings
Fig. 1 is a schematic diagram of a network topology provided in an embodiment of the present application;
fig. 2 is a schematic diagram of a specific exemplary enterprise network topology architecture;
fig. 3 is a schematic flowchart of a network topology discovery method according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a network topology discovery method in a direct connection scenario according to an embodiment of the present application;
fig. 5 is a schematic diagram of an enterprise network topology architecture in a direct connection scenario;
fig. 6 is a schematic flowchart of a method for discovering a network topology in a non-direct connection scenario according to an embodiment of the present application;
FIG. 7 is a schematic diagram of an enterprise network topology architecture in a non-direct connection scenario;
fig. 8 is a schematic flowchart of another network topology discovery method according to an embodiment of the present application;
FIG. 9 is a schematic diagram of an exemplary link state change;
FIG. 10 is a schematic diagram of yet another exemplary link state change;
fig. 11 is a schematic structural diagram of a node device according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a child node device according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of another seed node device according to an embodiment of the present application;
fig. 14 is a schematic structural diagram of a node device according to an embodiment of the present application.
Detailed Description
The embodiments of the present invention will be described below with reference to the drawings.
Fig. 1 is a schematic diagram of a network topology provided in an embodiment of the present application, where the network topology includes a ROOT node device (ROOT)10, one or more first sub-node devices 11 (only one first sub-node device is illustrated in the figure), and one or more second sub-node devices 12 (only one second sub-node device is illustrated in the figure), and of course, the network topology may further include more sub-node devices. Wherein the root node device, the first child node device and the second child node device have one or more ports. In this example, the first port of the root node device is connected to the second port of the first child node device, and the third port of the first child node device is connected to the fourth port of the second child node device. The root node equipment is directly connected with the first child node equipment; the second child node device is connected to the root node device through the first child node device, namely the second child node device is not directly connected with the root node device.
The method of the embodiments of the present application may be applied to any network architecture, such as an enterprise network, a campus network, a data center network, and the like.
Fig. 2 is a schematic diagram of a specific example of an enterprise network topology architecture, in which a core switch is used as a ROOT switch of a whole network to discover the topology of the whole network. Theoretically, any switch in the network can be used as the ROOT, but generally the control plane of the uppermost core switch has the strongest capability, and the node used as the ROOT has a certain requirement on the control plane, so the core switch is generally selected as the ROOT. When there are a plurality of core switches, one of the core switches configured as a ROOT may be selected arbitrarily, or a switch that is a ROOT may be selected from the plurality of core switches by some election algorithm. In this example, the core switch is connected to port 1 of aggregation switch (AGG) 1 through port 4, the core switch is connected to port 1 of aggregation switch 2 through port 5, port 4 of aggregation switch 1 is connected to port 1 of access switch (ACC) 1, port 7 of aggregation switch 1 is connected to port 1 of access switch 2, port 8 of aggregation switch 2 is connected to port 2 of access switch 2, terminal device a is connected to port 3 of access switch a, and terminal device B is connected to port 6 of access switch 2. The above network topologies are merely examples.
The embodiment of the application provides a network topology discovery scheme to automatically discover the network topology relationship.
The following is a detailed description of some specific embodiments.
Fig. 3 is a schematic flowchart of a method for discovering a network topology according to an embodiment of the present application, where the method may include:
s101, the root node equipment sends a link discovery message to the child node equipment through the first port.
Accordingly, the child node device receives the link discovery message.
As shown in the foregoing system architecture diagram, the root node device may be connected to one or more directly connected child node devices, and may also be connected to one or more non-directly connected child node devices through the directly connected child node devices. The child node device of the link peer to be found may be a direct connection child node device of the root node device, or may be a non-direct connection child node device of the root node device.
When there is a link between the root node device to be discovered and the child node device, the root node device sends a link discovery message to the child node device through the first port to perform a link discovery procedure.
Before S101, the method may further include: and detecting that the link corresponding to the first port is connected. When the root node device detects that a link corresponding to the first port of the root node device is connected, the root node device is connected with a link of a direct connection child node device; when the root node device receives the port state change message reported by the direct-connected child node device, the port corresponding to the direct-connected child node device is connected, and the direct-connected child node device is connected with the link of the non-direct-connected child node device of the next layer. And the root node equipment sends a link discovery message to the direct connection child node equipment, or sends a link discovery message to the non-direct connection child node equipment through the found direct connection child node equipment.
S102, the child node equipment sends a link discovery response message through a second port of the child node equipment.
Accordingly, the root node device receives the link discovery reply message.
The child node device receives the link discovery message through the connected link (specifically, through the second port), and resolves the message type into the link discovery message. The child node device constructs a link discovery response message including an identification of the child node device and an identification of the second port. The child node device transmits the link discovery reply message through the second port. Specifically, if the direct connection child node device responds, the direct connection child node device sends the link discovery response message through the second port; and if the non-direct connection child node equipment responds, the non-direct connection child node equipment sends the link discovery response message through the discovered direct connection child node equipment.
S103, the root node device determines a first link based on the link discovery response message, where the first link is a link between the first port and the second port.
And the root node equipment receives the link discovery response message through the connected link, analyzes the message type and identifies the message as the link discovery response message. And analyzing the identifier of the child node equipment and the identifier of the second port in the child node equipment, and determining a first link, wherein the first link is a link between the first port and the second port.
Further, the root node device instructs the child node device to set the second port as the upstream port based on the first link. For example, when the first link is a link in a Shortest Path (SPF) from the root node device to the child node device, the root node device instructs the child node device to set the second port as an upstream port. That is, the root node device calculates the shortest path of the first link through the shortest path, and needs to set the second port as an upstream port.
In particular, in one implementation, the root node device may instruct the child node devices to set the second port as an upstream port in other interaction messages.
In yet another implementation, the root node device may also set the second port as an upstream port through a separate interactive message child node device. The method may further include S104 to S106:
s104, the root node equipment sends a port role updating message to the child node equipment through the first port.
Accordingly, the child node device receives the port role update message.
And the root node equipment sends a port role updating message to the direct connection child node equipment, or sends the port role updating message to the non-direct connection child node equipment through the found direct connection child node equipment. The port role update message comprises the identifier of the child node device, the identifier of the second port and the role information of the second port, and the port role update message is used for indicating the child node device to perform role setting according to the role information of the second port. In this embodiment, the port role update message is used to instruct the child node device to set the second port as an uplink port.
And S105, the child node equipment sets the role of the second port according to the role information of the second port.
And after receiving the port role updating message, the child node equipment analyzes the message type and identifies the message as the port role updating message. And according to the role information of the second port carried in the message, the second port is taken as an uplink port.
S106, the child node equipment sends a port role updating response message through the second port.
Accordingly, the root node device receives the port role update response message.
Specifically, if the directly connected child node device responds, the port role update response message is sent to the root node device; and if the non-connected child node equipment performs response, forwarding the port role update response message through the directly-connected node equipment. The port role update response message is used to indicate success or failure of the port role setting.
If the child node device is a first discovery device, the method may further include S107 to S108:
s107, the root node device sends a device discovery message to the child node device through the first port, wherein the device discovery message comprises the identifier of the child node device.
Accordingly, the child node device receives the device discovery message.
And the root node equipment sends the equipment discovery message to the direct-connected child node equipment, or forwards the equipment discovery message to the non-direct-connected child node equipment through the direct-connected child node equipment.
S108, the child node device sends a device discovery response message through the second port, wherein the device discovery response message comprises the identifier of the child node device, and the identifiers, the states and the port capabilities of all the ports of the child node device.
Accordingly, the root node device receives the device discovery reply message.
After receiving the device discovery message, the child node device parses the message type, identifies the message type as a device discovery message, and constructs a device discovery response message, where the device discovery response message carries device information such as the identifier of the child node device, the identifiers of all ports of the child node device, the state (up/down), and the capability (e.g., link bandwidth). And the child node equipment sends the equipment to send a response message to the root node equipment from the second port.
According to the network topology discovery method provided by the embodiment of the application, when the node device detects that the link of the port is connected, the existing topology relation is discovered through the interaction of the messages, and the discovery of the network topology can be realized.
The network topology discovery method is described in detail below from a direct connection scenario and a non-direct connection scenario, respectively:
fig. 4 is a schematic flowchart of a method for discovering a network topology in a direct connection scenario according to an embodiment of the present application. The embodiment is described with reference to the enterprise network topology architecture in the direct connection scenario shown in fig. 5. In fig. 5, the root node device may be a core switch, two node devices, namely, an AGG1 and an AGG2, are connected to the root node device, and an ACC1 is connected to the root node device under the AGG1. Wherein, the link between the AGG1 and the root node device and the link between the AGG2 and the root node device are connected, but the root node device does not find the network topology relationship between the root node device and the AGG1 and the AGG 2; the link between ACC1 and AGG1 is not yet connected.
The network topology discovery comprises two phases: a link discovery phase and a device discovery phase.
A link discovery phase:
the root node device finds that the links corresponding to the plurality of downlink ports of the root node device are connected, and performs link discovery one by one according to the port serial numbers. Specifically, the description will be given by taking the discovery of the network topology relationship of a single link between the root node device and the AGG1 as an example, and the discovery of the network topology of the link between the root node device and the AGG2 is similar to this.
The root node device is connected to port 1 of the AGG1 through port 1.
S201, the root node device sends a link discovery message from port 1.
Since the link between port 1 of the root node device and port 1 of AGG1 is connected, the root node device may send a link discovery message over the link. Accordingly, the AGG1 at the other end of the link receives the link discovery message.
Specifically, the root node device may also start a timer after sending the link discovery message from port 1, and wait for the node device to return a response message within the time period.
S202, AGG1 sends a link discovery response message through port 1 of AGG1.
After receiving the link discovery message, the AGG1 parses the message type field, if the message is a link discovery message, constructs a link discovery response message, where the message carries the device identifier of the AGG1 and the identifier of the receiving port AGG1.1, and sends the link discovery response message from the AGG 1.1.
S203, the root node device discovers the link according to the identifier of port 1 of AGG1 and the identifier of port 1 of the root node device: ROOT equipment 1< - > AGG 1.1.
After receiving the link discovery response message, the ROOT node device parses the message type field, determines that the message is a link discovery response message, obtains the device identifier of AGG1 and the identifier of the receiving port AGG1.1 carried in the message, and combines the port ROOT device.1 of the ROOT node device sending the link discovery message, that is, the link ROOT device.1 < - > AGG1.1 is discovered.
If the root node device does not receive the link discovery response message, possible reasons are: the opposite terminal node device does not receive the link discovery message, the opposite terminal node device does not support the message type, and the link discovery response message returned by the child node device is not received by the root node device. The root node device may repeatedly initiate the link discovery procedure after the timer expires until receiving a link discovery response message or failing to repeat the number of times, and record an exception.
And S204, the root node equipment sends a port role updating message.
After the new link is found, the root node device calculates that the new link is on the shortest path through a Shortest Path (SPF) algorithm, and then constructs a port role update message. The port role update message carries the identifier of the target device (identifier of AGG1), the identifier of the target port (identifier of port AGG1.1 of AGG1) and the role information of the target port (AGG 1.1). The root node device sends the port role update message to AGG1.
S205, AGG1 sets port AGG1.1 as an uplink port according to the role information.
After receiving the port role update message, the AGG1 parses the message type field, finds the message as a port role update message, parses the identifier of the AGG1, the identifier of the port AGG1.1 of the AGG1 and the role information of the AGG1.1 from the message, compares the parsed device identifier with the device identifier, and if the device identifier is not consistent, indicates that the message is not sent to itself, and discards the message; otherwise, the port indicated by the message is set to the indicated port role. In this example, the destination port is AGG1.1, and the role of the destination port is an upstream port, AGG1 sets AGG1.1 as an upstream port.
S206, AGG1 sends a port role update response message to the root node device.
AGG1 constructs a port role update response message, and sends the port role update response message to the root node device from the upstream port AGG 1.1.
After receiving the port role update response message, the root node device indicates that the port role is successfully set, and records the successfully set uplink port.
S207, the root node device judges that the AGG1 of the opposite end of the link is the new device.
The root node equipment judges whether the link opposite terminal node equipment is new equipment discovered for the first time, if not, the network topology discovering process is ended; if yes, entering a device discovery phase. In this embodiment, AGG1 is the first new device discovered.
A device discovery phase:
s208, the root node device sends a device discovery message to the AGG1.
The ROOT node device sends the device discovery message through the home port ROOT device of the newly discovered link.1, starts a timer, and waits for the AGG1 to return a response message.
S209, the AGG1 sends a device discovery response message to the root node device.
After receiving the device discovery message, the AGG1 parses the message type, identifies the message type as a device discovery message, and constructs a device discovery response message, where the device discovery response message carries device information such as the identifier of the AGG1, the identifiers of all ports of the AGG1, the status (up/down), and the capability (e.g., link bandwidth). AGG1 sends the device send reply message from upstream port AGG1.1 to the root node device.
After receiving the device response message, the root node device analyzes the message type, analyzes the device information carried in the message after judging that the device finds the response message, records the device information, completes the device discovery, and refreshes the topology.
If the root node device does not receive the device discovery response message, possible reasons are: the opposite terminal node device does not receive the device discovery message, the opposite terminal node device does not support the message type, and the device discovery response message returned by the child node device is not received by the root node device. The root node device may repeatedly initiate the device discovery procedure after the timer expires until receiving the device discovery response message or failing to repeat the number of times, and record the exception.
According to the network topology discovery method provided by the embodiment of the application, when the root node device detects that the link of the port is connected, the existing topology relation is discovered through the interaction of the messages, and the discovery of the network topology can be realized.
Fig. 6 is a schematic flowchart of a method for discovering a network topology in a non-direct connection scenario according to an embodiment of the present application. The embodiment is described with reference to the enterprise network topology architecture in the non-direct connection scenario shown in fig. 7. In fig. 7, the root node device may be a core switch, two node devices, namely, an AGG1 and an AGG2, are connected to the root node device, and an ACC1 is connected to the root node device under the AGG1. Wherein, the root node device has found the network topology relationship between the root node device and the AGG1 and the AGG2 on the link between the AGG1 and the root node device and the link connection between the AGG2 and the root node device; the link between the ACC1 and AGG1 is connected, but the root node device has not discovered a network topology relationship between the root node device and the ACC1.
Different from network topology discovery in a direct connection scenario, the network topology discovery includes two stages, namely a link discovery stage and a device discovery stage, and between the link discovery stages, the intermediate node device reports to the root node device that a link between the intermediate node device and the next layer of node device is connected.
In fig. 7, the intermediate node apparatus is AGG1.
S301 and AGG1 detect that the link corresponding to the port AGG1.4 is connected.
The directly connected device AGG1 that has been discovered detects a port status change (port AGG1.4 changes from down state to up state), i.e. detects that the link to which AGG1.4 corresponds is connected. There are two cases when the corresponding link of AGG1.4 is connected: one is that the connection is not connected before and is connected now; another case is that the link between AGG1 and ACC1 is connected, but the link between AGG1 and the root node device is not connected, in the above embodiment, the link between AGG1 and the root node device is now connected, and therefore, AGG1 can detect that the link corresponding to AGG1.4 is connected.
S302, AGG1 sends a port status change message to the root node device.
The AGG1 sends a port status change message to the root node device through an upstream port, where the port status change message carries the identification of AGG1, the identification of AGG1.4, and the status (up) of AGG 1.4.
After receiving the port state change message, the root node device analyzes the message type, recognizes the message type as the port state change message, analyzes the identifier of AGG1, the identifier of AGG1.4 and the state (up) of AGG1.4 carried in the message, and enters a link discovery phase.
A link discovery phase:
s303', the root node device sends a link discovery message.
Unlike the link discovery in the foregoing embodiment, in this embodiment, the link discovery message needs to be sent to the new device through the AGG1, and a source routing manner may be adopted: the root node device calculates the shortest path of a device (i.e., AGG1) that reports the port state change message (the root node device may also calculate the shortest path in advance, and if there are multiple shortest paths, selects a shortest path as a default path to receive and transmit a control plane message), and sends a link discovery message from a port corresponding to AGG1, where the link discovery message carries an identifier of an output port AGG1.4 and may also carry a message type. The link discovery message is sent from the ROOT device 1 port of the ROOT node device.
S303 ″ and AGG1 detect that the link discovery message has a next layer of egress port, strip a layer of port, and forward the link discovery message.
After receiving the link discovery message, AGG1 detects that the link discovery message carries an egress port number, removes the identifier of the egress port, and forwards the link discovery message from the resolved egress port.
S304', ACC1 finds the link discovery message to send to itself, and replies with a link discovery response message.
The ACC1 receives the link discovery message through the link to which the ACC1 and AGG1 are connected, parses the message type, if the message does not carry the identifier of the port, it indicates that the message should be processed by it, parses the message type as a link discovery message, and constructs a link discovery response message, which includes the identifier of the ACC1 and the identifier of the port ACC1.1 of the ACC1. The ACC1 sends the link discovery reply message from the receiving port.
And S304' after receiving the link discovery response message, the AGG1 node forwards the link discovery response message to the root node device according to the default port.
After receiving the link discovery response message through the link connected between the ACC1 and the AGG1, the AGG1 forwards the link discovery response message to the root node device according to the default uplink port. After discovering the AGG1, the root node device may set one or more ports of the AGG1 as uplink ports, and may set one of the uplink ports as a default port.
S305, the ROOT node device finds the link ROOT device.1 < - > AGG1.1< - > ACC1.1 according to the identification of the ACC1.1 port and the found link ROOT device.1 < - > AGG1.1< - > ACC 1.1.
After receiving the link discovery response message, the ROOT node device parses the message type, identifies that the message is a link discovery response message, parses the identifier of ACC1 and the port identifier of ACC1.1 carried in the link discovery response message, and combines the discovered topology (ROOT device.1 < - > AGG1.1), thereby completing link discovery: ROOT apparatus 1 AGG1.1 ACC 1.1.
If the root node device does not receive the link discovery response message, possible reasons are: the opposite terminal node device does not receive the link discovery message, the opposite terminal node device does not support the message type, and the link discovery response message returned by the child node device is not received by the root node device. The root node device may repeatedly initiate the link discovery procedure after the timer expires until receiving a link discovery response message or failing to repeat the number of times, and record an exception.
And S306, the root node device calculates the shortest path of the link.
The root node device calculates that the link is on the shortest path (currently the shortest path because only one link of ACC1 is connected to the discovered network) through the SPF algorithm, so the root node device needs to set the upstream port of ACC1.
S307', the root node device sends a port role update message.
The root node device constructs a port role update message, where the port role update message carries an identifier of ACC1, an identifier of ACC1.1, and role information of ACC1.1 (in this example, the indication is set as an uplink port), encapsulates the egress port along the way (identifier of AGG 1.4), and sends the port role update message in a source routing manner.
S307 ", AGG1 detects that the link discovery message has a next layer of egress port, strips one layer of port, and forwards the port role update message to ACC1.
After receiving the port role update message, AGG1 detects that the message carries an output port number, resolves the port number, removes the identifier of the output port, and forwards the port role update message from the resolved output port.
S308, the ACC1 sets ACC1.1 as an uplink port according to the port role update message.
After the ACC1 receives the port role update message, if the message does not carry the identifier of the egress port, it indicates that the message should be handled by it (in this example, only the identifier of one egress port has been removed by AGG1, so the message is handled by ACC 1). The ACC1 resolves the message type as a port role update message, and sets ACC1.1 as an uplink port according to the role information indicated to be updated.
S309', ACC1 sends a port role update response message.
The ACC1 constructs a port role update response message indicating that the setup has been successful, and sends the message through the upstream port.
And after receiving the port role update response message, the AGG1 node forwards the port role update response message according to the default port.
And after receiving the port role updating response message, the root node equipment records the uplink port.
S310, the root node device judges that the ACC1 of the opposite end of the link is a new device.
The root node equipment judges whether the link opposite terminal node equipment is new equipment discovered for the first time, if not, the network topology discovering process is ended; if yes, entering a device discovery phase. In this embodiment, the ACC1 is the first discovered new device.
A device discovery phase:
s311', the root node device sends a device discovery message, where the device discovery message carries an identifier of AGG 1.4.
Because the new device is a non-direct connection device of the root node, the device discovery message is sent in a source routing mode: the root node device constructs a device discovery message, encapsulates the identity of the egress port along the way (the identity of AGG 1.4), and then sends the device discovery message by means of source routing.
S311 ″, AGG1 detects that the link discovery message has a next layer of egress port, strips one layer of port, and forwards the device discovery message.
After receiving the device discovery message, AGG1 obtains the identifier of the egress port in the discovery message, parses the identifier of the egress port, removes the identifier of the egress port, and forwards the device discovery message from the parsed egress port.
S312', ACC1 sends a device discovery reply message that includes the identification of ACC1, the identification, status and capabilities of all ports of ACC1.
The ACC1, upon receiving the device discovery message from the above egress port, detects that the message does not carry the identity of the egress port, indicating that the message should be handled by it (in this example, only the identity of one egress port has been removed by the AGG1, so the message is handled by the ACC 1). The ACC1 parses out that the message type is a device discovery message, constructs a device discovery response message, and carries device information: the identification of the ACC1, the identification, state (up/down), capabilities (e.g., link bandwidth), etc. of all ports of the ACC1, send the device discovery response message from the upstream ACC 1.4.
And after receiving the device discovery response message of the ACC1, the node S312' and AGG1 forwards the device discovery response message according to the default port.
And S313, recording the equipment information by the root node equipment, completing equipment registration and refreshing the topology.
If the root node device does not receive the device discovery response message, possible reasons are: the opposite terminal node device does not receive the device discovery message, the opposite terminal node device does not support the message type, and the device discovery response message returned by the child node device is not received by the root node device. The root node device may repeatedly initiate the device discovery procedure after the timer expires until receiving the device discovery response message or failing to repeat the number of times, and record the exception.
Therefore, in this embodiment, topology discovery is initiated in a centralized manner by the root node device, the child node devices only make simple responses and the most basic state report, calculation and state maintenance are supported by the root node device, and the control plane of the child node devices is extremely simple.
According to the network topology discovery method provided by the embodiment of the application, when the intermediate node device detects that the link with the port of the next layer of node device is connected, the link is reported to the root node device, and the root node device discovers the topology relation between the root node device and the next layer of node device of the intermediate node device through message interaction, so that the discovery of the network topology can be realized.
When the root node device detects that the link state changes, the roles of the ports of the child node devices on the link can be re-modified through calculation. Fig. 8 is a flowchart of a method of a network topology discovery method provided in an embodiment of the present application, where the method may include:
s401, when the change of the first link state is detected, the root node device determines a child node device needing to update the port role.
When the root node device detects that the link state corresponding to the port of the root node device changes or receives the reported change of the link corresponding to the port of the non-direct-connection child node device, a new shortest path can be determined through SPF calculation. And the root node equipment determines a second link which can reach the child node equipment with the changed link state, and determines the child node equipment needing to update the port role.
S402, the root node equipment sends a port role updating message.
Since the shortest path is re-determined, the direct-connected node device before change may be updated to a non-direct-connected node device, and therefore, it is necessary to forward the port role update message through other direct-connected node devices and/or non-direct-connected node devices (referred to as "intermediate node devices"). And the root node equipment constructs a port role updating message, wherein the port role updating message carries the identification of the output port of the middle child node equipment, the identification of the target port and the role information of the target port. The target port is the port of the role to be updated.
S403, the middle child node device detects that the port role update message has a next layer of output port, peels off a layer of port, and transmits the port role update message to the child node device of the next layer.
The intermediate node equipment receives the port role updating message, detects that the message comprises the identification of the output port, analyzes the identification of the output port, removes the identification of the output port of the intermediate node equipment, and forwards the message from the analyzed output port.
And S404, the child node equipment updates the port role according to the port role updating message.
Finally, the child node device receives the port role update message, detects that the message does not include the identifier of the output port, and can determine that the message should be processed by itself. Therefore, the role of the target port is updated according to the role information of the target port carried in the message.
S405, the child node equipment sends a port role updating response message.
And after the child node equipment updates the role of the target port, constructing a port role updating response message. The response message is used to indicate success or failure of the role update.
And S406, after receiving the port role updating response message, the intermediate node equipment forwards the port role response message according to the default port.
And after receiving the response, the root node equipment records the role of the port as a downlink port.
Specifically, as shown in fig. 9, in a schematic diagram of a link state change, the root node device detects a direct link state change (a link disconnection of root.4< - > AGG1.1), and calculates the shortest path using an SPF algorithm. The root node device finds out through calculation that the devices which change on the shortest path are ACC1, ACC2 and AGG1, and the devices which need to modify the port roles are ACC2 and AGG1.
Specifically, root.4< - > AGG1.1 and AGG1.7< - > ACC2.1 are one of the shortest paths, ACC2 can interact with the root node device and AGG1 through an uplink port ACC2.1, but now the link between root.4< - > AGG1.1 is broken, the shortest path from the root node device to ACC2 needs to be recalculated, and the role of ACC2.1 needs to be updated. Since the ACC2 is a non-direct connection device of the root node device, the port role update message is sent by means of source routing. The root node device constructs a port role update message, the message carries the identifier of the target device (identifier of ACC 2), the identifier of the target port (identifier of ACC2.1) and role information, encapsulates the identifier of the outgoing port along the way (outgoing port AGG2.8 of AGG 2), and sends the message to ACC2 in a source routing manner. After receiving the message, the AGG2 finds that the message carries the identifier of the egress port, then resolves the identifier of the egress port, removes the identifier of the egress port, and forwards the message from the resolved egress port. Upon receipt of the message, the ACC2 detects that the message does not carry an identification of an egress port, indicating that the message should be handled by it. The ACC2 parses the type of the message as a port role update message, further parses the destination port and role information therein, and updates the destination port (ACC2.1) to be a downlink port. The ACC2 constructs a port role update response message, which is sent from the upstream port. The AGG2 receives the message and forwards the message to the root node device via the upstream port. The message is used to indicate a role update success or failure. The root node equipment receives the message, and if the message indicates that the role is updated successfully, the operation is successful; and if the message indicates that the role updating fails, indicating that the operation fails.
As shown in fig. 9, the port bitmap of ACC2 includes a bitmap of port status and a bitmap of link connections. In the bitmap of the port state and the bitmap of the link connection, the port identifiers are ACC2.1 and ACC2.2 … ACC2.10 from right to left. In the bitmap of the port status, a bit "0" indicates that the port is a downstream port, and a bit "1" indicates that the port is an upstream port. Through the role updating operation, the ACC2.1 is updated from an uplink port to a downlink port, and the port state value of the ACC2.1 is updated from a bit "1" to a bit "0"; similarly, the same role update operation may be performed on ACC2.2, to update ACC2.2 from the downstream port to the upstream port, and the port state value of ACC2.2 is updated from bit "0" to bit "1". In the bitmap of the link connection, a bit "0" indicates that the link corresponding to the port is not connected, and a bit "1" indicates that the link corresponding to the port is connected. Currently, the links of the ports ACC2.1, ACC2.2, ACC2.6, ACC2.9 are connected, and the bit value corresponding to these ports is "1".
As shown in fig. 10, the link port of root.4< - > AGG1.1, the recalculated shortest path from the root node device to AGG1 is ROO.5< - > AGG2.1, AGG2.8< - > ACC2.2, ACC2.1< - > AGG1.7, and the role of AGG1.7 before the link is broken is the downlink port. Therefore, the role of AGG1.7 needs to be updated based on the calculated new shortest path. After a link disconnection event occurs, the AGG1 is changed from a direct connection device to a non-direct connection device of the root node device, and therefore, the root node device sends a port role update message in a source routing manner. The root node device constructs a port role update message, and the message carries the identifier of the target device (identifier of AGG1), the identifier of the target port (identifier of AGG 1.7) and role information. The identity of the port along the way (AGG2.8, ACC2.1) is repackaged and the message is sent to AGG1 by means of source routing. After receiving the message, AGG2 finds that the message carries the identifier of the egress port, resolves the identifier of the port, removes the identifier of AGG2.8, and forwards the message from the resolved egress port AGG 2.8. After receiving the message, the ACC2 finds that the message carries the identifier of the egress port, resolves the identifier of the port, removes the identifier of ACC2.1, and forwards the message from the resolved egress port ACC 2.1. The AGG1 receives the message, detects that the message does not carry the identifier of the port, which indicates that the message should be processed by it, resolves the type of the message as a port role update message, resolves the destination port and role information, and updates AGG1.7 as an uplink port according to the role information. The AGG1 constructs a port role updating response message and sends the message from an uplink port; the ACC2 downlink port receives the response message and forwards the response message to the AGG2 through the uplink port; the AGG2 downstream port receives the response message and forwards the response message to the root node device through the upstream port. The response message is used to indicate success or failure of the role update. The root node equipment receives the response message, if the response message indicates that the role is updated successfully, the operation is successful, and the topological structure is refreshed; and if the response message indicates that the role updating fails, indicating that the operation fails.
As shown in fig. 10, the port bitmap of AGG1 includes a bitmap of port status and a bitmap of link connections. In the bitmap of the port state and the bitmap of the link connection, the port identifiers are AGG1.1 and AGG1.2 … AGG1.10 from right to left. In the bitmap of the port status, a bit "0" indicates that the port is a downstream port, and a bit "1" indicates that the port is an upstream port. By the role update operation, the port state value of AGG1.7 is updated from bit "0" to bit "1", and the link corresponding to AGG1.1 is disconnected, and the same role update operation can be performed, and when AGG1.1 is updated from the uplink port to the downlink port, the port state value of AGG1.1 is updated from bit "1" to bit "0". In the bitmap of the link connection, a bit "0" indicates that the link corresponding to the port is not connected, and a bit "1" indicates that the link corresponding to the port is connected. Currently, if the links of the ports AGG1.4 and AGG1.7 are connected, the bit value corresponding to these ports is "1".
According to the network topology discovery method provided by the embodiment of the application, when the root node device detects that the link state changes, the role of the port of the child node device on the link can be revised again through calculation, and the topology structure is refreshed.
Based on the same concept of the network topology discovery method in the foregoing embodiment, as shown in fig. 11, an embodiment of the present application further provides a node device 1000, where the node device 1000 may be applied to the network topology methods shown in fig. 3, fig. 4, fig. 6, and fig. 8, and may be a root node device in the network topology discovery method. The node apparatus 1000 includes: the transmitting unit 11, the receiving unit 12 and the determining unit 13 may further include a detecting unit 14 and an indicating unit 15. The following are exemplary:
a sending unit 11, configured to send a link discovery message to a child node device through a first port;
a receiving unit 12, configured to receive a link discovery response message sent by the child node device through a second port of the child node device, where the link discovery response message includes an identifier of the child node device and an identifier of the second port; and
a determining unit 13, configured to determine a first link based on the link discovery response message, where the first link is a link between the first port and the second port.
In one implementation, the detecting unit 14 is configured to detect that a link corresponding to the first port is connected.
In yet another implementation, the instructing unit 15 is configured to instruct the child node device to set the second port as an uplink port based on the first link.
In yet another implementation, the sending unit 11 is configured to send a port role update message to the child node device through the first port, where the port role update message includes an identifier of the child node device, an identifier of a second port, and role information of the second port, and the port role update message is used to instruct the child node device to perform role setting according to the role information of the second port; and
the receiving unit 12 is configured to receive a port role update response message sent by the child node device through the second port.
In yet another implementation, the sending unit 11 is configured to send, if the child node device is a first discovery device, a device discovery message to the child node device through the first port, where the device discovery message includes an identifier of the child node device; and
the receiving unit 12 is configured to receive a device discovery response message sent by the child node device through the second port, where the device discovery response message includes an identifier of the child node device, and identifiers, statuses, and port capabilities of all ports of the child node device.
In yet another implementation, a first child node device is directly connected to the root node device, a second child node device is not directly connected to the root node device, and the receiving unit 12 is configured to receive a port state change message sent by the first child node device, where the port state change message is used to indicate that a link connection exists between a third port of the first child node device and a fourth port of the second child node device.
In yet another implementation, the link discovery message includes an identification of at least one egress port, the port role update message includes an identification of at least one egress port, and the device discovery message includes an identification of at least one egress port.
In yet another implementation, the determining unit 13 is further configured to determine, when it is detected that the state of the first link changes, a child node device whose port role needs to be updated;
the sending unit 11 is configured to send a port role update message to the child node device whose role needs to be updated through the second link, where the port role update message includes an identifier of an egress port of an intermediate child node device between the root node device and the child node device whose role needs to be updated; and
the receiving unit 12 is configured to receive a port role update response message.
For more detailed description of each unit, reference may be made to the related description of the root node device in the embodiments shown in fig. 3, fig. 4, fig. 6, and fig. 8, which is not repeated herein.
According to the node device provided by the embodiment of the application, when the root node device detects that the link of the port is connected, the existing topological relation is discovered through the interaction of the messages, and the discovery of the network topology can be realized.
Based on the same concept of the network topology discovery method in the foregoing embodiment, as shown in fig. 12, an embodiment of the present application further provides a child node device 2000, where the child node device 2000 can be applied to the network topology methods shown in fig. 3, fig. 4, fig. 6, and fig. 8. The child node apparatus 2000 includes: the receiving unit 21 and the transmitting unit 22 may further include a detecting unit 23.
The following are exemplary:
a receiving unit 21, configured to receive a link discovery message sent by a root node device, where the link discovery message includes an identifier of a third port;
a sending unit 22, configured to forward the link discovery message to a second child node device through the third port;
the receiving unit 21 is further configured to receive a link discovery response message sent by the second child node device through a fourth port, where the link discovery response message includes an identifier of the second child node device and an identifier of the fourth port; and
the sending unit 22 is further configured to send the link discovery response message to the root node device.
In one implementation, the detecting unit 23 is configured to detect that a link connection exists between the third port of the first sub-node device and the fourth port of the second sub-node device; and
the sending unit 22 is configured to send a port state change message to a root node device, where the port state change message is used to indicate that a link connection exists at the third port
In yet another implementation, the receiving unit 21 is configured to receive a port role update message sent by the root node device, where the port role update message includes an identifier of the second child node device, an identifier of the third port, an identifier of the fourth port, and role information of the fourth port, and the port role update message is used to instruct the second child node device to perform role setting according to the role information of the fourth port;
the sending unit 22 is configured to send the port role update message to the second child node device through the third port;
the receiving unit 21 is further configured to receive, through the fourth port, a port role update response message sent by the second child node device; and
the sending unit 22 is further configured to send the port role update response message to the root node device.
In yet another implementation, the receiving unit 21 is configured to receive, if the second child node device is a first discovery device, a device discovery message sent by the root node device, where the device discovery message includes an identifier of the second child node device and an identifier of the third port;
the sending unit 22 is configured to send the device discovery message to the second child node device through the third port;
the receiving unit 21 is further configured to receive, through the fourth port, a device discovery response message sent by the second child node device, where the device discovery response message includes an identifier of the second child node device, and identifiers, statuses, and port capabilities of all ports of the second child node device; and
the sending unit 22 is further configured to send the device discovery response message to the root node device.
For more detailed description of each unit, reference may be made to the description of the intermediate node device in the embodiments shown in fig. 3, fig. 4, fig. 6, and fig. 8, which is not repeated herein.
According to the node device provided by the embodiment of the application, when the node device detects that the link of the port is connected, the existing topological relation is discovered through the interaction of the messages, and the discovery of the network topology can be realized.
Based on the same concept of the network topology discovery method in the foregoing embodiment, as shown in fig. 13, an embodiment of the present application further provides a node device 3000, where the node device 3000 may be applied to the network topology methods shown in fig. 3, fig. 4, fig. 6, and fig. 8. The node apparatus 3000 includes: a receiving unit 31 and a transmitting unit 32; a setting unit 33 may also be included. The following are exemplary:
a receiving unit 31, configured to receive a link discovery message sent by a root node device through a first port;
a sending unit 32, configured to send a link discovery response message to the root node device through the second port, where the link discovery response message includes an identifier of the child node device and an identifier of the second port.
In one implementation, the receiving unit 31 is configured to receive a port role update message sent by the root node device through the first port, where the port role update message includes an identifier of the child node device, an identifier of a second port, and role information of the second port, and the port role update message is used to instruct the child node device to perform role setting according to the role information of the second port;
a setting unit 33, configured to perform role setting on the second port according to the role information of the second port;
a sending unit 32, configured to send a port role update response message to the root node device through the second port.
In yet another implementation, the receiving unit 31 is configured to receive, if the child node device is a first discovery device, a device discovery message sent by the root node device through the first port, where the device discovery message includes an identifier of the child node device;
a sending unit 32, configured to send a device discovery response message to the root node device through the second port, where the device discovery response message includes an identifier of the child node device, and identifiers, statuses, and port capabilities of all ports of the child node device.
In yet another implementation, a first child node device is directly connected to the root node device, a second child node device is not directly connected to the root node device, and the sending unit 32 is configured to send a port state change message to the root node device, where the port state change message is used to indicate that a link connection exists between a third port of the first child node device and a fourth port of the second child node device.
In yet another implementation, the link discovery message includes an identification of at least one egress port, the port role update message includes an identification of at least one egress port, and the device discovery message includes an identification of at least one egress port.
For more detailed description of each unit, reference may be made to the description of the child node device in the embodiments shown in fig. 3, fig. 4, fig. 6, and fig. 8, which is not repeated herein.
According to the child node device provided by the embodiment of the application, when the node device detects that the link of the port is connected, the existing topological relation is discovered through the interaction of the messages, and the discovery of the network topology can be realized.
An embodiment of the present application further provides a node device, and fig. 14 is a schematic structural diagram of a node device provided in an embodiment of the present application. The node apparatus 4000 comprises a physical interface 41 and a processor 42. The physical interface 41 is used for messaging. Processor 42 is configured to perform the method steps performed by the root node device, the intermediate node device, or the target child node device of fig. 3, 4, 6, and 8.
The number of physical interfaces 41 may be one or more. The physical interface 41 may include a wireless interface and/or a wired interface. For example, the wireless interface may include a WLAN interface, a bluetooth interface, a cellular network interface, or any combination thereof. The wired interface may include an ethernet interface, an asynchronous transfer mode interface, a fibre channel interface, or any combination thereof. The ethernet interface may be an electrical or optical interface. The physical interface 41 does not necessarily include (although typically includes) an ethernet interface.
The number of processors 42 may be one or more. Processor 42 may include a central processing unit (cpu), a network processor, a Graphics Processing Unit (GPU), an application specific integrated circuit (asic), a programmable logic device (pld), or any combination thereof. The PLD may be a complex programmable logic device, a field programmable gate array, general purpose array logic, or any combination thereof. The processor 42 may include a control plane 421 and a forwarding plane 422. The control plane 421 and the forwarding plane 422 may be implemented by separate circuits or may be integrated into one circuit. For example, the processor 42 is a multi-core CPU. One or some of the cores implement a control plane 421 and others implement a forwarding plane 422. Also for example, control plane 421 is implemented by a CPU and forwarding plane 422 is implemented by an NP, ASIC, FPGA, or any combination thereof. For another example, the node device is a frame network device, the control plane 421 is implemented by a main control card, and the forwarding plane 422 is implemented by a line card. Also for example, the control plane 421 and the forwarding plane 422 are both implemented by NPs with control plane capabilities.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the division of the unit is only one logical function division, and other division may be implemented in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. The shown or discussed mutual coupling, direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some interfaces, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions according to the embodiments of the present application are wholly or partially generated when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on or transmitted over a computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)), or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The usable medium may be a read-only memory (ROM), or a Random Access Memory (RAM), or a magnetic medium, such as a floppy disk, a hard disk, a magnetic tape, a magnetic disk, or an optical medium, such as a Digital Versatile Disk (DVD), or a semiconductor medium, such as a Solid State Disk (SSD).

Claims (20)

1. A method for discovering a network topology, comprising:
transmitting a link discovery message to the child node device through the first port;
receiving a link discovery response message sent by the child node device through a second port of the child node device, wherein the link discovery response message includes an identifier of the child node device and an identifier of the second port;
determining a first link based on the link discovery response message, the first link being a link between the first port and the second port.
2. The method of claim 1, further comprising:
and instructing the child node device to set the second port as an uplink port based on the first link.
3. The method of claim 2, wherein the instructing the child node device to set the second port as an upstream port based on the first link comprises:
sending a port role updating message to the child node device through the first port, wherein the port role updating message comprises the identifier of the child node device, the identifier of a second port and the role information of the second port, and the port role updating message is used for indicating the child node device to perform role setting according to the role information of the second port;
and receiving a port role updating response message sent by the child node equipment through the second port.
4. The method according to any one of claims 1 to 3, further comprising:
if the child node device is a first discovery device, sending a device discovery message to the child node device through the first port, wherein the device discovery message includes an identifier of the child node device;
and receiving a device discovery response message sent by the child node device through the second port, wherein the device discovery response message includes the identifier of the child node device, and the identifiers, the states and the port capabilities of all the ports of the child node device.
5. The method of claim 4, wherein a first child node device is directly connected to the root node device and a second child node device is not directly connected to the root node device, and wherein before sending the link discovery message to the child node device via the first port, the method further comprises:
receiving a port state change message sent by the first child node device, where the port state change message is used to indicate that a link connection exists between a third port of the first child node device and a fourth port of the second child node device.
6. The method of claim 5, wherein the link discovery message includes an identification of at least one egress port, wherein the port role update message includes an identification of at least one egress port, and wherein the device discovery message includes an identification of at least one egress port.
7. The method according to any one of claims 1 to 6, further comprising:
when the state of the first link is detected to be changed, determining child node equipment needing to update the port role;
sending a port role updating message to the child node device needing role updating through a second link, wherein the port role updating message comprises an identifier of an outlet port of an intermediate child node device between the root node device and the child node device needing role updating;
and receiving a port role updating response message.
8. A method for discovering a network topology, comprising:
receiving a link discovery message sent by a root node device through a first port;
and sending a link discovery response message to the root node device through the second port, wherein the link discovery response message comprises the identifier of the child node device and the identifier of the second port.
9. The method of claim 8, further comprising:
receiving a port role update message sent by the root node device through the first port, wherein the port role update message comprises an identifier of the child node device, an identifier of a second port and role information of the second port, and the port role update message is used for indicating the child node device to perform role setting according to the role information of the second port;
setting the role of the second port according to the role information of the second port;
and sending a port role update response message to the root node equipment through the second port.
10. The method according to claim 8 or 9, characterized in that the method further comprises:
if the child node device is a first discovery device, receiving a device discovery message sent by the root node device through the first port, wherein the device discovery message includes an identifier of the child node device;
and sending a device discovery response message to the root node device through the second port, wherein the device discovery response message comprises the identifier of the child node device, and the identifiers, the states and the port capabilities of all the ports of the child node device.
11. The method of claim 10, wherein a first child node device is directly connected to the root node device and a second child node device is not directly connected to the root node device, the method further comprising:
and sending a port state change message to the root node device, where the port state change message is used to indicate that a link connection exists between the third port of the first child node device and the fourth port of the second child node device.
12. The method of claim 11, wherein the link discovery message includes an identification of at least one egress port, wherein the port role update message includes an identification of at least one egress port, and wherein the device discovery message includes an identification of at least one egress port.
13. A node apparatus, comprising:
a sending unit, configured to send a link discovery message to a child node device through a first port;
a receiving unit, configured to receive a link discovery response message sent by the child node device through a second port of the child node device, where the link discovery response message includes an identifier of the child node device and an identifier of the second port;
a determining unit, configured to determine a first link based on the link discovery response message, where the first link is a link between the first port and the second port.
14. The node apparatus of claim 13, wherein:
the sending unit is configured to send a port role update message to the child node device through the first port, where the port role update message includes an identifier of the child node device, an identifier of a second port, and role information of the second port, and the port role update message is used to instruct the child node device to perform role setting according to the role information of the second port;
the receiving unit is configured to receive a port role update response message sent by the child node device through the second port.
15. The node apparatus according to claim 13 or 14, characterized in that:
the sending unit is configured to send a device discovery message to the child node device through the first port if the child node device is a first discovery device, where the device discovery message includes an identifier of the child node device;
the receiving unit is configured to receive a device discovery response message sent by the child node device through the second port, where the device discovery response message includes an identifier of the child node device, and identifiers, states, and port capabilities of all ports of the child node device.
16. The node device according to any one of claims 13 to 15, wherein a first child node device is directly connected to the root node device, and a second child node device is not directly connected to the root node device;
the receiving unit is configured to receive a port state change message sent by the first child node device, where the port state change message is used to indicate that a link connection exists between a third port of the first child node device and a fourth port of the second child node device.
17. The node apparatus according to any one of claims 13 to 16, further comprising:
the determining unit is further configured to determine, when it is detected that the state of the first link changes, a child node device whose port role needs to be updated;
the sending unit is configured to send a port role update message to the child node device whose role needs to be updated through a second link, where the port role update message includes an identifier of an egress port of an intermediate child node device between the root node device and the child node device whose role needs to be updated;
the receiving unit is used for receiving the port role updating response message.
18. A node apparatus, comprising:
a receiving unit, configured to receive a link discovery message sent by a root node device through a first port;
a sending unit, configured to send a link discovery response message to the root node device through a second port, where the link discovery response message includes an identifier of the child node device and an identifier of the second port.
19. The node apparatus of claim 18, wherein:
the receiving unit is configured to receive a port role update message sent by the root node device through the first port, where the port role update message includes an identifier of the child node device, an identifier of a second port, and role information of the second port, and the port role update message is used to instruct the child node device to perform role setting according to the role information of the second port;
the node device further includes:
the setting unit is used for setting the role of the second port according to the role information of the second port;
the sending unit is configured to send a port role update response message to the root node device through the second port.
20. The node apparatus according to claim 18 or 19, characterized in that:
the receiving unit is configured to receive, if the child node device is a first discovery device, a device discovery message sent by the root node device through the first port, where the device discovery message includes an identifier of the child node device;
the sending unit is configured to send a device discovery response message to the root node device through the second port, where the device discovery response message includes an identifier of the child node device, and identifiers, states, and port capabilities of all ports of the child node device.
CN201911053346.7A 2019-10-31 2019-10-31 Network topology discovery method and node equipment Active CN112751697B (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201911053346.7A CN112751697B (en) 2019-10-31 2019-10-31 Network topology discovery method and node equipment
PCT/CN2020/124378 WO2021083208A1 (en) 2019-10-31 2020-10-28 Network topology discovery method and node device
EP20880534.1A EP4047877A4 (en) 2019-10-31 2020-10-28 Network topology discovery method and node device
US17/731,686 US11855875B2 (en) 2019-10-31 2022-04-28 Network topology discovery method and node device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911053346.7A CN112751697B (en) 2019-10-31 2019-10-31 Network topology discovery method and node equipment

Publications (2)

Publication Number Publication Date
CN112751697A true CN112751697A (en) 2021-05-04
CN112751697B CN112751697B (en) 2023-11-21

Family

ID=75645064

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911053346.7A Active CN112751697B (en) 2019-10-31 2019-10-31 Network topology discovery method and node equipment

Country Status (4)

Country Link
US (1) US11855875B2 (en)
EP (1) EP4047877A4 (en)
CN (1) CN112751697B (en)
WO (1) WO2021083208A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113422798A (en) * 2021-05-11 2021-09-21 华为技术有限公司 Network data transmission method, system and computer
CN114024859A (en) * 2021-11-24 2022-02-08 山西合力创新科技股份有限公司 Network topology generation method based on equipment and link discovery, storage medium and terminal
CN114338413A (en) * 2021-12-30 2022-04-12 中国工商银行股份有限公司 Method and device for determining topological relation of equipment in network and storage medium
CN115208767A (en) * 2022-05-12 2022-10-18 哈尔滨工业大学(深圳) Ether mill network detection method, device, equipment and medium based on simulation technology

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116456422A (en) * 2022-01-10 2023-07-18 中兴通讯股份有限公司 Microwave network root node query method and device, microwave system and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020154606A1 (en) * 2001-02-19 2002-10-24 Duncan Robert James Network management apparatus and method for determining the topology of a network
US20120327766A1 (en) * 2011-06-24 2012-12-27 Cisco Technology, Inc. Level of hierarchy in mst for traffic localization and load balancing
CN102916884A (en) * 2012-10-26 2013-02-06 江苏华丽网络工程有限公司 Topology finding method for switching devices
CN105376164A (en) * 2015-11-25 2016-03-02 青岛信合一工贸有限公司 Topology of exchange equipment
CN105991435A (en) * 2015-02-05 2016-10-05 华为技术有限公司 Method and apparatus of acquiring port path

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5506838A (en) * 1994-12-29 1996-04-09 Emc Corporation Packet propagation and dynamic route discovery apparatus and techniques
US6847614B2 (en) * 1998-04-20 2005-01-25 Broadcom Corporation Apparatus and method for unilateral topology discovery in network management
US8605623B2 (en) * 2002-05-31 2013-12-10 Koninklijke Philips N.V. Determining and configuring a communication path in a network
US9210073B2 (en) * 2004-04-30 2015-12-08 Hewlett-Packard Development Company, L.P. System and method for message routing in a network
US7542432B2 (en) * 2005-10-27 2009-06-02 Alcatel Lucent Resource matched topology database synchronization in communications networks having topology state routing protocols
JP5229343B2 (en) * 2011-03-15 2013-07-03 オムロン株式会社 Connection abnormality detection method, network system, and master device
JP5821815B2 (en) * 2012-09-11 2015-11-24 日立金属株式会社 Communication system and communication system processing method
GB201219292D0 (en) * 2012-10-26 2012-12-12 Vodafone Ip Licensing Ltd Use of ORI interface to perform data and control word forwarding through REs in a multihop configuration
CN103905221A (en) * 2012-12-26 2014-07-02 成都勤智数码科技股份有限公司 General topological link accurate discovery method
US9325608B2 (en) * 2012-12-28 2016-04-26 Dell Products L.P. Systems and methods for reducing information loss in an aggregated information handling system
US9094285B2 (en) * 2013-01-25 2015-07-28 Argela Yazilim ve Bilisim Teknolojileri San. ve Tic. A.S. Automatic discovery of multiple controllers in Software Defined Networks (SDNs)
CN105827439B (en) * 2016-03-11 2019-02-01 范晓东 The method for realizing wireless device ad hoc network
US10771372B2 (en) * 2016-06-16 2020-09-08 Oracle International Corporation Transmitting test traffic on a communication link
CN110545194B (en) * 2018-05-28 2021-06-01 华为技术有限公司 Network topology generation method and device
CN108919762B (en) * 2018-07-06 2021-05-25 东莞市李群自动化技术有限公司 Control method and device based on industrial Ethernet

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020154606A1 (en) * 2001-02-19 2002-10-24 Duncan Robert James Network management apparatus and method for determining the topology of a network
US20120327766A1 (en) * 2011-06-24 2012-12-27 Cisco Technology, Inc. Level of hierarchy in mst for traffic localization and load balancing
CN102916884A (en) * 2012-10-26 2013-02-06 江苏华丽网络工程有限公司 Topology finding method for switching devices
CN105991435A (en) * 2015-02-05 2016-10-05 华为技术有限公司 Method and apparatus of acquiring port path
CN105376164A (en) * 2015-11-25 2016-03-02 青岛信合一工贸有限公司 Topology of exchange equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
邵曦等: "基于音乐内容和歌词的音乐情感分类研究" *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113422798A (en) * 2021-05-11 2021-09-21 华为技术有限公司 Network data transmission method, system and computer
CN114024859A (en) * 2021-11-24 2022-02-08 山西合力创新科技股份有限公司 Network topology generation method based on equipment and link discovery, storage medium and terminal
CN114024859B (en) * 2021-11-24 2024-03-26 山西合力创新科技股份有限公司 Network topology generation method, storage medium and terminal based on equipment and link discovery
CN114338413A (en) * 2021-12-30 2022-04-12 中国工商银行股份有限公司 Method and device for determining topological relation of equipment in network and storage medium
CN114338413B (en) * 2021-12-30 2024-01-26 中国工商银行股份有限公司 Method, device and storage medium for determining topological relation of equipment in network
CN115208767A (en) * 2022-05-12 2022-10-18 哈尔滨工业大学(深圳) Ether mill network detection method, device, equipment and medium based on simulation technology
CN115208767B (en) * 2022-05-12 2023-10-27 哈尔滨工业大学(深圳) Ethernet network detection method, device, equipment and medium based on simulation technology

Also Published As

Publication number Publication date
CN112751697B (en) 2023-11-21
EP4047877A4 (en) 2022-11-16
US20220255836A1 (en) 2022-08-11
WO2021083208A1 (en) 2021-05-06
US11855875B2 (en) 2023-12-26
EP4047877A1 (en) 2022-08-24

Similar Documents

Publication Publication Date Title
CN112751697B (en) Network topology discovery method and node equipment
KR20150084647A (en) Method and apparatus for establishing a virtual interface for a set of mutual-listener devices
CN111316703A (en) Access point discovery for wireless network topologies
CN108134707B (en) Method, system and network equipment for detecting route
US10084656B2 (en) TRILL network establishing method, node, and system
CN111884875A (en) Offline device determination method and device
WO2022062568A1 (en) Switch configuration method and related device
WO2022217786A1 (en) Cross-network communicaton method, apparatus, and system for multi-bus network, and storage medium
CN109803272B (en) Communication method, device and system
CN108667640B (en) Communication method and device, and network access system
CN109120520B (en) Fault processing method and equipment
CN112751752A (en) Route convergence method, device, communication equipment and storage medium
WO2022105325A1 (en) Rerouting method, communication apparatus and storage medium
CN113573379A (en) Data transmission method and device
CN113872787B (en) Network topology discovery method, device and computer readable storage medium
KR20190108255A (en) Method and apparatus for controlling mobile ad-hoc network based on software-defined network
US9883408B2 (en) Gateway apparatus and communications system
EP3605350A1 (en) Interconnection system, and interconnection control method and apparatus
US11303324B2 (en) Radio transmission apparatus, transmission system, transmission method, and non-transitory computer readable medium storing program
KR101931543B1 (en) Method and computer program for handling trouble using flow-mod message in software defined networking environment
CN112887164B (en) Broadcast storm diagnosis method, apparatus and computer storage medium
EP4203568A1 (en) Time synchronization failure processing method, device and system
CN114143853A (en) Communication link selection method, device and storage medium
CN105554182A (en) Information processing method and electronic apparatus
CN115567437A (en) Cross-device link aggregation switching method, system, switch and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant