[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN112637052B - Switching method, switching device, ring network, electronic equipment and storage medium - Google Patents

Switching method, switching device, ring network, electronic equipment and storage medium Download PDF

Info

Publication number
CN112637052B
CN112637052B CN202011513809.6A CN202011513809A CN112637052B CN 112637052 B CN112637052 B CN 112637052B CN 202011513809 A CN202011513809 A CN 202011513809A CN 112637052 B CN112637052 B CN 112637052B
Authority
CN
China
Prior art keywords
port
node
state
common node
identity
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.)
Active
Application number
CN202011513809.6A
Other languages
Chinese (zh)
Other versions
CN112637052A (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.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication 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 Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN202011513809.6A priority Critical patent/CN112637052B/en
Publication of CN112637052A publication Critical patent/CN112637052A/en
Application granted granted Critical
Publication of CN112637052B publication Critical patent/CN112637052B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • 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)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application provides a switching method, a ring network, a device, electronic equipment and a storage medium, wherein the method is applied to a common node connected with a neighbor node in the ring network, and the common node comprises a first port and a second port; the common node is connected with the neighbor node through a first port; the ring network also comprises a main node connected with the neighbor node; the main node is connected to the second port; the method comprises the following steps: receiving a first identity switch request; the first identity switching request represents that the master node and the identity of the master node need to be switched; after the main node is configured as a new main node, if the first port is in a blocking state, the second port is in a conducting state, and the main node is in a loading state, an NRRB message of no-response loop protection link blocking is sent through the second port, so that the main node can receive the NRRB message after being configured as a new common node; the state of the ring network is changed into a dormant state, so that the normal operation of the ring network can be ensured when the identities of the nodes in the ring network are switched.

Description

