Communication method and device
By adjusting the secondary port function of the primary node and sending specific messages in the RRPP ring network, the problem of unicast packet loss during the ring network recovery process is solved, and zero packet loss of unicast packets during the failure reversal process is achieved.
Patent Information
- Application Number
- CN202411621143.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-11-13
Smart Images

Figure CN119544406A_ABST
Abstract
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] Rapid Ring Protection Protocol (RRPP) is a link layer protocol specifically used in Ethernet rings. When the Ethernet ring is complete, it can prevent broadcast storms caused by data loops, and when the link on the Ethernet ring is disconnected, it can quickly restore the communication link between the nodes on the ring network. Compared with the spanning tree protocol, RRPP converges faster, and the convergence time is independent of the number of nodes on the ring network, so it can be applied to networks with larger network diameters.
[0003] The master node included in the RRPP ring network can detect the health status of the ring network through the polling mechanism and link down notification mechanism, and handle the link failure in time. If the faulty link in the ring network is restored, the master node initiates the ring network recovery process.
[0004] During the ring network recovery process, the master node periodically sends Hello messages on the ring network through its own primary port. If the master node receives a Hello message through its own secondary port within the preset time, the master node determines that all links on the ring network have returned to normal. The master node blocks the secondary port, refreshes the local MAC table entries and ARP / ND table entries, and sends a Complete-Flush-FDB message on the ring network to notify all transmission nodes on the ring network except the master node (including the transmission nodes at both ends of the faulty link) to refresh the local MAC table entries and ARP / ND table entries.
[0005] After receiving the Complete-Flush-FDB message, the transmission node in the Pre-forwarding state on the ring network will migrate to the Link-Up state, and the ring network recovery is complete. If the Complete-Flush-FDB message is lost during the transmission process, the transmission node in the Pre-forwarding state will use the timer to automatically release the temporarily blocked port and refresh the local MAC table and ARP / ND table to restore data communication.
[0006] However, the above-mentioned ring network recovery (fault switching) process will result in unicast packet loss. 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 prior 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 message loss that is prone to occur 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 master port and a slave 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 a first MAC migration message and a second MAC migration message, updating a 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 is applied to a master node on a ring network, the master node includes a master port and a slave 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;
[0020] The sending unit is used to send a Hello message on the ring network through the primary port;
[0021] The setting unit is used to turn off the broadcast transceiver function included in 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 used 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 used 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 used 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 blocking state and restore the broadcast transceiver function.
[0026] In a fourth aspect, the present application provides a communication device, the device is applied to a transmission node on a ring network, the device 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, including a processor and a machine-readable storage medium, the machine-readable storage medium storing 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, including a processor and a machine-readable storage medium, the machine-readable storage medium storing 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 a 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 main port, and sends a second MAC migration message on the ring network through the main 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 main 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 state of the secondary port under the protection VLAN to a blocking state, and resumes the broadcast receiving and sending functions.
[0033] In this way, the master node adjusts the function of its own secondary port according to the Hello message, uses the Complete-Flush-FDB message to instruct each node on the ring network to prohibit and resume MAC address learning, and sends MAC migration messages on the ring network through its own primary and secondary ports, respectively, and each node on the ring network learns MAC table entries on its own primary and secondary ports. This achieves zero unicast packet loss during the fault switching process; at the same time, it also solves the problem of unicast packet loss that is prone to occur during the recovery process of the existing RRPP ring network. 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 a 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 schematic diagram of RRPP ring network fault recovery 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, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0045] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in this article refers to and includes any or all possible combinations of one or more corresponding listed items.
[0046] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the 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 A flow chart of a communication method provided in an embodiment of the present application. The method is applied to a master node, the master node is in a ring network, and the ring network may be specifically an 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 a plurality of 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 main port of the master node, the main 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 change from the up state to the down state. The first transmission node and the second transmission node adjust their node states from the Link-Up state to the Link-Down state respectively.
[0053] After determining that the ring network is faulty, the master node adjusts its node state from Complete State to Failed State, and releases the blocking state of the secondary port under the protection VLAN. It is understandable that, due to the change in network topology, in order to avoid message misdirection, each node on the ring network will refresh its own forwarding table (e.g., MAC table, ARP table, ND table, etc.). This refreshing process is also a prior art and will not be repeated here.
[0054] In the 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 failure has been restored. Due to the above-mentioned link failure, the master node cannot receive the Hello message through the secondary port within the preset time. At this time, the master node maintains its own Failed state and continues to maintain the secondary port in the protection virtual local area network (English: Virtual Local Area Network, referred to as: VLAN) The blocking state is released. The secondary port can be used to forward data messages (unicast messages, broadcast messages, unknown unicast messages).
[0055] If the above 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 messages according to the forwarding table at the time of the ring network failure.
[0057] According to the above, the master node cannot immediately perceive the recovery of the above link failure. 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 been restored. Since the above link failure has been restored, and the status of the first interface and the second interface under the protection VLAN is set to a blocking state, the Hello message can be forwarded on the above link and forwarded to the secondary port of the master node.
[0058] After sending a Hello message on the RRPP ring network, the master node can 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 (for example, 1s, 2s, 3s, 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 included in the secondary port is turned off, 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 of unicast messages, but can no longer continue to transceiver 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] It is understandable that at this time, the unicast message is still forwarded along the original path, so that the unicast message is not lost. Since the first interface and the second interface are in a blocked state under the protection VLAN, and the secondary port of the master node turns off the broadcast transceiver function, there is a blocking point in the path for forwarding the broadcast message, and the broadcast message will be lost.
[0064] Step 130: Send a first Complete-Flush-FDB message on the ring network through the master 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;
[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 releases the blocking state of the second 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 second transmission node) to prohibit media access control address (English: Media Access Control Address, abbreviated as: 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 (primary and secondary ports included in other transmission nodes) in the ring network to prohibit MAC address learning according to the first Complete-Flush-FDB message.
[0070] It should be noted that the prohibition of MAC address learning means that the interface of the received message is prohibited from learning the source MAC address included in the message, and is prohibited from generating a MAC table entry corresponding to the source MAC address. Each transmission node can set the interface to prohibit MAC address learning through the control chip (for example, disabling MAC address learning on the interface).
[0071] It is understandable that at this time, the unicast message is still forwarded along the original path, so that the unicast message is not lost. Since the blocking state of the first interface and the second interface under the protection VLAN is released, and the secondary port of the master node turns off the broadcast transceiver function, there is no blocking point in the path for forwarding the broadcast message, so the broadcast message is not lost.
[0072] Optionally, before executing step 130, the master node first sets its own primary and secondary ports to only prohibit MAC address learning. The master node can set the primary and secondary ports to prohibit 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 sending 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] 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.
[0076] After the transmission node connected to the secondary port included in the primary node receives the first MAC migration message as the first transmission node, the transmission node deletes the first MAC table entry on the third interface that receives the first MAC migration message according to the first MAC migration message, and when there is a network device connected to the non-primary secondary port (the non-primary secondary port of the transmission node) locally, the transmission node adds the first MAC address of the network device to the first MAC migration message to obtain a third MAC migration message. The transmission node continues to send the third MAC migration message to the next hop node on the RRPP ring network, and the third MAC migration message includes the first MAC address.
[0077] After receiving the third MAC migration message, the next hop node obtains the first MAC address therefrom. According to the third MAC migration message, the next hop node deletes the MAC table entry on the interface that receives the third MAC migration message, learns the first MAC address to the interface, and generates a corresponding MAC table entry, which includes the first MAC address and the identifier of the interface. The next hop node will also repeat 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.
[0078] It is understandable that if there is no network device connected to the non-primary secondary port locally at the first transmission node, the first transmission 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.
[0079] 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.
[0080] Optionally, when the master node receives the third MAC migration message through the master port, that is, 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 master port; learns the first MAC address to the master port, and generates a third MAC table entry, which includes the first MAC address and the identifier of the master port.
[0081] When the master node receives the first MAC migration message through the master port, that is, 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 master port. Since 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 can be understood 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 receives 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. When 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, and the fourth interface is used to access the 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 execute the process of deleting MAC table entries, learning MAC addresses, adding MAC addresses in MAC migration messages, and continuing to send MAC migration messages 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 send the second MAC migration message or the fourth MAC migration message to the next hop node after deleting the fourth MAC table entry, depending on whether there is a network device connected to a non-primary or secondary port locally.
[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 fourth MAC migration message is discarded.
[0092] Therefore, the master node sends the MAC migration message 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 a first MAC migration message through the secondary port and then send a 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, and the VLAN is an 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, according to the description of step 140, after each node on the RRPP ring network updates the local MAC table, the master node generates a second Complete-Flush-FDB message again. The master node 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] Further, after receiving the second Complete-Flush-FDB message, each transmission node on the RRPP ring network sets all its interfaces (primary and secondary ports included in each transmission node) in the ring network to resume MAC address learning according to the second Complete-Flush-FDB message. Each transmission node can set the interface to resume MAC address learning through the control chip (for example, enable MAC address learning on the interface).
[0099] It should be noted that the above-mentioned resumption of MAC address learning means prohibiting the interface of the received 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 state of the secondary port under the protection VLAN to a blocked state and restores the broadcast receiving and sending function.
[0104] It is understandable that at this time, the unicast message will be forwarded along the path before the link failure, so that the unicast message will not be lost. Since the blocking state of the first interface and the second interface under the protection VLAN is released, and the state of the secondary port of the master node under the protection VLAN is set to the blocking state, the broadcast message will also be forwarded along the path before the link failure, so that the broadcast message will not be lost.
[0105] Even if the secondary port recovers the broadcast sending and receiving function, since the state of the secondary port in the protection VLAN is blocked, 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 a 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 main 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; the master node sends a second Complete-Flush-FDB message on the ring network through the main 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 state of the secondary port under the protection VLAN to a blocked state, and resumes the broadcast receiving and sending functions.
[0107] In this way, the master node adjusts the function of its own secondary port according to the Hello message, uses the Complete-Flush-FDB message to instruct each node on the ring network to prohibit and resume MAC address learning, and sends MAC migration messages on the ring network through its own primary and secondary ports, respectively, and each node on the ring network learns MAC table entries on its own primary and secondary ports. This achieves zero unicast packet loss during the fault switching process; at the same time, it also solves the problem of unicast packet loss that is prone to occur during the recovery process of the existing RRPP ring network.
[0108] The communication method provided in the embodiment of the present application is described in detail below. Figure 2 , Figure 2 A flowchart of another communication method provided by an embodiment of the present application. The method is applied to a transmission node, the transmission node is in a ring network, and the ring network may be specifically an RRPP ring network. The communication method provided by an embodiment of the present application may include the following steps.
[0109] Step 210: When a first Complete-Flush-FDB message is received, according to the first Complete-Flush-FDB message, the interface on the ring network is set to prohibit MAC address learning;
[0110] Specifically, the ring network is composed of a plurality of 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 including the master node and the transmission node is taken as an example for description.
[0111] Optionally, the transmission node includes a first interface, which is located on the RRPP ring and is specifically a primary port or a 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 located on the RRPP ring.
[0112] 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.
[0113] According to the above embodiments, if the link fails, the transmission node senses that the first interface changes from the up state to the down state, and adjusts its node state from the Link-Up state to the Link-Down state.
[0114] After determining that the ring network is faulty, the master node adjusts its node state from Complete State to Failed State, and releases the blocking state of the secondary port under the protection VLAN. It is understandable that, due to the change in network topology, in order to avoid message misdirection, each node on the ring network will refresh its own forwarding table (e.g., MAC table, ARP table, ND table, etc.). This refreshing process is also a prior art and will not be repeated here.
[0115] In the 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 failure has been restored. Due to the above-mentioned link failure, the master node cannot receive the Hello message through the secondary port within the preset time. At this time, the master node maintains its own Failed state and continues to maintain 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 above link failure is restored, the transmission node senses that the first interface changes from the down state to the up state. The transmission node adjusts its own node state from the Link-Down state to the Pre-forwarding state. 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 cannot be used to forward data packets (unicast packets, broadcast packets, unknown unicast packets), but can be used to forward protocol packets (Hello packets).
[0117] At this time, the network topology has not changed, and the RRPP ring network still forwards messages according to the forwarding table at the time of the ring network failure.
[0118] According to the above, the master node cannot immediately perceive the recovery of the above link failure. 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 been restored. Since the above link failure has been restored and the state of the first interface under the protection VLAN is set to a blocking state, the Hello message can be forwarded on the above link and forwarded to the secondary port of the master node.
[0119] After sending a Hello message on the RRPP ring network, the master node can determine whether the Hello message is received through the secondary port within a preset time.
[0120] If the master node receives a Hello message through the secondary port within a preset time (e.g., 1s, 2s, 3s, etc.), the master node turns off the broadcast transceiver function included in the secondary port and maintains the unicast transceiver function. After the master node adjusts the function of the secondary port, it also migrates its own node state from the Failed state to the Complete state.
[0121] 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.
[0122] 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.
[0123] After the 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.
[0124] It should be noted that the prohibition of MAC address learning means that the interface receiving the message is prohibited from learning the source MAC address included in the message and is prohibited from generating a MAC table entry corresponding to the source MAC address.
[0125] Step 220: When a first MAC migration message and a second MAC migration message are received, update a 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 the embodiment of the present application, the transmission 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 can be understood that the second interface can specifically be a primary port or a secondary port included in the transmission 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 through the second interface, the transmission node deletes the first MAC table entry on the second interface. If there is a network device connected to a non-primary or secondary port 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 continues to send a third MAC migration message to the next-hop node on the RRPP ring network, and 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 at the transmission node, the transmission 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 the embodiment of the present application, the transmission node further includes a third interface, which is on the RRPP ring and connected to the primary port or secondary port included in the previous hop transmission node. It can be understood that the third interface can specifically be the primary port or secondary port included in the transmission node.
[0133] In another implementation, if the transmission node is not the first transmission node that receives 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 connected to a non-primary or secondary port locally on 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 a fourth MAC migration message to the next-hop node (for example, a transmission node or a 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 execute the process of deleting MAC table entries, learning MAC addresses, adding MAC addresses to MAC migration messages, and continuing to send MAC migration messages 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 that receives 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 master 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 can be understood 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, and the second MAC migration message does not include any MAC address.
[0140] Optionally, in the embodiment of the present application, the transmission node further includes a fourth interface, which is on the RRPP ring and connected to a primary port or a secondary port included in the previous hop node (for example, the previous hop node is a primary node or a transmission node). It can be understood that the fourth interface can specifically be a primary port or a secondary port included in the transmission 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 or 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, and 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 execute the process of deleting MAC table entries, learning MAC addresses, adding MAC addresses to MAC migration messages, and continuing to send MAC migration messages 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 transmission 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 transmission nodes 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, after deleting the fourth MAC table entry, send the second MAC migration message or the fourth MAC migration message to the next-hop node according to whether there is a network device connected to the non-primary or secondary port locally.
[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 a first MAC migration message through the secondary port and then send a 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, and the VLAN is an 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 a second Complete-Flush-FDB message is received, according to the second Complete-Flush-FDB message, the interface on the ring network is set to resume MAC address learning.
[0149] Specifically, according to the description of step 220, after each node on the RRPP ring network updates the local MAC table, the master node generates a second Complete-Flush-FDB message again. The master node 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 included in 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 a 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 of the received 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 by 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 own secondary port according to the Hello message, uses the Complete-Flush-FDB message to instruct each node on the ring network to prohibit and resume MAC address learning, and sends MAC migration messages on the ring network through its own primary and secondary ports, respectively, and each node on the ring network learns MAC table entries on its own primary and secondary ports. This achieves zero unicast packet loss during the fault switching process; at the same time, it also solves the problem of unicast packet loss that is prone to occur during the recovery process of the existing RRPP ring network.
[0156] The communication method provided in the embodiment of the present application is described in detail below. Figure 3-A , Figure 3-A A schematic diagram of a RRPP ring network fault provided in an embodiment of the present application. Figure 3-A In the RRPP ring network, the master node, node A, node B, node C, node D and node E are included. Each node includes a primary port and a secondary port, and the primary and secondary ports are both located on the RRPP ring network. Except for the master node, nodes A to E are all transmission 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 also includes an interface 11, identified as 1 / 13, which is connected to network device 1 (MAC address: 1-1-1); node A also includes an interface 12, identified as 1 / 14, which is connected to network device 2 (MAC address: 2-2-2); node D also includes an interface 13, identified as 1 / 15, which is connected to network device 3 (MAC address: 3-3-3); node E also includes an interface 14, identified as 1 / 16, which is connected to network device 4 (MAC address: 4-4-4).
[0159] If a fault occurs in the ring network, the ring network fault can currently be detected through a polling mechanism or a Link Down notification mechanism.
[0160] like Figure 3-A As shown, if the link between node B and node A fails, node B and node C sense that interface 4 and interface 5 change from up to down. Node B and node C adjust their node states from Link-Up to Link-Down respectively.
[0161] After the master node determines that the ring network is faulty, it 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 understandable that due to the change in network topology, in order to avoid message misdirection, each node on the RRPP ring network will refresh its own forwarding table (for example, MAC table, ARP table, ND table, etc.).
[0162] In an embodiment of the present application, the master node periodically sends Hello messages on the RRPP ring network through the main port to detect whether the ring network failure has been restored. Due to the above-mentioned link failure, 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 its own Failed state and continues to maintain 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). It can be understood that Hello belongs to a protocol message.
[0163] The Hello message is forwarded in the ring network. Figure 3-A The solid line indicates the forwarding direction of unicast messages on the ring network. Figure 3-A Indicated by dotted line.
[0164] If the above link failure is restored, Node B and Node C perceive that Interface 4 and Interface 5 change from down state to up state. Node B and Node C adjust their own node states from Link-Down state to Pre-forwarding state respectively. At the same time, Node B sets the state of Interface 4 in the protection VLAN to blocking state; Node C sets the state of Interface 5 in the protection VLAN to blocking state. That is, Interface B and Interface C cannot be used to forward data packets (unicast packets, broadcast packets, unknown unicast packets), but can be used to forward protocol packets (Hello packets).
[0165] At this time, the network topology has not changed, and the RRPP ring network still forwards messages according to the forwarding table at the time of the ring network failure.
[0166] As can be seen from the above, the master node cannot immediately sense the recovery of the above link failure. 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 been restored. Since the above link failure has been restored and the status of interface 4 and interface 5 under the protection VLAN is set to blocking, the Hello message can be forwarded on the above link.
[0167] See also Figure 3-B , Figure 3-B A schematic diagram of RRPP ring network failure recovery provided in an embodiment of the present application. The forwarding direction of the Hello message on the ring network is 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 broadcast message forwarding direction 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 can 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 the secondary port within the preset time, the master node will adjust the secondary port's function of sending and receiving data messages. The master node turns off the broadcast sending and receiving function of the secondary port and maintains the unicast sending and receiving function. That is, the secondary port of the master node can continue to send and receive unicast messages, but can no longer send and receive broadcast messages.
[0170] After the master node adjusts the function of the secondary port, it also migrates its own node status from the Failed status to the Complete status.
[0171] It is understandable that at this time, the unicast message is still forwarded along the original path, so that the unicast message is not lost. Since the interface status at interface 4 and interface 5 under the protection VLAN is blocked, and the secondary port of the master node turns off the broadcast transceiver function, there is a blocking point in the path for forwarding broadcast messages, and the broadcast message will be lost.
[0172] See also Figure 3-C , Figure 3-C Another RRPP ring network fault recovery diagram provided in the embodiment of the present application. The forwarding direction of the Hello message on the ring network is 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 broadcast message forwarding direction on the ring network. Figure 3-C Indicated by dotted solid line.
[0173] After the master node adjusts the function of the secondary port, the master node first sets both its primary and secondary ports to prohibit MAC address learning. 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. It can be understood that the first Complete-Flush-FDB message also belongs to 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, other transmission nodes (node A, node D, node E) on the RRPP ring network set all their interfaces in the ring network (primary and secondary ports included in other transmission nodes) to prohibit MAC address learning according to the first Complete-Flush-FDB message.
[0178] It is understandable that at this time, the unicast message is still forwarded along the original path, so that the unicast message is not lost. Since the blocking state of interface 4 and interface 5 under the protection VLAN is released, and the broadcast transceiver function of the port of the master node is disabled, there is no blocking point in the path for forwarding broadcast messages, so the broadcast message is not lost.
[0179] See also Figure 3-D , Figure 3-D A schematic diagram of another RRPP ring network fault recovery provided in an 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 broadcast message forwarding direction 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 included in the master node receives MAC migration message 1 as the first transmission node, node E deletes MAC table entry 1 on interface 10 that receives MAC migration message 1 according to MAC migration message 1, and adds the MAC address (4-4-4) of network device 4 to MAC migration message 1, thereby obtaining MAC migration message 2. Node E continues to send MAC migration message 2 to node D on the RRPP ring network, and the 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. According to MAC migration message 2, node D deletes MAC table entry 2 on interface 8 that receives MAC migration message 2, learns the MAC address (4-4-4) of network device 4 to interface 8, and generates corresponding MAC table entry 3, which 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 (3-3-3) of network device 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, and MAC migration message 3 includes the MAC address (4-4-4) of network device 4 and the MAC address (3-3-3) of network device 3.
[0185] After receiving MAC migration message 3, node C obtains the MAC address (4-4-4) of network device 4 and the MAC address (3-3-3) of network device 3. According to MAC migration message 3, node C deletes MAC table entry 4 on interface 6 that receives MAC migration message 3, and learns the MAC address (4-4-4) of network device 4 and the MAC address (3-3-3) of network device 3 to interface 6, and generates corresponding MAC table entry 4 and MAC table entry 5. MAC table entry 4 includes the MAC address (3-3-3) of network device 3 and the identifier (1 / 8) of interface 6, and MAC table entry 5 includes the MAC address (4-4-4) of network device 4 and the identifier (1 / 8) of interface 6. 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 (4-4-4) of network device 4 and the MAC address (3-3-3) of network device 3. According to MAC migration message 3, node B deletes MAC table entry 6 on interface 4 that receives MAC migration message 3, and learns the MAC address (4-4-4) of network device 4 and the MAC address (3-3-3) of network device 3 to interface 4, and generates corresponding MAC table entry 7 and MAC table entry 8. MAC table entry 7 includes the MAC address (3-3-3) of network device 3 and the identifier (1 / 6) of interface 4, and MAC table entry 8 includes the MAC address (4-4-4) of network device 4 and the identifier (1 / 6) of interface 4. 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. According to MAC migration message 3, node A deletes MAC table entry 9 on interface 2 that receives MAC migration message 3, and learns the MAC address (4-4-4) of network device 4 and the MAC address (3-3-3) of network device 3 to interface 2, and generates corresponding MAC table entry 10 and MAC table entry 11. MAC table entry 10 includes the MAC address (3-3-3) of network device 3 and the identifier (1 / 4) of interface 2, and 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 (2-2-2) of network device 2 to MAC migration message 3 to obtain MAC migration message 4. Node A continues to send MAC migration message 4 to the master node on the RRPP ring network, and MAC migration message 4 includes 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.
[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. According to MAC migration message 4, the master node deletes MAC table entry 12 on the primary port that receives MAC migration message 4, and learns 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 to the primary port, and generates corresponding MAC table entry 13, MAC table entry 14, and MAC table entry 15. MAC table entry 13 includes the MAC address (2-2-2) of network device 2 and the identifier (1 / 1) of the primary port, MAC table entry 14 includes the MAC address (3-3-3) of network device 3 and the identifier (1 / 1) of the primary port, and MAC table entry 15 includes the MAC address (4-4-4) of network device 4 and the identifier (1 / 1) of the primary port.
[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. Among them, the local initial MAC table refers to the MAC table refreshed by each node to avoid message misdirection after the ring network fails.
[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 in the ring network.
[0195]
[0196]
[0197] The master node continues to generate MAC migration message 5, which includes the MAC address (1-1-1) of network device 1. The master node sends MAC migration message 5 on the RRPP ring network through the primary port. It can be understood that 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 deletes the MAC table entry 16 on interface 1 that receives MAC migration message 5 according to MAC migration message 5, and learns the MAC address (1-1-1) of network device 1 to interface 1, and generates a corresponding MAC table entry 17, which 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 (2-2-2) of network device 2 to MAC migration message 5 to obtain MAC migration message 6. Node A continues to send MAC migration message 6 to node B on the RRPP ring network. The MAC migration message 6 includes the MAC address (2-2-2) of network device 2 and the MAC address (1-1-1) of network device 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. According to MAC migration message 6, node B deletes MAC table entry 18 on interface 3 that receives 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 to interface 3, and generates 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, and the 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. According to MAC migration message 6, node C deletes MAC table entry 21 on interface 5 that receives 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 to interface 5, and generates corresponding MAC table entry 22 and MAC table entry 23. MAC table entry 22 includes the MAC address (1-1-1) of network device 1 and the identifier (1 / 7) of interface 5, and 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. According to MAC migration message 6, node D deletes MAC table entry 24 on interface 7 that receives 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 to interface 7, and generates corresponding MAC table entry 25 and MAC table entry 26. MAC table entry 25 includes the MAC address (1-1-1) of network device 1 and the identifier (1 / 9) of interface 7, and 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 (3-3-3) of network device 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. The MAC migration message 7 includes 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.
[0205] After receiving the MAC migration message 7, the node E obtains the MAC address (1-1-1) of the network device 1, the MAC address (2-2-2) of the network device 2, and the MAC address (3-3-3) of the network device 3. According to the MAC migration message 7, the node E deletes the MAC table entry 27 on the interface 9 that receives the MAC migration message 7, and learns the MAC address (1-1-1) of the network device 1, the MAC address (2-2-2) of the network device 2, and the MAC address (3-3-3) of the network device 3 to the interface 9, and generates the corresponding MAC table entry 28, MAC table entry 29, and MAC table entry 30. The MAC table entry 28 includes the MAC address (1-1-1) of the network device 1 and the identifier (1 / 11) of the interface 9, the MAC table entry 29 includes the MAC address (2-2-2) of the network device 2 and the identifier (1 / 11) of the interface 9, and the MAC table entry 30 includes the MAC address (3-3-3) of the network device 3 and the identifier (1 / 11) of the 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 the local MAC table. It can be understood that after each node updates the local MAC table, it can update the ARP table / ND table by itself.
[0213] It should be noted that when each node adds the MAC address of the network device to the MAC migration message, it also adds the VLAN identifier (for example, VLAN100) of the VLAN to which the network device belongs to the MAC migration message. In this way, when each node generates the corresponding MAC table entry, the generated MAC table entry also includes the VLAN identifier. In the above embodiment, due to limited space, the VLAN identifier is not reflected in the MAC table entry or table.
[0214] After each node on the RRPP ring network updates the local MAC table, the master node first sets its own primary and secondary ports to resume MAC address learning. The master node generates a second Complete-Flush-FDB message again. Through the primary port, the master node continues to send the second Complete-Flush-FDB message on the RRPP ring network. It can be understood that the 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 included in 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 a blocking state and restores the broadcast transceiver function.
[0218] It is understandable that at this time, the unicast message will be forwarded along the path before the link failure, so that the unicast message will not be lost. Since the first transmission node and the second transmission node have released the blocking state of the interface under the protection VLAN, and the master node has set the state of the secondary port under the protection VLAN to the blocking state, the broadcast message will also be forwarded along the path before the link failure, so that the broadcast message will not be lost.
[0219] See also Figure 3-E , Figure 3-E A schematic diagram of another RRPP ring network fault recovery provided in an 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 broadcast message forwarding direction on the ring network. Figure 3-E Indicated by dotted solid line.
[0220] Based on the same inventive concept, the present application embodiment 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 master port and a slave 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 410, a receiving unit 420 and a setting unit 430;
[0221] The sending unit 410 is used to send a Hello message on the ring network through the primary port;
[0222] The setting unit 430 is configured to disable the broadcast transceiving function included in the secondary port and maintain the unicast transceiving 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 blocking state and restore the broadcast transceiver function.
[0227] Optionally, the setting unit 430 is further configured to set the node state to a Failed state when the receiving unit 420 fails to receive the Hello message through the secondary port within the preset time;
[0228] The device further comprises: a releasing unit (not shown in the figure), which is used to release the blocking state of the secondary port under the protection VLAN;
[0229] A migration unit (not shown in the figure) is used to migrate the node state from the Failed state to the Complete state.
[0230] Optionally, the setting unit 430 is further configured to set both the primary port and the secondary port to prohibit MAC address learning;
[0231] The setting unit 430 is further configured to set both the primary port and the secondary port to resume MAC address learning.
[0232] Optionally, the sending unit 410 is specifically used to send the first MAC migration message 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 a non-primary secondary port locally, adds the first MAC address of the network device to the first MAC migration message, and sends a third MAC migration message to the next-hop node, wherein the third MAC migration message includes the first MAC address.
[0233] Optionally, the device further comprises:
[0234] a deleting unit (not shown in the figure), configured to delete the second MAC table entry on the primary port when the receiving unit 420 receives the third MAC migration message through the primary port;
[0235] A generating unit (not shown in the figure) is used to learn the first MAC address to the primary port and generate a third MAC table entry, wherein the third MAC table entry includes the first MAC address and an identifier of the primary port.
[0236] Optionally, the master 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, and when there is a network device connected to a 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, wherein the fourth MAC migration message includes the second MAC address and the third MAC address;
[0238] The second MAC address is a MAC address of a network device connected to the fourth interface, and the fifth MAC table entry includes the second MAC address and an identifier of the fifth interface.
[0239] Optionally, the device further comprises:
[0240] A discarding unit (not shown in the figure) is used 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 a 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 main 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; the master node sends a second Complete-Flush-FDB message on the ring network through the main 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 state of the secondary port under the protection VLAN to a blocked state, and resumes the broadcast receiving and sending functions.
[0242] In this way, the master node adjusts the function of its own secondary port according to the Hello message, uses the Complete-Flush-FDB message to instruct each node on the ring network to prohibit and resume MAC address learning, and sends MAC migration messages on the ring network through its own primary and secondary ports, respectively, and each node on the ring network learns MAC table entries on its own primary and secondary ports. This achieves zero unicast packet loss during the fault switching process; at the same time, it also solves the problem of unicast packet loss that is prone to occur during the recovery process of the existing RRPP ring network.
[0243] Based on the same inventive concept, the present application embodiment 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 the device 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 also used to set the state of the first interface under the protection VLAN to a blocking state;
[0249] The device 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 under 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 that receives the first MAC migration message and receives the first MAC migration message through the second interface;
[0253] The device also includes:
[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, wherein 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 delete the second MAC table entry on the third interface 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;
[0258] When the receiving unit 510 receives the third MAC migration message, the first MAC address is learned to the third interface, and a third MAC table entry is generated, where the third MAC table entry includes the first MAC address and an identifier of the third interface;
[0259] The sending unit (not shown in the figure) is further used 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, the third MAC address is learned to the fourth interface, and a fifth MAC table entry is generated, where the fifth MAC table entry includes the third MAC address and an identifier of the fourth interface;
[0264] The device also includes:
[0265] a sending unit (not shown in the figure), configured to send the second MAC migration message or the fifth MAC migration message to a next-hop node, wherein 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 by 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 own secondary port according to the Hello message, uses the Complete-Flush-FDB message to instruct each node on the ring network to prohibit and resume MAC address learning, and sends MAC migration messages on the ring network through its own primary and secondary ports, respectively, and each node on the ring network learns MAC table entries on its own primary and secondary ports. This achieves zero unicast packet loss during the fault switching process; at the same time, it also solves the problem of unicast packet loss that is prone to occur during the recovery process of the existing RRPP ring network.
[0269] Based on the same inventive concept, the embodiment of the present application also provides a network device, such as Figure 6 As shown, it includes a processor 610, a transceiver 620 and a machine-readable storage medium 630, the machine-readable storage medium 630 stores machine-executable instructions that can be executed by the processor 610, and the processor 610 is prompted by the machine-executable instructions to execute the communication method provided in the embodiment of the present application. Figure 4 , Figure 5 The communication device shown can be used as Figure 6 The network device hardware structure shown is implemented.
[0270] The computer-readable storage medium 630 may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk storage. Optionally, the computer-readable storage medium 630 may also be at least one storage device located away from the processor 610.
[0271] The processor 610 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, or discrete hardware components.
[0272] In the embodiment 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 enable the processor 610 itself and call the transceiver 620 to execute the communication method described in the aforementioned embodiment of the present application.
[0273] In addition, an embodiment of the present application provides a machine-readable storage medium 630, which stores machine-executable instructions. When called and executed by the processor 610, the machine-executable instructions prompt the processor 610 itself and the calling transceiver 620 to execute the communication method described in the aforementioned embodiment of the present application.
[0274] The implementation process of the functions and effects 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.
[0275] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, 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 communication device and machine-readable storage medium embodiments, since the method contents involved are basically similar to 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 substitutions, 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 includes a master port and a slave 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 method includes: 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, characterized in that 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, wherein 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 also 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: The second MAC migration message is sent 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, a fifth MAC table entry corresponding to the second MAC address is generated on the fifth interface, and when there is a network device connected to a non-primary secondary port locally, the third MAC address of the network device is added to the second MAC migration message, and a fourth MAC migration message is sent to the next hop node, where the fourth MAC migration message includes the second MAC address and the third MAC address; The second MAC address is a MAC address of a network device connected to the fourth interface, and the fifth MAC table entry includes the second MAC address and an 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 comprises: 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 a first MAC migration message and a second MAC migration message, updating a 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 under the protection VLAN to a blocking state; Migrate the node state from the Link-Down state to the 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 that receives 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 a 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 also 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, learning the first MAC address to the third interface and generating a third MAC table entry, wherein the third MAC table entry includes the first MAC address and an identifier of the third interface; The method further comprises: Sending the first MAC migration message or the fourth MAC migration message to a 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 also 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, the third MAC address is learned to the fourth interface, and a fifth MAC table entry is generated, 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 master port and a slave 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 used to turn off the broadcast transceiver function included in 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 used 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 used 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 used 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 blocking 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
Method for processing faults of intersected Ethernet ring and nodes
CN102170384A
Flow switching method and device based on RRPP ring
CN102291288A
Methods and systems for Ethernet ring network fault detection and connection
CN102291290A
Method and device for looped network protection
CN102710482A
Scalable distributed web-based authentication
US20090100500A1