Communication method and apparatus

The master node sends Hello and Complete-Flush-FDB messages on the RRPP ring network, adjusts the secondary port function, and sends MAC migration messages through the primary and secondary ports to update the MAC table. This solves the problem of unicast packet loss during RRPP ring network recovery and achieves zero packet loss.

CN119544406BActive Publication Date: 2025-10-10NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411621143.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-10-10
Estimated Expiration
2044-11-13

AI Technical Summary

Technical Problem

During the RRPP ring network recovery process, unicast packets are easily lost.

Method used

The master node sends a Hello message on the ring network. Based on whether the secondary port receives the Hello message, it adjusts the function and sends a Complete-Flush-FDB message and a MAC migration message to instruct the transmission node to prohibit or resume MAC address learning, update the local MAC table, and resume broadcast transmission and reception functions.

Benefits of technology

The invention realizes zero unicast message loss during the RRPP ring network fault switchback process, and solves the unicast message loss problem in the prior art.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544406B_ABST
    Figure CN119544406B_ABST
Patent Text Reader

Abstract

The application provides a communication method and device, the method comprising: sending a Hello packet on a ring network through a primary port; when the Hello packet is received through a secondary port within a preset time, closing a broadcast transceiving function included in the secondary port and keeping a unicast transceiving function; sending a first Complete-Flush-FDB packet on the ring network through the primary port; sending a first MAC migration packet on the ring network through the secondary port and sending a second MAC migration packet on the ring network through the primary port; sending a second Complete-Flush-FDB packet on the ring network through the primary port; and when the second Complete-Flush-FDB packet is received through the secondary port, setting a state of the secondary port under a protection VLAN to a blocking state and restoring the broadcast transceiving function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a communication method and device. Background Art

[0002] The Rapid Ring Protection Protocol (RRPP) is a link layer protocol specifically designed for Ethernet rings. When the Ethernet ring is intact, it prevents broadcast storms caused by data loops. When a link on the Ethernet ring is disconnected, it quickly restores communication links between nodes on the ring. Compared to the spanning tree protocol, RRPP offers faster convergence, and its convergence time is independent of the number of nodes on the ring, making it suitable for networks with larger diameters.

[0003] The master node in an RRPP ring network monitors the health of the ring network through polling and link-down notification mechanisms, and promptly handles link failures within the ring network. If a faulty link in the ring network recovers, the master node initiates the ring network recovery process.

[0004] During ring network recovery, the master node periodically sends Hello messages through its primary port. If the master node receives a Hello message through its secondary port within a preset time, it determines that all links on the ring network have recovered. The master node blocks its secondary port, refreshes its local MAC table and ARP / ND table entries, and sends a Complete-Flush-FDB message across the ring network to notify all transmission nodes on the ring network (including those at both ends of the failed link) except the master node to refresh their local MAC table and ARP / ND table entries.

[0005] After receiving the Complete-Flush-FDB message, a transmission node in the Pre-forwarding state on the ring network transitions to the Link-Up state, completing the ring network recovery. If the Complete-Flush-FDB message is lost during transmission, the transmission node in the Pre-forwarding state will automatically release the temporarily blocked port using a timer and refresh the local MAC table and ARP / ND table entries to restore data communication.

[0006] However, during the above-mentioned ring network recovery (fault switchback) process, unicast packet loss will occur. The reason is that when the master node sends the Complete-Flush-FDB message, if the transmission node receives the unicast message before refreshing the local MAC table and ARP / ND table, the transmission node will forward the unicast message through the previous MAC table and ARP / ND table, resulting in forwarding errors and packet loss. Summary of the Invention

[0007] In view of this, the present application provides a communication method and apparatus to solve the problem of unicast packet loss that easily occurs during the recovery process of the existing RRPP ring network.

[0008] In a first aspect, the present application provides a communication method, the method being applied to a master node on a ring network, the master node including a primary port and a secondary port, the ring network further including a first transmission node and a second transmission node, the first transmission node including a first interface, the second transmission node including a second interface, the link state between the first interface and the second interface recovering from a fault state to a normal state, the method comprising:

[0009] Sending a Hello message on the ring network through the primary port;

[0010] When the Hello message is received through the secondary port within a preset time, the broadcast transceiver function included in the secondary port is turned off, and the unicast transceiver function is maintained;

[0011] Sending a first Complete-Flush-FDB message on the ring network through the primary port, so that the first transmission node and the second transmission node respectively release the blocking state of the first interface and the second interface respectively included in the protection VLAN, and each transmission node on the ring network sets its own interface on the ring network to prohibit MAC address learning according to the first Complete-Flush-FDB message;

[0012] Sending a first MAC migration message on the ring network through the secondary port, and sending a second MAC migration message on the ring network through the primary port, so that each node on the ring network updates a local MAC table according to the first MAC migration message and the second MAC migration message;

[0013] Sending a second Complete-Flush-FDB message on the ring network through the primary port, so that each transmission node sets its own interface on the ring network to resume MAC address learning according to the second Complete-Flush-FDB message;

[0014] When the second Complete-Flush-FDB message is received through the secondary port, the state of the secondary port in the protection VLAN is set to a blocking state, and the broadcast transceiver function is restored.

[0015] In a second aspect, the present application provides a communication method, which is applied to a transmission node on a ring network, and the method includes:

[0016] When receiving the first Complete-Flush-FDB message, according to the first Complete-Flush-FDB message, setting the interface on the ring network to prohibit MAC address learning;

[0017] When receiving the first MAC migration message and the second MAC migration message, updating the local MAC table according to the first MAC migration message and the second MAC migration message;

[0018] When the second Complete-Flush-FDB message is received, the interface on the ring network is set to resume MAC address learning according to the second Complete-Flush-FDB message.

[0019] In a third aspect, the present application provides a communication device, the device being applied to a master node on a ring network, the master node including a primary port and a secondary port, the ring network further including a first transmission node and a second transmission node, the first transmission node including a first interface, the second transmission node including a second interface, the link state between the first interface and the second interface recovering from a fault state to a normal state, the device including: a sending unit, a receiving unit, and a setting unit;

[0020] The sending unit is used to send a Hello message on the ring network through the primary port;

[0021] The setting unit is configured to disable the broadcast transceiver function of the secondary port and maintain the unicast transceiver function when the receiving unit receives the Hello message through the secondary port within a preset time;

[0022] The sending unit is further configured to send a first Complete-Flush-FDB message on the ring network through the primary port, so that the first transmission node and the second transmission node respectively release the blocking state of the first interface and the second interface respectively included in the protection VLAN, and each transmission node on the ring network sets its own interface on the ring network to prohibit MAC address learning according to the first Complete-Flush-FDB message;

[0023] The sending unit is further configured to send a first MAC migration message on the ring network through the secondary port, and send a second MAC migration message on the ring network through the primary port, so that each node on the ring network updates a local MAC table according to the first MAC migration message and the second MAC migration message;

[0024] The sending unit is further configured to send a second Complete-Flush-FDB message on the ring network through the primary port, so that each transmission node sets its own interface on the ring network to resume MAC address learning according to the second Complete-Flush-FDB message;

[0025] The setting unit is further configured to, when the receiving unit receives the second Complete-Flush-FDB message through the secondary port, set the state of the secondary port in the protection VLAN to a blocked state and restore the broadcast transceiver function.

[0026] In a fourth aspect, the present application provides a communication device, which is applied to a transmission node on a ring network, and includes: a receiving unit, a setting unit, and an updating unit;

[0027] The setting unit is configured to, when the receiving unit receives the first Complete-Flush-FDB message, set the interface on the ring network to prohibit MAC address learning according to the first Complete-Flush-FDB message;

[0028] The updating unit is configured to update the local MAC table according to the first MAC migration message and the second MAC migration message when the receiving unit receives the first MAC migration message and the second MAC migration message;

[0029] The setting unit is further configured to, when the receiving unit receives the second Complete-Flush-FDB message, set the interface on the ring network to resume MAC address learning according to the second Complete-Flush-FDB message.

[0030] In a fifth aspect, the present application provides a network device comprising a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to execute the method provided in the first aspect of the present application.

[0031] In a sixth aspect, the present application provides a network device comprising a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to execute the method provided in the second aspect of the present application.

[0032] Therefore, by applying the communication method and device provided by the present application, the master node sends a Hello message on the ring network through the main port; when the Hello message is received through the secondary port within the preset time, the master node turns off the broadcast transceiver function included in the secondary port and maintains the unicast transceiver function; through the main port, the master node sends a first Complete-Flush-FDB message on the ring network, so that the first transmission node and the second transmission node respectively release the blocking state of the first interface and the second interface respectively included in their respective protection VLANs, and each transmission node on the ring network sets its own interface on the ring network to prohibit MAC address learning according to the first Complete-Flush-FDB message; through the secondary port The master node sends a first MAC migration message on the ring network through the primary port, and sends a second MAC migration message on the ring network through the primary port, so that each node on the ring network updates the local MAC table according to the first MAC migration message and the second MAC migration message; the master node sends a second Complete-Flush-FDB message on the ring network through the primary port, so that each transmission node sets its own interface on the ring network to resume MAC address learning according to the second Complete-Flush-FDB message; when the second Complete-Flush-FDB message is received through the secondary port, the master node sets the status of the secondary port under the protection VLAN to the blocking state, and restores the broadcast transceiver function.

[0033] In this way, the master node adjusts the function of its secondary port based on the Hello message, uses the Complete-Flush-FDB message to instruct each node on the ring network to disable or resume MAC address learning, and then sends MAC migration messages on the ring network through its primary and secondary ports, respectively. Each node on the ring network then learns MAC entries on its primary and secondary ports. This achieves zero unicast packet loss during failover, and also solves the problem of unicast packet loss that is common during the recovery process of existing RRPP ring networks. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A flow chart of a communication method provided in an embodiment of the present application;

[0035] Figure 2 A flowchart of another communication method provided in an embodiment of the present application;

[0036] Figure 3-AA schematic diagram of an RRPP ring network fault provided in an embodiment of the present application;

[0037] Figure 3-B A schematic diagram of RRPP ring network fault recovery provided in an embodiment of the present application;

[0038] Figure 3-C Another RRPP ring network fault recovery diagram provided in an embodiment of the present application;

