CN117560312A - Self-adaptive network dynamic topology method and device based on switch - Google Patents

Self-adaptive network dynamic topology method and device based on switch Download PDF

Info

Publication number
CN117560312A
CN117560312A CN202311390924.2A CN202311390924A CN117560312A CN 117560312 A CN117560312 A CN 117560312A CN 202311390924 A CN202311390924 A CN 202311390924A CN 117560312 A CN117560312 A CN 117560312A
Authority
CN
China
Prior art keywords
node
switch
current
port
network
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
CN202311390924.2A
Other languages
Chinese (zh)
Other versions
CN117560312B (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.)
Zhongying Technology Co ltd
Original Assignee
Zhongying Technology 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 Zhongying Technology Co ltd filed Critical Zhongying Technology Co ltd
Priority to CN202311390924.2A priority Critical patent/CN117560312B/en
Publication of CN117560312A publication Critical patent/CN117560312A/en
Application granted granted Critical
Publication of CN117560312B publication Critical patent/CN117560312B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • 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/22Alternate 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/24Multipath
    • H04L45/247Multipath using M:N active or standby paths
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery

Landscapes

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

Abstract

The invention discloses a self-adaptive network dynamic topology method and a device based on a switch, wherein the method comprises the following steps: constructing an SRIO topology network corresponding to the node network, and generating an active topology structure record list; starting periodic scanning of the node network; taking the root node as a current node; acquiring a node successfully adapted to a current node port as a neighboring node, and determining that the current node is not connected with the neighboring node in the active topology structure record table; performing new node online operation on the adjacent nodes, and performing route reconfiguration on each node corresponding to the active topology structure record table and the current node; if the adjacent node is a switch node, recording that the current node is a father node, and taking the switch node as the current node. The method is beneficial to the routing configuration function of the SRIO switching system, is beneficial to solving the problems of redundant links and shortest paths, and is beneficial to rapidly checking the problems of links in engineering practice.

Description

