Equipment switching method and device suitable for multiple dual homing protocol ring links
By including the target VLAN information in the clearing message, only the MAC and ARP entries of the target VLAN are cleared, thus solving the packet loss problem of DHP ring links caused by device switching and improving communication quality and networking flexibility.
Patent Information
- Application Number
- CN202511382507.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-25
- Publication Date
- 2025-12-05
AI Technical Summary
In a network with multiple dual-homed protocol ring links, packet loss and communication quality degradation issues arise due to device switching in the DHP ring link.
By including information about the target VLAN in the clearing message, the aggregation layer device and non-homing nodes only clear the Media Access Control (MAC) entries and Address Resolution Protocol (ARP) entries corresponding to the target VLAN, instead of clearing all dynamic entries, thus optimizing the device failover process.
It reduces or even avoids packet loss in DHP ring links caused by equipment switching, improving communication quality and networking flexibility.
Smart Images

Figure CN121077910A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of computer network technology, and in particular relates to a device switching method and apparatus applicable to multiple dual-homing protocol ring links. Background Technology
[0002] In a network comprising multiple Dual Homing Protocol (DHP) ring links, the aggregation layer device has multiple DHP ring links connected to it. Each node in a DHP ring link is connected to the aggregation layer device via that DHP ring link. If the topology of any of these DHP ring links changes, the home node in that DHP ring link sends a clearing message to the aggregation layer device through its home port connected to the aggregation layer device. The aggregation layer device then clears all dynamic Media Access Control (MAC) and Address Resolution Protocol (ARP) entries based on the clearing message, performing device failover. However, this method can easily cause packet loss and other communication quality degradation issues in other DHP ring links. Summary of the Invention
[0003] This application aims to address at least one of the technical problems existing in the prior art. To this end, this application proposes a device switching method and apparatus applicable to multiple Dual-Hosting Protocol (DHP) ring links, which can reduce or even avoid communication quality degradation problems such as packet loss in DHP ring links caused by device switching.
[0004] Firstly, this application provides a device switching method applicable to multiple dual-homing protocol ring links, applied to each homing node in a target dual-homing protocol ring link; the target dual-homing protocol ring link is any one of the multiple dual-homing protocol ring links; the method includes: Upon receiving a target message and with the home node configured in target mode, a clearing message carrying the target virtual local area network (VLAN) is generated based on the information of the target VLAN. The target VLAN is the VLAN corresponding to the target dual-homing protocol ring link. The target message is used to indicate a change in the topology of the target dual-homing protocol ring link. The target message is sent by at least one non-home node in the target dual-homing protocol ring link. The clear table message is sent to the aggregation layer device and the non-home node, so that the aggregation layer device and the non-home node clear the media access control table entries and address resolution protocol entries corresponding to the target virtual local area network.
[0005] According to the device switching method applicable to multiple dual-homed protocol ring links of this application, by carrying the target VLAN information in the clearing message, the aggregation layer device and non-homed nodes only clear the Media Access Control (MAC) table entries and Address Resolution Protocol (ARP) table entries corresponding to the target VLAN. When the topology of the target dual-homed protocol ring link changes, device switching will not clear all dynamic MAC and ARP entries, thereby reducing or even avoiding communication quality degradation problems such as packet loss in the DHP ring link caused by device switching, further optimizing the performance of device switching, and also improving the flexibility of networking based on dual-homed protocol, which is suitable for multi-phase tangent ring networking.
[0006] According to one embodiment of this application, when the number of target virtual local area networks carried in the clearing message is greater than a first threshold, the target virtual local area networks carried in the clearing message are represented in string form.
[0007] According to one embodiment of this application, when the number of target virtual local area networks carried in the clearing message is less than a first threshold, the target virtual local area networks carried in the clearing message are represented in array form.
[0008] According to one embodiment of this application, the clearing message further includes type identification information, which is used to indicate the representation of the target virtual local area network carried by the clearing message.
[0009] According to one embodiment of this application, the clearing message is provided with a clearing field in TLV format, which is used to carry the target virtual local area network and the type identification information.
[0010] Secondly, this application provides a device switching method applicable to multiple dual-homed protocol ring links, applied to an aggregation layer device and each non-homed node in a target dual-homed protocol ring link; the target dual-homed protocol ring link is any one of the multiple dual-homed protocol ring links; the method includes: Receive and parse the clear table message; the clear table message is a message sent by the home node in the target dual-homing protocol ring link when the topology of the target dual-homing protocol ring link changes. If the clearing message carries a target VLAN, the Media Access Control (MAC) entry and Address Resolution Protocol (ARP) entry corresponding to the target VLAN are cleared; the target VLAN is the VLAN corresponding to the target dual-homed ring link.
[0011] According to the device switching method applicable to multiple dual-homed protocol ring links of this application, by carrying the target VLAN information in the clearing message, the aggregation layer device and non-homed nodes only clear the Media Access Control (MAC) table entries and Address Resolution Protocol (ARP) table entries corresponding to the target VLAN. When the topology of the target dual-homed protocol ring link changes, device switching will not clear all dynamic MAC and ARP entries, thereby reducing or even avoiding communication quality degradation problems such as packet loss in the DHP ring link caused by device switching, further optimizing the performance of device switching, and also improving the flexibility of networking based on dual-homed protocol, which is suitable for multi-phase tangent ring networking.
[0012] According to one embodiment of this application, the clearing message further includes type identification information, which is used to indicate the representation of the target virtual local area network carried by the clearing field.
[0013] According to one embodiment of this application, when the clearing message carries a target virtual local area network (VLAN), clearing the media access control (MAC) entry and address resolution protocol (IPC) entry corresponding to the target VLAN includes: When the clearing message carries a target virtual local area network (VLAN), the representation of the target VLAN is determined based on the type identification information carried in the clearing message, and the method for identifying the target VLAN is determined.
[0014] According to one embodiment of this application, after receiving and parsing the clearing message, the method further includes: If the clearing message does not carry the target VLAN, the saved Media Access Control (MAC) entries and Address Resolution Protocol (ARP) entries are cleared.
[0015] Thirdly, this application provides a device switching apparatus applicable to multiple dual-homing protocol ring links, applied to each homing node in a target dual-homing protocol ring link; the target dual-homing protocol ring link is any one of the multiple dual-homing protocol ring links; the apparatus includes: A generation module is configured to, upon receiving a target message and with the home node configured in target mode, generate a clearing message carrying information about the target virtual local area network (VLAN), based on information about the target VLAN. The target VLAN is the VLAN corresponding to the target dual-homing protocol ring link. The target message indicates a change in the topology of the target dual-homing protocol ring link. The target message is sent by at least one non-home node in the target dual-homing protocol ring link. The sending module is used to send the clearing message to the aggregation layer device and the non-home node, so that the aggregation layer device and the non-home node clear the media access control table entries and address resolution protocol entries corresponding to the target virtual local area network.
[0016] According to the device switching apparatus applicable to multiple dual-homed protocol ring links of this application, by carrying the target VLAN information in the clearing message, the aggregation layer device and non-homed nodes only clear the Media Access Control (MAC) table entries and Address Resolution Protocol (ARP) table entries corresponding to the target VLAN. When the topology of the target dual-homed protocol ring link changes, the device switching will not clear all dynamic MAC and ARP entries, thereby reducing or even avoiding communication quality degradation problems such as packet loss in the DHP ring link caused by device switching, further optimizing the performance of device switching, and also improving the flexibility of networking based on dual-homed protocol, which is suitable for multi-phase tangent ring networking.
[0017] Fourthly, this application provides a device switching apparatus applicable to multiple dual-homed protocol ring links, applied to each non-homed node in the aggregation layer device and the target dual-homed protocol ring link; the target dual-homed protocol ring link is any one of the multiple dual-homed protocol ring links; the apparatus includes: The receiving module is used to receive and parse the clearing message; the clearing message is a message sent by the home node in the target dual-homing protocol ring link when the topology of the target dual-homing protocol ring link changes. The clearing module is used to clear the Media Access Control (MAC) entries and Address Resolution Protocol (ARP) entries corresponding to the target virtual local area network (VLAN) when the clearing message carries the target VLAN; the target VLAN is the VLAN corresponding to the target dual-homed ring link.
[0018] According to the device switching apparatus applicable to multiple dual-homed protocol ring links of this application, by carrying the target VLAN information in the clearing message, the aggregation layer device and non-homed nodes only clear the Media Access Control (MAC) table entries and Address Resolution Protocol (ARP) table entries corresponding to the target VLAN. When the topology of the target dual-homed protocol ring link changes, the device switching will not clear all dynamic MAC and ARP entries, thereby reducing or even avoiding communication quality degradation problems such as packet loss in the DHP ring link caused by device switching, further optimizing the performance of device switching, and also improving the flexibility of networking based on dual-homed protocol, which is suitable for multi-phase tangent ring networking.
[0019] Fifthly, this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the device switching method applicable to multiple dual-homing protocol ring links as described in the first or second aspect above.
[0020] In a sixth aspect, this application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the device switching method applicable to multiple dual-homed protocol ring links as described in the first or second aspect above.
[0021] In a seventh aspect, this application provides a chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the device switching method applicable to multiple dual-homing protocol ring links as described in the first or second aspect.
[0022] Eighthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the device switching method applicable to multiple dual-homing protocol ring links as described in the first or second aspect above.
[0023] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0024] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which: Figure 1 This is one of the flowcharts illustrating a device switching method applicable to multiple dual-homing protocol ring links provided in the embodiments of this application; Figure 2 This is a schematic diagram of a network structure including multiple dual-homed protocol ring links provided in an embodiment of this application; Figure 3 This is a schematic diagram of the transmission path of the clearing message in the device switching method applicable to multiple dual-homed protocol ring links provided in the embodiments of this application; Figure 4 This is one of the schematic diagrams of the format of the clearing message in the device switching method applicable to multiple dual-homed protocol ring links provided in the embodiments of this application; Figure 5 This is the second schematic diagram of the format of the clearing message in the device switching method applicable to multiple dual-homed protocol ring links provided in the embodiments of this application; Figure 6This is one of the schematic diagrams of the format of the clearing table field in the device switching method applicable to multiple dual-homed protocol ring links provided in the embodiments of this application; Figure 7 This is the second schematic diagram of the format of the clearing table field in the device switching method applicable to multiple dual-homed protocol ring links provided in the embodiments of this application; Figure 8 This is the third schematic diagram of the format of the clearing table field in the device switching method applicable to multiple dual-homed protocol ring links provided in the embodiments of this application; Figure 9 This application provides a second flowchart illustrating a device switching method applicable to multiple dual-homing protocol ring links. Figure 10 This is the third flowchart illustrating the device switching method applicable to multiple dual-homing protocol ring links provided in the embodiments of this application; Figure 11 This is one of the structural schematic diagrams of a device switching device applicable to multiple dual-homing protocol ring links provided in the embodiments of this application; Figure 12 This is the second schematic diagram of the device switching device applicable to multiple dual-homing protocol ring links provided in the embodiments of this application; Figure 13 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0025] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0026] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0027] In related technologies, in a network comprising multiple DHP ring links, if the topology of any one of these DHP ring links changes, the home node in that ring link sends a clearing table message to the aggregation layer device via its home port connected to the aggregation layer device. The aggregation layer device then clears all dynamically generated MAC and ARP entries based on the clearing table message, performing device failover. However, this failover process clears all dynamically generated MAC and ARP entries, causing the current topology change of the DHP ring link to affect other DHP ring links, resulting in packet loss and other communication quality degradation issues on those other DHP ring links.
[0028] The following description, in conjunction with the accompanying drawings, details the device switching method, device switching apparatus, electronic device, and readable storage medium applicable to multiple dual-homed protocol ring links provided in this application, through specific embodiments and application scenarios.
[0029] Among them, the device switching method applicable to multiple dual-homed protocol ring links can be applied to the terminal, and can be executed by the hardware or software in the terminal.
[0030] The terminal includes, but is not limited to, portable communication devices such as mobile phones or tablets with touch-sensitive surfaces (e.g., touchscreen displays and / or touchpads). It should also be understood that, in some embodiments, the terminal may not be a portable communication device, but rather a desktop computer with touch-sensitive surfaces (e.g., touchscreen displays and / or touchpads).
[0031] The following embodiments describe a terminal including a display and a touch-sensitive surface. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse, and joystick.
[0032] The device switching method applicable to multiple dual-homed protocol ring links provided in this application embodiment can be executed by an electronic device or a functional module or functional entity in an electronic device that can implement the device switching method applicable to multiple dual-homed protocol ring links. The electronic devices mentioned in this application embodiment include, but are not limited to, mobile phones, tablets, computers, cameras, and wearable devices. The following uses an electronic device as the execution subject to illustrate the device switching method applicable to multiple dual-homed protocol ring links provided in this application embodiment.
[0033] like Figure 1 As shown, the device switching method applicable to multiple dual-homed protocol ring links includes steps 110 and 120.
[0034] In practice, this device failover method can be applied to networks containing multiple DHP ring links. In such networks, the aggregation layer device has multiple DHP ring links connected to it. Nodes in each DHP ring link are connected to the aggregation layer device through that DHP ring link.
[0035] For each DHP ring link, the nodes in the ring link include two types: home nodes and non-home nodes. The number of home nodes is typically two. All other nodes that are not home nodes are non-home nodes. Non-home nodes can also be called ordinary nodes or normal nodes. In some embodiments, each node in the DHP ring link can be a network device such as a switch.
[0036] A network structure including multiple dual-homed protocol ring links can be as follows: Figure 2 As shown. Reference Figure 2In this network topology, both the core layer and aggregation layer employ a master-slave configuration. Both aggregation layer devices utilize Virtual Router Redundancy Protocol (VRRP), serving as the master and backup devices, respectively. Therefore, these two aggregation layer devices can be referred to as VRRP Master and VRRP Backup. The VRRP Master device can connect to the master core layer device via VLAN 12. The VRRP Backup device can connect to the backup core layer device via VLAN 13. The two core layer devices can be redundantly connected via VLANs 101 and 102. The master core layer device can also connect to other networks via VLANs 101 and 102. Two aggregation layer devices are interconnected via the VRRP protocol to each other's Access Aggregation Gateway (AGG) ports, supporting trunk all VLANs (VLANs) mode. The aforementioned multiple dual-homed ring links can include DHP ring links: DHP Link 1 to DHP Link n (n is a positive integer). Each DHP ring link includes two home nodes, which serve as the home ports for that DHP ring link. One home node is interconnected with the aggregation layer device VRRP Master to its AGG port, and the other home node is interconnected with the aggregation layer device VRRP Backup to its AGG port. In addition to the two home nodes, each DHP ring link also includes at least one non-home node. Adjacent nodes in each DHP ring link are interconnected to each other's AGG ports. Each DHP ring link is connected based on a VLAN, such as VLANs 2101 to VLAN 210n mentioned above. It is understood that the VLAN numbers (e.g., 101, 102, 12, 13, 2101 and 210n) or names (e.g., vlan101, vlan102, vlan12, vlan13, vlan2101 and vlan210n) of the above-mentioned virtual LANs are all illustrative examples.
[0037] In some embodiments, the VLAN number and / or name of a virtual local area network (VLAN) can both serve as the identifier of the VLAN.
[0038] In actual implementation, this device switching method applicable to multiple dual-homing protocol ring links can be applied to each homing node in the target dual-homing protocol ring link; the target dual-homing protocol ring link is any one of the multiple dual-homing protocol ring links.
[0039] The device switching method provided in this application embodiment can be applied to each home node in the target DHP ring link. That is, each home node in the target DHP ring link can serve as the execution subject of the device switching method provided in this application embodiment. Any one of the above-mentioned multiple DHP ring links can serve as the target DHP ring link.
[0040] Step 110: Upon receiving the target message and with the home node configured in target mode, generate a clearing message carrying the virtual local area network (VLAN) information based on the target VLAN information; the target VLAN is the VLAN corresponding to the target dual-homing protocol ring link; the target message is used to indicate a change in the topology of the target dual-homing protocol ring link; the target message is sent by at least one non-home node in the target dual-homing protocol ring link.
[0041] In actual implementation, any non-homing node in the target dual-homing protocol ring link can determine whether the topology of the target dual-homing protocol ring link has changed by checking whether the uplink (UP) and downlink (DOWN) objects of its own ports have changed. If the uplink or downlink object has changed, the non-homing node can determine that the topology of the target dual-homing protocol ring link has changed; if neither the uplink nor downlink object has changed, the non-homing node can determine that the topology of the target dual-homing protocol ring link has not changed.
[0042] For example, if the uplink target of the port of non-homing node 9 in the target dual-homing protocol ring link changes from non-homing node 10 to non-homing node 11, then non-homing node 9 can determine that the topology of the target dual-homing protocol ring link has changed; or, if the downlink target of the port of non-homing node 9 in the target dual-homing protocol ring link changes from non-homing node 8 to non-homing node 7 or non-homing node 6, then non-homing node 9 can determine that the topology of the target dual-homing protocol ring link has changed.
[0043] After the non-homing node determines that the topology of the target dual-homing protocol ring link has changed, it can send a target message to the home node in the target dual-homing protocol ring link through the target dual-homing protocol ring link, notifying the home node that the topology of the target dual-homing protocol ring link has changed. That is, when the home node receives the target message, it indicates that the topology of the target dual-homing protocol ring link has changed.
[0044] Even when the topology of the target DHP ring link changes, each home node in the target DHP ring link still generates a clearing message. However, unlike the clearing messages in related technologies, when the home node is configured in target mode, the clearing message in this embodiment carries the target VLAN. Therefore, the device receiving the clearing message can only clear the MAC and ARP entries corresponding to the target VLAN based on the target VLAN in the clearing message, instead of clearing all dynamic MAC and ARP entries. This ensures that clearing MAC and ARP entries will not affect other VLANs besides the target VLAN, and therefore will not affect other DHP ring links besides the target DHP ring link.
[0045] In some embodiments, the clearing message carries a target VLAN, which may include information about the target VLAN carried in the clearing message. This target VLAN information can be used to indicate the identity of the target VLAN, indicating which VLAN(s) corresponds to the target DHP ring link.
[0046] In some embodiments, the information of the target VLAN may include information such as the identifier of the target VLAN. Therefore, based on the identifier and other information of the target VLAN carried in the clearing table fields, it is possible to determine which one or more VLANs are the target VLAN.
[0047] In some embodiments, the identifier of the target virtual local area network may include the VLAN number of the target virtual local area network, etc.
[0048] In some embodiments, the target VLAN may be a VLAN used for network communication of services carried by the target DHP ring link.
[0049] In some embodiments, the target virtual local area network can be one or more.
[0050] In some embodiments, for each DHP ring link, the virtual local area network used for network communication of the services carried by the DHP ring link may be pre-configured by the user.
[0051] It should be noted that a configuration item can be added to the home node. This item can be configured to the target mode, another mode, or left unconfigured. Being configured to another mode or not being configured at all are considered as not being configured to the target mode. For home nodes in related technologies, if this configuration item is not added, it is considered that they are not configured to the target mode.
[0052] In some embodiments, when the home node is not configured in target mode, the home node generates the same clearing message as in related technologies, that is, the clearing message does not carry the target VLAN.
[0053] Step 120: Send a clear table message to the aggregation layer device and the non-homing node so that the aggregation layer device and the non-homing node clear the media access control table entries and address resolution protocol entries corresponding to the target virtual LAN.
[0054] In actual execution, after generating the clearing message, it can be sent to the two aggregation layer devices and each non-home node in the target DHP ring link. After receiving the clearing message, each aggregation layer device and each non-home node in the target DHP ring link can clear the Media Access Control (MAC) entries and Address Resolution Protocol (ARP) entries corresponding to the target VLAN based on the target VLAN information carried in the clearing message.
[0055] In some embodiments, MAC entries are stored in a forwarding database. The MAC entries corresponding to the target VLAN can be cleared by clearing the forwarding database corresponding to the target VLAN.
[0056] refer to Figure 3 The transmission path and direction of the clearing message can be as follows: Figure 3 As shown. It should be noted that the clearing table message is generated when the topology of the target dual-homed protocol ring link changes. Therefore, the clearing table message can be used to indicate that the topology of the target dual-homed protocol ring link has changed, and the clearing table message can also be called a topology change frame (TOPChange frame).
[0057] The device switching method for multiple dual-homed protocol ring links provided in the embodiments of this application carries the target VLAN information in the clearing message, so that the aggregation layer device and non-homed nodes only clear the Media Access Control (MAC) entries and Address Resolution Protocol (ARP) entries corresponding to the target VLAN. When the topology of the target dual-homed protocol ring link changes, the device switching will not clear all dynamic MAC entries and ARP entries, thereby reducing or even avoiding communication quality degradation problems such as packet loss in the DHP ring link caused by device switching, further optimizing the performance of device switching, and improving the flexibility of networking based on dual-homed protocol, which is suitable for multi-phase tangent ring networking.
[0058] In some embodiments of this application, when the number of target virtual local area networks carried in the clearing message is greater than a first threshold, the target virtual local area networks carried in the clearing message are represented in string form.
[0059] In actual execution, the representation of the target VLAN carried in the clearing message can be determined based on the number of target VLANs.
[0060] In some embodiments, the relationship between the number of target VLANs and a first threshold can be determined. If the number of target VLANs is greater than the first threshold, the information of the target VLANs can be represented in string form.
[0061] Information about the target VLAN, represented as a string, is carried in the clearing message. In some embodiments, the information about the target VLAN, represented as a string, can be encapsulated in the clearing message, thus allowing the clearing message to carry the target VLAN.
[0062] In some embodiments, the first threshold may be determined based on actual conditions such as the total number of virtual local area networks. The specific value of this first threshold is not limited in the embodiments of this application.
[0063] According to the device switching method for multiple dual-homed protocol ring links provided in the embodiments of this application, when the number of target VLANs carried in the clearing table message is greater than a first threshold, the target VLANs carried in the clearing table message are represented in string form. This enables more direct acquisition of target VLAN information and clearing of corresponding Media Access Control (MAC) entries and Address Resolution Protocol (ARP) entries when the number of target VLANs is small, thereby improving the efficiency of clearing corresponding MAC and ARP entries.
[0064] In some embodiments of this application, when the number of target virtual local area networks carried in the clearing message is less than a first threshold, the target virtual local area networks carried in the clearing message are represented in array form.
[0065] In actual execution, the relationship between the number of target VLANs and the first threshold can be determined. If the number of target VLANs is less than the first threshold, the information of the target VLANs can be represented in array form.
[0066] Information about the target VLAN, represented in array form, is carried in the clearing message. In some embodiments, the information about the target VLAN, represented in array form, can be encapsulated in the clearing message, so that the clearing message can carry the target VLAN.
[0067] In some embodiments, the first threshold may be determined based on actual conditions such as the total number of virtual local area networks. The specific value of this first threshold is not limited in the embodiments of this application.
[0068] According to the device switching method for multiple dual-homed protocol ring links provided in the embodiments of this application, when the number of target VLANs carried in the clearing message is less than a first threshold, the target VLANs carried in the clearing message are represented in array form. This enables more efficient use of the length of the clearing message to carry more information about the target VLANs when the number of target VLANs is large, thereby improving the efficiency of the clearing message in carrying the information about the target VLANs.
[0069] In some embodiments of this application, the clearing message also includes type identification information, which is used to indicate the representation of the target virtual local area network carried by the clearing message.
[0070] In actual execution, the clearing table message can also carry type identification information. This type identification information can be used to indicate the representation of the target VLAN carried by the clearing table message, that is, whether the target VLAN carried by the clearing table message is represented in array form or string form.
[0071] The device switching method for multiple dual-homed protocol ring links provided in this application includes type identification information in the clearing message to indicate the representation of the target VLAN carried in the clearing message. This allows the aggregation layer device and non-homed nodes receiving the clearing message to correctly obtain the target VLAN carried in the clearing message based on the type identification information. This enables the aggregation layer device and non-homed nodes to clear only the Media Access Control (MAC) and Address Resolution Protocol (ARP) entries corresponding to the target VLAN. Even when the topology of the target dual-homed protocol ring link changes, device switching will not clear all dynamic MAC and ARP entries. This reduces or even avoids communication quality degradation issues such as packet loss in the DHP ring link caused by device switching, further optimizing device switching performance and improving the flexibility of dual-homed protocol-based networking. It is suitable for multi-phase tangent ring networks.
[0072] In some embodiments of this application, the clearing message is provided with a clearing field in TLV format, which is used to carry target virtual LAN and type identification information.
[0073] In actual execution, the clearing table message can include a clearing table field. This clearing table field can be used to carry the target VLAN, as well as the type identification information mentioned above that indicates the representation format of the target VLAN carried in the clearing table message.
[0074] In some embodiments, the identifier of the target virtual local area network (VLAN) and the aforementioned type identifier information can be encapsulated in the clearing table field according to the clearing table field format, thereby generating the clearing table field. It is understood that the clearing table field generated in the above manner carries the identifier of the target VLAN and the aforementioned type identifier information, etc.
[0075] refer to Figure 4 and Figure 5 The clearing table message in this application embodiment is an extension of the DHP clearing table message in related technologies, with the addition of clearing table fields. Figure 4 The format of the clearing message generated when the home node is configured in target mode is shown, while for comparison, Figure 5 This illustrates the format of a clearing message generated when the home node is not configured in target mode, which is the format of a clearing message in related technologies. (Comparison) Figure 4 and Figure 5 It is known that, compared with the clearing message in related technologies, the clearing message generated in this application embodiment when the home node is configured as the target mode adds the clear fdb / arp TLV field (this field is the clearing field).
[0076] It's understandable that `clear fdb / arp TLV` is an illustrative example of a field name for clearing a table. Here, `clear` means to clear; `fdb / arp` represents the Forwarding Database (FDB) and ARP entries; and `TLV` represents a TLV cell, where T, L, and V represent Type, Length, and Value, respectively. The Forwarding Database can be used to store entries such as MAC addresses, VLAN numbers, port numbers, and flags. Each FDB address entry can contain the following: MAC address, the port number associated with the MAC address, the name of the VLAN associated with the MAC address, and the flags for the FDB address entry.
[0077] In some embodiments, compared to the clearing message in related technologies, the length of the clearing message in this application embodiment may remain unchanged, and the length of the DRP-PDU field is reduced accordingly and allocated to the clearing field.
[0078] In some embodiments, the format of the clearing table fields may be pre-configured or conform to relevant specifications. This application does not limit the specific format of the clearing table fields.
[0079] In some embodiments, reference Figure 6The fields in the clear table can use the TLV format. In TLV, T, L, and V represent Type, Length, and Value, respectively.
[0080] In some embodiments, the Type field in the clearing table may carry the aforementioned type identification information. The Value field in the clearing table may carry information about the target VLAN represented in array or string format. The Length field in the clearing table may be used to indicate the length of the target VLAN information represented in array or string format.
[0081] In some embodiments, reference Figure 6 In the clear table, the Type field can be a type field, the Length field can be a length field, and the Value field can be a value field.
[0082] In some embodiments, for such Figure 6 The format of the clearing table fields shown is as follows: the `type` field is 1 byte long and indicates the type of the TLV; the value of the `type` field is the first target value (taking 01 as an example), corresponding to the target VLAN carried in the clearing table message being in array form, indicating that the fdb / arp array corresponding to the specified VLAN is being cleared; the value of the `type` field is the second target value (taking 02 as an example), corresponding to the target VLAN carried in the clearing table message being in string form, indicating that the fdb / arp list corresponding to the specified VLAN is being cleared. The specified VLAN is the target VLAN. The fdb / arp array and fdb / arp list corresponding to the specified VLAN are the MAC table entries and ARP table entries corresponding to the target VLAN in array form and list form, respectively.
[0083] In some embodiments, for such Figure 6 The format of the fields in the clearing table shown is such that the length field is 1 byte long, which indicates the length of the value field in this TLV.
[0084] In some embodiments, when the value of the type field is 01, it indicates that the target VLAN carried in the clear table message is in array form, denoted as CLEAR_VLAN_ARRAY, which means clearing the fdb / arp array corresponding to the specified VLAN. For example, if the specified VLANs include VLAN1, VLAN2, and VLAN5, then the value field can be in array form, representing VLAN1, VLAN2, and VLAN5 as 00 01 00 02 00 05.
[0085] refer to Figure 7 When the `type` field has a value of 01, the elements in the `value` field can be arranged as an array, with each element (i.e., information for each target VLAN) occupying 2 bytes. For example, if VLANs 1, 2, and 5 are specified, the format of the `value` field should be as follows: hexadecimal representations of 1, 2, and 5, with each VLAN's information occupying 2 bytes. Therefore, the `value` field would be arranged as the following array: 00 01 00 02 00 05. It is understandable that this array format is suitable for situations where the number of target VLANs is small (e.g., less than the first threshold).
[0086] In some embodiments, when the value of the type field is 02, it indicates that the target VLAN carried in the clearing message is in string form, denoted as CLEAR_VLAN_LIST, indicating that the fdb / arp list corresponding to the specified VLAN is cleared. For example, if the specified VLANs include VLAN1, VLAN2, and VLAN5, then the value field can be in list format, representing VLAN1, VLAN2, and VLAN5 as the string "1-2,5". Consecutive numbers are connected by the character "-", and non-consecutive numbers are separated by commas.
[0087] refer to Figure 8 When the `type` field has a value of 02, the elements in the `value` field can be represented as strings, with consecutive numbers connected by the character "-" and non-consecutive numbers separated by commas. For example, if VLANs include VLAN1, VLAN2, and VLAN5, the format of the `value` field should be as follows: the hexadecimal representation of the string "1-2,5", which would be arranged as: 31 2d 32 2c 35. It's understandable that the array format is suitable for situations with a large number of target VLANs (e.g., greater than or equal to the first threshold). It's also understandable that compared to the array format, the string format allows for a shorter `value` field, thus enabling more information about the target VLANs to be carried within the same length.
[0088] It is understood that the hyphen “-” connecting consecutive numbers and the comma separating non-consecutive numbers are illustrative examples, and other characters or symbols may be used.
[0089] The device switching method for multiple dual-homed protocol ring links provided in the embodiments of this application adopts the TLV format for the clearing table field, enabling the aggregation layer device and non-homed nodes to clear only the Media Access Control (MAC) and Address Resolution Protocol (ARP) entries corresponding to the target Virtual Local Area Network (DLAN) based on the clearing table field. When the topology of the target DHP ring link changes, device switching will not clear all dynamic MAC and ARP entries, thereby reducing or even avoiding communication quality degradation problems such as packet loss in the DHP ring link caused by device switching. This further optimizes the performance of device switching and improves the flexibility of networking based on dual-homed protocols, making it suitable for multi-phase tangent ring networking.
[0090] This application also provides a device switching method applicable to multiple dual-homed protocol ring links. For example... Figure 9 As shown, the device switching method applicable to multiple dual-homing protocol ring links includes steps 910 and 920.
[0091] In actual implementation, this device switching method applicable to multiple dual-homed protocol ring links can be applied to the aggregation layer device and each non-homed node in the target dual-homed protocol ring link; the target dual-homed protocol ring link is any one of the multiple dual-homed protocol ring links.
[0092] Step 910: Receive and parse the clear table message; the clear table message is a message sent by the home node in the target dual-homed protocol ring link when the topology of the target dual-homed protocol ring link changes.
[0093] In actual implementation, when the topology of the target dual-homed protocol ring link changes, the home node in the target DHP ring link can generate a clearing message and send the clearing message to the aggregation layer device and the non-home node in the target dual-homed protocol ring link.
[0094] It is understandable that when the home node is configured in target mode, the clearing message carries the target VLAN, while when the home node is not configured in target mode, the clearing message does not carry the target VLAN.
[0095] In some embodiments, the target VLAN may be a VLAN used for network communication of services carried by the target DHP ring link.
[0096] In some embodiments, the target virtual local area network can be one or more.
[0097] In some embodiments, for each DHP ring link, the virtual local area network used for network communication of the services carried by the DHP ring link may be pre-configured by the user.
[0098] Each aggregation layer device and each non-homing node in the target dual-homing protocol ring link can receive this clearing message.
[0099] After receiving the clearing message, each aggregation layer device and each non-homing node in the target dual-homing protocol ring link can parse the clearing message to obtain all the fields carried by the clearing message, thereby determining whether the clearing message carries the target virtual LAN.
[0100] Step 920: If the clear table message carries the target VLAN, clear the Media Access Control (MAC) entry and Address Resolution Protocol (ARP) entry corresponding to the target VLAN; the target VLAN is the VLAN corresponding to the target dual-homed ring link.
[0101] In actual implementation, for each aggregation layer device and each non-homing node in the target dual-homing protocol ring link, after determining that the received clearing message carries the target VLAN, the MAC entry and ARP entry corresponding to the target VLAN can be cleared based on the information of the target VLAN carried in the clearing message.
[0102] The device switching method for multiple dual-homed protocol ring links provided in the embodiments of this application carries the target VLAN information in the clearing message, so that the aggregation layer device and non-homed nodes only clear the Media Access Control (MAC) entries and Address Resolution Protocol (ARP) entries corresponding to the target VLAN. When the topology of the target dual-homed protocol ring link changes, the device switching will not clear all dynamic MAC entries and ARP entries, thereby reducing or even avoiding communication quality degradation problems such as packet loss in the DHP ring link caused by device switching, further optimizing the performance of device switching, and improving the flexibility of networking based on dual-homed protocol, which is suitable for multi-phase tangent ring networking.
[0103] In some embodiments of this application, the clearing message also includes type identification information, which is used to indicate the representation of the target virtual local area network carried by the clearing field.
[0104] In actual execution, the representation of the target virtual local area networks carried in the clearing message can be determined based on the number of target virtual local area networks.
[0105] In some embodiments, the relationship between the number of target VLANs and a first threshold can be determined. If the number of target VLANs is greater than the first threshold, the information of the target VLANs can be represented as a string. If the number of target VLANs is less than the first threshold, the information of the target VLANs can be represented as an array.
[0106] In some embodiments, the representation of the target virtual local area network carried in the clearing table field may be indicated by type identification information.
[0107] Therefore, based on the type identification information, the representation of the target VLAN carried in the clearing message can be determined, and thus, by parsing the clearing message, information about the target VLAN can be obtained. Based on the information about the target VLAN, it can be determined which VLAN(s) is the target VLAN.
[0108] The device switching method for multiple dual-homed protocol ring links provided in this application includes type identification information in the clearing message to indicate the representation of the target VLAN carried in the clearing message. This allows the aggregation layer device and non-homed nodes receiving the clearing message to correctly obtain the target VLAN carried in the clearing message based on the type identification information. This enables the aggregation layer device and non-homed nodes to clear only the Media Access Control (MAC) and Address Resolution Protocol (ARP) entries corresponding to the target VLAN. Even when the topology of the target dual-homed protocol ring link changes, device switching will not clear all dynamic MAC and ARP entries. This reduces or even avoids communication quality degradation issues such as packet loss in the DHP ring link caused by device switching, further optimizing device switching performance and improving the flexibility of dual-homed protocol-based networking. It is suitable for multi-phase tangent ring networks.
[0109] In some embodiments of this application, when the clearing message carries a target virtual local area network (VLAN), clearing the media access control (MAC) entry and address resolution protocol (IPC) entry corresponding to the target VLAN includes: when the clearing message carries a target VLAN, determining the representation of the target VLAN and the method of identifying the target VLAN based on the type identification information carried in the clearing message.
[0110] In actual execution, when the clearing message carries a target virtual local area network, the representation of the target virtual local area network carried in the clearing message can be determined as an array, a string, or another form based on the type identifier information carried in the clearing message.
[0111] After determining the representation of the target VLAN carried in the clearing message, the method for identifying the target VLAN carried in the clearing message can be determined accordingly.
[0112] In some embodiments, when the target virtual local area network is represented in array form, the method for determining the target virtual local area network carried in the clearing message includes: identifying the target array in the clearing message; and obtaining information about the target virtual local area network based on the content of the target array.
[0113] In some embodiments, when the target virtual local area network is represented in string form, the method for determining the target virtual local area network carried in the clearing message includes: identifying the target string in the clearing message; and obtaining information about the target virtual local area network based on the content of the target string.
[0114] The device switching method for multiple dual-homed protocol ring links provided in this application, by determining the representation of the target VLAN based on the type identification information carried in the clearing message and determining the method for identifying the target VLAN, can correctly obtain the target VLAN carried in the clearing message according to the method for identifying the target VLAN. This allows the aggregation layer device and non-homed nodes to clear only the Media Access Control (MAC) entries and Address Resolution Protocol (ARP) entries corresponding to the target VLAN. When the topology of the target dual-homed protocol ring link changes, device switching will not clear all dynamic MAC entries and ARP entries. This can reduce or even avoid communication quality degradation problems such as packet loss in the DHP ring link caused by device switching, further optimize the performance of device switching, and improve the flexibility of dual-homed protocol-based networking, making it suitable for multi-phase tangent ring networking.
[0115] In some embodiments of this application, after receiving and parsing the clearing message, the method further includes: clearing the stored Media Access Control List entries and Address Resolution Protocol entries if the clearing message does not carry the target virtual local area network.
[0116] In actual implementation, for each aggregation layer device and each non-homing node in the target dual-homing protocol ring link, after determining that the received clearing message does not carry a clearing field, all dynamic MAC entries and all dynamic ARP entries can be cleared, instead of only clearing the MAC entries and ARP entries corresponding to the target virtual LAN.
[0117] The device switching method for multiple dual-homed protocol ring links provided in the embodiments of this application clears the saved Media Access Control List entries and Address Resolution Protocol entries when the clearing message does not carry the target VLAN. This method is compatible with traditional device switching methods for dual-homed protocol ring links and has a wider range of applications.
[0118] In some embodiments of this application, clearing the Media Access Control List (MAC) entries and Address Resolution Protocol (ARP) entries corresponding to the target Virtual Local Area Network (VLAN) based on the clearing table fields includes: determining the target VLAN based on the clearing table fields.
[0119] In actual execution, by parsing the clearing table message and obtaining the fields in the message, it is possible to determine which virtual LAN(s) is the target virtual LAN(s) based on the target virtual LAN(s) information carried in the clearing table(s).
[0120] Clear the Media Access Control List (MAC) entries and Address Resolution Protocol (ARP) entries corresponding to the target virtual LAN.
[0121] In practice, after identifying the target VLAN, the corresponding MAC and ARP entries can be cleared.
[0122] The device switching method for multiple dual-homed protocol ring links provided in this application determines the target VLAN based on clearing table fields and clears the Media Access Control (MAC) and Address Resolution Protocol (ARP) entries corresponding to the target VLAN. Only the MAC and ARP entries corresponding to the target VLAN are cleared. Therefore, when the topology of the target dual-homed protocol ring link changes, device switching will not clear all dynamic MAC and ARP entries. This reduces or even avoids communication quality degradation issues such as packet loss in the DHP ring link caused by device switching, further optimizing device switching performance and improving the flexibility of dual-homed protocol-based networking. It is suitable for multi-phase tangent ring networks.
[0123] To facilitate understanding of the above embodiments of this application, the following description is provided in conjunction with... Figure 10 This paper describes the implementation process of the device switching method for multiple dual-homed protocol ring links provided in the embodiments of this application. In some embodiments of this application, reference is made to... Figure 10 For aggregation layer devices or non-homed nodes in a target dual-homed protocol ring link, performing a device switching method applicable to multiple dual-homed protocol ring links may include the following steps.
[0124] Step 1001: Receive the clearing message.
[0125] Receive a message carrying a clearing table message; the clearing table message is a message sent by the home node in the target dual-homed protocol ring link when the topology of the target dual-homed protocol ring link changes; the target virtual LAN is the virtual LAN corresponding to the target dual-homed protocol ring link.
[0126] Step 1002: Message parsing.
[0127] The received clearing message is parsed to obtain the fields in the clearing message.
[0128] Step 1003: Determine whether the field contains the clear fdb / arp TLV field.
[0129] The clear table field carries information about the target virtual LAN. If yes, proceed to step 1004; otherwise, proceed to step 1005.
[0130] The process is divided into two cases: one is the clear fdb / arp TLV field (taking the clear fdb / arp TLV field as an example) and the other is the clear fdb / arp TLV field.
[0131] Step 1004: parse the TLV and clear the fdb / arp for executing the VLAN.
[0132] If the table clearing message contains the `clear fdb / arp TLV` field, this field can be parsed according to the TLV format to determine the type of table clearing operation and the specified VLAN. After determining the list of specified VLANs, the `fdb` and `arp` entries corresponding to each specified VLAN in the list can be cleared sequentially, thereby clearing the MAC and ARP entries corresponding to that specified VLAN. The specified VLAN is the target virtual LAN.
[0133] Step 1005: Maintain compatibility with the original format and completely clear fdb / arp.
[0134] If the table clearing message does not contain the clear fdb / arp TLV field, it is equivalent to being compatible with the original format, that is, the format of the table clearing message in related technologies is the same, and the processing method can also be the same as in related technologies, clearing all dynamic MAC entries and all dynamic ARP entries to ensure forward compatibility.
[0135] Step 1006, End.
[0136] After clearing the MAC and ARP entries, the device failover process is also complete.
[0137] The device switching method for multiple dual-homed protocol ring links provided in this application can be executed by a device switching device for multiple dual-homed protocol ring links. This application uses an example of a device switching device for multiple dual-homed protocol ring links executing the device switching method for multiple dual-homed protocol ring links to illustrate the device switching device for multiple dual-homed protocol ring links provided in this application.
[0138] This application also provides a device switching apparatus applicable to multiple dual-homed protocol ring links. This device switching apparatus can be applied to each home node in a target dual-homed protocol ring link; the target dual-homed protocol ring link is any one of the multiple dual-homed protocol ring links. For example... Figure 11 As shown, the device switching apparatus applicable to multiple dual-homing protocol ring links includes: a generation module 1110 and a transmission module 1120.
[0139] The generation module 1110 is used to generate a clearing message carrying the target virtual local area network (VLAN) based on the information of the target VLAN when a target message is received and the home node is configured in target mode; the target VLAN is the VLAN corresponding to the target dual-homed protocol ring link; the target message is used to indicate that the topology of the target dual-homed protocol ring link has changed; the target message is sent by at least one non-home node in the target dual-homed protocol ring link. The sending module 1120 is used to send a clearing message to the aggregation layer device and the non-homing node, so that the aggregation layer device and the non-homing node clear the media access control table entries and address resolution protocol entries corresponding to the target virtual local area network.
[0140] The device switching apparatus for multiple dual-homed protocol ring links provided in the embodiments of this application carries the target VLAN information in the clearing message, so that the aggregation layer device and non-homed nodes only clear the Media Access Control (MAC) entries and Address Resolution Protocol (ARP) entries corresponding to the target VLAN. When the topology of the target dual-homed protocol ring link changes, the device switching will not clear all dynamic MAC entries and ARP entries, thereby reducing or even avoiding communication quality degradation problems such as packet loss in the DHP ring link caused by device switching, further optimizing the performance of device switching, and improving the flexibility of networking based on dual-homed protocol, which is suitable for multi-phase tangent ring networking.
[0141] In some embodiments of this application, when the number of target virtual local area networks carried in the clearing message is less than a first threshold, the target virtual local area networks carried in the clearing message are represented in string form.
[0142] In some embodiments of this application, when the number of target virtual local area networks carried in the clearing message is greater than a first threshold, the target virtual local area networks carried in the clearing message are represented in array form.
[0143] In some embodiments of this application, the clearing message also includes type identification information, which is used to indicate the representation of the target virtual local area network carried by the clearing message.
[0144] In some embodiments of this application, the clearing message is provided with a clearing field in TLV format, which is used to carry target virtual LAN and type identification information.
[0145] The device switching device applicable to multiple dual-homed protocol ring links in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the specific device.
[0146] The device switching device applicable to multiple dual-homed protocol ring links in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit it.
[0147] The device switching device for multiple dual-homed protocol ring links provided in this application embodiment can achieve... Figures 1 to 8 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0148] This application also provides a device switching apparatus applicable to multiple dual-homed protocol ring links. This device switching apparatus can be applied to the aggregation layer device and each non-homed node in the target dual-homed protocol ring link; the target dual-homed protocol ring link is any one of the multiple dual-homed protocol ring links. For example... Figure 12 As shown, the device switching apparatus applicable to multiple dual-homing protocol ring links includes: a receiving module 1210 and a clearing module 1220.
[0149] The receiving module 1210 is used to receive and parse the clearing table message; the clearing table message is a message sent by the home node in the target dual-homed protocol ring link when the topology of the target dual-homed protocol ring link changes. The clearing module 1220 is used to clear the Media Access Control List (MAC) entries and Address Resolution Protocol (ARP) entries corresponding to the target virtual local area network (VLAN) when the clearing message carries the target VLAN; the target VLAN is the VLAN corresponding to the target dual-homed ring link.
[0150] The device switching apparatus for multiple dual-homed protocol ring links provided in the embodiments of this application carries the target VLAN information in the clearing message, so that the aggregation layer device and non-homed nodes only clear the Media Access Control (MAC) entries and Address Resolution Protocol (ARP) entries corresponding to the target VLAN. When the topology of the target dual-homed protocol ring link changes, the device switching will not clear all dynamic MAC entries and ARP entries, thereby reducing or even avoiding communication quality degradation problems such as packet loss in the DHP ring link caused by device switching, further optimizing the performance of device switching, and improving the flexibility of networking based on dual-homed protocol, which is suitable for multi-phase tangent ring networking.
[0151] In some embodiments of this application, the clearing message also includes type identification information, which is used to indicate the representation of the target virtual local area network carried by the clearing field.
[0152] In some embodiments of this application, the clearing module 1220 may include: The judgment unit is used to determine the representation of the target virtual local area network (VLAN) carried in the clearing message and determine the method of identifying the target VLAN based on the type identification information carried in the clearing message when the clearing message carries the target VLAN.
[0153] In some embodiments of this application, the clearing module 1220 can also be used to clear saved Media Access Control entries and Address Resolution Protocol entries when the clearing message does not carry the target virtual local area network.
[0154] In some embodiments, the clearing module 1220 may include: The determination unit is used to determine the target virtual local area network based on the clearing table fields; The clearing unit is used to clear the Media Access Control List (MAC) entries and Address Resolution Protocol (ARP) entries corresponding to the target virtual LAN.
[0155] The device switching device applicable to multiple dual-homed protocol ring links in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the specific device.
[0156] The device switching device applicable to multiple dual-homed protocol ring links in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit it.
[0157] The device switching device for multiple dual-homed protocol ring links provided in this application embodiment can achieve... Figures 9 to 10 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0158] In some embodiments, such as Figure 13 As shown, this application embodiment also provides an electronic device 1300, including a processor 1301, a memory 1302, and a computer program stored in the memory 1302 and executable on the processor 1301. When the program is executed by the processor 1301, it implements the various processes of the above-described device switching method embodiments applicable to multiple dual-homing protocol ring links and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0159] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.
[0160] This application also provides a non-transitory computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described device switching method embodiments applicable to multiple dual-homed protocol ring links and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0161] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0162] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described device switching method applicable to multiple dual-homing protocol ring links.
[0163] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0164] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run programs or instructions to implement the various processes of the above-described device switching method embodiments applicable to multiple dual-homing protocol ring links, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0165] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0166] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0167] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0168] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
[0169] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0170] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.
Claims
1. A method for device switchover for a plurality of dual-homing protocol ring links, the method comprising: Be applied to each home node in target dual-homing protocol ring link; The target dual-homing protocol ring link is any one of the plurality of dual-homing protocol ring links;The method comprises: In the case of receiving a target message and the home node being configured as a target mode, generating a clear table message carrying a target virtual local area network based on information of the target virtual local area network;The target virtual local area network is a virtual local area network corresponding to the target dual-homing protocol ring link;The target message is used to indicate that the topology of the target dual-homing protocol ring link changes;The target message is sent by at least one non-home node in the target dual-homing protocol ring link; Send the clear table message to the aggregation layer device and the non-home node, so that the aggregation layer device and the non-home node clear the media access control table item and the address resolution protocol table item corresponding to the target virtual local area network.
2. The method for device switchover applicable to multiple dual-homing protocol ring links according to claim 1, wherein, When the number of target virtual local area networks carried by the clear table message is greater than a first threshold, the target virtual local area networks carried by the clear table message are represented in the form of a string.
3. The method for device switchover applicable to multiple dual-homing protocol ring links according to claim 1, wherein, When the number of target virtual local area networks carried by the clear table message is less than a first threshold, the target virtual local area networks carried by the clear table message are represented in the form of an array.
4. The method for device switching applicable to multiple dual-homing protocol ring links according to claim 2 or 3, characterized in that, The clear table message further comprises type identification information, which is used to indicate the representation form of the target virtual local area network carried by the clear table message.
5. The method for device switchover applicable to multiple dual-homing protocol ring links according to claim 4, wherein, The clear table message is provided with a clear table field in TLV format, which is used to carry the target virtual local area network and the type identification information.
6. A method for device switching for a plurality of dual-homing protocol ring links, the method comprising: Be applied to each non-home node in target dual-homing protocol ring link; The target dual-homing protocol ring link is any one of the plurality of dual-homing protocol ring links;The method comprises: Receive and analyze the clear table message;The clear table message is sent by a home node in the target dual-homing protocol ring link in the case that the topology of the target dual-homing protocol ring link changes; In the case that the clear table message carries a target virtual local area network, clear the media access control table item and the address resolution protocol table item corresponding to the target virtual local area network;The target virtual local area network is a virtual local area network corresponding to the target dual-homing protocol ring link.
7. The method for device switchover applicable to multiple dual-homing protocol ring links according to claim 6, wherein, The clear table message further comprises type identification information, which is used to indicate the representation form of the target virtual local area network carried by the clear table field.
8. The method for device switchover applicable to multiple dual-homing protocol ring links according to claim 7, wherein, The clear table message further comprises type identification information, which is used to indicate the representation form of the target virtual local area network carried by the clear table field. In the case that the clear table message carries a target virtual local area network, according to the type identification information carried in the clear table message, judge the representation form of the target virtual local area network carried and determine the way to identify the target virtual local area network.
9. The method for device switching applicable to multiple dual-homing protocol ring links according to any one of claims 6 to 8, characterized in that, After the receiving and analyzing the clear table message, the method further comprises: In the case that the clear table message does not carry a target virtual local area network, clear the saved media access control table item and address resolution protocol table item.
10. A device switchover apparatus suitable for a plurality of dual-homing protocol ring links, characterized by, Be applied to each home node in target dual-homing protocol ring link; The target dual-homing protocol ring link is any one of the plurality of dual-homing protocol ring links;The device comprises: The generating module is used for generating a clear table message carrying a target virtual local area network based on the information of the target virtual local area network in the case of receiving a target message and the home node being configured as a target mode;The target virtual local area network is a virtual local area network corresponding to the target dual-homing protocol ring link;The target message is used to indicate that the topology of the target dual-homing protocol ring link changes;The target message is sent by at least one non-home node in the target dual-homing protocol ring link; The sending module is used for sending the clear table message to the aggregation layer device and the non-home node, so that the aggregation layer device and the non-home node clear the media access control table item and the address resolution protocol table item corresponding to the target virtual local area network.
11. A device switchover apparatus suitable for a plurality of dual-homing protocol ring links, characterized by, Be applied to each non-home node in target dual-homing protocol ring link and aggregation layer device; The target dual-homing protocol ring link is any one of the plurality of dual-homing protocol ring links;The device comprises: The receiving module is used for receiving and analyzing a clear table message;The clear table message is a message sent by a home node in the target dual-homing protocol ring link in the case of the topology of the target dual-homing protocol ring link changing; The clearing module is used for clearing the media access control table item and the address resolution protocol table item corresponding to the target virtual local area network in the case of the clear table message carrying a target virtual local area network;The target virtual local area network is a virtual local area network corresponding to the target dual-homing protocol ring link.