[0039] Figure 3-D A schematic diagram of another RRPP ring network fault recovery provided in an embodiment of the present application;

[0040] Figure 3-E A schematic diagram of another RRPP ring network fault recovery provided in an embodiment of the present application;

[0041] Figure 4 A structural diagram of a communication device provided in an embodiment of the present application;

[0042] Figure 5 A structural diagram of another communication device provided in an embodiment of the present application;

[0043] Figure 6 The network device hardware structure provided in the embodiment of the present application. DETAILED DESCRIPTION

[0044] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0045] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. As used in this application and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the corresponding listed items.

[0046] It should be understood that although the terms first, second, third, etc. may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0047] The communication method provided in the embodiment of the present application is described in detail below. Figure 1 , Figure 1 This is a flow chart of a communication method provided in an embodiment of the present application. The method is applied to a master node, which is located on a ring network, which may be a RRPP ring network. The communication method provided in an embodiment of the present application may include the following steps.

[0048] Step 110: Send a Hello message on the ring network through the primary port;

[0049] Specifically, the ring network is composed of multiple nodes, including a master node and at least one transmission node. Each node includes a primary port and a secondary port. In the embodiment of the present application, the ring network includes a master node, a first transmission node, and a second transmission node as an example for description.

[0050] The first transmission node includes a first interface (to distinguish it from the primary port of the master node, the primary port of the first transmission node is referred to as the first interface), and the second transmission node includes a second interface (to distinguish it from the secondary port of the master node, the secondary port of the second transmission node is referred to as the second interface). A link is formed between the first interface and the second interface, and the link is on the ring network.

[0051] If a fault occurs in the ring network, the ring network fault can be detected through a polling mechanism or a Link Down notification mechanism. The above-mentioned polling mechanism and Link Down notification mechanism are both existing technologies and will not be repeated again.

[0052] In one example, if the link fails, the first transmission node and the second transmission node sense that the first interface and the second interface have changed from an up state to a down state. The first transmission node and the second transmission node each adjust their node states from a Link-Up state to a Link-Down state.

[0053] After determining that the ring network has failed, the master node adjusts its node state from Complete State to Failed State and removes the blocking state of the secondary port under the protection VLAN. It is understood that due to the change in network topology, to avoid message misdirection, each node on the ring network will refresh its respective forwarding table (e.g., MAC table, ARP table, ND table, etc.). This refresh process is also prior art and will not be repeated here.

[0054] In this embodiment of the present application, the master node periodically sends Hello messages on the RRPP ring network through the primary port to detect whether the ring network has recovered from a fault. If, due to the aforementioned link failure, the master node is unable to receive Hello messages through the secondary port within a preset time, the master node maintains its own Failed state and continues to unblock the secondary port in the protected virtual local area network (VLAN). The secondary port can be used to forward data packets (unicast packets, broadcast packets, and unknown unicast packets).

[0055] If the above-mentioned link failure is restored, the first transmission node and the second transmission node perceive that the first interface and the second interface change from the down state to the up state. The first transmission node and the second transmission node respectively adjust their own node states from the Link-Down state to the Pre-forwarding state. At the same time, the first transmission node sets the state of the first interface under the protection VLAN to the blocking state; the second transmission node sets the state of the second interface under the protection VLAN to the blocking state. That is, the first interface and the second interface cannot be used to forward data packets (unicast packets, broadcast packets, unknown unicast packets), but can be used to forward protocol packets (Hello packets).

[0056] At this time, the network topology has not changed, and the RRPP ring network still forwards packets according to the forwarding table at the time of the ring network failure.

[0057] As can be seen from the preceding description, the master node cannot immediately detect the link failure recovery. However, the master node still periodically sends Hello messages on the RRPP ring network through the primary port to detect whether the ring network failure has recovered. Since the link failure has recovered, and the first and second interfaces are set to blocked in the protection VLAN, Hello messages can be forwarded on the link and forwarded to the master node's secondary port.

[0058] After sending a Hello message on the RRPP ring network, the master node may determine whether the Hello message is received through the secondary port within a preset time.

[0059] If the master node receives the Hello message through the secondary port within a preset time (eg, 1 s, 2 s, 3 s, etc.), the master node executes step 120 .

[0060] Step 120: When the Hello message is received through the secondary port within a preset time, the broadcast transceiver function of the secondary port is disabled, and the unicast transceiver function is maintained;

[0061] Specifically, according to the description of 110, when the master node receives a Hello message through the secondary port within a preset time, the master node will adjust the secondary port's transceiver function for data messages. The master node turns off the broadcast transceiver function of the secondary port and maintains the unicast transceiver function. That is, the secondary port of the master node can continue to maintain the transceiver function for unicast messages, but can no longer continue to transceive broadcast messages. The master node can adjust the function of the secondary port through the control chip (for example, enable the unicast transceiver function on the secondary port and disable the broadcast transceiver function).

[0062] Optionally, after adjusting the function of the secondary port, the master node also migrates its own node state from the Failed state to the Complete state.

[0063] Understandably, at this point, unicast packets are still forwarded along the original path, preventing packet loss. Because the first and second interfaces are blocked in the protection VLAN, and the broadcast transceiver function is disabled on the master node's secondary port, there is a blockage in the path used to forward broadcast packets, leading to packet loss.

[0064] Step 130: Send a first Complete-Flush-FDB message on the ring network through the primary port, so that the first transmission node and the second transmission node respectively release the blocking status of their respective first interfaces and second interfaces under the protection VLAN. In addition, each transmission node on the ring network sets its own interface on the ring network to prohibit MAC address learning based on the first Complete-Flush-FDB message.

[0065] Specifically, according to the description of step 120, after adjusting the function of the secondary port, the master node generates a first Complete-Flush-FDB message, and sends the first Complete-Flush-FDB message on the RRPP ring network through the primary port.

[0066] Since the link failure on the RRPP ring network is recovered, each node on the RRPP ring network will receive the first Complete-Flush-FDB message.

[0067] Furthermore, after the first transmission node receives the first Complete-Flush-FDB message, it releases the blocking state of the first interface under the protection VLAN according to the first Complete-Flush-FDB message, and at the same time sets all its interfaces in the ring network (the primary and secondary ports included in the first transmission node) to prohibit MAC address learning.

[0068] Similarly, after receiving the first Complete-Flush-FDB message, the second transmission node removes the blocking status of the second interface in the protection VLAN according to the first Complete-Flush-FDB message, and simultaneously sets all its own interfaces in the ring network (including the primary and secondary ports of the second transmission node) to prohibit Media Access Control Address (MAC) address learning.

[0069] Furthermore, after receiving the first Complete-Flush-FDB message, other transmission nodes on the RRPP ring network set all their interfaces in the ring network (primary and secondary ports of other transmission nodes) to prohibit MAC address learning according to the first Complete-Flush-FDB message.

[0070] It should be noted that the aforementioned prohibition of MAC address learning means prohibiting the interface receiving the message from learning the source MAC address included in the message and prohibiting the generation of a MAC table entry corresponding to the source MAC address. Each transmission node can configure the interface to prohibit MAC address learning through the control chip (for example, disabling MAC address learning on the interface).

[0071] Understandably, at this point, unicast packets are still forwarded along the original path, ensuring no packet loss. Because the first and second interfaces are unblocked in the protection VLAN, and the master node's secondary port has disabled broadcast transceiver functionality, there are no blockages along the path used to forward broadcast packets, ensuring no packet loss.

[0072] Optionally, before executing step 130, the master node first sets its primary and secondary ports to only disable MAC address learning. The master node can set the primary and secondary ports to disable MAC address learning through the control chip (for example, disabling MAC address learning on the primary and secondary ports).

[0073] Step 140: Send a first MAC migration message on the ring network through the secondary port, and send a second MAC migration message on the ring network through the primary port, so that each node on the ring network updates a local MAC table according to the first MAC migration message and the second MAC migration message;

[0074] Specifically, according to the description of step 130, after the master node sends the first Complete-Flush-FDB message on the RRPP ring network, the master node generates a first MAC migration (MOVE) message again and sends the first MAC migration message on the RRPP ring network through the secondary port.

[0075] Due to the link fault recovery on the RRPP ring network, each node on the RRPP ring network will receive the first MAC migration message.

[0076] After the transmission node connected with the secondary port included in the master node receives the first MAC migration message as the first transmission node, according to the first MAC migration message, the transmission node deletes the first MAC table item on the third interface receiving the first MAC migration message, and when there is a network device accessing the non-master secondary port (the non-master secondary port of the transmission node) locally, the transmission node adds the first MAC address of the network device in the first MAC migration message to obtain a third MAC migration message. The transmission node continues to send the third MAC migration message including the first MAC address on the RRPP ring network to the next hop node.

[0077] After the next hop node receives the third MAC migration message, the next hop node obtains the first MAC address from the third MAC migration message. According to the third MAC migration message, the next hop node deletes the MAC table item on the interface receiving the third MAC migration message, learns the first MAC address on the interface, and generates a corresponding MAC table item including the first MAC address and the identifier of the interface. The next hop node also repeats the process of deleting the MAC table item, learning the MAC address, adding the MAC address in the MAC migration message, and continues to send the MAC migration message on the RRPP ring network to the next hop node until the master node receives the MAC migration message through the master port.

[0078] It can be understood that if the first transmission node does not have a network device accessing the non-master secondary port locally, the first transmission node will continue to send the first MAC migration message on the RRPP ring network to the next hop node after deleting the first MAC table item.

[0079] After the next hop node receives the first MAC migration message, the next hop node can also perform the same process as the first transmission node, which is not repeated here.

[0080] Optionally, when the master node receives the third MAC migration message through the primary port, that is, when the MAC migration message has passed through each node on the RRPP ring network, the master node deletes the second MAC table entry on the primary port, learns the first MAC address to the primary port, and generates a third MAC table entry that includes the first MAC address and the identifier of the primary port.

[0081] When the master node receives the first MAC migration message through its primary port, it knows that the MAC migration message has passed through every node on the RRPP ring network. The master node deletes the second MAC table entry on the primary port. Because the first MAC migration message does not include a MAC address, the master node does not need to learn or generate a MAC table entry.

[0082] It is understandable that each node in the path adds the MAC address of the local network device connected to the non-primary secondary port into the MAC migration message, so that the next hop node learns the MAC address.