Switching method, switching device, ring network, electronic equipment and storage medium
Technical Field
The present application relates to the field of network communication technologies, and in particular, to a handover method, an apparatus, a ring network, an electronic device, and a storage medium.
Background
An Ethernet Ring Protection Switching (ERPS) protocol is a two-layer loop-breaking protocol standard defined by the International Telecommunication Union Telecommunication Standardization organization (International Telecommunication Union-Telecommunication Standardization Sector, ITU-T), and has a protocol standard number of ITU-T g.8032/Y1344, also called g.8032.
The g.8032 protocol has the advantages of high reliability and stability, and can prevent data loop broadcast storm when the ethernet ring network is complete, and can quickly recover the communication path between each node on the ring network when the link of the ethernet ring network fails, and has higher convergence speed. Meanwhile, if the devices in the ring network all support the protocol, the intercommunication can be realized; wherein, the looped netowrk includes: the system comprises a main node, at least one common node and a neighbor node which is respectively connected with the main node and the common node;
the G8032 protocol has the disadvantages that a user needs to select a role for each device in the ring network and configure the G8032 protocol, and if the configuration is unreasonable, the ring network cannot normally operate, and the configuration of the device in the ring network needs to be modified when the network topology changes.
According to the standard issued by < < ITU-T G.8032/Y.1344> (08/2015), if a common node connected to a neighbor node in a Ring network is configured as a new master node, and the new master node receives an No Request Ring Protection Link Blocked (NRRB) message sent by a historical master node in the Ring network in a loading state, the new master node closes a timer and switches to a dormant state, at this time, if the historical master node is configured as a new common node, the new common node is in the loading state, and because the new master node does not send the NRRB message after the timer is closed to be in the dormant state, the new common node cannot receive the NRRB message, so that the new common node is always in the loading state, and finally the Ring network cannot normally operate.
Disclosure of Invention
In view of the above, an object of the embodiments of the present application is to provide a switching method, an apparatus, a ring network, an electronic device and a storage medium, so as to solve the above problems.
In a first aspect, an embodiment of the present application provides a handover method, which is applied to a common node connected to a neighboring node in a ring network, where the common node includes a first port and a second port, and the common node is connected to the neighboring node through the first port; the ring network also comprises a main node connected with the neighbor node; the main node is connected with the second port; the method comprises the following steps: receiving a first identity switch request; the first identity switching request represents that the main node and the identity of the main node need to be switched; after the host node is configured as a new host node, if the first port is in a blocking state, the second port is in a conducting state, and the host node is in a loading state, sending an NRRB message of no-response loop protection link blocking through the second port, so that the host node can receive the NRRB message after being configured as a new common node; and changing the state of the self-body from the loading state to the sleeping state.
In the implementation process, after the host node is configured as a new host node, if the first port is in a blocking state, the second port is in a conducting state, and the host node is in a loading state, the NRRB message is sent through the second port, so that after the host node is configured as a new common node, the NRRB message can be received, and then it is ensured that the new common node can become a dormant state, and meanwhile, the ring network can be finally ensured to normally operate by changing the state of the host node into the dormant state.
Based on the first aspect, in a possible design, if the first port is in a blocking state, the second port is in a conducting state, and the second port is in a loading state, and sending an NRRB packet for loop protection link blocking without response through the second port includes: starting a timer to start timing under the conditions that the first port is in a blocking state and the second port is in a conducting state, and changing the self state from an initialization state to a loading state; when the timing duration of the timer reaches a preset time threshold, the NRRB message is sent through the second port; correspondingly, after the NRRB packet is sent through the second port, the method further includes: the timer is turned off.
In order to ensure that the master node can receive the NRRB message after being configured as the new normal node, in the implementation process, under the condition that the first port is in a blocking state and the second port is in a conducting state, a timer is started to start timing, the state of the master node is changed from an initialization state to a loading state, and the NRRB message is sent through the second port when the timing duration of the timer reaches a preset time threshold, so that the master node is prevented from receiving the NRRB message sent by the new master node before being configured as the new normal node, and finally the NRRB message can be received after being configured as the new normal node.
In a possible design based on the first aspect, before the starting the timer to start timing, the method further includes blocking the first port when it is determined that the first port is in a conducting state; opening the second port upon determining that the second port is in a blocked state.
In the implementation process, by the mode, the first port is in the blocking state before the timer starts to time, the second port is in the opening state, and then the NRRB message is sent to a new common node when the time length reaches the preset time threshold, and meanwhile, the looped network is prevented from looping by blocking the first port.
Based on the first aspect, in a possible design, before the sending the NRRB packet via the second port, the method further includes: and when the first port is in a blocking state, the second port is in a conducting state and is in an initialization state, sending an no-response NR message through the second port.
In the implementation process, when the first port is in a blocking state, the second port is in a conducting state, and the first port and the second port are in an initialization state, the second port sends the NR packet, so that the other nodes in the ring network can perform corresponding operations on the ports of the first port and the second port according to the NR packet, and the flow in the ring network can be normally forwarded.
In a second aspect, an embodiment of the present application provides a handover method, which is applied to a master node in a ring network, where the master node includes: a third port and a fourth port; still include in the looped netowrk: the system comprises a neighbor node connected with the main node and a common node connected with the neighbor node; the neighbor node is respectively connected with the fourth port and the common node, and the third port is connected with the common node; the method comprises the following steps: receiving a second identity switching request; wherein the second identity handover request represents that the identities of the master node and the common node need to be handed over, and the second identity handover request includes: configuration information; after the common node is configured as a new node, configuring the common node as the new common node according to the configuration information; when the third port is in a blocking state, the fourth port is in a conducting state, and the fourth port is in a loading state, receiving an NRRB message which is sent by the new main node and is blocked by the no-response loop protection link; and changing the state of the self-body from the loading state to the sleeping state.
In the implementation process, under the condition that a new host node exists in the ring network, the host node is configured as a new common node according to configuration information so as to avoid the subsequent abnormal operation of the ring network, and secondly, the third port is in a blocking state, the fourth port is in a conducting state, and the host node is in a loading state, receives an NRRB message sent by the new host node so as to ensure that the state of the host node can be successfully changed into a dormant state, and finally, the normal operation of the ring network is ensured.
In a third aspect, an embodiment of the present application provides a switching apparatus, which is applied to a common node connected to a neighboring node in a ring network, where the common node includes a first port and a second port, and the common node is connected to the neighboring node through the first port; the ring network also comprises a main node connected with the neighbor node; the main node is connected with the second port; the device comprises: a first receiving unit, configured to receive a first identity handover request; the first identity switching request represents that the main node and the identity of the main node need to be switched; a first sending unit, configured to send, after configuring itself as a new master node, an NRRB message blocked by an unanswered loop protection link through a second port if the first port is in a blocking state, the second port is in a conducting state, and the first port is in a loading state, so that the NRRB message can be received after configuring itself as a new normal node; and the first changing unit is used for changing the state of the first changing unit from the loading state to the sleeping state.
Based on the third aspect, in a possible design, the first sending unit is specifically configured to start a timer to start timing and change the state of the first sending unit from an initialization state to a loading state under the condition that the first port is in a blocking state and the second port is in a conducting state; when the timing duration of the timer reaches a preset time threshold, the NRRB message is sent through the second port; correspondingly, the device further comprises: and the closing unit is used for closing the timer.
In a possible design based on the third aspect, the apparatus further includes: a port operation unit for blocking the first port when it is determined that the first port is in a conducting state; and opening the second port upon determining that the second port is in a blocked state.
In a possible design based on the third aspect, the apparatus further includes: and the second sending unit is used for sending the no-response NR message through the second port when the first port is in a blocking state, the second port is in a conducting state and the second port is in an initialization state.
In a fourth aspect, an embodiment of the present application provides a switching apparatus, which is applied to a master node in a ring network, where the master node includes: a third port and a fourth port; still include in the looped netowrk: the system comprises a neighbor node connected with the main node and a common node connected with the neighbor node; the neighbor node is respectively connected with the fourth port and the common node, and the third port is connected with the common node; the device comprises: a second receiving unit, configured to receive a second identity switching request; wherein the second identity handover request represents that the identities of the master node and the common node need to be handed over, and the second identity handover request includes: configuration information; the configuration unit is used for configuring the common node as a new common node according to the configuration information after the common node is configured as the new node; a third receiving unit, configured to receive an NRRB message, which is sent by the new master node and is blocked by the non-reply loop protection link, when the third port is in a blocking state, the fourth port is in a conducting state, and the third receiving unit is in a loading state; and the second change unit is used for changing the state of the second change unit from the loading state to the sleeping state.
In a fifth aspect, an embodiment of the present application provides a ring network, where the ring network includes: the system comprises a main node, a neighbor node and a common node connected with the main node and the neighbor node; the common node includes: a first port and a second port; the master node includes: a third port and a fourth port; the neighbor nodes are respectively connected with the first port and the fourth port; the second port is connected with the third port; the common node is used for receiving a first identity switching request; wherein the first identity switching request represents that the identities of the master node and the common node need to be switched; the ordinary node is further configured to send an NRRB message for non-reply loop protection link blocking through the second port if the first port is in a blocking state, the second port is in a conducting state, and the ordinary node is in a loading state after the ordinary node is configured as a new master node; the common node is also used for changing the self state from a loading state to a sleeping state; the main node is used for receiving a second identity switching request; wherein the second identity handover request represents that the identities of the master node and the common node need to be handed over, and the second identity handover request includes: configuration information; the master node is further configured to configure itself as a new common node according to the configuration information after the common node is configured as the new node; the master node is further configured to receive the NRRB message when the third port is in a blocking state, the fourth port is in a conducting state, and the master node is in a loading state; the main node is also used for changing the self state from the loading state to the sleeping state.
In a sixth aspect, an embodiment of the present application provides an electronic device, including a processor and a memory connected to the processor, where a computer program is stored in the memory, and when the computer program is executed by the processor, the electronic device is caused to perform the method of the first aspect or the second aspect.
In a seventh aspect, an embodiment of the present application provides a storage medium, where a computer program is stored, and when the computer program runs on a computer, the computer is caused to execute the method of the first aspect or the second aspect.
Additional features and advantages of the present application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the embodiments of the present application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic structural diagram of a ring network provided in an embodiment of the present application.
Fig. 2 is a schematic flowchart of a handover method according to an embodiment of the present application.
Fig. 3 is a schematic structural diagram of a switching device according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of another switching device according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Icon: 310-a first receiving unit; 320-a first sending unit; 330-a first modification unit; 410-a second receiving unit; 420-a configuration unit; 430-a third receiving unit; 440-a second modification unit; 500-an electronic device; 501, a processor; 502-a memory; 503-port.
Detailed Description
The technical solution in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a ring network provided in an embodiment of the present application, where the ring network includes: the system comprises a main node, a neighbor node connected with the main node and a common node connected with the neighbor node; the common node includes: a first port and a second port; the master node includes: a third port and a fourth port (it is understood that the fourth port belongs to a Ring Protection Link (RPL) Owner port); the neighbor node includes: a fifth port and a sixth port; the fifth port is connected with the fourth port; the sixth port is connected with the first port; the two ports are connected with the third port.
The common node is used for receiving a first identity switching request; the first identity switch request represents that the identities of the master node and the common node need to be switched.
The ordinary node is further configured to send an No response Ring Protection Link Blocked (NRRB) packet through the second port if the first port is in a blocking state, the second port is in a conducting state, and the ordinary node is in a loading state after the ordinary node is configured as a new master node.
And the common node is also used for changing the state of the common node from a loading state to a sleeping state.
The main node is used for receiving a second identity switching request; wherein the second identity handover request represents that the identities of the master node and the common node need to be handed over, and the second identity handover request includes: and configuring information.
The master node is further configured to configure itself as a new common node according to the configuration information after the common node is configured as the new node.
The master node is further configured to receive the NRRB message when the third port is in a blocking state, the fourth port is in a conducting state, and the master node is in a loading state.
The main node is also used for changing the self state from the loading state to the sleeping state.
In other embodiments, the number of the common nodes in the ring network may also be at least two.
Referring to fig. 2, fig. 2 is a flowchart of a handover method according to an embodiment of the present application, where the method is applied to a ring network shown in fig. 1, and the flow shown in fig. 2 will be described in detail below, where the method includes the steps of: s21, S22, S23, S24, S25, S26, and S27.
It should be noted that, when the number of the common nodes in the ring network is at least two, the switching method shown in fig. 2 is only applied to the common nodes connected to the neighboring nodes in the ring network and the master node.
S21: the common node receives a first identity switching request; the first identity switch request represents that the identities of the master node and the common node need to be switched.
In practical implementation, S21 may be implemented as follows, and the ordinary node receives the first identity switch request in real time or irregularly.
The first port of the common node itself is configured to be a PRL Owner port, and therefore, in a case that the first port of the common node itself is configured to be the PRL Owner port, the common node itself is configured to be a new host node.
S22: and the common node responds to the first identity switching request, and after the common node is configured as a new main node, if the first port is in a blocking state, the second port is in a conducting state, and the common node sends an NRRB message through the second port under the condition that the common node is in a loading state.
It should be noted that, for any port in the ring network, when the port is in the blocking state, the port can receive the message, but cannot send the message through the port.
Otherwise, when the port is in a conducting state, the message can be received through the port, and the message can also be sent through the port.
As an implementation manner, if the first port is in a blocking state, the second port is in a conducting state, and the second port is in a loading state, the sending an NRRB message through the second port includes: a1 and a 2.
A1: after the common node is configured as a new master node, and under the condition that the first port is in a blocking state and the second port is in a conducting state, a timer is started to start timing, and the state of the common node is changed from an initialization state to a loading state.
In practical implementation, a1 may be implemented in such a way that, after the normal node itself is configured as a new master node, the normal node first changes its state to an initialization state, determines whether the first port is in a blocking state, determines whether the second port is in a conducting state, and then starts a timer to start timing and changes its state from the initialization state to a loading state if it is determined that the first port is in the blocking state and the second port is in the conducting state.
A2: and when the timing duration of the timer reaches a preset time threshold, sending the NRRB message through the second port.
In this embodiment, the preset time threshold is 5 minutes, and in other embodiments, the preset time threshold may also be other values, where the preset time threshold is greater than a time length required by the master node to be configured as a new common node, the longer the preset time threshold is, the more the master node is configured as a new common node, the longer the preset time threshold is, the longer the time length that the new common node is in the loading state is.
In an actual implementation process, a2 may be implemented in such a manner that, when it is determined that the timing duration of the timer reaches a preset time threshold, an NRRB message is generated, and the NRRB message is sent through the second port.
It should be noted that, the NRRB message in step a2 may also be generated before the timing duration reaches the preset time threshold.
Correspondingly, after the NRRB packet is sent through the second port, the method further includes: the timer is turned off.
It will be appreciated that the timer stops after it is turned off.
As an implementation manner, S22 may be implemented in such a way that, after a normal node is configured as a new master node, if the first port is in a blocking state, the second port is in an on state, and the normal node is in a loading state, an NRRB message is sent through the first port indefinitely, it is understood that, after the NRRB message is sent through the first port once, sending of the NRRB message is stopped, and step S23 is executed.
After the general node transmits the NRRB message, step S23 is performed.
S23: the ordinary node changes the state of the ordinary node from a loading state to a sleeping state.
The execution order of S23 and S24 is not limited.
S24: the main node receives a second identity switching request; wherein the second identity handover request represents that the identities of the master node and the common node need to be handed over, and the second identity handover request includes: and configuring information.
In an actual implementation process, S24 may be implemented in such a way that the master node receives the second identity switching request only when a new master node exists in the ring network.
It can be understood that, when the master node receives the second identity switching request, it is considered that a new master node already exists in the ring network.
After the master node receives the second identity switching request, step S25 is performed.
S25: and after the common node is configured as a new node, the master node configures itself as the new common node according to the configuration information.
In an actual implementation process, the step S25 may be implemented in such a manner that, after the common node is configured as a new node, the master node extracts configuration information from the second identity switching request, and then configures its own port according to the configuration information, so as to configure itself as a new common node.
As an example, the master node may be configured as a new general node, and the fourth port may not belong to the PRL Owner port, and the state of the master node may be changed to the initialization state.
The specific implementation of the master node configuring itself as a new and common node according to the configuration information is well known in the art, and therefore, the details are not described herein.
After the master node becomes a new ordinary node, step S26 is executed.
S26: and the master node is in a blocking state at the third port, is in a conducting state at the fourth port, and receives the NRRB message sent by the new master node when the master node is in a loading state.
In an actual implementation process, the step S26 may be implemented in such a manner that the master node determines whether the third port is in a blocking state, determines whether the fourth port is in a conducting state, and receives, through the fourth port, an NRRB message sent by a new master node when determining that the third port is in the blocking state, the fourth port is in the conducting state, and the master node is in a loading state.
As an implementation manner, S26 may be implemented in such a manner that the master node determines whether the third port is in a blocking state, blocks the third port when it is determined that the third port is in a conducting state, determines whether the fourth port is in a conducting state, opens the fourth port when it is determined that the fourth port is in a blocking state, changes its state from an initialization state to a loading state, and receives, through the fourth port, an NRRB message sent by a new master node in the loading state.
After the master node receives the NRRB message sent by the new master node, step S27 is executed.
S27: the master node changes its state from the load state to the sleep state.
As an embodiment, after S26, the method further includes: and the main node opens the third port so as to enable the third port to be in a conducting state.
As an embodiment, before the starting the timer to start timing, the method further includes the steps of: b1 and B2.
B1: and when the common node determines that the first port is in a conducting state, blocking the first port.
In practical implementation, B1 may be implemented in such a way that after being configured as a new node, the normal node determines whether the first port is in a conducting state when it is in an initialization state, and blocks the first port when it is determined that the first port is in a conducting state.
B2: and when the common node determines that the second port is in a blocking state, opening the second port.
In practical implementation, B2 may be implemented in such a way that after being configured as a new node, the normal node, in its initialization state, determines whether the second port is in a blocking state, and when determining that the second port is in the blocking state, opens the first port.
Wherein, the execution order of B1 and B2 is not limited.
As an embodiment, before sending the NRRB message through the second port, the method further includes: C.
c: and the ordinary node is in a blocking state at the first port, is in a conducting state at the second port and is in an initialization state, and sends a No-answer (No Request, NR) message through the second port.
Wherein the NR packet includes a physical address of the new node.
In an actual implementation process, C may be implemented in such a manner that a common node is in a blocking state at the first port, the second port is in a conducting state, and is in an initialization state, generates an NR packet, continuously sends the NR packet through the second port, starts a timer to start timing, changes the state of the common node from the initialization state to a loading state, and stops sending the NR packet until a timing duration of the timer reaches a preset time threshold.
The NR packet in step C may also be generated before the first port is in a blocking state and the second port is in a conducting state.
As an implementation manner, for the other nodes in the ring network except for the new master node, after the node receives an NR packet sent by the new master node in a dormant state, extracting a physical address of the new node from the NR packet, and when determining that the priority of the node is higher than that of the new node, blocking or opening an own port and not changing the own state are not performed according to the own physical address, the physical address of the new node, and a predetermined correspondence between the physical address and the priority; and conversely, when the priority of the self is lower than that of the new node, enabling the non-fault port in the self port to be in a conducting state.
Referring to fig. 3, fig. 3 is a block diagram of a switching device according to an embodiment of the present disclosure. The apparatus applies the common node connected to the neighboring node in fig. 1, and the structural block diagram shown in fig. 3 will be described below, and the apparatus includes:
a first receiving unit 310, configured to receive a first identity switch request; wherein the first identity switching request represents that the master node needs to be switched with its own identity.
A first sending unit 320, configured to send an NRRB message through the second port after configuring itself as a new master node, if the first port is in a blocking state, the second port is in a conducting state, and the first port is in a loading state, so that the NRRB message can be received after the master node is configured as a new normal node.
A first changing unit 330, configured to change the state of itself from the loading state to the hibernation state.
As an embodiment, the first sending unit 320 is specifically configured to start a timer to start timing when the first port is in a blocking state and the second port is in a conducting state, and change the state of the first sending unit from an initialization state to a loading state; when the timing duration of the timer reaches a preset time threshold, the NRRB message is sent through the second port; correspondingly, the device further comprises: and the closing unit is used for closing the timer.
As an embodiment, the apparatus further comprises: a port operation unit for blocking the first port when it is determined that the first port is in a conducting state; and opening the second port upon determining that the second port is in a blocked state.
As an embodiment, the apparatus further comprises: and the second sending unit is used for sending the NR message through the second port when the first port is in a blocking state, the second port is in a conducting state and the second port is in an initialization state.
Referring to fig. 4, fig. 4 is a block diagram of a switching device according to an embodiment of the present disclosure. The apparatus employs the master node shown in fig. 1, and the block diagram of the structure shown in fig. 4 will be described below, and the apparatus includes:
a second receiving unit 410, configured to receive a second identity switching request; wherein the second identity handover request represents that the identities of the master node and the common node need to be handed over, and the second identity handover request includes: and configuring information.
A configuring unit 420, configured to configure itself as a new common node according to the configuration information after the common node is configured as a new node.
A third receiving unit 430, configured to receive an NRRB message sent by the new master node when the third port is in a blocking state, the fourth port is in a conducting state, and the third receiving unit is in a loading state;
and a second changing unit 440 for changing a state of itself from the loading state to the hibernation state.
For the process of implementing each function by each functional unit in this embodiment, please refer to the content described in the embodiment shown in fig. 1-2, which is not described herein again.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an electronic device 500 according to an embodiment of the present disclosure, where the electronic device 500 may be a master node in fig. 1 or a common node connected to a neighboring node.
The electronic device 500 may include: memory 502, processing 501, ports 503, and a communications bus for enabling communications for connection of these components.
The Memory 502 is used for storing various data such as a computer program instruction corresponding to the switching method and apparatus provided in the embodiment of the present application, where the Memory 502 may be, but is not limited to, a Random Access Memory (Random Access Memory), a Read Only Memory (Read Only Memory), a Programmable Read-Only Memory (Programmable Read-Only Memory), an Erasable Read-Only Memory (Erasable Programmable Read-Only Memory), an electrically Erasable Programmable Read-Only Memory (electrically Erasable Programmable Read-Only Memory), and the like.
The processor 501 is configured to execute the computer program instructions corresponding to the handover method and apparatus.
The processor 501 may be an integrated circuit chip having signal processing capability. The Processor 501 may be a general-purpose Processor, including a Central Processing Unit (Central Processing Unit), a Network Processor (Network Processor), and the like; but may also be a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
And a port 503 for receiving or transmitting data.
In addition, a storage medium is provided in an embodiment of the present application, and a computer program is stored in the storage medium, and when the computer program runs on a computer, the computer is caused to execute the method provided in any embodiment of the present application.
To sum up, the switching method, apparatus, ring network, electronic device and storage medium provided in embodiments of the present application are applied to a common node in the ring network, where the common node includes: a first port and a second port; still include in the looped netowrk: a master node and a neighbor node; the neighbor nodes are respectively connected with the main node and the first port, and the main node is connected with the second port; after the main node is configured as a new main node, if the first port is in a blocking state, the second port is in a conducting state, and the main node is in a loading state, the NRRB message is sent through the second port, so that after the main node is configured as a new common node, the NRRB message can be received, the new common node can be enabled to be in a dormant state, meanwhile, the state of the main node is changed into the dormant state, and finally, the ring network can be enabled to run normally.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based devices that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