Self-adaptive network dynamic topology method and device based on switch
Technical Field
The invention relates to the technical field of communication network dynamic topology, in particular to a self-adaptive network dynamic topology method and device based on a switch.
Background
The SRIO (Serial RapidIO) protocol is a protocol for high-speed serial communication, has the characteristics of low delay, high bandwidth, high reliability and the like, and is commonly used in the fields of data centers, communication equipment, wireless base stations, radars, avionics and the like.
In practical applications, a plurality of processors (such as a CPU and an FPGA) typically form an SRIO network through a plurality of SRIO switch chips, so as to achieve the purpose of high-speed interconnection between the processors. The SRIO protocol can support various network topologies such as star, mesh, ring, tree, daisy chain and the like of the embedded system, and a typical topological network of the SRIO is shown in fig. 1, and needs to manage the network topologies to provide functions such as rapid scan chain enumeration, dynamic network access, rate self-adaption, route optimization and the like.
The common network management software processing method is to perform chain scanning enumeration aiming at a single network topological structure, recursively acquire the connection state of the next-stage switch by taking the node where the network management software is located as a root node and configure the route, meet special nodes for special processing, finally configure the routes of all nodes in the network, store all switch nodes in the network into a switch linked list, store equipment nodes into the equipment linked list, use the default linear rate of hardware in the whole process, and avoid the change of the network management software.
Common network management software is only suitable for a single network topology structure, and if the network topology structure is changed, a plurality of nodes can be scanned and missed, even the system is abnormal or crashed, and the application limitation is strong.
Common network management software does not have the functions of rate self-adaption and dynamic network access, and all nodes in a network topology structure need to pre-define the rate. If there is a node or switch that does not match the agreed rate, the network management software cannot scan the node or switch; if a node is started after the network management software sweeps the chain enumeration, that node cannot eventually be scanned either.
Common network management software encounters a redundant path and does not judge the shortest path, which may cause that the communication path between nodes is too long and the communication path is uncertain, so that the transmission bandwidth is reduced, and even the system stability is reduced.
Disclosure of Invention
In view of this, the invention provides a self-adaptive network dynamic topology method and device based on a switch, and the invention can realize the functions of rapid chain scanning enumeration, dynamic network access, rate self-adaptation, optimal path selection and the like by using the same set of network management software aiming at the network dynamic topology structure which changes at any time and is different.
The present invention is so implemented as to solve the above-mentioned technical problems.
A switch-based adaptive network dynamic topology method, the method comprising the steps of:
step S1: constructing an SRIO topology network corresponding to the node network, and generating an active topology structure record table corresponding to the SRIO topology network; starting periodic scanning of the node network;
step S2: when the scanning time comes, taking the root node as the current node;
step S3: acquiring nodes which are not polled by the current node and are connected to the port successfully adapted as adjacent nodes, and entering step S4; if the adjacent node is not acquired and the current node is the root node, ending the scanning; if the adjacent node is not obtained and the current node is not the root node, recursing the current node step by step, obtaining a node with a port which is not polled as the current node, and entering step S3;
step S4: determining whether the current node is connected with the adjacent node in the active topology structure record table, and if so, entering a step S6; otherwise, enter step S5;
step S5: performing new node online operation on the adjacent nodes, updating an active topology structure record table, and performing route reconfiguration based on the active topology structure record table;
step S6: if the adjacent node is a switch node, recording that the current node is a father node, taking the switch node as the current node, and entering step S3; otherwise, the current node is recursively and upward step by step, a node with a port which is not polled is obtained as the current node, and the step S3 is entered.
Preferably, the step S1 includes: constructing an SRIO topology network corresponding to a node network, and constructing an equipment linked list, a switch linked list, a routing table and an active topology structure record table corresponding to the SRIO topology network; the equipment linked list records all the equipment and all the switches of the SRIO topological network, and the positions of the equipment in the linked list are determined according to the scanned sequence of the equipment and the switches; the switch linked list records all switches of the SRIO topological network, and the positions of the switches in the linked list are determined according to the scanned sequence of the switches; each switch defaults to configure 16 routing tables, wherein the routing tables are used for recording paths between every two switches in all switches of the SRIO topology network, the routing tables comprise three fields, namely the shortest hop count, the number of the next hop and the connection port of the next hop, wherein the shortest hop count represents the distance between a starting switch corresponding to the routing table and an ending switch, the number of the next hop represents the number of a switch node of the next hop of the starting switch corresponding to the routing table, and the connection port of the next hop represents the connection port of the switch node of the next hop and the starting switch corresponding to the routing table; the active topology structure record table records the connection relation between each node of the SRIO topology network according to the dynamic change of the SRIO topology network; the root node is the node running the network management software.
Preferably, in step S3, a node connected to a port that is not polled by the current node and is successfully adapted is obtained as a neighboring node, and step S4 is entered, including:
acquiring nodes connected on ports which are not polled by the current node and are successfully adapted as adjacent nodes; step S4 is entered; otherwise, performing connectionless processing on the current node, and entering step S3.
Preferably, the adapting is port adapting, wherein the port adapting refers to reading the connection state of the port to be matched of the current node, and if the port is in the connection state, the port adapting is successful; otherwise, switching the line rate of the current port, and after switching, if the current node and the adjacent node can be successfully connected, indicating that the port is successfully adapted, otherwise, indicating that the port is failed to be adapted.
Preferably, the performing connectionless processing on the current node includes: inquiring the active topology structure record table, if the current node in the active topology structure record table is connected with the adjacent node, indicating that the adjacent node is offline, and then carrying out route reconfiguration on each node and the current node included in the active topology structure record table; otherwise, the current node is not connected to any node, and the current node is not processed.
Preferably, in step S5, the performing a new node online operation on the neighboring node includes:
step S511: taking the adjacent node as a new node, inquiring whether the number is allocated to the new node in the SRIO topology network, and if so, entering step S512; otherwise, the number is allocated to the new node in the equipment management table according to the default rule, and the step S512 is entered;
step S512: memory space is allocated for the new node;
step S513: determining a path of the network management software accessing the new node by routing the new node;
step S514: clearing port faults of the port where the new node is located on the current node;
step S515: if the new node is a switch, detecting whether a redundant link exists between the current port of the current node and the current port of the new node, namely detecting whether other ports of the current node are connected with other ports of the new node, if so, releasing the allocated basic equipment number, adding a path from the current port of the current node to the current port of the new node into an active topology structure record table, and ending the method.
Preferably, if the new node is a switch, the number allocated before the new node is released, and the number is allocated again in the switch management table as the number of the new node; adding the new node into an equipment linked list, and adding a connection relation between the new node and the current node in a topological graph, namely adding a path from the new node to the current node in an active topological structure record table; if the new node is a switch, then matching the drive function for the switch, and adding the switch into a switch linked list.
Preferably, the route reconfiguration includes:
step 521, obtaining all nodes to be subjected to route reconfiguration and corresponding active topology structure record tables, and filling a route selection table corresponding to each switch node according to the active topology structure record tables;
step S522: acquiring shortest hop count information of other switch nodes from a routing table of each switch node, and constructing an adjacent matrix W based on the shortest hop count information, wherein the adjacent matrix W is n rows and n columns, and n is the node number in the active topology structure record table; element W (i, j) in the adjacency matrix represents the shortest hop count between node i and node j;
step S523: for any two nodes i and j in the adjacency matrix, according to the Floyd algorithm, calculating W (i, j) =min (W (i, k) +W (k, j), W (i, j)), wherein min represents the minimum value, k represents a selected intermediate node, and when W (i, k) +W (k, j) < W (i, j), the k value is recorded and the adjacency matrix is updated; the way to update the adjacency matrix is: updating the number of the next hop of the routing table corresponding to the node i corresponding to the element W (i, j) into the number of the next hop from the switch i to the switch k, and updating the port of the next hop of the routing table into the port of the next hop from the switch i to the switch k; the shortest hop count of the routing table from the switch j to the switch i is updated to be the value of W (j, i), the number of the next hop of the routing table is updated to be the number of the next hop from the switch j to the switch k, and the port of the next hop of the routing table is updated to be the port of the next hop from the switch j to the switch k;
step S524: and reconfiguring all the switch routing tables according to the updated routing tables.
The invention provides a self-adaptive network dynamic topology device based on a switch, which comprises:
an initialization module: the method comprises the steps of configuring an SRIO topological network corresponding to a node network, and generating an active topological structure record table corresponding to the SRIO topological network; starting periodic scanning of the node network;
and a scanning starting module: the method comprises the steps that when the scanning time comes, a root node is used as a current node; the root node is a node running network management software;
the adjacent node acquisition module: the method comprises the steps of acquiring nodes connected to ports which are not polled by a current node and are successfully adapted as adjacent nodes, and entering a first judging module; if the adjacent node is not acquired and the current node is the root node, ending the scanning; if the adjacent node is not acquired and the current node is not the root node, recursing the current node step by step, acquiring a node with an unpolled port as the current node, and triggering an adjacent node acquisition module;
a first judging module: the configuration is used for determining whether the current node is connected with the adjacent node in the active topological structure record table, and if so, a second judging module is triggered; otherwise, triggering the online module;
and (5) an online module: the method comprises the steps of configuring to execute new node online operation on the adjacent node, updating an active topology structure record table, and performing route reconfiguration based on the active topology structure record table;
and a second judging module: if the adjacent node is a switch node, recording that the current node is a father node, taking the switch node as the current node, and triggering an adjacent node acquisition module; otherwise, the current node is recursively and upward step by step, a node with a port which is not polled is obtained as the current node, and the adjacent node obtaining module is triggered.
The invention provides an electronic device, which is characterized by comprising:
a processor for executing a plurality of instructions;
a memory for storing a plurality of instructions;
wherein the plurality of instructions are for storage by the memory and loading and executing by the processor the method as described above.
The invention has the beneficial technical effects that:
(1) The invention can accurately describe the topological graph of the SRIO network through the self-defined topological structure, is beneficial to managing the IDs of all nodes in the network and the connection relation among the nodes, and is convenient for processing redundant links and shortest paths; the routing table can accurately describe the routing diagram of the SRIO network, is of great importance to the realization of the routing configuration function of the SRIO switching system, is beneficial to solving the problems of redundant links and shortest paths, and is beneficial to rapidly checking the problems of links in engineering practice.
(2) The invention provides a redundant link detection method for the conditions of the self loop of the switch, multiple connections between two switches and the like, and processes the redundant link detection, thereby avoiding the occurrence of scanning dead loop and scanning conflict.
(3) The invention provides a solution idea of periodic switching speed and periodic scanning for the problems of speed mismatch and some nodes on-line and off-line in the middle of each node.
(4) The invention introduces the Fluedel algorithm idea to the problem of multiple paths between two nodes in the network, accurately calculates the shortest path, improves the high efficiency and certainty of SRIO communication, and avoids the problems of communication inefficiency and system breakdown.
(5) The invention can meet the requirements of rapid chain scanning enumeration, dynamic network access, rate self-adaption and route optimization, can adapt to various network topologies such as star, net, ring, tree, daisy chain and the like compared with the common network management method, and improves the communication efficiency and the stability of the system through a shortest path algorithm.
Drawings
FIG. 1 is a schematic diagram of a typical SRIO topology network of the prior art;
fig. 2 is a flow chart of a switch-based adaptive network dynamic topology method provided by the invention;
fig. 3 is a schematic diagram of a switch-based adaptive network dynamic topology method provided by the present invention;
fig. 4 is a schematic diagram of a processing method of a node connectionless procedure according to the present invention;
FIG. 5 is a schematic diagram of a method for processing a new node online according to the present invention;
fig. 6 is a schematic diagram of a processing method of route reconfiguration according to the present invention.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings and examples.
As shown in fig. 2-3, the present invention proposes a switch-based adaptive network dynamic topology method, which includes the following steps:
step S1: constructing an SRIO topology network corresponding to the node network, and generating an active topology structure record table corresponding to the SRIO topology network; starting periodic scanning of the node network;
step S2: when the scanning time comes, taking the root node as the current node;
step S3: acquiring nodes which are not polled by the current node and are connected to the port successfully adapted as adjacent nodes, and entering step S4; if the adjacent node is not acquired and the current node is the root node, ending the scanning; if the adjacent node is not obtained and the current node is not the root node, recursing the current node step by step, obtaining a node with a port which is not polled as the current node, and entering step S3;
step S4: determining whether the current node is connected with the adjacent node in the active topology structure record table, and if so, entering a step S6; otherwise, enter step S5;
step S5: performing new node online operation on the adjacent nodes, updating an active topology structure record table, and performing route reconfiguration based on the active topology structure record table;
step S6: if the adjacent node is a switch node, recording that the current node is a father node, taking the switch node as the current node, and entering step S3; otherwise, the current node is recursively and upward step by step, a node with a port which is not polled is obtained as the current node, and the step S3 is entered.
In the invention, the root node has only one port, the other nodes have a plurality of ports, and two nodes with connection relations are connected through one port.
The step S1 includes: constructing an SRIO topology network corresponding to a node network, and constructing an equipment linked list, a switch linked list, a routing table and an active topology structure record table corresponding to the SRIO topology network; starting periodic scanning of the node network; the node includes a switch and a device.
The equipment linked list records all the equipment and all the switches of the SRIO topological network, and the positions of the equipment in the linked list are determined according to the scanned sequence of the equipment and the switches; the switch linked list records all switches of the SRIO topological network, and the positions of the switches in the linked list are determined according to the scanned sequence of the switches; each switch defaults to configure 16 routing tables, wherein the routing tables are used for recording paths between every two switches in all switches of the SRIO topology network, the routing tables comprise three fields, namely the shortest hop count, the number of the next hop and the connection port of the next hop, wherein the shortest hop count represents the distance between a starting switch corresponding to the routing table and an ending switch, the number of the next hop represents the number of a switch node of the next hop of the starting switch corresponding to the routing table, and the connection port of the next hop represents the connection port of the switch node of the next hop and the starting switch corresponding to the routing table. And the active topology structure record table records the connection relation between each node of the SRIO topology network according to the dynamic change of the SRIO topology network.
In this embodiment, the active topology record table manages the entire SRIO topology network, records the serial numbers ID of each node and the connection relationship between each node, and the network management software can describe the current active SRIO topology according to the active topology record table.
When the method is executed for the first time, the SRIO topological network needs to be initialized, namely, the SRIO topological network is initialized according to the connection relation between the preassigned partial nodes and each other. The connection relation between the preassigned partial nodes and each other can be customized in the code or can be read from the configuration file.
The hop is the minimum unit of distance between two switches, the distance between two directly connected switches is 1 hop, if another switch is inserted between two switches, the distance between the two switches is 2 hops, and so on.
The number ID of the node is used for identifying a physical node in the SRIO switching network and is stored in a state register of the physical node. In an SRIO switching network, the number ID of each node is typically unique. The routing function of the SRIO switching network is to route the node's serial ID to a port of the switch node. The number ID of a node is represented by two data widths of 8 bits and/or 16 bits for SRIO switching networks of different sizes. In this embodiment, setting the attribute of the number ID of the node in the routing table makes the routing in the SRIO network more specific and easier to describe.
The routing to a certain port of the switch node refers to routing to a certain port of the SRIO switch, and each port of the SRIO switch can be connected to a node. The port number and the current port of the SRIO switch can be obtained by reading the port information register of the SRIO switch node.
Further, a device management table and a switch management table are set, wherein the device management table manages information of device nodes in the SRIO switching network, and the information of the device nodes comprises a starting device number, a maximum number of the device nodes, a device allocation rule and a device number list. The switch management table manages the related information of the serial number ID of the SRIO switch node, and comprises information such as a start number, a maximum number of the switch node, a switch allocation rule, a serial number list and the like.
Step S3, the node connected to the port that is not polled by the current node and is successfully adapted is obtained as the neighboring node, and step S4 is entered, including:
acquiring nodes connected on ports which are not polled by the current node and are successfully adapted as adjacent nodes; step S4 is entered; otherwise, performing connectionless processing on the current node, and entering step S3.
The adaptation is port adaptation, wherein the port adaptation refers to reading the connection state of a port to be matched of the current node, and if the port is in the connection state, the port adaptation is successful; otherwise, switching the line rate of the current port, and after switching, if the current node and the adjacent node can be successfully connected, indicating that the port is successfully adapted, otherwise, indicating that the port is failed to be adapted.
In this embodiment, the line rate is switched only once in each scanning process, and is sequentially switched to 1.25Gbps, 2.5Gbps, 3.125Gbps, 5Gbps, and 6.25Gbps.
As shown in fig. 4, the connectionless processing for the current node includes: inquiring the active topology structure record table, if the current node in the active topology structure record table is connected with the adjacent node, indicating that the adjacent node is offline, and then carrying out route reconfiguration on each node and the current node included in the active topology structure record table; otherwise, the current node is not connected to any node, and the current node is not processed.
As shown in fig. 5, the step S5 of performing a new node online operation on the neighboring node includes:
step S511: taking the adjacent node as a new node, inquiring whether the number is allocated to the new node in the SRIO topology network, and if so, entering step S512; otherwise, the number is allocated to the new node in the equipment management table according to the default rule, and the step S512 is entered;
step S512: memory space is allocated for the new node;
step S513: determining a path of the network management software accessing the new node by routing the new node;
step S514: clearing port faults of the port where the new node is located on the current node;
step S515: if the new node is a switch, detecting whether a redundant link exists between the current port of the current node and the current port of the new node, namely detecting whether other ports of the current node are connected with other ports of the new node, if so, releasing the allocated basic equipment number, adding a path from the current port of the current node to the current port of the new node into an active topology structure record table, and ending the method.
The method of detecting the redundant link is to read the DISCOVER bit in the 0x3c register of the new node, and if set, this new node is the previously discovered node, this link is the redundant link; otherwise the DISCOVER bit is written into the new node's 0x3c register, which is not a redundant link.
Further, if the new node is a switch, releasing the number allocated before the new node, and reallocating the number in the switch management table as the number of the new node; adding the new node into an equipment linked list, and adding a connection relation between the new node and the current node in a topological graph, namely adding a path from the new node to the current node in an active topological structure record table; if the new node is a switch, then matching the drive function for the switch, and adding the switch into a switch linked list. In the invention, the numbers of the equipment and the switch are managed separately, so the new node is treated as the equipment node before, and the equipment number is allocated to the new node; and when the new node is judged to be the switch, the equipment number allocated before is released, and the switch number is reallocated.
As shown in fig. 6, the route reconfiguration includes:
step 521, obtaining all nodes to be subjected to route reconfiguration and corresponding active topology structure record tables, and filling a route selection table corresponding to each switch node according to the active topology structure record tables;
step S522: acquiring shortest hop count information of other switch nodes from a routing table of each switch node, and constructing an adjacent matrix W based on the shortest hop count information, wherein the adjacent matrix W is n rows and n columns, and n is the node number in the active topology structure record table; element W (i, j) in the adjacency matrix represents the shortest hop count between node i and node j;
step S523: for any two nodes i and j in the adjacency matrix, according to the Floyd algorithm, calculating W (i, j) =min (W (i, k) +W (k, j), W (i, j)), wherein min represents the minimum value, k represents a selected intermediate node, and when W (i, k) +W (k, j) < W (i, j), the k value is recorded and the adjacency matrix is updated; the way to update the adjacency matrix is: updating the number of the next hop of the routing table corresponding to the node i corresponding to the element W (i, j) into the number of the next hop from the switch i to the switch k, and updating the port of the next hop of the routing table into the port of the next hop from the switch i to the switch k; the shortest hop count of the routing table from the switch j to the switch i is updated to be the value of W (j, i), the number of the next hop of the routing table is updated to be the number of the next hop from the switch j to the switch k, and the port of the next hop of the routing table is updated to be the port of the next hop from the switch j to the switch k;
step S524: and reconfiguring all the switch routing tables according to the updated routing tables.
In this embodiment, the implementation manner of route reconfiguration is:
(1) Reinitializing the routing tables, and setting the shortest hop count of all the routing tables to be a maximum value of 256;
(2) Filling a routing table according to the topological relation in the network topological graph, setting the shortest hop number of the routing table between all directly connected switch nodes as 1, and filling the basic equipment number of the next hop and the port connected with the next hop;
(3) Calculating a routing table according to a shortest path principle, wherein a Fluedel algorithm idea is introduced into a shortest path algorithm, and the method is specifically realized as follows:
constructing n rows and n columns of adjacent matrixes W according to the shortest hop count attribute of all the filled routing tables, wherein n represents the total number of nodes of the switch, and defaults to 16; let W (i, j) denote one element of the i-th row, j-th column of this matrix, and also denote the shortest number of hops between switch numbered i to switch numbered j, if switch i and switch j are directly connected, W (i, j) =1, otherwise W (i, j) =256;
according to the Floyd algorithm, selecting a certain node k as an intermediate node which is required to pass through from i to j, updating a smaller value into a path length W (i, j) by comparing the sizes of W (i, k) +W (k, j) and the existing W (i, j), traversing the selection of the k node to obtain the shortest path length from i to j when all nodes pass through, and updating the shortest path by continuously adding the intermediate point; the implementation mode in the program is a triple nested loop mode, i, j and k are traversed respectively, and a state transition equation is executed: w (i, j) =min (W (i, k) +w (k, j), W (i, j), where min represents the minimum and k represents a selected one of the intermediate nodes.
The value of W (i, j) is executed once every update of W (j, i) =w (i, j), and the routing table is updated once. Wherein the shortest hop count of the routing table from the switch i to the switch j is updated to be the value of W (i, j), the basic device number of the next hop of the routing table is updated to be the basic device number of the next hop of the switch i to the switch k, and the port of the next hop of the routing table is updated to be the port of the next hop of the switch i to the switch k; the shortest hop count of the routing table from switch j to switch i is updated to the value of W (j, i), the basic device number of the next hop of the routing table is updated to the basic device number of the next hop of switch j to switch k, and the port of the next hop of the routing table is updated to the port of the next hop of switch j to switch k.
After the calculation and updating of the adjacency matrix W are completed, a routing table between any two SRIO switches is obtained.
(4) All switch routing tables are reconfigured in a near-to-far order from the root node according to the routing tables. The specific flow is as follows:
traversing all the routing tables taking the root node as a starting point, and sequentially configuring the routing tables of all the switches according to the sequence from near to far. The routing configuration of each switch needs to traverse all the routing tables starting from the switch, and route all nodes on the destination switch to the ports of the next hop of the routing table according to the routing tables.
The routing configuration of the switch refers to that an SRIO data packet with a basic equipment number is routed to a designated port of the SRIO switch chip through configuring a register of the SRIO switch chip.
The invention provides a self-adaptive network dynamic topology device based on a switch, which comprises:
an initialization module: the method comprises the steps of configuring an SRIO topological network corresponding to a node network, and generating an active topological structure record table corresponding to the SRIO topological network; starting periodic scanning of the node network;
and a scanning starting module: the method comprises the steps that when the scanning time comes, a root node is used as a current node; the root node is a node running network management software;
the adjacent node acquisition module: the method comprises the steps of acquiring nodes connected to ports which are not polled by a current node and are successfully adapted as adjacent nodes, and entering a first judging module; if the adjacent node is not acquired and the current node is the root node, ending the scanning; if the adjacent node is not acquired and the current node is not the root node, recursing the current node step by step, acquiring a node with an unpolled port as the current node, and triggering an adjacent node acquisition module;
a first judging module: the configuration is used for determining whether the current node is connected with the adjacent node in the active topological structure record table, and if so, a second judging module is triggered; otherwise, triggering the online module;
and (5) an online module: the method comprises the steps of configuring to execute new node online operation on the adjacent node, updating an active topology structure record table, and performing route reconfiguration based on the active topology structure record table;
and a second judging module: if the adjacent node is a switch node, recording that the current node is a father node, taking the switch node as the current node, and triggering an adjacent node acquisition module; otherwise, the current node is recursively and upward step by step, a node with a port which is not polled is obtained as the current node, and the adjacent node obtaining module is triggered.
The above specific embodiments merely describe the design principle of the present invention, and the shapes of the components in the description may be different, and the names are not limited. Therefore, the technical scheme described in the foregoing embodiments can be modified or replaced equivalently by those skilled in the art; such modifications and substitutions do not depart from the spirit and technical scope of the invention, and all of them should be considered to fall within the scope of the invention.

Claims (10)

1. A switch-based adaptive network dynamic topology method, comprising:
step S1: constructing an SRIO topology network corresponding to the node network, and generating an active topology structure record table corresponding to the SRIO topology network; starting periodic scanning of the node network;
step S2: when the scanning time comes, taking the root node as the current node;
step S3: acquiring nodes which are not polled by the current node and are connected to the port successfully adapted as adjacent nodes, and entering step S4; if the adjacent node is not acquired and the current node is the root node, ending the scanning; if the adjacent node is not obtained and the current node is not the root node, recursing the current node step by step, obtaining a node with a port which is not polled as the current node, and entering step S3;
step S4: determining whether the current node is connected with the adjacent node in the active topology structure record table, and if so, entering a step S6; otherwise, enter step S5;
step S5: performing new node online operation on the adjacent nodes, updating an active topology structure record table, and performing route reconfiguration based on the active topology structure record table;
step S6: if the adjacent node is a switch node, recording that the current node is a father node, taking the switch node as the current node, and entering step S3; otherwise, the current node is recursively and upward step by step, a node with a port which is not polled is obtained as the current node, and the step S3 is entered.
2. The method according to claim 1, wherein the step S1 includes: constructing an SRIO topology network corresponding to a node network, and constructing an equipment linked list, a switch linked list, a routing table and an active topology structure record table corresponding to the SRIO topology network; the equipment linked list records all the equipment and all the switches of the SRIO topological network, and the positions of the equipment in the linked list are determined according to the scanned sequence of the equipment and the switches; the switch linked list records all switches of the SRIO topological network, and the positions of the switches in the linked list are determined according to the scanned sequence of the switches; each switch defaults to configure 16 routing tables, wherein the routing tables are used for recording paths between every two switches in all switches of the SRIO topology network, the routing tables comprise three fields, namely the shortest hop count, the number of the next hop and the connection port of the next hop, wherein the shortest hop count represents the distance between a starting switch corresponding to the routing table and an ending switch, the number of the next hop represents the number of a switch node of the next hop of the starting switch corresponding to the routing table, and the connection port of the next hop represents the connection port of the switch node of the next hop and the starting switch corresponding to the routing table; the active topology structure record table records the connection relation between each node of the SRIO topology network according to the dynamic change of the SRIO topology network; the root node is the node running the network management software.
3. The method according to claim 1, wherein the step S3 of obtaining, as the neighboring node, the node connected to the port that is not polled by the current node and is successfully adapted, proceeds to step S4, and includes:
acquiring nodes connected on ports which are not polled by the current node and are successfully adapted as adjacent nodes; step S4 is entered; otherwise, performing connectionless processing on the current node, and entering step S3.
4. A method according to claim 3, wherein the adaptation is port adaptation, the port adaptation is reading a connection state of a port to be matched of the current node, and if the port adaptation is in the connection state, the port adaptation is successful; otherwise, switching the line rate of the current port, and after switching, if the current node and the adjacent node can be successfully connected, indicating that the port is successfully adapted, otherwise, indicating that the port is failed to be adapted.
5. The method of claim 4, wherein said connectionless processing of the current node comprises: inquiring the active topology structure record table, if the current node in the active topology structure record table is connected with the adjacent node, indicating that the adjacent node is offline, and then carrying out route reconfiguration on each node and the current node included in the active topology structure record table; otherwise, the current node is not connected to any node, and the current node is not processed.
6. The method as set forth in claim 5, wherein the step S5 of performing the new node on-line operation on the neighboring node includes:
step S511: taking the adjacent node as a new node, inquiring whether the number is allocated to the new node in the SRIO topology network, and if so, entering step S512; otherwise, the number is allocated to the new node in the equipment management table according to the default rule, and the step S512 is entered;
step S512: memory space is allocated for the new node;
step S513: determining a path of the network management software accessing the new node by routing the new node;
step S514: clearing port faults of the port where the new node is located on the current node;
step S515: if the new node is a switch, detecting whether a redundant link exists between the current port of the current node and the current port of the new node, namely detecting whether other ports of the current node are connected with other ports of the new node, if so, releasing the allocated basic equipment number, adding a path from the current port of the current node to the current port of the new node into an active topology structure record table, and ending the method.
7. The method of claim 6, wherein if the new node is a switch, the number previously allocated to the new node is released, and the number is newly allocated in a switch management table as the number of the new node; adding the new node into an equipment linked list, and adding a connection relation between the new node and the current node in a topological graph, namely adding a path from the new node to the current node in an active topological structure record table; if the new node is a switch, then matching the drive function for the switch, and adding the switch into a switch linked list.
8. The method of any of claims 1-7, wherein the route reconfiguration comprises:
step 521, obtaining all nodes to be subjected to route reconfiguration and corresponding active topology structure record tables, and filling a route selection table corresponding to each switch node according to the active topology structure record tables;
step S522: acquiring shortest hop count information of other switch nodes from a routing table of each switch node, and constructing an adjacent matrix W based on the shortest hop count information, wherein the adjacent matrix W is n rows and n columns, and n is the node number in the active topology structure record table; element W (i, j) in the adjacency matrix represents the shortest hop count between node i and node j;
step S523: for any two nodes i and j in the adjacency matrix, according to the Floyd algorithm, calculating W (i, j) =min (W (i, k) +W (k, j), W (i, j)), wherein min represents the minimum value, k represents a selected intermediate node, and when W (i, k) +W (k, j) < W (i, j), the k value is recorded and the adjacency matrix is updated; the way to update the adjacency matrix is: updating the number of the next hop of the routing table corresponding to the node i corresponding to the element W (i, j) into the number of the next hop from the switch i to the switch k, and updating the port of the next hop of the routing table into the port of the next hop from the switch i to the switch k; the shortest hop count of the routing table from the switch j to the switch i is updated to be the value of W (j, i), the number of the next hop of the routing table is updated to be the number of the next hop from the switch j to the switch k, and the port of the next hop of the routing table is updated to be the port of the next hop from the switch j to the switch k;
step S524: and reconfiguring all the switch routing tables according to the updated routing tables.
9. An adaptive switch-based network dynamic topology apparatus, the apparatus comprising:
an initialization module: the method comprises the steps of configuring an SRIO topological network corresponding to a node network, and generating an active topological structure record table corresponding to the SRIO topological network; starting periodic scanning of the node network;
and a scanning starting module: the method comprises the steps that when the scanning time comes, a root node is used as a current node; the root node is a node running network management software;
the adjacent node acquisition module: the method comprises the steps of acquiring nodes connected to ports which are not polled by a current node and are successfully adapted as adjacent nodes, and entering a first judging module; if the adjacent node is not acquired and the current node is the root node, ending the scanning; if the adjacent node is not acquired and the current node is not the root node, recursing the current node step by step, acquiring a node with an unpolled port as the current node, and triggering an adjacent node acquisition module;
a first judging module: the configuration is used for determining whether the current node is connected with the adjacent node in the active topological structure record table, and if so, a second judging module is triggered; otherwise, triggering the online module;
and (5) an online module: the method comprises the steps of configuring to execute new node online operation on the adjacent node, updating an active topology structure record table, and performing route reconfiguration based on the active topology structure record table;
and a second judging module: if the adjacent node is a switch node, recording that the current node is a father node, taking the switch node as the current node, and triggering an adjacent node acquisition module; otherwise, the current node is recursively and upward step by step, a node with a port which is not polled is obtained as the current node, and the adjacent node obtaining module is triggered.
10. An electronic device, the electronic device comprising:
a processor for executing a plurality of instructions;
a memory for storing a plurality of instructions;
wherein the plurality of instructions are for storage by the memory and loading and executing by the processor the method of any of claims 1-8.
CN202311390924.2A 2023-10-25 2023-10-25 Self-adaptive network dynamic topology method and device based on switch Active CN117560312B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311390924.2A CN117560312B (en) 2023-10-25 2023-10-25 Self-adaptive network dynamic topology method and device based on switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311390924.2A CN117560312B (en) 2023-10-25 2023-10-25 Self-adaptive network dynamic topology method and device based on switch

Publications (2)

Publication Number Publication Date
CN117560312A true CN117560312A (en) 2024-02-13
CN117560312B CN117560312B (en) 2024-07-12

Family

ID=89821216

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311390924.2A Active CN117560312B (en) 2023-10-25 2023-10-25 Self-adaptive network dynamic topology method and device based on switch

Country Status (1)

Country Link
CN (1) CN117560312B (en)

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030033427A1 (en) * 2001-05-10 2003-02-13 Brahmaroutu Surender V. Method for determining multiple paths between ports in a switched fabric
US20040024908A1 (en) * 2002-07-31 2004-02-05 Brocade Communications Systems, Inc. Topology database synchronization
JP2006157716A (en) * 2004-11-30 2006-06-15 Mitsubishi Electric Corp Network node device and route information updating method thereof
CN101183982A (en) * 2007-11-21 2008-05-21 烽火通信科技股份有限公司 Automatic discovery method based on topological structure of multi-service transmission looped network
EP2203004A1 (en) * 2008-12-29 2010-06-30 Hitachi Ltd. Method and apparatus for determining a distribution of neighbour nodes around a first node in a communication network
CN103347098A (en) * 2013-05-28 2013-10-09 中国电子科技集团公司第十研究所 Network enumeration method of Rapid IO bus interconnection system
US20160065405A1 (en) * 2014-08-27 2016-03-03 Aviacomm Inc. Policy-based intelligent ad-hoc network architecture for grouping nodes based on common activities
WO2016058263A1 (en) * 2014-12-16 2016-04-21 北京大学深圳研究生院 Content-based routing method and system
CN106789161A (en) * 2016-11-24 2017-05-31 北京无线电测量研究所 A kind of RapidIO routing configuration devices and method based on VPX systems
US20190372858A1 (en) * 2018-05-30 2019-12-05 Cisco Technology, Inc. Network fabric visualization and management
WO2022021860A1 (en) * 2020-07-29 2022-02-03 山东英信计算机技术有限公司 Multi-node network topology management method and apparatus, and electronic device and storage medium
CN114222352A (en) * 2021-12-29 2022-03-22 中国航空工业集团公司西安航空计算技术研究所 Dynamic network access method of WAIC network access equipment based on preconfigured network topology
CN114363188A (en) * 2021-11-26 2022-04-15 中国航空无线电电子研究所 Network dynamic searching and route configuring method
CN115002022A (en) * 2022-04-29 2022-09-02 中国航空无线电电子研究所 Route configuration generation method for RapidIO network
CN115208820A (en) * 2022-06-24 2022-10-18 中国电子科技集团公司第五十二研究所 Automatic route planning method for RapidIO switching network
WO2023130656A1 (en) * 2022-01-10 2023-07-13 苏州浪潮智能科技有限公司 Method for generating heterougeneous multi-node interconnection topology, and storage medium

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030033427A1 (en) * 2001-05-10 2003-02-13 Brahmaroutu Surender V. Method for determining multiple paths between ports in a switched fabric
US20040024908A1 (en) * 2002-07-31 2004-02-05 Brocade Communications Systems, Inc. Topology database synchronization
JP2006157716A (en) * 2004-11-30 2006-06-15 Mitsubishi Electric Corp Network node device and route information updating method thereof
CN101183982A (en) * 2007-11-21 2008-05-21 烽火通信科技股份有限公司 Automatic discovery method based on topological structure of multi-service transmission looped network
EP2203004A1 (en) * 2008-12-29 2010-06-30 Hitachi Ltd. Method and apparatus for determining a distribution of neighbour nodes around a first node in a communication network
CN103347098A (en) * 2013-05-28 2013-10-09 中国电子科技集团公司第十研究所 Network enumeration method of Rapid IO bus interconnection system
US20160065405A1 (en) * 2014-08-27 2016-03-03 Aviacomm Inc. Policy-based intelligent ad-hoc network architecture for grouping nodes based on common activities
WO2016058263A1 (en) * 2014-12-16 2016-04-21 北京大学深圳研究生院 Content-based routing method and system
CN106789161A (en) * 2016-11-24 2017-05-31 北京无线电测量研究所 A kind of RapidIO routing configuration devices and method based on VPX systems
US20190372858A1 (en) * 2018-05-30 2019-12-05 Cisco Technology, Inc. Network fabric visualization and management
WO2022021860A1 (en) * 2020-07-29 2022-02-03 山东英信计算机技术有限公司 Multi-node network topology management method and apparatus, and electronic device and storage medium
CN114363188A (en) * 2021-11-26 2022-04-15 中国航空无线电电子研究所 Network dynamic searching and route configuring method
CN114222352A (en) * 2021-12-29 2022-03-22 中国航空工业集团公司西安航空计算技术研究所 Dynamic network access method of WAIC network access equipment based on preconfigured network topology
WO2023130656A1 (en) * 2022-01-10 2023-07-13 苏州浪潮智能科技有限公司 Method for generating heterougeneous multi-node interconnection topology, and storage medium
CN115002022A (en) * 2022-04-29 2022-09-02 中国航空无线电电子研究所 Route configuration generation method for RapidIO network
CN115208820A (en) * 2022-06-24 2022-10-18 中国电子科技集团公司第五十二研究所 Automatic route planning method for RapidIO switching network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
潘灵;桑楠;: "一种RapidIO网络路径分配策略", 计算机应用, no. 2, 15 December 2008 (2008-12-15) *

Also Published As

Publication number Publication date
CN117560312B (en) 2024-07-12

Similar Documents

Publication Publication Date Title
US7200117B2 (en) Method of optimizing network capacity and fault tolerance in deadlock-free routing
US5682479A (en) System and method for network exploration and access
CN110417569B (en) Network link fault processing method and tunnel endpoint equipment
US8327021B2 (en) Technique of determining connectivity solutions for network elements
US6628661B1 (en) Spanning tree recovery in computer networks
US8305934B2 (en) Computer program, apparatus, and method for managing network
US7310343B2 (en) Systems and methods for rapid selection of devices in a tree topology network
US20140064287A1 (en) System and method for supporting discovery and routing degraded fat-trees in a middleware machine environment
CN101471813A (en) Configuration method, system and equipment for implementing domain-striding maintenance management
US6791939B1 (en) Dynamic generation of deadlock-free routings
CN109067650B (en) Automatic route searching and configuring method based on SRIO switching network
CN108463976A (en) Reduce the flooding of link in network shape variation
CN110858810B (en) Network link state monitoring method, device, system and medium
Simsek et al. Efficient network monitoring via in-band telemetry
US10999127B1 (en) Configuring network devices using a shared failure domain
US6584073B1 (en) Network topologies
US12010042B2 (en) Efficient parallelized computation of a Benes network configuration
CN117560312B (en) Self-adaptive network dynamic topology method and device based on switch
CN105450524B (en) Method for optimizing and calculating media forwarding route
JPWO2017170103A1 (en) Network system, network control device, method and program
CN107995047B (en) Topology networking method and device for data center
CN111585821B (en) High-speed interconnection network topology discovery method, device, medium and high-performance computing system
US10855581B2 (en) System and method of computing ethernet routing paths
CN112637053B (en) Method and device for determining backup forwarding path of route
CN113595750B (en) Network topology dividing method and device and network topology management equipment

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