[0083] The first transmission node may be specifically the first transmission node or the second transmission node, and the next hop node may be specifically the first transmission node or the second transmission node or the master node.

[0084] Furthermore, after sending the first Complete-Flush-FDB message on the RRPP ring network, the master node also generates a second MAC migration message, and sends the second MAC migration message on the RRPP ring network through the primary port.

[0085] Since the link failure on the RRPP ring network is recovered, each node on the RRPP ring network will receive the second MAC migration message.

[0086] After receiving the second MAC migration message, the transmission node connected to the primary port included in the master node deletes the fourth MAC table entry on the fifth interface that received the second MAC migration message, and when the second MAC migration message includes the second MAC address, the transmission node generates a fifth MAC table entry corresponding to the second MAC address on the fifth interface. If there is a network device connected to the non-primary secondary port locally, the transmission node adds the third MAC address of the network device to the second MAC migration message and sends a fourth MAC migration message to the next hop node, where the fourth MAC migration message includes the second MAC address and the third MAC address;

[0087] The master node further includes a fourth interface for accessing a network device. The second MAC address is the MAC address of the network device, and the fifth MAC table entry includes the second MAC address and an identifier of the fifth interface.

[0088] It is understandable that each transmission node on the RRPP ring network will repeatedly perform the process of deleting the MAC table entry, learning the MAC address, adding the MAC address in the MAC migration message, and continuing to send the MAC migration message to the next hop node on the RRPP ring network until the master node receives the MAC migration message through the secondary port.

[0089] If the second MAC migration message does not include the second MAC address, that is, the second MAC migration message does not include the MAC address of the network device, the transmission node may delete the fourth MAC table entry and, based on whether there is a network device connected to the non-primary or secondary port locally, send the second MAC migration message or the fourth MAC migration message to the next hop node.

[0090] After receiving the first MAC migration message, the next-hop node may also perform the same process as the previous-hop node, which will not be repeated here.

[0091] Optionally, when the master node receives the fourth MAC migration message through the secondary port, the master node discards the fourth MAC migration message.

[0092] Therefore, the master node sends MAC migration messages through the primary and secondary ports respectively, so that each node on the RRPP ring network updates the local MAC table.

[0093] In an embodiment of the present application, the master node may simultaneously send a MAC migration message to the next-hop transmission node through the primary and secondary ports respectively; it may also first send a second MAC migration message through the primary port and then send the first MAC migration message through the secondary port; or, first send the first MAC migration message through the secondary port and then send the second MAC migration message through the primary port.

[0094] In the embodiment of the present application, the MAC migration message also includes a VLAN identifier, which represents the identifier of the VLAN to which the network device belongs. Therefore, the MAC table entry generated by each node also includes a VLAN identifier.

[0095] Step 150: Send a second Complete-Flush-FDB message on the ring network through the primary port, so that each transmission node sets its own interface on the ring network to resume MAC address learning according to the second Complete-Flush-FDB message;

[0096] Specifically, as described in step 140, after each node on the RRPP ring network updates its local MAC table, the master node generates a second Complete-Flush-FDB message again and continues to send the second Complete-Flush-FDB message on the RRPP ring network through the primary port.

[0097] Since the link failure on the RRPP ring network is recovered, each node on the RRPP ring network will receive the second Complete-Flush-FDB message.

[0098] Furthermore, after receiving the second Complete-Flush-FDB message, each transmission node on the RRPP ring network configures all of its interfaces (primary and secondary ports on each transmission node) in the ring network to resume MAC address learning based on the second Complete-Flush-FDB message. Each transmission node can configure the interfaces to resume MAC address learning (for example, enabling MAC address learning on the interfaces) through the control chip.

[0099] It should be noted that the above-mentioned resumption of MAC address learning means prohibiting the interface that receives the message from resuming learning the source MAC address included in the message and generating a MAC table entry corresponding to the source MAC address on the interface.

[0100] It can be understood that each transmission node on the above RRPP ring network includes a first transmission node and a second transmission node.

[0101] Optionally, before executing step 150, the master node first sets its primary and secondary ports to only resume MAC address learning. The master node can set the primary and secondary ports to resume MAC address learning through the control chip (for example, enable MAC address learning on the primary and secondary ports).

[0102] Step 160: When the second Complete-Flush-FDB message is received through the secondary port, the state of the secondary port in the protection VLAN is set to a blocking state, and the broadcast transceiver function is restored.

[0103] Specifically, according to the description of step 140, after the master node sends the second Complete-Flush-FDB message on the RRPP ring network, when the second Complete-Flush-FDB message is received through the secondary port, the master node sets the status of the secondary port under the protection VLAN to a blocked state and restores the broadcast transceiver function.

[0104] It is understandable that at this point, unicast packets will be forwarded along the path taken before the link failure, ensuring no unicast packet loss. Because the first and second interfaces are no longer blocked in the protection VLAN, and the master node's secondary port is blocked in the protection VLAN, broadcast packets will also be forwarded along the path taken before the link failure, ensuring no broadcast packet loss.

[0105] Even if the secondary port recovers the broadcast sending and receiving function, since the secondary port is in a blocked state in the protection VLAN, the secondary port cannot send or receive broadcast messages.

[0106] Therefore, by applying the communication method provided by the present application, the master node sends a Hello message on the ring network through the main port; when the Hello message is received through the secondary port within the preset time, the master node turns off the broadcast transceiver function included in the secondary port and maintains the unicast transceiver function; through the main port, the master node sends a first Complete-Flush-FDB message on the ring network, so that the first transmission node and the second transmission node respectively release the blocking state of the first interface and the second interface respectively included in their respective protection VLANs, and each transmission node on the ring network sets its own interface on the ring network to prohibit MAC address learning according to the first Complete-Flush-FDB message; through the secondary port , the master node sends a first MAC migration message on the ring network, and through the primary port, the master node sends a second MAC migration message on the ring network, so that each node on the ring network updates the local MAC table according to the first MAC migration message and the second MAC migration message; through the primary port, the master node sends a second Complete-Flush-FDB message on the ring network, so that each transmission node sets its own interface on the ring network to resume MAC address learning according to the second Complete-Flush-FDB message; when the second Complete-Flush-FDB message is received through the secondary port, the master node sets the status of the secondary port under the protection VLAN to a blocked state, and restores the broadcast receiving and sending functions.

[0107] In this way, the master node adjusts the function of its secondary port based on the Hello message, uses the Complete-Flush-FDB message to instruct each node on the ring network to disable or resume MAC address learning, and then sends MAC migration messages on the ring network through its primary and secondary ports, respectively. Each node on the ring network then learns MAC entries on its primary and secondary ports. This achieves zero unicast packet loss during failover, and also solves the problem of unicast packet loss that is common during the recovery process of existing RRPP ring networks.

[0108] The communication method provided in the embodiment of the present application is described in detail below. Figure 2 , Figure 2 This is a flowchart of another communication method provided in an embodiment of the present application. The method is applied to a transmission node, where the transmission node is located on a ring network, which may specifically be an RRPP ring network. The communication method provided in an embodiment of the present application may include the following steps.

[0109] Step 210, when receiving the first Complete-Flush-FDB message, setting the interface on the ring network to prohibit MAC address learning according to the first Complete-Flush-FDB message;

[0110] Specifically, the ring network is composed of multiple nodes, including a master node and at least one transmission node. Each node includes a master port and a secondary port. In the embodiments of the present application, the ring network including the master node and the transmission node is taken as an example for description.

[0111] Optionally, the transmission node includes a first interface on the RRPP ring, and specifically, the master port or the secondary port included by the transmission node. The transmission node establishes a link with the next hop node through the first interface, and the link is also on the RRPP ring.

[0112] If a failure occurs in the ring network, the ring network failure can be detected by a polling mechanism or a Link Down notification mechanism. The polling mechanism and the Link Down notification mechanism are prior art, which will not be repeated again.

[0113] According to the foregoing embodiments, if the link fails, the transmission node perceives that the first interface changes from the up state to the down state. The transmission node adjusts the node state of itself from the Link-Up state to the Link-Down state.

[0114] After determining the ring network failure, the master node adjusts the node state of itself from the Complete State (healthy state) to the Failed State (failure state), and releases the blocking state of the secondary port under the protection VLAN. It can be understood that, since the network topology changes, to avoid message misdirection, each node on the ring network flushes its own forwarding table (for example, MAC table, ARP table, ND table, etc.). The flushing process is prior art, which will not be repeated again.

[0115] In the embodiments of the present application, the master node periodically sends a Hello message on the RRPP ring through the master port to detect whether the ring network failure is recovered. Due to the link failure, the master node cannot receive the Hello message through the secondary port within a preset time, at this time, the master node maintains its Failed state, and continues to maintain the release of the blocking state of the secondary port under the protection VLAN. The secondary port can be used to forward data messages (unicast messages, broadcast messages, unknown unicast messages).

[0116] If the link failure recovers, the transmission node perceives that the first interface changes from the down state to the up state. The transmission node adjusts its node state from the Link-Down state to the Pre-forwarding state, and at the same time, the transmission node sets the state of the first interface under the protection VLAN to the blocking state. That is, the first interface is not available for forwarding data packets (unicast packets, broadcast packets, unknown unicast packets), but is available for forwarding protocol packets (Hello packets).

[0117] At this time, the network topology does not send a change, and the RRPP ring network still forwards packets according to the forwarding table at the time of ring network failure.

[0118] According to the foregoing, the master node cannot immediately perceive the link failure recovery. The master node still periodically sends Hello packets on the RRPP ring network through the primary port to detect whether the ring network failure recovers. Due to the link failure recovery and the setting of the blocking state of the first interface under the protection VLAN, the Hello packets can be forwarded on the link and forwarded to the secondary port of the master node.

[0119] After the master node sends the Hello packets on the RRPP ring network, it can determine whether the Hello packets are received through the secondary port within a preset time.

[0120] If the master node receives the Hello packets through the secondary port within a preset time (for example, 1s, 2s, 3s, and the like), the master node closes the broadcast transceiving function of the secondary port and keeps the unicast transceiving function. After the master node adjusts the function of the secondary port, it also migrates its node state from the Failed state to the Complete state.