Claims (10)

1. A switching method is characterized in that the switching method is applied to a common node connected with a neighbor node in a ring network, the common node comprises a first port and a second port, and the common node is connected with the neighbor node through the first port; the ring network also comprises a main node connected with the neighbor node; the main node is connected with the second port; the method comprises the following steps:
receiving a first identity switch request; the first identity switching request represents that the identities of the main node and the common node need to be switched;
responding to the first identity switching request, and after the first identity switching request is configured as a new main node, if the first port is in a blocking state, the second port is in a conducting state, and the first identity switching request is in a loading state, sending an NRRB (non-response ring protection link) blocking message through the second port, so that the main node can receive the NRRB message after being configured as a new common node;
and changing the state of the self-body from the loading state to the sleeping state.
2. The method of claim 1, wherein if the first port is in a blocking state, the second port is in a conducting state, and the second port is in a loading state, and sending an NRRB message for loop protection link blocking without reply through the second port comprises:
starting a timer to start timing under the conditions that the first port is in a blocking state and the second port is in a conducting state, and changing the self state from an initialization state to a loading state;
when the timing duration of the timer reaches a preset time threshold, the NRRB message is sent through the second port;
correspondingly, after the NRRB packet is sent through the second port, the method further includes:
the timer is turned off.
3. The method of claim 2, wherein before the start timer starts counting, the method further comprises:
blocking the first port upon determining that the first port is in a conducting state;
opening the second port upon determining that the second port is in a blocked state.
4. The method of claim 1, wherein prior to said sending an unacknowledged loop protection link blocked NRRB message over the second port, the method further comprises:
and when the first port is in a blocking state, the second port is in a conducting state and is in an initialization state, sending an no-response NR message through the second port.
5. A switching method is characterized in that the switching method is applied to a main node in a ring network, and the main node comprises the following steps: a third port and a fourth port; still include in the looped netowrk: the system comprises a neighbor node connected with the main node and a common node connected with the neighbor node; the neighbor node is respectively connected with the fourth port and the common node, and the third port is connected with the common node; the method comprises the following steps:
receiving a second identity switching request; wherein the second identity handover request represents that the identities of the master node and the common node need to be handed over, and the second identity handover request includes: configuration information;
after the common node is configured as a new main node, configuring the common node as a new common node according to the configuration information;
when the third port is in a blocking state, the fourth port is in a conducting state, and the fourth port is in a loading state, receiving an NRRB message which is sent by the new main node and is blocked by the no-response loop protection link;
and changing the state of the self-body from the loading state to the sleeping state.
6. A switching device is characterized in that the switching device is applied to a common node connected with a neighbor node in a ring network, the common node comprises a first port and a second port, and the common node is connected with the neighbor node through the first port; the ring network also comprises a main node connected with the neighbor node; the main node is connected with the second port; the device comprises:
a first receiving unit, configured to receive a first identity handover request; the first identity switching request represents that the identities of the main node and the common node need to be switched;
a first sending unit, configured to send, after configuring itself as a new master node, an NRRB packet blocked by an unanswered loop protection link through a second port if the first port is in a blocking state, the second port is in a conducting state, and the first port is in a loading state, so that the NRRB packet can be received after configuring itself as a new normal node;
and the first changing unit is used for changing the state of the first changing unit from the loading state to the sleeping state.
7. A switching device is characterized in that the switching device is applied to a main node in a ring network, and the main node comprises: a third port and a fourth port; still include in the looped netowrk: the system comprises a neighbor node connected with the main node and a common node connected with the neighbor node; the neighbor node is respectively connected with the fourth port and the common node, and the third port is connected with the common node; the device comprises:
a second receiving unit, configured to receive a second identity switching request; wherein the second identity handover request represents that the identities of the master node and the common node need to be handed over, and the second identity handover request includes: configuration information;
the configuration unit is used for configuring the common node as a new common node according to the configuration information after the common node is configured as a new main node;
a third receiving unit, configured to receive an NRRB message, which is sent by the new master node and is blocked by the non-reply loop protection link, when the third port is in a blocking state, the fourth port is in a conducting state, and the third receiving unit is in a loading state;
and the second change unit is used for changing the state of the second change unit from the loading state to the sleeping state.
8. A ring network, characterized in that the ring network comprises: the system comprises a main node, a neighbor node and a common node connected with the main node and the neighbor node; the common node includes: a first port and a second port; the master node includes: a third port and a fourth port; the neighbor nodes are respectively connected with the first port and the fourth port; the second port is connected with the third port;
the common node is used for receiving a first identity switching request; the first identity switching request represents that the identities of the main node and the common node need to be switched;
the ordinary node is further configured to send an NRRB message for non-reply loop protection link blocking through the second port if the first port is in a blocking state, the second port is in a conducting state, and the ordinary node is in a loading state after the ordinary node is configured as a new master node;
the common node is also used for changing the self state from a loading state to a sleeping state;
the main node is used for receiving a second identity switching request; wherein the second identity handover request represents that the identities of the master node and the common node need to be handed over, and the second identity handover request includes: configuration information;
the master node is further configured to configure the common node as the new common node according to the configuration information after the common node is configured as the new master node;
the master node is further configured to receive the NRRB message when the third port is in a blocking state, the fourth port is in a conducting state, and the master node is in a loading state;
the main node is also used for changing the self state from the loading state to the sleeping state.
9. An electronic device comprising a memory and a processor, the memory having stored therein computer program instructions that, when read and executed by the processor, perform the method of any of claims 1-5.
10. A storage medium having stored thereon computer program instructions which, when read and executed by a computer, perform the method of any one of claims 1-5.
CN202011513809.6A 2020-12-18 2020-12-18 Switching method, switching device, ring network, electronic equipment and storage medium Active CN112637052B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011513809.6A CN112637052B (en) 2020-12-18 2020-12-18 Switching method, switching device, ring network, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011513809.6A CN112637052B (en) 2020-12-18 2020-12-18 Switching method, switching device, ring network, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112637052A CN112637052A (en) 2021-04-09
CN112637052B true CN112637052B (en) 2022-02-22

