A bidirectional ring network and its communication method, and a switch supporting the bidirectional ring network
By adopting a two-way ring network structure in the network, each node has the ability to transmit two-way data, solving the problem of network paralysis caused by link failures under the one-way transmission mechanism, improving the reliability and stability of the network, and reducing delays .
Patent Information
- Application Number
- CN202411290286.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-09-14
AI Technical Summary
In the prior art, the network with a one-way transmission mechanism will cause the entire network to be paralyzed when the link fails, seriously affecting the reliability and stability of the system.
Using a bidirectional ring network structure, each node includes a first port and a second port, each port has a receiving interface and a sending interface, and receives forward data of the upstream node through the first port and sends it to the downstream node through the second port. Reverse data of the downstream node is received through the second port and sent to the upstream node through the first port.
It realizes that the entire network does not crash when a node fails, ensures the reliability and stability of the ring network, and reduces network delay.
Smart Images

Figure CN118827278B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network information transmission, and in particular to a bidirectional ring network and a communication method thereof, and a switch supporting the bidirectional ring network. Background Art
[0002] Fiber optic communication technology is widely used in data centers, storage area networks (SANs), and high-performance computing environments due to its high bandwidth, low latency, and anti-electromagnetic interference characteristics. In these networks, FC switches play a core role in routing and forwarding data frames.
[0003] The traditional FC arbitration ring network adopts a one-way transmission mechanism, see Figure 1 , Figure 1 The ring network in the example includes four nodes: NT1-NT3 and NC. Among them, L_Port is the ring network port. If the optical fiber link between NT1 and NT2 is abnormal, the data frame sent by NT1 to NT2 will be lost, and NT2 and NT3 will not receive the command from NC. At the same time, the status frame sent by NT1 cannot be sent to NC due to the abnormal link between NT1 and NT2, and the entire network will collapse. This design will cause the entire network to be paralyzed when a link fails, seriously affecting the reliability and stability of the system. Summary of the invention
[0004] The present invention provides a bidirectional ring network and a communication method thereof, and a switch supporting the bidirectional ring network, so as to solve the defect in the prior art that a network with a unidirectional transmission mechanism will cause the whole network to be paralyzed when a link fails, thus seriously affecting the reliability and stability of the system.
[0005] The present invention provides a bidirectional ring network, comprising a plurality of nodes connected in a ring shape, each node comprising a first port and a second port, each port comprising a receiving interface and a sending interface;
[0006] For each node:
[0007] Receiving forward data from an upstream node through the receiving interface of the first port, and sending the forward data to a downstream node via the sending interface of the first port, the receiving interface of the second port, and the sending interface of the second port in sequence;
[0008] Reverse data of a downstream node is received through the receiving interface of the second port, and the reverse data is sent to an upstream node via the sending interface of the second port, the receiving interface of the first port, and the sending interface of the first port in sequence; wherein the forward data is the same as the reverse data.
[0009] According to a bidirectional ring network provided by the present invention, the node is a switch, and the first port includes: a first data frame receiving module, a first routing address query module, a first data frame selecting module and a first data frame sending module;
[0010] receiving a data frame of forward data of an upstream node through a receiving interface of the first port, and sending the data frame to a first data frame receiving module;
[0011] Sending the data frame of the forward data to the first routing address query module through the first data frame receiving module;
[0012] Determine whether the address of the current data frame belongs to a ring network or a switching network through the first routing address query module, and send the data frame to the first data frame selection module through the first routing address query module when it is determined that the address of the data frame belongs to the ring network;
[0013] The data frame is sent to the sending interface of the first port via the first data frame sending module through the first data frame selection module, and the forward data is sent to the downstream node via the receiving interface of the second port and the sending interface of the second port in sequence.
[0014] According to a bidirectional ring network provided by the present invention, the node is a switch, and the second port includes: a second data frame receiving module, a second routing address query module, a second data frame selecting module and a second data frame sending module;
[0015] receiving a data frame of reverse data of a downstream node through a receiving interface of the second port, and sending the data frame to a second data frame receiving module;
[0016] Sending the data frame of the reverse data to the second routing address query module through the second data frame receiving module;
[0017] Determine whether the address of the current data frame belongs to a ring network or a switching network through a second routing address query module, and send the data frame to the data frame selection module through the second routing address query module when it is determined that the address of the data frame belongs to the ring network;
[0018] The data frame is sent to the sending interface of the second port via the second data frame sending module through the second data frame selection module, and the reverse data is sent to the upstream node via the receiving interface of the first port and the sending interface of the first port in sequence.
[0019] According to a bidirectional ring network provided by the present invention, the forward data includes a plurality of serial data frames; the first port includes: a first serial-to-parallel conversion module and a first parallel-to-serial conversion module, the first serial-to-parallel conversion module is respectively connected to the receiving interface of the first port and the first data frame receiving module, and the first parallel-to-serial conversion module is respectively connected to the first data frame sending module and the sending interface of the first port;
[0020] When the serial data frame is received by the first data frame receiving module, the serial data frame is sent to the first serial-to-parallel conversion module, and the first serial-to-parallel conversion module converts the serial data frame into a parallel data frame;
[0021] When the parallel data frames are received by the first data frame sending module, the parallel data frames are converted into serial data frames by the first parallel-to-serial conversion module, and the converted serial data frames are sent to the sending interface of the first port.
[0022] According to a bidirectional ring network provided by the present invention, the switch further comprises: a distribution module, the first port and the second port of the switch are both connected to the distribution module;
[0023] Switching network port, used to connect to other nodes in the switching network;
[0024] The switch interface, the distribution module and each switch network port are connected to the corresponding switch interface;
[0025] A switching module, the switching module is used to determine the communication between the switching interfaces;
[0026] In the case where it is determined through the first routing address query module that the address of the data frame belongs to the switching network, the data frame is sent to the distribution module through the first routing address query module, and the data frame is sent to the corresponding switching interface via the distribution module;
[0027] The switching module determines the switching interface of the target node corresponding to the data frame, and sends the data frame to the target node through the switching interface of the target node and the switching network port.
[0028] According to a bidirectional ring network provided by the present invention, the switch also includes: when a local data frame sent by other nodes in the switching network to a node in the ring network is received through the distribution module, the local data frame is simultaneously sent to the first port and the second port through the distribution module to achieve simultaneous forward and reverse sending of the local data frame.
[0029] According to a bidirectional ring network provided by the present invention, when the local data frame and the data frame of the forward data are received by the first data frame selection module, the data frame of the forward data is set to a higher priority by the first data frame selection module for transmission.
[0030] The present invention provides a communication method of a bidirectional ring network, which is used for the bidirectional ring network as described above, and the communication method comprises:
[0031] For each node:
[0032] Receive forward data from an upstream node through a receiving interface of the first port of the node, and send the forward data to a downstream node via a sending interface of the first port of the node, a receiving interface of the second port of the node, and a sending interface of the second port of the node in sequence;
[0033] Reverse data of a downstream node is received through the receiving interface of the second port of the node, and the reverse data is sent to an upstream node via the sending interface of the second port of the node, the receiving interface of the first port of the node, and the sending interface of the first port of the node in sequence; wherein the forward data is the same as the reverse data.
[0034] According to the communication method of the bidirectional ring network provided by the present invention, the node is a switch, and the first port includes: a first data frame receiving module, a first routing address query module, a first data frame selection module and a first data frame sending module;
[0035] Receiving forward data from an upstream node through a receiving interface of the first port, and sequentially sending the forward data to a downstream node through a sending interface of the first port, a receiving interface of the second port, and a sending interface of the second port, specifically includes:
[0036] receiving a data frame of forward data of an upstream node through a receiving interface of the first port, and sending the data frame to a first data frame receiving module;
[0037] Sending the data frame of the forward data to the first routing address query module through the first data frame receiving module;
[0038] Determine whether the address of the current data frame belongs to a ring network or a switching network through the first routing address query module, and send the data frame to the first data frame selection module through the first routing address query module when it is determined that the address of the data frame belongs to the ring network;
[0039] The data frame is sent to the sending interface of the first port via the first data frame sending module through the first data frame selection module, and the forward data is sent to the downstream node via the receiving interface of the second port and the sending interface of the second port in sequence.
[0040] The present invention provides a switch supporting a bidirectional ring network, comprising a first port and a second port, each port comprising a receiving interface and a sending interface;
[0041] Receiving forward data from an upstream node through the receiving interface of the first port, and sending the forward data to a downstream node via the sending interface of the first port, the receiving interface of the second port, and the sending interface of the second port in sequence;
[0042] Reverse data of a downstream node is received through the receiving interface of the second port, and the reverse data is sent to an upstream node via the sending interface of the second port, the receiving interface of the first port, and the sending interface of the first port in sequence; wherein the forward data is the same as the reverse data.
[0043] The bidirectional ring network and its communication method, and the switch supporting the bidirectional ring network provided by the present invention are connected in a ring shape by setting a plurality of nodes, and setting a first port and a second port in each node, each port including a receiving interface and a sending interface; then for each node: receiving forward data of an upstream node through the receiving interface of the first port, and sending the forward data to a downstream node via the sending interface of the first port, the receiving interface of the second port, and the sending interface of the second port in sequence; receiving reverse data of a downstream node through the receiving interface of the second port, and sending the reverse data to an upstream node via the sending interface of the second port, the receiving interface of the first port, and the sending interface of the first port in sequence, thereby forming a bidirectional ring network structure, being able to transmit data in the forward and reverse directions at the same time, avoiding the paralysis of the entire network caused by a failure of a certain node, and ensuring the reliability and stability of the ring network. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0045] Figure 1 It is one of the structural diagrams of a unidirectional ring network provided in the prior art.
[0046] Figure 2This is the second structural diagram of a unidirectional ring network provided in the prior art.
[0047] Figure 3 It is a structural schematic diagram of the bidirectional ring network provided by the present invention.
[0048] Figure 4 It is a structural schematic diagram of the first port of the switch provided by the present invention.
[0049] Figure 5 It is a structural schematic diagram of the switch provided by the present invention.
[0050] Figure 6 It is a flow chart of the communication method of the bidirectional ring network provided by the present invention. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0052] In the prior art unidirectional ring network, when the number of nodes in the arbitration ring network is large, the network delay increases. Assuming that the forwarding time of each node is 1 μs, the delay from NC to NT3 reaches 2 μs. When the number of nodes reaches 16, the maximum delay reaches 14 μs.
[0053] In addition, when the arbitration ring network adopts a bidirectional network topology, when the nodes on the switch communicate with the nodes in the ring network, the current switch port does not have a redundant backup interface, and the bidirectional ring network cannot be connected to the switching network. Figure 2 shown.
[0054] Among them, L_Port is the ring network port; FL_Port is the switching network port; PN_Port is the node port.
[0055] In order to solve the technical defects existing in the prior art, the embodiment of the present invention realizes the simultaneous transmission of forward and reverse data by setting up a bidirectional ring network, and ensures the reliability and stability of data transmission in the ring network based on data transmission redundancy.
[0056] Furthermore, since the bidirectional ring network of this embodiment can realize forward and reverse data transmission, its maximum network delay can be reduced by half.
[0057] Combine the following Figure 3-Figure 5 A bidirectional ring network according to an embodiment of the present invention is described.
[0058] The embodiment of the present invention discloses a bidirectional ring network, see Figure 3 , including a plurality of nodes connected in a ring shape, each node including a first port and a second port, each port including a receiving interface and a sending interface. The first port and the second port are the same ports, and there is no difference in priority or composition structure, and they are defined to facilitate the data transmission process.
[0059] Taking NT1 as an example, the first port is L_Port_A and the second port is L_Port_B; for NT2, the first port is L_Port_B and the second port is L_Port_A.
[0060] For each node:
[0061] Receiving forward data from an upstream node through the receiving interface of the first port, and sending the forward data to a downstream node via the sending interface of the first port, the receiving interface of the second port, and the sending interface of the second port in sequence;
[0062] Reverse data of a downstream node is received through the receiving interface of the second port, and the reverse data is sent to an upstream node via the sending interface of the second port, the receiving interface of the first port, and the sending interface of the first port in sequence; wherein the forward data is the same as the reverse data.
[0063] It should be explained that the forward direction and the reverse direction are artificially defined for the convenience of describing the solution of this embodiment. Figure 3 In order to facilitate description, clockwise data transmission is defined as positive direction, and counterclockwise data transmission is defined as negative direction. Of course, clockwise data transmission can also be defined as negative direction, and counterclockwise data transmission can be defined as positive direction according to requirements.
[0064] Correspondingly, the upstream node and the downstream node are defined based on forward data transmission. Taking NT1 as an example, its upstream node is NC1 and its downstream node is the switch switch.
[0065] After adopting the bidirectional ring network, any node sends data from both ports A and B at the same time, and transmits it in two directions in the network, forward and reverse. Any node receives two paths of data for redundancy processing. If the unidirectional fiber link between any two nodes in the arbitration ring is abnormal, it will not cause the network to crash. The data will be transmitted to the end point along another route, doubling the system reliability.
[0066] like Figure 3As shown in the figure, assuming that NC1 needs to send data to NT2, the forward ring network follows NC1->NT1->Switch->NT2, and the reverse ring network NC1->NT2. NT2 will directly use the data of the reverse ring network. The data flow of NT2 sending data to NC1 is similar and will not be repeated here.
[0067] Assume that there are 5 nodes (node number n) in a one-way ring network, namely NC->NT1->NT2->NT3->NT4->NC, and assume that the forwarding delay of each node is fixed at 1μs. The maximum delay from NC to all nodes in the one-way ring network is NT4, and the maximum delay is 1μs×(n-2). The maximum delay in the one-way ring network with 5 nodes is 3μs. After adopting a two-way ring network, NT2<->NT1<->NC<->NT3<->NT4<->NT2 (node NC is in the middle of the two-way ring network). In the two-way ring network, the maximum delay from node NC to all nodes in the network is 1μs×(n-2) / 2 (the calculated value is rounded), and the maximum delay in the two-way ring network with 5 nodes is 1μs.
[0068] The number of network nodes is n, and the delay ratio of the bidirectional ring network to the unidirectional ring network is as follows: when n is an even number, the delay ratio is 1 / 2, that is, the delay of the bidirectional ring network is reduced by one time; if n is an odd number, the delay ratio is (n-2) / 2, that is, the delay of the bidirectional ring network is reduced by more than one time. In other words, in the worst case, the delay of the bidirectional ring network is reduced by one time.
[0069] The bidirectional ring network provided by the embodiment of the present invention is connected in a ring shape by setting up multiple nodes, and setting a first port and a second port in each node, each port including a receiving interface and a sending interface; then for each node: the forward data of the upstream node is received through the receiving interface of the first port, and the forward data is sent to the downstream node via the sending interface of the first port, the receiving interface of the second port and the sending interface of the second port in sequence; the reverse data of the downstream node is received through the receiving interface of the second port, and the reverse data is sent to the upstream node via the sending interface of the second port, the receiving interface of the first port and the sending interface of the first port in sequence, thereby forming a bidirectional ring network structure, which can transmit data in the forward and reverse directions at the same time, avoiding the paralysis of the entire network when a node fails, and ensuring the reliability and stability of the ring network.
[0070] For nodes in the ring network that are switches, see Figure 4 , the first port includes: a first data frame receiving module 401, a first routing address query module 402, a first data frame selecting module 403 and a first data frame sending module 404;
[0071] Receive a data frame of forward data from an upstream node through a receiving interface of the first port, and send the data frame to a first data frame receiving module 401;
[0072] Sending the data frame of the forward data to the first routing address query module 402 through the first data frame receiving module 401;
[0073] Determine whether the address of the current data frame belongs to the ring network or the switching network through the first routing address query module 402, and send the data frame to the first data frame selection module 403 through the first routing address query module 402 when it is determined that the address of the data frame belongs to the ring network;
[0074] The data frame is sent to the sending interface of the first port via the first data frame sending module 404 through the first data frame selecting module 403, and the forward data is sent to the downstream node via the receiving interface of the second port and the sending interface of the second port in sequence.
[0075] Similar to the first port, the second port includes: a second data frame receiving module, a second routing address query module, a second data frame selecting module and a second data frame sending module;
[0076] receiving a data frame of reverse data of a downstream node through a receiving interface of the second port, and sending the data frame to a second data frame receiving module;
[0077] Sending the data frame of the reverse data to the second routing address query module through the second data frame receiving module;
[0078] Determine whether the address of the current data frame belongs to a ring network or a switching network through a second routing address query module, and send the data frame to the data frame selection module through the second routing address query module when it is determined that the address of the data frame belongs to the ring network;
[0079] The data frame is sent to the sending interface of the second port via the second data frame sending module through the second data frame selection module, and the reverse data is sent to the upstream node via the receiving interface of the first port and the sending interface of the first port in sequence.
[0080] Furthermore, the forward data includes a plurality of serial data frames. Figure 4 The first port includes: a first serial-to-parallel conversion module 405 and a first parallel-to-serial conversion module 406. The first serial-to-parallel conversion module 405 is respectively connected to the receiving interface of the first port and the first data frame receiving module 401, and the first parallel-to-serial conversion module 406 is respectively connected to the first data frame sending module 404 and the sending interface of the first port.
[0081] When a serial data frame of forward data from an upstream node is received, the serial data frame is sent to the first serial-to-parallel conversion module 405 , and the first serial-to-parallel conversion module 405 converts the serial data frame into a 32-bit parallel data frame.
[0082] When parallel data frames are received by the first data frame sending module 404 , the parallel data frames are converted into serial data frames by the first parallel-to-serial conversion module 406 , and the converted serial data frames are sent to the sending interface of the first port.
[0083] In this embodiment, the first serial-to-parallel conversion module 405 converts the serial data frame into a 32-bit parallel data frame, and the first parallel-to-serial conversion module 406 converts the 32-bit parallel data frame into a serial data frame.
[0084] Correspondingly, the reverse data also includes a plurality of serial data frames. The second port includes: a second serial-to-parallel conversion module and a second parallel-to-serial conversion module, whose functions are the same as the first serial-to-parallel conversion module 405 and the first parallel-to-serial conversion module 406 of the first port, and will not be described in detail here.
[0085] Furthermore, the structure of the switch in the embodiment of the present invention is as follows: Figure 5 As shown in the figure, the switching module as the core of the switch adopts the CrossBar structure, and the switching network port F_port mainly realizes the sending and receiving functions of the switching network data frame and is used to connect other nodes in the switching network.
[0086] The CrossBar structure is part of the core of the FC switch, which allows multiple ports to transmit data simultaneously, greatly improving the throughput and efficiency of the network. The CrossBar module supports full-duplex communication through an efficient data path design, ensuring low latency and high reliability when transmitting data between different ports inside the switch.
[0087] The switch also includes: a distribution module fc2m, the first port FL_Port_0 and the second port FL_Port_1 of the switch are both connected to the distribution module fc2m; a switching interface CBn, the distribution module fc2m and each switching network port F_port_0~F_port_n are all connected to the corresponding switching interface CB0~CBn; the switching module CrossBar is used to determine the communication between the switching interfaces CB0~CBn.
[0088] The distribution module uses the fc2m (Fiber Channel to Multiplexer) module, which allows multiple FC devices or links to share a single physical connection or channel. This multiplexing technology can improve the efficiency and flexibility of the network, especially when multiple data streams need to be merged into one transmission medium.
[0089] When it is determined by the first routing address query module 402 that the address of the data frame belongs to the switching network, the data frame is sent to the distribution module fc2m through the first routing address query module 402, and the data frame is sent to the corresponding switching interface via the distribution module fc2m.
[0090] The first routing address query module 402 determines whether the currently received FC data frame belongs to a ring network or a switching network according to the software configuration. The FC data frame belonging to the switching network is output to the distribution module fc2m through the locally received FC frame channel; the FC data frame belonging to the ring network is output to the first port FL_Port_0 and the second port FL_Port_1 of the switch through the FC frame channel to be forwarded.
[0091] The switching interface CBn of the target node corresponding to the data frame is determined through the switching module CrossBar, and the data frame is sent to the target node n through the switching interface CBn of the target node and the switching network port F_port_n.
[0092] When the distribution module fc2m receives local data frames sent by other nodes in the switching network to the nodes in the ring network, the distribution module fc2m simultaneously sends the local data frames to the first port FL_Port_0 and the second port FL_Port_1 to achieve simultaneous forward and reverse transmission of the local data frames.
[0093] Through the above structure, the switching module CrossBar sends the FC data frame that needs to be sent to the ring network to the distribution module fc2m through the switching interface CB0, and the distribution module fc2m sends one FC data frame to the first port FL_Port0 and the second port FL_Port_1 at the same time. The FC data frame (ID belongs to the ring network) that needs to be forwarded received by the first port FL_Port_0 is sent to the sending interface of the second port FL_Port_1, and the data frame is sent by the second port FL_Port_1; the FC frame (ID belongs to the ring network) that needs to be forwarded received by the second port FL_Port_1 is sent to the sending interface of the first port FL_Port_0, and the data frame is sent by the first port FL_Port_0.
[0094] In the case where the local data frame and the data frame of the forward data are received by the first data frame selection module, the data frame of the forward data is set to a higher priority by the first data frame selection module for transmission.
[0095] Further, see Figure 4 and Figure 5 ,The process of sending data from a node in the ring network to a node in the switching network is as follows:
[0096] 1) The first port FL_Port_0 or the second port FL_Port_1 first determines whether the destination address of the received FC data frame is a node address in the switching network. When the destination ID in the FC data frame still belongs to the ring network node, the FC frame (ID belongs to the ring network) that needs to be forwarded received by the first port FL_Port_0 is sent to the FC data frame interface that needs to be forwarded of the second port FL_Port_1, and is sent by the second port FL_Port_1. The FC data frame (ID belongs to the ring network) that needs to be forwarded received by the second port FL_Port_1 is sent to the sending interface of the first port FL_Port_0, and is sent by the first port FL_Port_0. Then the first port FL_Port_0 or the second port FL_Port_1 directly forwards the FC data frame;
[0097] 2) When the destination ID is input into the switching network domain, the first port FL_Port_0 or the second port FL_Port_1 outputs the FC data frame to the distribution module fc2m. The distribution module fc2m performs redundancy removal on the received FC data frame and outputs one FC data frame to the switching module CrossBar.
[0098] 3) The core switching module CrossBar receives the FC data frame from the switching interface CB0 and outputs it to the switching network ports F_Port_0~F_Port_5 according to the routing switching.
[0099] The process of sending data from a node in a switching network to a node in a ring network is as follows:
[0100] 1) The FC data frames received by the switching network ports F_Port_0~F_Port_5 are input to the switching module CrossBar;
[0101] 2) The switching module CrossBar forwards the FC frame to the switching interface CB0 through a routing table lookup, and then sends it from the switching interface CB0 to the distribution module fc2m;
[0102] 3) The distribution module fc2m redundantly sends the FC data frame from the switching interface CB0 and outputs it to the first port FL_Port_0 or the second port FL_Port_1 at the same time. The first port FL_Port_0 and the second port FL_Port_1 send the FC data frame at the same time to achieve simultaneous sending of forward and reverse data.
[0103] Compared with the prior art, the beneficial effects are as follows:
[0104] 1) The communication reliability of the bidirectional ring network is improved;
[0105] 2) The maximum network delay of the bidirectional ring network is reduced by half;
[0106] 3) Bidirectional ring network and switching network interconnection to improve system communication reliability;
[0107] 4) The topology of bidirectional ring network + switching network can reduce the number of switches and ports in the system network (nodes in the ring network are connected to the switching network through 2 ports, and no new switches are required), reducing system costs.
[0108] Figure 6 FIG. 1 is a flow chart of a communication method of a bidirectional ring network provided by an embodiment of the present invention. Figure 6 As shown, the method is used for each node and includes the following:
[0109] Step 601: Receive forward data from an upstream node through the receiving interface of the first port of the node, and send the forward data to a downstream node via the sending interface of the first port of the node, the receiving interface of the second port of the node, and the sending interface of the second port of the node in sequence.
[0110] Step 602: Receive reverse data from a downstream node through the receiving interface of the second port of the node, and send the reverse data to an upstream node via the sending interface of the second port of the node, the receiving interface of the first port of the node, and the sending interface of the first port of the node in sequence.
[0111] The forward data is the same as the reverse data.
[0112] Optionally, when the node is a switch, the first port includes: a first data frame receiving module, a first routing address query module, a first data frame selecting module and a first data frame sending module; step 601 specifically includes:
[0113] receiving a data frame of forward data of an upstream node through a receiving interface of the first port, and sending the data frame to a first data frame receiving module;
[0114] Sending the data frame of the forward data to the first routing address query module through the first data frame receiving module;
[0115] Determine whether the address of the current data frame belongs to a ring network or a switching network through the first routing address query module, and send the data frame to the first data frame selection module through the first routing address query module when it is determined that the address of the data frame belongs to the ring network;
[0116] The data frame is sent to the sending interface of the first port via the first data frame sending module through the first data frame selection module, and the forward data is sent to the downstream node via the receiving interface of the second port and the sending interface of the second port in sequence.
[0117] Specifically, the second port includes: a second data frame receiving module, a second routing address query module, a second data frame selection module and a second data frame sending module; step 602 specifically includes:
[0118] receiving a data frame of reverse data of a downstream node through a receiving interface of the second port, and sending the data frame to a second data frame receiving module;
[0119] Sending the data frame of the reverse data to the second routing address query module through the second data frame receiving module;
[0120] Determine whether the address of the current data frame belongs to a ring network or a switching network through a second routing address query module, and send the data frame to the data frame selection module through the second routing address query module when it is determined that the address of the data frame belongs to the ring network;
[0121] The data frame is sent to the sending interface of the second port via the second data frame sending module through the second data frame selection module, and the reverse data is sent to the upstream node via the receiving interface of the first port and the sending interface of the first port in sequence.
[0122] The communication method of the bidirectional ring network provided by the embodiment of the present invention is achieved by setting up multiple nodes to be connected in a ring shape, and setting a first port and a second port in each node, each port including a receiving interface and a sending interface; then for each node: receiving forward data of the upstream node through the receiving interface of the first port, and sending the forward data to the downstream node via the sending interface of the first port, the receiving interface of the second port and the sending interface of the second port in sequence; receiving reverse data of the downstream node through the receiving interface of the second port, and sending the reverse data to the upstream node via the sending interface of the second port, the receiving interface of the first port and the sending interface of the first port in sequence, thereby forming a bidirectional ring network structure, which can transmit data in the forward and reverse directions at the same time, avoiding the paralysis of the entire network when a node fails, and ensuring the reliability and stability of the ring network.
[0123] The following describes a switch supporting a bidirectional ring network provided by an embodiment of the present invention. The switch supporting a bidirectional ring network described below and the bidirectional ring network described above can refer to each other.
[0124] The embodiment of the present invention provides a switch supporting a bidirectional ring network, such as Figure 4 As shown, it includes a first port and a second port, each port includes a receiving interface and a sending interface;
[0125] Receiving forward data from an upstream node through the receiving interface of the first port, and sending the forward data to a downstream node via the sending interface of the first port, the receiving interface of the second port, and the sending interface of the second port in sequence;
[0126] Reverse data of a downstream node is received through the receiving interface of the second port, and the reverse data is sent to an upstream node via the sending interface of the second port, the receiving interface of the first port, and the sending interface of the first port in sequence; wherein the forward data is the same as the reverse data.
[0127] Regarding the structure of the switch, in the aforementioned embodiments and Figure 4 and 5 This has been described in detail in the text, so I will not repeat it here.
[0128] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A bidirectional ring network, characterized in that: It includes a plurality of nodes connected in a ring shape, each node includes a first port and a second port, and each port includes a receiving interface and a sending interface; For each node: Receiving forward data from an upstream node through the receiving interface of the first port, and sending the forward data to a downstream node via the sending interface of the first port, the receiving interface of the second port, and the sending interface of the second port in sequence; Receiving reverse data of a downstream node through the receiving interface of the second port, and sending the reverse data to an upstream node via the sending interface of the second port, the receiving interface of the first port, and the sending interface of the first port in sequence; wherein the forward data is the same as the reverse data; The node is a switch, and the first port includes: a first data frame receiving module, a first routing address query module, a first data frame selecting module, and a first data frame sending module; receiving a data frame of forward data of an upstream node through a receiving interface of the first port, and sending the data frame to a first data frame receiving module; Sending the data frame of the forward data to the first routing address query module through the first data frame receiving module; Determine whether the address of the current data frame belongs to a ring network or a switching network through the first routing address query module, and send the data frame to the first data frame selection module through the first routing address query module when it is determined that the address of the data frame belongs to the ring network; Sending the data frame to the sending interface of the first port via the first data frame sending module through the first data frame selection module, and sending the forward data to the downstream node via the receiving interface of the second port and the sending interface of the second port in sequence; The node is a switch, and the second port includes: a second data frame receiving module, a second routing address query module, a second data frame selecting module and a second data frame sending module; receiving a data frame of reverse data of a downstream node through a receiving interface of the second port, and sending the data frame to a second data frame receiving module; Sending the data frame of the reverse data to the second routing address query module through the second data frame receiving module; Determine whether the address of the current data frame belongs to a ring network or a switching network through a second routing address query module, and send the data frame to the data frame selection module through the second routing address query module when it is determined that the address of the data frame belongs to the ring network; Sending the data frame to the sending interface of the second port via the second data frame sending module through the second data frame selection module, and sending the reverse data to the upstream node via the receiving interface of the first port and the sending interface of the first port in sequence; The forward data includes a plurality of serial data frames; The first port comprises: a first serial-to-parallel conversion module and a first parallel-to-serial conversion module, the first serial-to-parallel conversion module is respectively connected to the receiving interface of the first port and the first data frame receiving module, and the first parallel-to-serial conversion module is respectively connected to the first data frame sending module and the sending interface of the first port; When the serial data frame is received by the first data frame receiving module, the serial data frame is sent to the first serial-to-parallel conversion module, and the first serial-to-parallel conversion module converts the serial data frame into a parallel data frame; When the parallel data frames are received by the first data frame sending module, the parallel data frames are converted into serial data frames by the first parallel-to-serial conversion module, and the converted serial data frames are sent to the sending interface of the first port.
2. The bidirectional ring network according to claim 1, characterized in that: The switch further comprises: a distribution module, the first port and the second port of the switch are both connected to the distribution module; Switching network port, used to connect to other nodes in the switching network; A switching interface, wherein the distribution module and each switching network port are connected to a corresponding switching interface; A switching module, the switching module is used to determine the communication between the switching interfaces; In the case where it is determined through the first routing address query module that the address of the data frame belongs to the switching network, the data frame is sent to the distribution module through the first routing address query module, and the data frame is sent to the corresponding switching interface via the distribution module; The switching module determines the switching interface of the target node corresponding to the data frame, and sends the data frame to the target node through the switching interface of the target node and the switching network port.
3. The bidirectional ring network according to claim 2, characterized in that: The switch also includes: when receiving local data frames sent by other nodes in the switching network to nodes in the ring network through the distribution module, the local data frames are simultaneously sent to the first port and the second port through the distribution module to achieve simultaneous forward and reverse sending of the local data frames.
4. The bidirectional ring network according to claim 3, characterized in that: In the case where the local data frame and the data frame of the forward data are received by the first data frame selection module, the data frame of the forward data is set with a higher priority by the first data frame selection module for transmission.
5. A communication method for a bidirectional ring network, characterized in that: For use in a bidirectional ring network according to any one of claims 1 to 4, the communication method comprises: For each node: Receive forward data from an upstream node through a receiving interface of the first port of the node, and send the forward data to a downstream node via a sending interface of the first port of the node, a receiving interface of the second port of the node, and a sending interface of the second port of the node in sequence; Reverse data of a downstream node is received through the receiving interface of the second port of the node, and the reverse data is sent to an upstream node via the sending interface of the second port of the node, the receiving interface of the first port of the node, and the sending interface of the first port of the node in sequence; wherein the forward data is the same as the reverse data.
6. The communication method of the bidirectional ring network according to claim 5, characterized in that: The node is a switch, and the first port includes: a first data frame receiving module, a first routing address query module, a first data frame selecting module, and a first data frame sending module; Receiving forward data from an upstream node through a receiving interface of the first port, and sequentially sending the forward data to a downstream node through a sending interface of the first port, a receiving interface of the second port, and a sending interface of the second port, specifically includes: receiving a data frame of forward data of an upstream node through a receiving interface of the first port, and sending the data frame to a first data frame receiving module; Sending the data frame of the forward data to the first routing address query module through the first data frame receiving module; Determine whether the address of the current data frame belongs to a ring network or a switching network through the first routing address query module, and send the data frame to the first data frame selection module through the first routing address query module when it is determined that the address of the data frame belongs to the ring network; The data frame is sent to the sending interface of the first port via the first data frame sending module through the first data frame selection module, and the forward data is sent to the downstream node via the receiving interface of the second port and the sending interface of the second port in sequence.
7. A switch supporting a bidirectional ring network, characterized in that: Used in a bidirectional ring network as claimed in any one of claims 1 to 4, comprising a first port and a second port, each port comprising a receiving interface and a sending interface; Receiving forward data from an upstream node through the receiving interface of the first port, and sending the forward data to a downstream node via the sending interface of the first port, the receiving interface of the second port, and the sending interface of the second port in sequence; Reverse data of a downstream node is received through the receiving interface of the second port, and the reverse data is sent to an upstream node via the sending interface of the second port, the receiving interface of the first port, and the sending interface of the first port in sequence; wherein the forward data is the same as the reverse data.
Citation Information
Patent Citations
Two-way loop network system and its control method
CN101262406A
Fault processing method and device for ring topology networking communication, and storage medium
CN113055227A