[0121] After the master node adjusts the function of the secondary port, it generates a first Complete-Flush-FDB packet and sends the first Complete-Flush-FDB packet on the RRPP ring network through the primary port.

[0122] Due to the link failure recovery on the RRPP ring network, each node on the RRPP ring network will receive the first Complete-Flush-FDB packet.

[0123] After the transmission node receives the first Complete-Flush-FDB packet, it releases the blocking state of the first interface under the protection VLAN according to the first Complete-Flush-FDB packet, and at the same time, sets all interfaces (the primary and secondary ports included by the first transmission node) of the ring network to which the transmission node belongs to prohibit MAC address learning.

[0124] It should be noted that the prohibition of MAC address learning mentioned above means prohibiting the interface of the received message from learning the source MAC address included in the message and prohibiting the generation of a MAC table entry corresponding to the source MAC address.

[0125] Step 220: When the first MAC migration message and the second MAC migration message are received, update the local MAC table according to the first MAC migration message and the second MAC migration message;

[0126] Specifically, according to the description of step 210, after sending the first Complete-Flush-FDB message on the RRPP ring network, the master node generates a first MAC migration message again and sends the first MAC migration message on the RRPP ring network through the secondary port.

[0127] Since the link failure on the RRPP ring network is recovered, each node on the RRPP ring network will receive the first MAC migration message.

[0128] Optionally, in this embodiment of the present application, the transit node further includes a second interface, which is located on the RRPP ring and connected to the secondary port included in the master node. It is understandable that the second interface can specifically be a primary port or a secondary port included in the transit node.

[0129] In one implementation, if the transmission node is the first transmission node to receive the first MAC migration message and the transmission node receives the first MAC migration message via the second interface, the transmission node deletes the first MAC table entry on the second interface. If a network device connected to a non-primary or secondary port exists locally on the transmission node, the transmission node adds the first MAC address of the network device to the first MAC migration message to generate a third MAC migration message. The transmission node then continues to send the third MAC migration message to the next-hop node on the RRPP ring network, where the third MAC migration message includes the first MAC address.

[0130] It is understandable that if there is no network device connected to the non-primary secondary port locally on the transit node, the transit node will continue to send the first MAC migration message to the next-hop node on the RRPP ring network after deleting the first MAC table entry.

[0131] After receiving the first MAC migration message, the next hop node may also perform the same process as the first transmission node, which will not be repeated here.

[0132] Optionally, in this embodiment of the present application, the transit node further includes a third interface, which is located on the RRPP ring and connected to a primary port or a secondary port included in the previous-hop transit node. It is understood that the third interface can specifically be a primary port or a secondary port included in the transit node.

[0133] In another implementation, if the transmission node is not the first transmission node to receive the third MAC migration message and the transmission node receives the third MAC migration message through the third interface, the transmission node deletes the second MAC table entry on the third interface. The transmission node learns the first MAC address to the third interface and generates a third MAC table entry, which includes the first MAC address and the identifier of the third interface. If there is a network device locally connected to a non-primary secondary port of the transmission node, the transmission node adds the second MAC address of the network device to the third MAC migration message to generate a fourth MAC migration message. The transmission node continues to send the fourth MAC migration message to the next-hop node (for example, the transmission node or the master node) on the RRPP ring network, and the fourth MAC migration message includes the first MAC address and the second MAC address.

[0134] It is understandable that each node on the RRPP ring will repeatedly perform the process of deleting the MAC table entry, learning the MAC address, adding the MAC address to the MAC migration message, and continuing to send the MAC migration message to the next hop node on the RRPP ring network until the master node receives the MAC migration message through the master port.

[0135] If the transmission node is not the first transmission node to receive the first MAC migration message and the transmission node receives the first MAC migration message through the third interface, the transmission node deletes the second MAC table entry on the third interface. If there is no network device connected to the non-primary secondary port locally on the transmission node, the transmission node continues to send the first MAC migration message to the next-hop node on the RRPP ring network until the master node receives the MAC migration message through the primary port.

[0136] Furthermore, after sending the first Complete-Flush-FDB message on the RRPP ring network, the master node also generates a second MAC migration message, and sends the second MAC migration message on the RRPP ring network through the primary port.

[0137] Since the link failure on the RRPP ring network is recovered, each node on the RRPP ring network will receive the second MAC migration message.

[0138] If there is a network device connected to the non-primary secondary port locally in the master node, the master node adds the third MAC address of the network device to the second MAC migration message and sends the second MAC migration message on the RRPP ring network.

[0139] It is understandable that if there is no network device connected to the non-primary secondary port locally in the master node, the master node sends a second MAC migration message on the RRPP ring network. The second MAC migration message does not include any MAC address.

[0140] Optionally, in this embodiment of the present application, the transit node further includes a fourth interface, which is located on the RRPP ring and connected to a primary port or a secondary port included in a previous-hop node (e.g., the previous-hop node is a master node or a transit node). It is understood that the fourth interface may specifically be a primary port or a secondary port included in the transit node.

[0141] If the transmission node is any transmission node that receives the second MAC migration message and the transmission node receives the second MAC migration message through the fourth interface, the transmission node deletes the fourth MAC table entry on the fourth interface. The transmission node learns the third MAC address to the fourth interface and generates a fifth MAC table entry, which includes the third MAC address and the identifier of the fourth interface. If there is a network device connected to a non-primary secondary port locally on the transmission node, the transmission node adds the fourth MAC address of the network device to the second MAC migration message to generate a fifth MAC migration message. The transmission node continues to send the fifth MAC migration message to the next-hop node (for example, the transmission node or the master node) on the RRPP ring network. The fifth MAC migration message includes the third MAC address and the third MAC address.

[0142] It is understandable that each node on the RRPP ring will repeatedly perform the process of deleting the MAC table entry, learning the MAC address, adding the MAC address to the MAC migration message, and continuing to send the MAC migration message to the next hop node on the RRPP ring network until the master node receives the MAC migration message through the secondary port.

[0143] It should be noted that if the non-primary secondary port included in the previous hop node of the transit node is connected to a network device, the third MAC address is the MAC address of the network device connected to the non-primary secondary port included in the previous hop node. The previous hop node can be specifically a primary node or other transit node on the RRPP ring.

[0144] If the second MAC migration message does not include the second MAC address, that is, the second MAC migration message does not include the MAC address of any network device, the transmission node may delete the fourth MAC table entry and, based on whether there is a network device connected to the non-primary secondary port locally, send the second MAC migration message or the fourth MAC migration message to the next hop node.

[0145] After receiving the first MAC migration message, the next-hop node may also perform the same process as the previous-hop node, which will not be repeated here.

[0146] In an embodiment of the present application, the master node may simultaneously send a MAC migration message to the next-hop transmission node through the primary and secondary ports respectively; it may also first send a second MAC migration message through the primary port and then send the first MAC migration message through the secondary port; or, first send the first MAC migration message through the secondary port and then send the second MAC migration message through the primary port.

[0147] In the embodiment of the present application, the MAC migration message also includes a VLAN identifier, which represents the identifier of the VLAN to which the network device belongs. Therefore, the MAC table entry generated by each node also includes a VLAN identifier.

[0148] Step 230: When the second Complete-Flush-FDB message is received, the interface on the ring network is set to resume MAC address learning according to the second Complete-Flush-FDB message.

[0149] Specifically, as described in step 220, after each node on the RRPP ring network updates its local MAC table, the master node generates a second Complete-Flush-FDB message again and continues to send the second Complete-Flush-FDB message on the RRPP ring network through the primary port.

[0150] Since the link failure on the RRPP ring network is recovered, each node on the RRPP ring network will receive the second Complete-Flush-FDB message.

[0151] Furthermore, after receiving the second Complete-Flush-FDB message, each transmission node on the RRPP ring network sets all its interfaces (primary and secondary ports of each transmission node) in the ring network to resume MAC address learning according to the second Complete-Flush-FDB message.

[0152] After the master node sends the second Complete-Flush-FDB message on the RRPP ring network, when receiving the second Complete-Flush-FDB message through the secondary port, the master node sets the state of the secondary port in the protection VLAN to blocking state and restores the broadcast transceiver function.

[0153] It should be noted that the above-mentioned resumption of MAC address learning means prohibiting the interface that receives the message from resuming learning the source MAC address included in the message and generating a MAC table entry corresponding to the source MAC address on the interface.

[0154] Therefore, by applying the communication method provided in the present application, when the transmission node receives the first Complete-Flush-FDB message, according to the first Complete-Flush-FDB message, the transmission node sets the interface on the ring network to prohibit MAC address learning; when the transmission node receives the first MAC migration message and the second MAC migration message, according to the first MAC migration message and the second MAC migration message, the transmission node updates the local MAC table; when the second Complete-Flush-FDB message is received, according to the second Complete-Flush-FDB message, the transmission node sets the interface on the ring network to resume MAC address learning.

[0155] In this way, the master node adjusts the function of its secondary port based on the Hello message, uses the Complete-Flush-FDB message to instruct each node on the ring network to disable or resume MAC address learning, and then sends MAC migration messages on the ring network through its primary and secondary ports, respectively. Each node on the ring network then learns MAC entries on its primary and secondary ports. This achieves zero unicast packet loss during failover, and also solves the problem of unicast packet loss that is common during the recovery process of existing RRPP ring networks.

[0156] The communication method provided in the embodiment of the present application is described in detail below. Figure 3-A , Figure 3-A This is a schematic diagram of an RRPP ring network fault provided by an embodiment of the present application. Figure 3-A In the example, the RRPP ring network includes the master node, node A, node B, node C, node D, and node E. Each node has a primary port and a secondary port, and both the primary and secondary ports are located on the RRPP ring network. Except for the master node, nodes A through E are all transit nodes.

[0157] In the embodiment of the present application, the primary port of the master node is identified as 1 / 1, and the secondary port is identified as 1 / 2. The primary port (interface 1) of node A is identified as 1 / 3, and the secondary port (interface 2) is identified as 1 / 4; the primary port (interface 3) of node B is identified as 1 / 5, and the secondary port (interface 4) is identified as 1 / 6; the primary port (interface 5) of node C is identified as 1 / 7, and the secondary port (interface 6) is identified as 1 / 8; the primary port (interface 7) of node D is identified as 1 / 9, and the secondary port (interface 8) is identified as 1 / 10; the primary port (interface 9) of node E is identified as 1 / 11, and the secondary port (interface 10) is identified as 1 / 12.