Family

ID=75317817

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011513809.6A Active CN112637052B (en) 2020-12-18 2020-12-18 Switching method, switching device, ring network, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112637052B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116094990B (en) * 2023-01-19 2024-06-14 重庆长安汽车股份有限公司 Software optimization method and device based on MAC address forwarding table and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104065546A (en) * 2014-07-04 2014-09-24 引通通讯科技(上海)有限公司 Ethernet protection switching method
CN107171840A (en) * 2017-05-22 2017-09-15 杭州迪普科技股份有限公司 A kind of pretection switch method and apparatus based on ERPS agreements
CN108259289A (en) * 2016-12-29 2018-07-06 华为技术有限公司 A kind of looped network abnormal protection method and device
CN108900403A (en) * 2018-06-12 2018-11-27 瑞斯康达科技发展股份有限公司 A kind of method and apparatus of Ethernet ring protection configuration
CN110545198A (en) * 2018-05-29 2019-12-06 北京华为数字技术有限公司 ERPS loop damage method and main node

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011027361A2 (en) * 2009-09-07 2011-03-10 Tejas Networks Limited A method and system for ring protection switching

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104065546A (en) * 2014-07-04 2014-09-24 引通通讯科技(上海)有限公司 Ethernet protection switching method
CN108259289A (en) * 2016-12-29 2018-07-06 华为技术有限公司 A kind of looped network abnormal protection method and device
CN107171840A (en) * 2017-05-22 2017-09-15 杭州迪普科技股份有限公司 A kind of pretection switch method and apparatus based on ERPS agreements
CN110545198A (en) * 2018-05-29 2019-12-06 北京华为数字技术有限公司 ERPS loop damage method and main node
CN108900403A (en) * 2018-06-12 2018-11-27 瑞斯康达科技发展股份有限公司 A kind of method and apparatus of Ethernet ring protection configuration

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"工业以太网交换机快速环网保护协议设计与实现";彭洋旻;《中国优秀硕士学位论文全文数据库信息科技辑》;20130105;全文 *