[0158] The master node further comprises an interface 11, identified as 1 / 13, which is connected with the network device 1 (MAC address: 1-1-1); the node A further comprises an interface 12, identified as 1 / 14, which is connected with the network device 2 (MAC address: 2-2-2); the node D further comprises an interface 13, identified as 1 / 15, which is connected with the network device 3 (MAC address: 3-3-3); and the node E further comprises an interface 14, identified as 1 / 16, which is connected with the network device 4 (MAC address: 4-4-4).

[0159] If a fault occurs in the ring network, the polling mechanism or the Link Down notification mechanism can be used to detect the ring network fault.

[0160] As shown in Figure 3-A , if the link between the node B and the node A is faulty, the node B and the node C perceive that the interface 4 and the interface 5 change from the up state to the down state. The node B and the node C respectively adjust the node state of the node B and the node C from the Link-Up state to the Link-Down state.

[0161] After determining the ring network fault, the master node adjusts the node state of the master node from the Complete State (healthy state) to the Failed State (faulty state), and releases the blocking state of the secondary port in the protection VLAN. It can be understood that, due to the change of the network topology, in order to avoid the message direction error, each node in the RRPP ring network will refresh the forwarding table (for example, the MAC table, the ARP table, the ND table, and the like) of the node.

[0162] In the embodiment of the present application, the master node periodically sends the Hello message on the RRPP ring network through the primary port to detect whether the ring network fault is recovered. Due to the above-mentioned link fault, the master node cannot receive the Hello message through the secondary port within a preset time (for example, 1s), at this time, the master node maintains the Failed state of the master node, and continues to maintain the release of the blocking state of the secondary port in the protection VLAN. The secondary port can be used to forward the data message (unicast message, broadcast message, unknown unicast message). It can be understood that the Hello belongs to the protocol message.

[0163] In the embodiment of the present application, the master node periodically sends the Hello message on the RRPP ring network through the primary port to detect whether the ring network fault is recovered. Due to the above-mentioned link fault, the master node cannot receive the Hello message through the secondary port within a preset time (for example, 1s), at this time, the master node maintains the Failed state of the master node, and continues to maintain the release of the blocking state of the secondary port in the protection VLAN. The secondary port can be used to forward the data message (unicast message, broadcast message, unknown unicast message). It can be understood that the Hello belongs to the protocol message. Figure 3-A Figure 3-A

[0164] ​​If the link failure is restored, nodes B and C detect that interfaces 4 and 5 have changed from down to up. Nodes B and C each adjust their node status from Link-Down to Pre-forwarding. Node B also sets the status of interface 4 in the protection VLAN to Blocked, and node C sets the status of interface 5 in the protection VLAN to Blocked. This means that interfaces B and C cannot forward data packets (unicast packets, broadcast packets, and unknown unicast packets), but can forward protocol packets (Hello packets).

[0165] At this time, the network topology has not changed, and the RRPP ring network still forwards packets according to the forwarding table at the time of the ring network failure.

[0166] As can be seen from the preceding description, the master node cannot immediately detect the link failure recovery. However, the master node still periodically sends Hello messages on the RRPP ring network through the primary port to detect whether the ring network failure has recovered. Because the link failure has recovered, and the status of interfaces 4 and 5 in the protection VLAN is set to blocked, Hello messages can be forwarded on the link.

[0167] See also Figure 3-B , Figure 3-B A schematic diagram of RRPP ring network failure recovery provided in the embodiment of the present application. Figure 3-B The solid line indicates the forwarding direction of unicast messages on the ring network. Figure 3-B The dotted line indicates the forwarding direction of the broadcast message on the ring network. Figure 3-B Indicated by dotted solid line.

[0168] After sending a Hello message on the RRPP ring network, the master node may determine whether the Hello message is received through the secondary port within a preset time.

[0169] If the master node receives a Hello message through its secondary port within the preset time, it adjusts the secondary port's data message transmission and reception capabilities. The master node disables the secondary port's broadcast transmission and reception capabilities, while maintaining unicast transmission and reception capabilities. In other words, the master node's secondary port can continue to transmit and receive unicast messages, but can no longer transmit and receive broadcast messages.

[0170] After the master node adjusts the function of the secondary port, it also migrates its own node status from Failed to Complete.

[0171] Understandably, at this point, unicast packets are still forwarded along the original path, preventing packet loss. However, since interfaces 4 and 5 are blocked in the protected VLAN, and the master node's secondary port has broadcast transceiver functionality disabled, there is a blockage in the path used to forward broadcast packets, leading to packet loss.

[0172] See also Figure 3-C , Figure 3-C Another RRPP ring network fault recovery diagram provided in the embodiment of the present application. Figure 3-C The solid line indicates the forwarding direction of unicast messages on the ring network. Figure 3-C The dotted line indicates the forwarding direction of the broadcast message on the ring network. Figure 3-C Indicated by dotted solid line.

[0173] After adjusting the function of the secondary port, the master node first disables MAC address learning on both its primary and secondary ports. The master node then generates a first Complete-Flush-FDB message and sends it over the RRPP ring network via the primary port. It is understood that the first Complete-Flush-FDB message is also a protocol message.

[0174] Since the link failure on the RRPP ring network is recovered, each node on the RRPP ring network will receive the first Complete-Flush-FDB message.

[0175] Furthermore, after receiving the first Complete-Flush-FDB message, node B releases the blocking state of interface 4 under the protection VLAN according to the first Complete-Flush-FDB message, and at the same time sets all its interfaces in the ring network (the primary and secondary ports included in node B) to prohibit MAC address learning.

[0176] Similarly, after node C receives the first Complete-Flush-FDB message, it releases the blocking state of interface 5 under the protection VLAN according to the first Complete-Flush-FDB message, and at the same time sets all its interfaces in the ring network (the primary and secondary ports included in node C) to prohibit MAC address learning.

[0177] Furthermore, after receiving the first Complete-Flush-FDB message, the other transmission nodes (node ​​A, node D, and node E) on the RRPP ring network set all their interfaces in the ring network (primary and secondary ports of other transmission nodes) to prohibit MAC address learning according to the first Complete-Flush-FDB message.

[0178] Understandably, at this point, unicast packets are still forwarded along the original path, ensuring no packet loss. Because interfaces 4 and 5 are unblocked in the protection VLAN and the master node's ports have their broadcast transceiver functions disabled, there are no blockages along the path used to forward broadcast packets, ensuring no packet loss.

[0179] See also Figure 3-D , Figure 3-D This is another RRPP ring network fault recovery diagram provided by the embodiment of the present application. The forwarding direction of the first Complete-Flush-FDB message on the ring network is Figure 3-D The solid line indicates the forwarding direction of unicast messages on the ring network. Figure 3-D The dotted line indicates the forwarding direction of the broadcast message on the ring network. Figure 3-D Indicated by dotted solid line.

[0180] After sending the first Complete-Flush-FDB message on the RRPP ring network, the master node generates MAC migration message 1 again and sends MAC migration message 1 on the RRPP ring network through the secondary port. It can be understood that MAC migration message 1 is also a protocol message.

[0181] Since the link failure on the RRPP ring network is restored, each node on the RRPP ring network will receive the MAC migration message 1.

[0182] After node E, connected to the secondary port of the master node, receives MAC migration message 1 as the first transmission node, node E deletes MAC table entry 1 on interface 10 that received MAC migration message 1 and adds the MAC address (4-4-4) of network device 4 to MAC migration message 1, resulting in MAC migration message 2. Node E continues to send MAC migration message 2 to node D over the RRPP ring network. MAC migration message 2 includes the MAC address (4-4-4) of network device 4.

[0183] After receiving MAC migration message 2, node D obtains the MAC address (4-4-4) of network device 4. Based on MAC migration message 2, node D deletes MAC table entry 2 on interface 8 that received MAC migration message 2, learns the MAC address (4-4-4) of network device 4 on interface 8, and generates a corresponding MAC table entry 3. MAC table entry 3 includes the MAC address (4-4-4) of network device 4 and the identifier (1 / 10) of interface 8.

[0184] Node D adds the MAC address of network device 3 (3-3-3) to MAC migration message 2 to obtain MAC migration message 3. Node D continues to send MAC migration message 3 to node C on the RRPP ring network. MAC migration message 3 includes the MAC address of network device 4 (4-4-4) and the MAC address of network device 3 (3-3-3).

[0185] After receiving MAC migration message 3, node C obtains the MAC address of network device 4 (4-4-4) and the MAC address of network device 3 (3-3-3) from it. Based on MAC migration message 3, node C deletes MAC table entry 4 on interface 6 that received MAC migration message 3, and learns the MAC address of network device 4 (4-4-4) and the MAC address of network device 3 (3-3-3) on interface 6, generating corresponding MAC table entry 4 and MAC table entry 5. MAC table entry 4 includes the MAC address of network device 3 (3-3-3) and the identifier of interface 6 (1 / 8), while MAC table entry 5 includes the MAC address of network device 4 (4-4-4) and the identifier of interface 6 (1 / 8). Node C continues to send MAC migration message 3 to node B on the RRPP ring network.

[0186] After receiving MAC migration message 3, node B obtains the MAC address of network device 4 (4-4-4) and the MAC address of network device 3 (3-3-3) from it. Based on MAC migration message 3, node B deletes MAC table entry 6 on interface 4 that received MAC migration message 3, and learns the MAC address of network device 4 (4-4-4) and the MAC address of network device 3 (3-3-3) on interface 4, generating corresponding MAC table entries 7 and 8. MAC table entry 7 includes the MAC address of network device 3 (3-3-3) and the identifier of interface 4 (1 / 6), and MAC table entry 8 includes the MAC address of network device 4 (4-4-4) and the identifier of interface 4 (1 / 6). Node B continues to send MAC migration message 3 to node A on the RRPP ring network.