Also Published As

Publication number Publication date
CN112637052A (en) 2021-04-09

Similar Documents

Publication Publication Date Title
CN101001192B (en) Method, system and equipment for protecting ring network link
US5307354A (en) Method and apparatus for remote maintenance and error recovery in distributed data processing networks
US8139510B2 (en) Optimizations and enhancements to the IEEE RSTP 802.1w implementation
CN107070731B (en) Master-slave arbitration method and system
US9276822B2 (en) Method for transmitting messages in a communication network
KR20200125133A (en) Vehicle and method for transmitting messages in the vehicle
CN102104531B (en) Message processing device, method and system
JPH10322374A (en) Data bus system for power vehicle
US6128285A (en) Monitoring of a packet telephony device via a control device
CN101141366A (en) Method of preventing data loop in ring ethernet
CN113359968B (en) Method, system, device and medium for resetting PCIE (peripheral component interface express) device based on ARM (advanced RISC machine) platform
CN105791126A (en) Ternary content addressable memory (TCAM) table search method and device
CN112637052B (en) Switching method, switching device, ring network, electronic equipment and storage medium
US8948002B2 (en) Method and device for preventing repeated refreshing of address table of Ethernet ring network node
US20200264989A1 (en) Embedded USB2 (eUSB2) Repeater Operation
WO2022199033A1 (en) Network device, inter-board communication method, and storage medium
WO2021218645A1 (en) Node control method, system and apparatus
CN115714698A (en) Ring network communication method and device of vehicle-mounted Ethernet, vehicle and storage medium
CN104579736A (en) Loop circuit data transmission method and node equipment
CN106506074A (en) A kind of method and apparatus of detection optical port state
CN112469064A (en) Fault transparent transmission method and device and electronic equipment
CN105376787A (en) Method for processing network communication function abnormity and application processor
CN105357131A (en) FDB refreshing method, device, and system and node in ring network
CN111064593A (en) Network topology redundant communication system and network topology redundant communication method
US20020055353A1 (en) Method and device for declaring and modifying the functionality of a node in a communication network

Legal Events

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