[0187] After receiving MAC migration message 3, node A obtains the MAC address (4-4-4) of network device 4 and the MAC address (3-3-3) of network device 3. Based on MAC migration message 3, node A deletes MAC table entry 9 on interface 2, which received MAC migration message 3. It then learns the MAC addresses (4-4-4) of network device 4 and (3-3-3) of network device 3 onto interface 2, generating corresponding MAC table entries 10 and 11. MAC table entry 10 includes the MAC address (3-3-3) of network device 3 and the identifier (1 / 4) of interface 2. MAC table entry 11 includes the MAC address (4-4-4) of network device 4 and the identifier (1 / 4) of interface 2.

[0188] Node A adds the MAC address of network device 2 (2-2-2) to MAC migration message 3, obtaining MAC migration message 4. Node A continues to send MAC migration message 4 to the master node over the RRPP ring network. MAC migration message 4 includes the MAC address of network device 2 (2-2-2), the MAC address of network device 4 (4-4-4), and the MAC address of network device 3 (3-3-3).

[0189] After receiving MAC migration message 4, the master node obtains the MAC address (2-2-2) of network device 2, the MAC address (4-4-4) of network device 4, and the MAC address (3-3-3) of network device 3. Based on MAC migration message 4, the master node deletes MAC table entry 12 on the primary port that received MAC migration message 4 and learns the MAC addresses (2-2-2) of network device 2, (4-4-4) of network device 4, and (3-3-3) of network device 3 onto the primary port, generating corresponding MAC table entries 13, 14, and 15. MAC table entry 13 includes the MAC address (2-2-2) of network device 2 and the primary port identifier (1 / 1). MAC table entry 14 includes the MAC address (3-3-3) of network device 3 and the primary port identifier (1 / 1). MAC table entry 15 includes the MAC address (4-4-4) of network device 4 and the primary port identifier (1 / 1).

[0190] At this point, the first update of the local MAC table of each node on the ring network is completed.

[0191] The local initial MAC table of each node on the ring network is shown in Table 1, and the first updated MAC table of each node on the ring network is shown in Table 2. The local initial MAC table refers to the MAC table that is refreshed by each node to avoid message misdirection after a ring network failure.

[0192] Table 1 is the local initial MAC table of each node on the ring network

[0193]

[0194] Table 2 shows the first update of the MAC table of each node on the ring network.

[0195]

[0196]

[0197] The master node continues to generate a MAC migration message 5, which includes the MAC address (1-1-1) of network device 1. The master node sends the MAC migration message 5 on the RRPP ring network through the primary port. It can be understood that the MAC migration message 5 is also a protocol message.

[0198] Since the link failure on the RRPP ring network is restored, each node on the RRPP ring network will receive the MAC migration message 5 .

[0199] After node A connected to the main port included in the main node receives MAC migration message 5, node A will delete the MAC table entry 16 on interface 1 that receives MAC migration message 5 according to MAC migration message 5, and learn the MAC address (1-1-1) of network device 1 to interface 1, and generate the corresponding MAC table entry 17. MAC table entry 17 includes the MAC address (1-1-1) of network device 1 and the identifier (1 / 3) of interface 1.

[0200] Node A adds the MAC address of network device 2 (2-2-2) to MAC migration message 5, obtaining MAC migration message 6. Node A continues to send MAC migration message 6 to node B over the RRPP ring network. MAC migration message 6 includes the MAC address of network device 2 (2-2-2) and the MAC address of network device 1 (1-1-1).

[0201] After receiving MAC migration message 6, node B obtains the MAC address (2-2-2) of network device 2 and the MAC address (1-1-1) of network device 1 from it. Based on MAC migration message 6, node B deletes MAC table entry 18 on interface 3 that received MAC migration message 6, and learns the MAC address (2-2-2) of network device 2 and the MAC address (1-1-1) of network device 1 onto interface 3, generating corresponding MAC table entry 19 and MAC table entry 20. MAC table entry 19 includes the MAC address (1-1-1) of network device 1 and the identifier (1 / 5) of interface 3, and MAC table entry 20 includes the MAC address (2-2-2) of network device 2 and the identifier (1 / 5) of interface 3. Node B continues to send MAC migration message 6 to node C on the RRPP ring network. This MAC migration message 6 includes the MAC address (1-1-1) of network device 1 and the MAC address (2-2-2) of network device 2.

[0202] After receiving MAC migration message 6, node C obtains the MAC address (1-1-1) of network device 1 and the MAC address (2-2-2) of network device 2 from it. Based on MAC migration message 6, node C deletes MAC table entry 21 on interface 5 that received MAC migration message 3, and learns the MAC address (1-1-1) of network device 1 and the MAC address (2-2-2) of network device 2 onto interface 5, generating corresponding MAC table entries 22 and 23. MAC table entry 22 includes the MAC address (1-1-1) of network device 1 and the identifier (1 / 7) of interface 5, while MAC table entry 23 includes the MAC address (2-2-2) of network device 2 and the identifier (1 / 7) of interface 5. Node C continues to send MAC migration message 6 to node D on the RRPP ring network.

[0203] After receiving MAC migration message 6, node D obtains the MAC address (1-1-1) of network device 1 and the MAC address (2-2-2) of network device 2 from it. Based on MAC migration message 6, node D deletes MAC table entry 24 on interface 7 that received MAC migration message 6, and learns the MAC address (1-1-1) of network device 1 and the MAC address (2-2-2) of network device 2 onto interface 7, generating corresponding MAC table entries 25 and 26. MAC table entry 25 includes the MAC address (1-1-1) of network device 1 and the identifier (1 / 9) of interface 7. MAC table entry 26 includes the MAC address (2-2-2) of network device 2 and the identifier (1 / 9) of interface 7.

[0204] Node D adds the MAC address of network device 3 (3-3-3) to MAC migration message 6 to obtain MAC migration message 7. Node D continues to send MAC migration message 7 to node E on the RRPP ring network. MAC migration message 7 includes the MAC address of network device 1 (1-1-1), the MAC address of network device 2 (2-2-2), and the MAC address of network device 3 (3-3-3).

[0205] After receiving MAC migration message 7, node E obtains the MAC address (1-1-1) of network device 1, the MAC address (2-2-2) of network device 2, and the MAC address (3-3-3) of network device 3. Based on MAC migration message 7, node E deletes MAC table entry 27 on interface 9 that received MAC migration message 7 and learns the MAC address (1-1-1) of network device 1, the MAC address (2-2-2) of network device 2, and the MAC address (3-3-3) of network device 3 onto interface 9, generating corresponding MAC table entries 28, 29, and 30. MAC table entry 28 includes the MAC address (1-1-1) of network device 1 and the identifier (1 / 11) of interface 9. MAC table entry 29 includes the MAC address (2-2-2) of network device 2 and the identifier (1 / 11) of interface 9. MAC table entry 30 includes the MAC address (3-3-3) of network device 3 and the identifier (1 / 11) of interface 9.

[0206] Node E continues to send MAC migration message 7 to the master node on the RRPP ring network. After receiving MAC migration message 7, the master node discards MAC migration message 7.

[0207] At this point, the second update of the local MAC table of each node on the ring network is completed.

[0208] The local MAC table of each node on the ring network is shown in Table 3.

[0209] Table 3 shows the local updated MAC table of each node on the ring network.

[0210]

[0211]

[0212] Therefore, the master node sends MAC migration messages through the primary and secondary ports respectively, so that each node on the RRPP ring network updates its local MAC table. It is understandable that after each node updates its local MAC table, it can automatically update its ARP table / ND table.

[0213] It should be noted that when each node adds the MAC address of a network device to a MAC migration message, it also adds the VLAN ID of the VLAN to which the network device belongs (e.g., VLAN 100) to the MAC migration message. Thus, when each node generates a corresponding MAC table entry, the generated MAC table entry also includes the VLAN ID. In the aforementioned embodiment, due to space limitations, the VLAN ID is not reflected in the MAC table entry or table.

[0214] After each node on the RRPP ring network updates its local MAC address table, the master node first sets both its primary and secondary ports to resume MAC address learning. The master node then generates a second Complete-Flush-FDB message. The master node continues to send this second Complete-Flush-FDB message across the RRPP ring network via the primary port. It should be understood that this second Complete-Flush-FDB message is also a protocol message.

[0215] Since the link failure on the RRPP ring network is recovered, each node on the RRPP ring network will receive the second Complete-Flush-FDB message.

[0216] Furthermore, after receiving the second Complete-Flush-FDB message, each transmission node on the RRPP ring network sets all its interfaces (primary and secondary ports of each transmission node) in the ring network to resume MAC address learning according to the second Complete-Flush-FDB message.

[0217] After the master node sends the second Complete-Flush-FDB message on the RRPP ring network, when receiving the second Complete-Flush-FDB message through the secondary port, the master node sets the state of the secondary port in the protection VLAN to blocking state and restores the broadcast transceiver function.

[0218] It is understandable that at this point, unicast packets will be forwarded along the path taken before the link failure, ensuring no unicast packet loss. Because the first and second transmission nodes have unblocked their interfaces in the protection VLAN, and the master node has set the secondary port in the protection VLAN to a blocked state, broadcast packets will also be forwarded along the path taken before the link failure, ensuring no broadcast packet loss.

[0219] See also Figure 3-E , Figure 3-E This is another RRPP ring network fault recovery diagram provided by the embodiment of the present application. The forwarding direction of the second Complete-Flush-FDB message on the ring network is Figure 3-E The solid line indicates the forwarding direction of unicast messages on the ring network. Figure 3-E The dotted line indicates the forwarding direction of the broadcast message on the ring network. Figure 3-E Indicated by dotted solid line.

[0220] Based on the same inventive concept, the present application also provides a communication device corresponding to the communication method. Figure 4 , Figure 4A communication device is provided in an embodiment of the present application. The device is applied to a master node on a ring network, the master node includes a primary port and a secondary port, the ring network further includes a first transmission node and a second transmission node, the first transmission node includes a first interface, the second transmission node includes a second interface, and the link state between the first interface and the second interface is restored from a fault state to a normal state. The device includes: a sending unit 410, a receiving unit 420, and a setting unit 430;

[0221] The sending unit 410 is configured to send a Hello message on the ring network through the primary port;

[0222] The setting unit 430 is configured to disable the broadcast transceiver function of the secondary port and maintain the unicast transceiver function when the receiving unit 420 receives the Hello message through the secondary port within a preset time;

[0223] The sending unit 410 is further configured to send a first Complete-Flush-FDB message on the ring network through the primary port, so that the first transmission node and the second transmission node respectively release the blocking state of the first interface and the second interface respectively included in the protection VLAN, and each transmission node on the ring network sets its own interface on the ring network to prohibit MAC address learning according to the first Complete-Flush-FDB message;

[0224] The sending unit 410 is further configured to send a first MAC migration message on the ring network through the secondary port, and send a second MAC migration message on the ring network through the primary port, so that each node on the ring network updates a local MAC table according to the first MAC migration message and the second MAC migration message;

[0225] The sending unit 410 is further configured to send a second Complete-Flush-FDB message on the ring network through the primary port, so that each transmission node sets its own interface on the ring network to resume MAC address learning according to the second Complete-Flush-FDB message;

[0226] The setting unit 430 is further configured to, when the receiving unit 420 receives the second Complete-Flush-FDB message through the secondary port, set the state of the secondary port in the protection VLAN to a blocked state and restore the broadcast transceiver function.

[0227] Optionally, the setting unit 430 is further configured to set the node state as a Failed state when the receiving unit 420 does not receive the Hello packet through the secondary port within the preset time.

[0228] The apparatus further includes a releasing unit (not shown in the figure) configured to release the blocking state of the secondary port under the protection VLAN.

[0229] The apparatus further includes a migrating unit (not shown in the figure) configured to migrate the node state from the Failed state to a Complete state.

[0230] Optionally, the setting unit 430 is further configured to set the primary port and the secondary port as prohibited MAC address learning.

[0231] The setting unit 430 is further configured to set the primary port and the secondary port as restored MAC address learning.

[0232] Optionally, the sending unit 410 is specifically configured to send the first MAC migration packet on the ring network through the secondary port, so that a first transmission node receiving the first MAC migration packet deletes a first MAC table item on a third interface receiving the first MAC migration packet, and when there is a network device accessing a non-primary secondary port locally, adds a first MAC address of the network device in the first MAC migration packet, and sends a third MAC migration packet to a next hop node, the third MAC migration packet including the first MAC address.

[0233] Optionally, the apparatus further includes:

[0234] The apparatus further includes a deleting unit (not shown in the figure) configured to delete a second MAC table item on the primary port when the receiving unit 420 receives the third MAC migration packet through the primary port.

[0235] The apparatus further includes a generating unit (not shown in the figure) configured to learn the first MAC address to the primary port, and generate a third MAC table item including the first MAC address and an identifier of the primary port.

[0236] Optionally, the primary node further includes a fourth interface.

[0237] The sending unit 410 is specifically configured to send the second MAC migration message on the ring network through the primary port, so that the transmission node that receives the second MAC migration message deletes the fourth MAC table entry on the fifth interface that receives the second MAC migration message, and when the second MAC migration message includes the second MAC address, generates a fifth MAC table entry corresponding to the second MAC address on the fifth interface; when there is a network device connected to the non-primary secondary port locally, adds the third MAC address of the network device to the second MAC migration message, and sends a fourth MAC migration message to the next hop node, where the fourth MAC migration message includes the second MAC address and the third MAC address;

[0238] The second MAC address is the MAC address of the network device connected to the fourth interface, and the fifth MAC table entry includes the second MAC address and the identifier of the fifth interface.

[0239] Optionally, the device further comprises:

[0240] A discarding unit (not shown in the figure) is configured to discard the fourth MAC migration message when the fourth MAC migration message is received through the secondary port.

[0241] Therefore, by applying the communication device provided by the present application, the master node sends a Hello message on the ring network through the main port; when the Hello message is received through the secondary port within the preset time, the master node turns off the broadcast transceiver function included in the secondary port and maintains the unicast transceiver function; through the main port, the master node sends a first Complete-Flush-FDB message on the ring network, so that the first transmission node and the second transmission node respectively release the blocking state of the first interface and the second interface respectively included in their respective protection VLANs, and each transmission node on the ring network sets its own interface on the ring network to prohibit MAC address learning according to the first Complete-Flush-FDB message; through the secondary port , the master node sends a first MAC migration message on the ring network, and through the primary port, the master node sends a second MAC migration message on the ring network, so that each node on the ring network updates the local MAC table according to the first MAC migration message and the second MAC migration message; through the primary port, the master node sends a second Complete-Flush-FDB message on the ring network, so that each transmission node sets its own interface on the ring network to resume MAC address learning according to the second Complete-Flush-FDB message; when the second Complete-Flush-FDB message is received through the secondary port, the master node sets the status of the secondary port under the protection VLAN to a blocked state, and restores the broadcast receiving and sending functions.

[0242] In this way, the master node adjusts the function of its secondary port based on the Hello message, uses the Complete-Flush-FDB message to instruct each node on the ring network to disable or resume MAC address learning, and then sends MAC migration messages on the ring network through its primary and secondary ports, respectively. Each node on the ring network then learns MAC entries on its primary and secondary ports. This achieves zero unicast packet loss during failover, and also solves the problem of unicast packet loss that is common during the recovery process of existing RRPP ring networks.

[0243] Based on the same inventive concept, the present application also provides a communication device corresponding to the communication method. Figure 5 , Figure 5 Another communication device provided in an embodiment of the present application is applied to a transmission node on a ring network, and includes: a receiving unit 510, a setting unit 520, and an updating unit 530;

[0244] The setting unit 520 is configured to, when the receiving unit 510 receives the first Complete-Flush-FDB message, set the interface on the ring network to prohibit MAC address learning according to the first Complete-Flush-FDB message;

[0245] The updating unit 530 is configured to update the local MAC table according to the first MAC migration message and the second MAC migration message when the receiving unit 510 receives the first MAC migration message and the second MAC migration message;

[0246] The setting unit 520 is further configured to, when the receiving unit 510 receives the second Complete-Flush-FDB message, set the interface on the ring network to resume MAC address learning according to the second Complete-Flush-FDB message.

[0247] Optionally, the transmission node includes a first interface, and a link in the ring network where the first interface is located has recovered from a fault state to a normal state;

[0248] The setting unit 510 is further configured to set the state of the first interface in the protection VLAN to a blocking state;

[0249] The apparatus further includes: a migration unit (not shown in the figure), configured to migrate the node state from the Link-Down state to the Pre-forwarding state;

[0250] A releasing unit (not shown in the figure) is used to release the blocking state of the first interface in the protection VLAN according to the first Complete-Flush-FDB message.

[0251] Optionally, the transmission node includes a second interface;

[0252] The updating unit 530 is specifically configured to delete the first MAC table entry on the second interface if the transmission node is the first transmission node to receive the first MAC migration message and receives the first MAC migration message through the second interface;

[0253] The device further comprises:

[0254] a sending unit (not shown in the figure), configured to send the first MAC migration message or the third MAC migration message to a next-hop node, where the third MAC migration message includes the first MAC address;

[0255] The first MAC address is a MAC address of a network device connected to a non-primary secondary port included in the transmission node.

[0256] Optionally, the transmission node further includes a third interface;

[0257] The updating unit 530 is further specifically configured to, if the transmission node is not the first transmission node to receive the third MAC migration message and receives the first MAC migration message or the third MAC migration message through the third interface, delete the second MAC table entry on the third interface;

[0258] When the receiving unit 510 receives the third MAC migration message, it learns the first MAC address to the third interface and generates a third MAC table entry, where the third MAC table entry includes the first MAC address and the identifier of the third interface;

[0259] The sending unit (not shown in the figure) is further configured to send the first MAC migration message or the fourth MAC migration message to the next hop node, where the fourth MAC migration message includes the first MAC address and the second MAC address;

[0260] The second MAC address is a MAC address of a network device connected to a non-primary secondary port included in the transmission node.

[0261] Optionally, the transmission node further includes a fourth interface;

[0262] The updating unit 530 is specifically configured to delete the fourth MAC table entry on the fourth interface if the transmission node is any transmission node that receives the second MAC migration message and receives the second MAC migration message through the fourth interface;

[0263] If the second MAC migration message includes a third MAC address, learn the third MAC address to the fourth interface and generate a fifth MAC table entry, where the fifth MAC table entry includes the third MAC address and an identifier of the fourth interface;

[0264] The device further comprises:

[0265] a sending unit (not shown in the figure), configured to send the second MAC migration message or the fifth MAC migration message to the next hop node, where the fifth MAC migration message includes the third MAC address and the fourth MAC address;

[0266] Among them, if the non-primary secondary port included in the previous hop node of the transmission node is connected to a network device, then the third MAC address is the MAC address of the network device connected to the non-primary secondary port included in the previous hop node, and the fourth MAC address is the MAC address of the network device connected to the non-primary secondary port included in the transmission node.

[0267] Therefore, by applying the communication device provided in the present application, when the transmission node receives the first Complete-Flush-FDB message, according to the first Complete-Flush-FDB message, the transmission node sets the interface on the ring network to prohibit MAC address learning; when the transmission node receives the first MAC migration message and the second MAC migration message, according to the first MAC migration message and the second MAC migration message, the transmission node updates the local MAC table; when the second Complete-Flush-FDB message is received, according to the second Complete-Flush-FDB message, the transmission node sets the interface on the ring network to resume MAC address learning.

[0268] In this way, the master node adjusts the function of its secondary port based on the Hello message, uses the Complete-Flush-FDB message to instruct each node on the ring network to disable or resume MAC address learning, and then sends MAC migration messages on the ring network through its primary and secondary ports, respectively. Each node on the ring network then learns MAC entries on its primary and secondary ports. This achieves zero unicast packet loss during failover, and also solves the problem of unicast packet loss that is common during the recovery process of existing RRPP ring networks.

[0269] Based on the same inventive concept, the embodiment of the present application further provides a network device, such asFigure 6 As shown in FIG. 6, the communication device includes a processor 610, a transceiver 620 and a machine readable storage medium 630. The machine readable storage medium 630 stores machine executable instructions which can be executed by the processor 610 to cause the processor 610 to perform the communication method provided by the embodiments of the present application. The above-mentioned Figure 4 、 Figure 5 The communication device shown in FIG. 6 can be implemented by using the network equipment hardware structure shown in FIG. 7. Figure 6 The above-mentioned computer readable storage medium 630 can include a random access memory (RAM) and can also include a non-volatile memory (NVM), such as at least one disk memory. Optionally, the computer readable storage medium 630 can also be at least one storage device located away from the above-mentioned processor 610.

[0270] The above-mentioned processor 610 can be a general processor, including a central processing unit (CPU), a network processor (NP) and the like; and can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.

[0271] In the embodiments of the present application, the processor 610 reads the machine executable instructions stored in the machine readable storage medium 630, and the machine executable instructions cause the processor 610 to be able to realize the communication method described in the above-mentioned embodiments of the present application by itself and by calling the transceiver 620.

[0272] In addition, the embodiments of the present application provide a machine readable storage medium 630 which stores machine executable instructions. When called and executed by the processor 610, the machine executable instructions cause the processor 610 to be able to realize the communication method described in the above-mentioned embodiments of the present application by itself and by calling the transceiver 620.

[0273] The implementation process of the functions and roles of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0274]

[0275] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0276] As for the embodiments of the communication device and the machine-readable storage medium, since the method contents involved are basically similar to those of the aforementioned method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0277] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A communication method, characterized in that: The method is applied to a master node on a ring network, the master node including a primary port and a secondary port, the ring network further including a first transmission node and a second transmission node, the first transmission node including a first interface, the second transmission node including a second interface, and the link state between the first interface and the second interface recovering from a fault state to a normal state, the method comprising: Sending a Hello message on the ring network through the primary port; When the Hello message is received through the secondary port within a preset time, the broadcast transceiver function included in the secondary port is turned off, and the unicast transceiver function is maintained; Sending a first Complete-Flush-FDB message on the ring network through the primary port, so that the first transmission node and the second transmission node respectively release the blocking state of the first interface and the second interface respectively included in the protection VLAN, and each transmission node on the ring network sets its own interface on the ring network to prohibit MAC address learning according to the first Complete-Flush-FDB message; Sending a first MAC migration message on the ring network through the secondary port, and sending a second MAC migration message on the ring network through the primary port, so that each node on the ring network updates a local MAC table according to the first MAC migration message and the second MAC migration message; Sending a second Complete-Flush-FDB message on the ring network through the primary port, so that each transmission node sets its own interface on the ring network to resume MAC address learning according to the second Complete-Flush-FDB message; When the second Complete-Flush-FDB message is received through the secondary port, the state of the secondary port in the protection VLAN is set to a blocking state, and the broadcast transceiver function is restored.

2. The method according to claim 1, characterized in that The method further comprises: When the Hello message is not received through the secondary port within the preset time, the node state is set to Failed state; Unblocking the secondary port in the protection VLAN; Before sending the first Complete-Flush-FDB message on the ring network through the primary port, the method further includes: The node state is migrated from the Failed state to the Complete state.

3. The method according to claim 1, characterized in that Before sending the first Complete-Flush-FDB message on the ring network through the primary port, the method further includes: Setting the primary port and the secondary port to prohibit MAC address learning; Before sending the second Complete-Flush-FDB message on the ring network through the primary port, the method further includes: The primary port and the secondary port are both configured to resume MAC address learning.

4. The method according to claim 1, wherein The sending of the first MAC migration message on the ring network through the secondary port, so that each node on the ring network updates a local MAC table according to the first MAC migration message, specifically includes: The first MAC migration message is sent on the ring network through the secondary port, so that the first transmission node that receives the first MAC migration message deletes the first MAC table entry on the third interface that receives the first MAC migration message, and when there is a network device connected to the non-primary secondary port locally, the first MAC address of the network device is added to the first MAC migration message, and a third MAC migration message is sent to the next-hop node, where the third MAC migration message includes the first MAC address.

5. The method according to claim 4, characterized in that The method further comprises: When the third MAC migration message is received through the primary port, the second MAC table entry on the primary port is deleted; The first MAC address is learned on the primary port, and a third MAC table entry is generated, where the third MAC table entry includes the first MAC address and an identifier of the primary port.

6. The method according to claim 4, characterized in that The master node further includes a fourth interface; The sending of the second MAC migration message on the ring network through the primary port, so that each node on the ring network updates a local MAC table according to the second MAC migration message, specifically includes: sending the second MAC migration message on the ring network through the primary port, so that a transmission node that receives the second MAC migration message deletes the fourth MAC table entry on the fifth interface that receives the second MAC migration message, and when the second MAC migration message includes the second MAC address, generates a fifth MAC table entry corresponding to the second MAC address on the fifth interface; when a network device connected to a non-primary secondary port exists locally, adds the third MAC address of the network device to the second MAC migration message, and sends a fourth MAC migration message to a next-hop node, where the fourth MAC migration message includes the second MAC address and the third MAC address; The second MAC address is the MAC address of the network device connected to the fourth interface, and the fifth MAC table entry includes the second MAC address and the identifier of the fifth interface.

7. The method according to claim 6, characterized in that The method further comprises: When the fourth MAC migration message is received through the secondary port, the fourth MAC migration message is discarded.

8. A communication method, characterized in that: The method is applied to a transmission node on a ring network, and the method includes: When receiving the first Complete-Flush-FDB message, according to the first Complete-Flush-FDB message, setting the interface on the ring network to prohibit MAC address learning; When receiving the first MAC migration message and the second MAC migration message, updating the local MAC table according to the first MAC migration message and the second MAC migration message; When the second Complete-Flush-FDB message is received, the interface on the ring network is set to resume MAC address learning according to the second Complete-Flush-FDB message.

9. The method according to claim 8, characterized in that The transmission node includes a first interface, and a link in the ring network where the first interface is located has recovered from a fault state to a normal state; Before setting the interface on the ring network to prohibit MAC address learning, the method further includes: Setting the state of the first interface in the protection VLAN to a blocked state; Migrate the node state from Link-Down state to Pre-forwarding state; According to the first Complete-Flush-FDB message, the blocking state of the first interface in the protection VLAN is released.

10. The method according to claim 8, characterized in that The transmission node includes a second interface; The updating of the local MAC table according to the first MAC migration message specifically includes: If the transmission node is the first transmission node to receive the first MAC migration message and receives the first MAC migration message through the second interface, deleting the first MAC table entry on the second interface; The method further comprises: Sending the first MAC migration message or the third MAC migration message to the next hop node, where the third MAC migration message includes the first MAC address; The first MAC address is a MAC address of a network device connected to a non-primary secondary port included in the transmission node.

11. The method according to claim 10, characterized in that The transmission node further includes a third interface; The updating of the local MAC table according to the first MAC migration message specifically includes: If the transmission node is not the first transmission node that receives the third MAC migration message and receives the first MAC migration message or the third MAC migration message through the third interface, deleting the second MAC table entry on the third interface; When receiving the third MAC migration message, learn the first MAC address to the third interface and generate a third MAC table entry, where the third MAC table entry includes the first MAC address and the identifier of the third interface; The method further comprises: Sending the first MAC migration message or the fourth MAC migration message to the next hop node, where the fourth MAC migration message includes the first MAC address and the second MAC address; The second MAC address is a MAC address of a network device connected to a non-primary secondary port included in the transmission node.

12. The method according to claim 8, characterized in that The transmission node further includes a fourth interface; The updating of the local MAC table according to the second MAC migration message specifically includes: If the transmission node is any transmission node that receives the second MAC migration message and receives the second MAC migration message through the fourth interface, deleting the fourth MAC table entry on the fourth interface; If the second MAC migration message includes a third MAC address, learn the third MAC address to the fourth interface and generate a fifth MAC table entry, where the fifth MAC table entry includes the third MAC address and an identifier of the fourth interface; The method further comprises: Sending the second MAC migration message or the fifth MAC migration message to the next hop node, where the fifth MAC migration message includes the third MAC address and the fourth MAC address; Among them, if the non-primary secondary port included in the previous hop node of the transmission node is connected to a network device, then the third MAC address is the MAC address of the network device connected to the non-primary secondary port included in the previous hop node, and the fourth MAC address is the MAC address of the network device connected to the non-primary secondary port included in the transmission node.

13. A communication device, characterized in that: The device is applied to a master node on a ring network, the master node includes a primary port and a secondary port, the ring network also includes a first transmission node and a second transmission node, the first transmission node includes a first interface, the second transmission node includes a second interface, and the link state between the first interface and the second interface is restored from a fault state to a normal state, the device includes: a sending unit, a receiving unit, and a setting unit; The sending unit is used to send a Hello message on the ring network through the primary port; The setting unit is configured to disable the broadcast transceiver function of the secondary port and maintain the unicast transceiver function when the receiving unit receives the Hello message through the secondary port within a preset time; The sending unit is further configured to send a first Complete-Flush-FDB message on the ring network through the primary port, so that the first transmission node and the second transmission node respectively release the blocking state of the first interface and the second interface respectively included in the protection VLAN, and each transmission node on the ring network sets its own interface on the ring network to prohibit MAC address learning according to the first Complete-Flush-FDB message; The sending unit is further configured to send a first MAC migration message on the ring network through the secondary port, and send a second MAC migration message on the ring network through the primary port, so that each node on the ring network updates a local MAC table according to the first MAC migration message and the second MAC migration message; The sending unit is further configured to send a second Complete-Flush-FDB message on the ring network through the primary port, so that each transmission node sets its own interface on the ring network to resume MAC address learning according to the second Complete-Flush-FDB message; The setting unit is further configured to, when the receiving unit receives the second Complete-Flush-FDB message through the secondary port, set the state of the secondary port in the protection VLAN to a blocked state and restore the broadcast transceiver function.

14. A communication device, characterized in that: The device is applied to a transmission node on a ring network, and comprises: a receiving unit, a setting unit, and an updating unit; The setting unit is configured to, when the receiving unit receives the first Complete-Flush-FDB message, set the interface on the ring network to prohibit MAC address learning according to the first Complete-Flush-FDB message; The updating unit is configured to update the local MAC table according to the first MAC migration message and the second MAC migration message when the receiving unit receives the first MAC migration message and the second MAC migration message; The setting unit is further configured to, when the receiving unit receives the second Complete-Flush-FDB message, set the interface on the ring network to resume MAC address learning according to the second Complete-Flush-FDB message.

Citation Information

Patent Citations

  • Flow switching method and device based on RRPP ring

    CN102291288A

  • Scalable distributed web-based authentication

    US20090100500A1