A message forwarding control method and device
By configuring different control VLAN IDs for FRRP sub-rings and maintaining ID lists in network devices, the problem of indistinguishable control packets in the FRRP domain is solved, packet forwarding control on the FRRP ring network is realized, and the ring network efficiency is improved. Robustness and reliability.
Patent Information
- Application Number
- CN202310105676.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-10
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2043-02-10
AI Technical Summary
In the FRRP protocol, since the control packets corresponding to multiple subrings in the same FRRP domain carry the same subring ID, control packets transmitted in the ring network under the same FRRP domain cannot be distinguished, resulting in unnecessary Forwarding packets consumes CPU performance and may cause key packets to be lost.
By configuring different control VLAN IDs for multiple subrings and maintaining an ID list in the network device, the target VLAN ID is extracted when receiving a packet, and after determining that it matches the VLAN ID of the subring or main ring, the packet is forwarded from the corresponding port. , to avoid unnecessary transparent transmission.
It effectively distinguishes the control packets of each sub-ring in the same FRRP domain, avoids unnecessary packet forwarding, and improves the robustness and reliability of the FRRP ring network.
Smart Images

Figure CN116137608B
Abstract
Description
Technical Field
[0001] One or more embodiments of the present specification relate to the field of computer network technology, and in particular, to a message forwarding control method and device. Background Art
[0002] FRRP (Fast Ring Recovery Protocol) is a link layer protocol specifically used in Ethernet rings. When a link or device on an Ethernet ring fails, it can quickly switch to a backup link to ensure rapid recovery of services.
[0003] A FRRP domain is a set of network devices configured with the same control VLAN and the same data VLAN. The control VLAN is the VLAN used to transmit FRRP control messages.
[0004] A FRRP domain can contain multiple FRRP rings, but the FRRP rings in the same FRRP domain can only contain one primary ring. After the primary ring is selected, the other FRRP rings in the same FRRP domain are all sub-rings.
[0005] Because in the FRRP protocol, the control messages corresponding to multiple sub-rings under the same FRRP domain carry the same sub-ring ID, it is impossible to distinguish the control messages transmitted in the ring network under the same FRRP domain. In this case, the control message corresponding to any sub-ring in the multiple sub-rings can be transparently transmitted to other sub-rings in the multiple sub-rings, causing unnecessary message forwarding, occupying CPU performance, and thus losing key messages. Summary of the invention
[0006] The present application provides a message forwarding control method and device, and the technical solution is as follows:
[0007] According to a first aspect of the present application, a message forwarding control method is provided, which is applied to a network device, wherein the network device is configured with at least one Frrp subring of a target Frrp domain; each Frrp subring of the at least one Frrp subring is configured with a different control VLAN, and the control VLAN corresponds to a different VLAN ID; the network device is configured with an ID list, and the ID list includes the VLAN IDs corresponding to each Frrp subring included in the at least one Frrp subring configured by the network device; the method includes:
[0008] Receive a message, and extract the target vlan ID carried in the message;
[0009] Determine whether the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring in the vlan IDs corresponding to each Frrp sub-ring included in the ID list;
[0010] If the target vlan ID carried in the message successfully matches the vlan ID corresponding to any Frrp sub-ring in the vlan IDs corresponding to the respective Frrp sub-rings included in the ID list, the message is forwarded from the port corresponding to any Frrp sub-ring.
[0011] Optionally, if the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring in the vlan IDs corresponding to the respective Frrp sub-rings included in the ID list, forwarding the message from a port corresponding to any Frrp sub-ring includes:
[0012] If the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring in the vlan IDs corresponding to the respective Frrp sub-rings included in the ID list, further determining whether the port corresponding to any Frrp sub-ring in the network device is in a forwarding state;
[0013] If it is determined that the port in the network device corresponding to any one of the Frrp sub-rings is in a forwarding state, the message is forwarded from the port in the network device corresponding to any one of the Frrp sub-rings.
[0014] Optionally, the method further includes:
[0015] Counting the number of Frrp control messages received within a preset time period, and determining whether the number of messages is greater than a preset threshold;
[0016] If the number of packets is greater than a preset threshold, the loop identifier in the cache is incremented according to a preset increment rule;
[0017] Determine whether the loop identifier is greater than a preset loop count within a preset statistical period;
[0018] If the loop identifier is greater than the preset loop number, the port corresponding to any Frrp sub-ring is set to a blocking state.
[0019] Optionally, the method further includes:
[0020] Counting the number of Frrp control messages received within a preset time period, and determining whether the number of messages is greater than a preset threshold;
[0021] If the number of packets is not greater than a preset threshold, the path identifier in the cache is incremented according to a preset increment rule;
[0022] Determine whether the passage identification is greater than a preset passage number within a preset statistical period;
[0023] If the path identifier is greater than the preset path number, further determining whether a hello message is received;
[0024] If no hello message is received, the port corresponding to any Frrp sub-ring is set to a forwarding state, and the path identifier is set to an initialization value.
[0025] According to a second aspect of the present application, another message forwarding control method is provided, which is applied to a network device; the network device is configured with a Frrp main ring of a target Frrp domain; each Frrp sub-ring contained in the target Frrp domain is configured with a different control VLAN, and the control VLAN corresponds to a different VLAN ID; the network device is configured with an ID list, and the ID list includes the VLAN ID corresponding to each Frrp sub-ring contained in the target Frrp domain and the VLAN ID corresponding to the control VLAN configured by the Frrp main ring; the method includes:
[0026] Receive a message, and extract the target vlan ID carried in the message;
[0027] Determine whether the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring or Frrp main ring in the ID list;
[0028] If the target vlan ID carried in the message successfully matches the vlan ID corresponding to any Frrp sub-ring or Frrp main ring in the ID list, the message is forwarded from the port corresponding to the Frrp main ring.
[0029] Optionally, if the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring or Frrp main ring in the ID list, forwarding the message from the port corresponding to the Frrp main ring includes:
[0030] If the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring or Frrp main ring in the ID list, further determining whether the primary port and the secondary port of the network device are both in forwarding state;
[0031] If both the primary port and the secondary port of the network device are in a forwarding state, the message is forwarded from the primary port or the secondary port of the network device.
[0032] According to a third aspect of the present application, another message forwarding control method is provided, which is applied to a network device, wherein the network device is configured with a Frrp main ring of a target Frrp domain and at least one Frrp sub-ring of the target Frrp domain; each Frrp sub-ring of the at least one Frrp sub-ring is configured with a different control VLAN, and the control VLAN corresponds to a different VLAN ID; the network device is configured with an ID list, and the ID list includes the VLAN ID corresponding to each Frrp sub-ring contained in the at least one Frrp sub-ring configured by the network device and the VLAN ID corresponding to the control VLAN configured by the Frrp main ring; the method includes:
[0033] Receive a message, and extract the target vlan ID carried in the message;
[0034] Determine whether the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring or the Frrp main ring in the ID list;
[0035] If the target vlan ID carried by the message successfully matches the vlanID corresponding to any Frrp sub-ring in the ID list, the message is forwarded from the port corresponding to the Frrp main ring and the edge port corresponding to any Frrp sub-ring;
[0036] Alternatively, if the target vlan ID carried by the message successfully matches the vlanID corresponding to the Frrp primary ring in the ID list, the message is forwarded from the port corresponding to the Frrp primary ring.
[0037] According to a fourth aspect of the present application, a message forwarding control device is provided, which is applied to a network device, wherein the network device is configured with at least one Frrp subring of a target Frrp domain; each Frrp subring of the at least one Frrp subring is configured with a different control VLAN, and the control VLAN corresponds to a different VLAN ID; the subring node is configured with an ID list, and the ID list includes the VLAN IDs corresponding to each Frrp subring included in the at least one Frrp subring configured by the network device; the device includes:
[0038] A receiving unit, used for receiving a message and extracting a target vlan ID carried in the message;
[0039] a determination unit, configured to determine whether a target vlan ID carried by the message successfully matches a vlan ID corresponding to any of the vlan IDs corresponding to the respective Frrp sub-rings in the ID list;
[0040] A forwarding unit is used to forward the message from a port corresponding to any Frrp sub-ring if a target vlan ID carried by the message matches a vlan ID corresponding to any Frrp sub-ring in the vlan ID list corresponding to each Frrp sub-ring.
[0041] According to a fifth aspect of the present application, another message forwarding control device is provided, which is applied to a network device; the network device is configured with a Frrp main ring of a target Frrp domain; each Frrp sub-ring included in the target Frrp domain is configured with a different control VLAN, and the control VLAN corresponds to a different VLAN ID; the network device is configured with an ID list, and the ID list includes the VLAN ID corresponding to each Frrp sub-ring included in the target Frrp domain and the VLAN ID corresponding to the control VLAN configured by the Frrp main ring; the device includes:
[0042] A receiving unit, used for receiving a message and extracting a target vlan ID carried in the message;
[0043] a determination unit, configured to determine whether a target vlan ID carried in the message successfully matches a vlan ID corresponding to any Frrp sub-ring or Frrp main ring in the ID list;
[0044] A forwarding unit is used to forward the message from the port corresponding to the Frrp main ring if the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring or Frrp main ring in the ID list.
[0045] According to a sixth aspect of the present application, another message forwarding control device is provided, which is applied to a network device, wherein the network device is configured with a Frrp main ring of a target Frrp domain and at least one Frrp sub-ring of the target Frrp domain; each Frrp sub-ring of the at least one Frrp sub-ring is configured with a different control VLAN, and the control VLAN corresponds to a different VLAN ID; the network device is configured with an ID list, and the ID list includes the VLAN ID corresponding to each Frrp sub-ring contained in the at least one Frrp sub-ring configured by the network device and the VLAN ID corresponding to the control VLAN configured by the Frrp main ring; the device includes:
[0046] A receiving unit, used for receiving a message and extracting a target vlan ID carried in the message;
[0047] a determination unit, configured to determine whether a target vlan ID carried in the message successfully matches a vlan ID corresponding to any Frrp sub-ring or the Frrp main ring in the ID list;
[0048] a forwarding unit, configured to forward the message from a port corresponding to the Frrp main ring and an edge port corresponding to any Frrp sub-ring if a target VLAN ID carried by the message matches a VLAN ID corresponding to any Frrp sub-ring in the ID list;
[0049] Alternatively, if the target vlan ID carried by the message successfully matches the vlanID corresponding to the Frrp primary ring in the ID list, the message is forwarded from the port corresponding to the Frrp primary ring.
[0050] According to a seventh aspect of the present application, there is provided an electronic device, comprising a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are interconnected via the bus;
[0051] The memory stores machine-readable instructions, and the processor executes the message forwarding control method by calling the machine-readable instructions.
[0052] According to an eighth aspect of the present application, a machine-readable storage medium is provided, wherein the machine-readable storage medium stores machine-readable instructions, and when the machine-readable instructions are called and executed by a processor, the message forwarding control method is implemented.
[0053] Through the above embodiments, different control vlans are configured for each Frrp subring in the target Frrp domain, and the control vlans correspond to different vlan IDs. An ID list is configured in the network device, and the ID list includes the vlan IDs corresponding to each Frrp subring contained in the at least one Frrp subring configured by the network device, so as to distinguish the control messages corresponding to each Frrp subring in the same Frrp domain; when the network device receives a message, the target vlan ID carried by the message can be extracted, and the target vlan ID carried by the message can be successfully matched with the vlan ID corresponding to any Frrp subring in the vlan ID corresponding to each Frrp subring included in the ID list; if so, the message is forwarded from the port corresponding to any Frrp subring. The control messages corresponding to each Frrp subring in the same Frrp domain can be controlled to be unable to be transparently transmitted to other Frrp subrings in the same Frrp domain, avoiding unnecessary message forwarding, thereby improving the robustness and reliability of the Frrp ring network.
[0054] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0056] Figure 1 This is a flow chart of a message forwarding control method in an embodiment of this specification;
[0057] Figure 2 This is a schematic diagram of a target Frrp domain in an embodiment of this specification;
[0058] Figure 3 This is a flow chart of another message forwarding control method in an embodiment of this specification;
[0059] Figure 4 This is a flow chart of another message forwarding control method in an embodiment of this specification;
[0060] Figure 5 This is a schematic diagram of the structure of an electronic device in which a message forwarding control device is located in an embodiment of this specification;
[0061] Figure 6 This is a block diagram of a message forwarding control device in an embodiment of this specification;
[0062] Figure 7 This is a block diagram of another message forwarding control device in an embodiment of this specification;
[0063] Figure 8 This is a block diagram of another message forwarding control device in one embodiment of this specification. DETAILED DESCRIPTION
[0064] 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, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0065] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.
[0066] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of this specification, the relevant contents of the FRRP protocol involved in the embodiments of this specification are briefly described below.
[0067] VLAN (Virtual Local Area Network) is a logical segmentation of network users connected to the port of a Layer 2 switch. It is a network segmentation that can be configured based on the location, role, department, or application and protocol used by the network user.
[0068] A FRRP domain is a set of network devices configured with the same control VLAN and the same data VLAN. The control VLAN is the VLAN used to transmit FRRP control messages, and the data VLAN is the VLAN used to transmit data messages.
[0069] Among them, a FRRP domain can contain multiple FRRP rings, but the FRRP rings in the same FRRP domain can only contain one primary ring, which can be determined by the user's configuration. After the primary ring is selected, the other FRRP rings in the same FRRP domain are all sub-rings.
[0070] The FRRP ring is a ring topology structure composed of network devices configured with the same control VLAN and the same data VLAN connected by links. Each network device on the FRRP ring is called a FRRP node. Each FRRP ring must have only one master node and at least one forwarding node.
[0071] The FRRP protocol supports multiple networking modes such as single ring, tangent ring and intersecting ring. In the intersecting ring networking, in order to prevent loops caused by multi-ring networks, one of the two intersecting rings must be the main ring. The protocol messages of the sub-ring can be transmitted through the main ring, and the protocol messages of the main ring are only transmitted within the main ring. The control VLANs of the main ring and the sub-ring are different and do not interfere with each other.
[0072] In actual applications, there are two intersection devices at the intersection of the main ring and the sub-ring, one of which is an edge node and the other is an auxiliary edge node in the sub-ring. The edge node and the auxiliary edge node must be configured in pairs. The intersection device is a main node or a transmission node in the main ring.
[0073] The ports through which the master node and the forwarding node access the FRRP ring have two ports, one is the master port and the other is the slave port, and the master port and the slave port are configured by the user; the port through which the edge node or the auxiliary edge node accesses the main ring is the main ring port, and the port through which the edge node or the auxiliary edge node accesses the sub-ring is the edge port.
[0074] The messages transmitted based on the FRRP protocol are divided into control messages and data messages. The transmission of data messages can be controlled based on the transmission of control messages. There are three types of control messages, namely HELLO messages, EDGE-HELLO messages, and MAJOR-FAULT messages.
[0075] HELLO message refers to the health monitoring message in the FRRP protocol, which is used to detect the loop integrity of the network. Specifically, the master node of the main ring or sub-ring can send a hello message from the main port to the slave port of the master node. If the slave port of the master node receives the hello message, the main ring or sub-ring where the master node is located is currently a loop.
[0076] EDGE-HELLO message refers to the main ring integrity check message in the FRRP protocol, which is used to detect the loop integrity of the main ring. Specifically, the edge node of the sub-ring can send an edge-hello message to the auxiliary edge node of the sub-ring. If the auxiliary edge node cannot receive the edge-hello message sent by the edge node within a preset time period, the link between the edge node of the sub-ring and the main ring where the auxiliary edge node is located has failed.
[0077] MAJOR-FAULT message refers to the main ring fault notification message in the FRRP protocol, which is used to convey the information that the main ring has a fault to the edge node. Specifically, when the auxiliary edge node of the sub-ring cannot receive the edge-hello message sent by the edge node of the same sub-ring within a preset time period, the major-fault message can be sent to the edge node. When the edge node receives the major-fault message, it means that the link of the main ring where the edge node of the sub-ring and the auxiliary edge node are located has failed.
[0078] Because in the FRRP protocol, the sub-ring IDs of multiple sub-rings under the same FRRP domain are the same, that is, the sub-ring IDs carried by the control messages corresponding to the multiple sub-rings under the same FRRP domain are the same, and therefore it is impossible to distinguish the control messages transmitted in the ring network under the same FRRP domain. In this case, the control message corresponding to any sub-ring in the multiple sub-rings can be transparently transmitted to other sub-rings in the multiple sub-rings, resulting in unnecessary message forwarding, occupying CPU performance, and easily causing the message transmission processing to exceed the CPU processing capacity, thereby losing key messages.
[0079] In view of this, the present specification aims to propose a technical solution for controlling message forwarding based on the sub-ring ID by configuring a different sub-ring ID for the network devices included in each sub-ring in multiple sub-rings.
[0080] When implemented, the method can be applied to a network device, the network device is configured with at least one Frrp subring of a target Frrp domain; each Frrp subring of the at least one Frrp subring is configured with a different control VLAN, and the control VLAN corresponds to a different VLAN ID; the network device is configured with an ID list, and the ID list includes the VLAN IDs corresponding to each Frrp subring included in the at least one Frrp subring configured by the network device; the method includes:
[0081] Furthermore, a message may be received, and a target vlan ID carried in the message may be extracted;
[0082] Further, it can be determined whether the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring in the vlan IDs corresponding to the respective Frrp sub-rings included in the ID list;
[0083] Further, if the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring in the vlan IDs corresponding to the respective Frrp sub-rings included in the ID list, the message can be forwarded from the port corresponding to any Frrp sub-ring.
[0084] Through the above embodiments, different control vlans are configured for each Frrp subring in the target Frrp domain, and the control vlans correspond to different vlan IDs. An ID list is configured in the network device, and the ID list includes the vlan IDs corresponding to each Frrp subring contained in the at least one Frrp subring configured by the network device, so as to distinguish the control messages corresponding to each Frrp subring in the same Frrp domain; when the network device receives a message, the target vlan ID carried by the message can be extracted, and the target vlan ID carried by the message can be successfully matched with the vlan ID corresponding to any Frrp subring in the vlan ID corresponding to each Frrp subring included in the ID list; if so, the message is forwarded from the port corresponding to any Frrp subring. The control messages corresponding to each Frrp subring in the same Frrp domain can be controlled to be unable to be transparently transmitted to other Frrp subrings in the same Frrp domain, avoiding unnecessary message forwarding, thereby improving the robustness and reliability of the Frrp ring network.
[0085] See also Figure 1 , Figure 1 FIG. 1 is a flowchart of an exemplary message forwarding control method. Figure 1 As shown, the method is applied to a network device, the network device is configured with at least one Frrp sub-ring of a target Frrp domain; each Frrp sub-ring of the at least one Frrp sub-ring is configured with a different control VLAN, and the control VLAN corresponds to a different VLAN ID; the network device is configured with an ID list, and the ID list may include the VLAN IDs corresponding to each Frrp sub-ring contained in the at least one Frrp sub-ring configured by the network device.
[0086] In this specification, the network device may be configured with multiple Frrp domains, and the target Frrp domain may be any Frrp domain among the multiple Frrp domains configured by the network device; the target Frrp domain may include multiple Frrp rings, wherein the multiple Frrp rings include a Frrp main ring and at least one Frrp sub-ring, and different control vlans may be configured for at least one Frrp sub-ring of the target Frrp domain, and the control vlan may correspond to different vlan IDs.
[0087] Based on the network device being configured with at least one Frrp subring of the target Frrp domain and the vlan ID corresponding to each Frrp subring included in the at least one Frrp subring, the network device may perform the following steps:
[0088] Step 102: Receive a message and extract the target VLAN ID carried in the message.
[0089] In the present specification, any Frrp sub-ring in at least one Frrp sub-ring included in the target Frrp domain may be determined as the target Frrp sub-ring.
[0090] In one embodiment shown, the message may be a control message corresponding to the target Frrp sub-ring, and the control message may carry a target VLAN ID corresponding to a control VLAN configured for the target Frrp sub-ring.
[0091] For example, the VLAN ID of the target sub-ring may be 1001, and the network device may receive a control message corresponding to the target sub-ring, and extract the target VLAN ID 1001 carried in the control message.
[0092] Step 104: Determine whether the target VLAN ID carried in the message successfully matches the VLAN ID corresponding to any Frrp sub-ring in the VLAN IDs corresponding to the respective Frrp sub-rings included in the ID list.
[0093] In this specification, the network device is configured with an ID list, which may include subring entries of each Frrp subring included in the at least one Frrp subring configured by the network device and vlan ID entries corresponding to each Frrp subring.
[0094] For example, please refer to Table 1, which is an ID list shown in an exemplary embodiment.
[0095]
[0096] Table 1
[0097] As described in Table 1, the network device is configured with sub-ring 1, sub-ring 3, and sub-ring 7 of the target Frrp domain, wherein the vlan ID of the sub-ring 1 may be 1001, the vlan ID of the sub-ring 3 may be 1003, and the vlan ID of the sub-ring 7 may be 1007. The network device may match the target vlan ID with the ID list, and may determine whether the target vlan ID carried by the message successfully matches the vlan ID of any sub-ring in the sub-ring IDs included in the ID list.
[0098] Step 106: If the target VLAN ID carried by the message successfully matches the VLAN ID corresponding to any Frrp sub-ring in the VLAN IDs corresponding to the respective Frrp sub-rings included in the ID list, the message is forwarded from the port corresponding to the any Frrp sub-ring.
[0099] For example, the target vlan ID carried in the message extracted by the network device can be 1001, and the vlan ID 1001 can be included in the ID list configured by the network device. It can be determined that the target vlan ID carried by the message successfully matches the vlan ID of any sub-ring in the vlan ID included in the ID list. Then the network device can forward the message from the port corresponding to any Frrp sub-ring.
[0100] In one embodiment shown, if the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring in the vlan IDs corresponding to the various Frrp sub-rings included in the ID list, the message is forwarded from the port corresponding to the any Frrp sub-ring, including: if the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring in the vlan IDs corresponding to the various Frrp sub-rings included in the ID list, further determining whether the port corresponding to the any Frrp sub-ring in the network device is in a forwarding state; if it is determined that the port corresponding to the any Frrp sub-ring in the network device is in a forwarding state, forwarding the message from the port corresponding to the any Frrp sub-ring in the network device.
[0101] In this specification, the network device may be a sub-ring master node of any Frrp sub-ring, and the sub-ring master node may include a master port and a slave port corresponding to any Frrp sub-ring.
[0102] In the Frrp ring network, in order to prevent the generation of a loop, the sub-ring master node can block the slave port corresponding to the HELLO message when receiving the HELLO message, that is, block the slave port of the Frrp sub-ring corresponding to the HELLO message. Therefore, before forwarding the message, the network device can determine whether the master port and the slave port corresponding to any Frrp sub-ring in the network device are both in the forwarding state. If the master port and the slave port of the network device are both in the forwarding state, the message can be forwarded from the master port or the slave port.
[0103] For example, see Figure 2 , Figure 2The diagram is a schematic diagram of a target Frrp domain in an embodiment of the present specification. The network device may be a network device 6 in the target Frrp domain, and the network device 6 may be a sub-ring master node of the sub-ring 1. If the target vlan ID carried by the message successfully matches the vlan ID of the sub-ring 1 included in the ID list of the network device 6, it can be further determined whether the port corresponding to the sub-ring 1 in the network device 6 is in a forwarding state. If it is determined that the port corresponding to the sub-ring 1 in the network device 6 is in a forwarding state, the message can be forwarded from the port corresponding to the sub-ring 1 in the network device 6.
[0104] See also Figure 3 , Figure 3 FIG. 1 is a flowchart of another exemplary message forwarding control method. Figure 3 As shown, the method is applied to a network device, the network device is configured with a Frrp main ring of a target Frrp domain; each Frrp sub-ring contained in the target Frrp domain is configured with a different control VLAN, and the control VLAN corresponds to a different VLAN ID; the network device is configured with an ID list, and the ID list includes the VLAN ID corresponding to each Frrp sub-ring contained in the target Frrp domain and the VLAN ID corresponding to the control VLAN configured by the Frrp main ring.
[0105] In this specification, the network device may be configured with multiple Frrp domains, and the target Frrp domain may be any Frrp domain among the multiple Frrp domains configured by the network device; the target Frrp domain may include multiple Frrp rings, wherein the multiple Frrp rings include a Frrp main ring and at least one Frrp sub-ring, and different control vlans may be configured for at least one Frrp sub-ring of the target Frrp domain, and the control vlan may correspond to different vlan IDs.
[0106] Based on the network device being configured with the Frrp main ring of the target Frrp domain, the vlan IDs corresponding to the Frrp sub-rings contained in the target Frrp domain, and the vlan ID corresponding to the control vlan configured by the Frrp main ring, the network device may perform the following steps:
[0107] Step 302: Receive a message and extract the target VLAN ID carried in the message.
[0108] In this specification, any Frrp subring in at least one Frrp subring included in the target Frrp domain can be determined as the target subring. The message can be a control message corresponding to the target Frrp subring, and the control message can carry a target vlan ID corresponding to the control vlan configured for the target Frrp subring.
[0109] For example, the VLAN ID of the target sub-ring may be 1002, and the network device may receive a control message corresponding to the target sub-ring, and extract the target VLAN ID 1002 carried in the control message.
[0110] Step 304: Determine whether the target VLAN ID carried in the message successfully matches the VLAN ID corresponding to any Frrp sub-ring or Frrp main ring in the ID list.
[0111] In this specification, the network device is configured with an ID list, which may include a main ring table entry corresponding to the Frrp main ring configured by the network device, a sub-ring table entry corresponding to each Frrp sub-ring contained in at least one Frrp sub-ring in the same Frrp domain as the Frrp main ring, and a vlan ID table entry corresponding to each Frrp sub-ring and a vlan ID table entry corresponding to the Frrp main ring.
[0112] For example, please refer to Table 2, which is an ID list shown in an exemplary embodiment.
[0113]
[0114] Table 2
[0115] As described in Table 2, the network device is configured with an ID list, and the ID list may include the vlan IDs corresponding to the main ring, sub-ring 3, and sub-ring 7 of the target Frrp domain, wherein the vlan ID of the main ring may be 1000, the vlan ID of the sub-ring 3 may be 1002, and the vlan ID of the sub-ring 7 may be 1007. The network device may match the target vlan ID with the ID list, and may determine whether the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring or Frrp main ring in the ID list.
[0116] Step 306: If the target VLAN ID carried by the message successfully matches the VLAN ID corresponding to any Frrp sub-ring or Frrp main ring in the ID list, the message is forwarded from the port corresponding to the Frrp main ring.
[0117] For example, the target vlan ID carried in the message extracted by the network device can be 1003, and the vlan ID 1003 can be included in the ID list configured by the network device. If it is determined that the target vlan ID carried by the message successfully matches the vlan ID of any sub-ring in the vlan ID included in the ID list, the network device can forward the message from the port corresponding to the Frrp main ring in the same Frrp domain as any Frrp sub-ring.
[0118] In one embodiment shown, if the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring or Frrp main ring in the ID list, the message is forwarded from the port corresponding to the Frrp main ring, including: if the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring or Frrp main ring in the ID list, further determining whether the main port and the slave port corresponding to the network device and the Frrp main ring are both in a forwarding state; if the main port and the slave port of the network device are both in a forwarding state, forwarding the message from the main port or the slave port of the network device.
[0119] In this specification, the network device may be any main ring node in the Frrp main ring of the target Frrp domain, and the main ring node may include a main ring port corresponding to the Frrp main ring.
[0120] Since in the Frrp ring network, the main ring nodes include the main ring master node and other main ring nodes, in order to prevent the generation of a loop, the main ring master node can block the slave port corresponding to the HELLO message when receiving the HELLO message, that is, block the slave port of the Frrp main ring corresponding to the HELLO message. Therefore, before forwarding the message, the network device can determine whether the master port and the slave port corresponding to any Frrp sub-ring in the network device are both in the forwarding state. If the master port and the slave port of the network device are both in the forwarding state, the message can be forwarded from the master port or the slave port.
[0121] For example, see also Figure 2, the network device may be the network device 1 in the target Frrp domain, and the network device 1 may be the master node of the main ring 1. If the target vlan ID carried by the message successfully matches the vlan ID of the sub-ring 1 included in the ID list of the network device 1, it can be further determined whether the port corresponding to the main ring 1 in the same Frrp domain as the sub-ring 1 in the network device 1 is in a forwarding state, and if it is determined that the port corresponding to the main ring 1 in the network device 1 is in a forwarding state, the message can be forwarded from the port corresponding to the main ring 1 in the network device 1.
[0122] See also Figure 4 , Figure 4 FIG. 1 is a flowchart of another exemplary message forwarding control method. Figure 4 As shown, the method is applied to a network device, the network device is configured with a Frrp main ring of a target Frrp domain and at least one Frrp sub-ring of the target Frrp domain; each Frrp sub-ring of the at least one Frrp sub-ring is configured with a different control VLAN, and the control VLAN corresponds to a different VLAN ID; the network device is configured with an ID list, and the ID list includes the VLAN ID corresponding to each Frrp sub-ring contained in the at least one Frrp sub-ring configured by the network device and the VLAN ID corresponding to the control VLAN configured by the Frrp main ring.
[0123] In this specification, the network device may be configured with multiple Frrp domains, and the target Frrp domain may be any Frrp domain among the multiple Frrp domains configured by the network device; the target Frrp domain may include multiple Frrp rings, wherein the multiple Frrp rings include a Frrp main ring and at least one Frrp sub-ring, and different control vlans may be configured for at least one Frrp sub-ring of the target Frrp domain, and the control vlan may correspond to different vlan IDs.
[0124] In this specification, the network device may be configured with a target Frrp sub-ring of the target Frrp domain, and may also be configured with a Frrp main ring of the target Frrp domain; if the network device is configured with a Frrp main ring of the target Frrp domain and a Frrp sub-ring of the same Frrp domain, then the network device is an intersection node of the Frrp sub-ring and the Frrp main ring, and the network device may include an edge port corresponding to the target Frrp sub-ring, and a main ring port corresponding to the Frrp main ring.
[0125] Based on the network device being configured with the Frrp main ring of the target Frrp domain and at least one Frrp sub-ring of the target Frrp domain, as well as the vlan IDs corresponding to the respective Frrp sub-rings contained in the target Frrp domain and the vlan ID corresponding to the Frrp main ring, the network device may perform the following steps:
[0126] Step 402: Receive a message and extract the target VLAN ID carried in the message.
[0127] For example, the network device may receive a control message corresponding to the target Frrp sub-ring, and extract the target vlan ID 1003 carried in the control message.
[0128] Step 404: Determine whether the target VLAN ID carried in the message successfully matches the VLAN ID corresponding to any Frrp sub-ring or Frrp main ring in the ID list.
[0129] In this specification, the network device is configured with an ID list, which may include sub-ring table entries of each Frrp sub-ring contained in the at least one Frrp sub-ring configured by the network device and the main ring table entries corresponding to the configured Frrp main ring, as well as vlan ID table entries corresponding to the each Frrp sub-ring and vlan ID table entries corresponding to the Frrp main ring.
[0130] For example, please refer to Table 3, which is an ID list shown in an exemplary embodiment.
[0131]
[0132] Table 3
[0133] As described in Table 3, the network device is configured with an ID list, and the ID list may include the vlan IDs corresponding to the main ring, sub-ring 3, and sub-ring 7 of the target Frrp domain, wherein the vlan ID of the main ring may be 1000, the vlan ID of the sub-ring 3 may be 1003, and the vlan ID of the sub-ring 7 may be 1007. The network device may match the target vlan ID with the ID list, and may determine whether the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring or Frrp main ring in the ID list.
[0134] Step 406: If the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring in the ID list, the message is forwarded from the port corresponding to the Frrp main ring and the edge port corresponding to any Frrp sub-ring; or, if the target vlan ID carried by the message successfully matches the vlan ID corresponding to the Frrp main ring in the ID list, the message is forwarded from the port corresponding to the Frrp main ring.
[0135] For example, the target vlan ID carried in the message extracted by the network device can be 1003, and the vlan ID 1003 can be included in the ID list configured by the network device. If it is determined that the target vlan ID carried by the message successfully matches the vlan ID of any sub-ring in the vlan ID included in the ID list, the network device can forward the message from the main ring port corresponding to any Frrp sub-ring.
[0136] In one embodiment shown, the number of Frrp control messages received within a preset time period is counted to determine whether the number of messages is greater than a preset threshold; if the number of messages is greater than the preset threshold, the loop identifier in the cache is incremented according to a preset incrementing rule; it is determined whether the loop identifier within the preset statistical period is greater than a preset number of loops; if the loop identifier is greater than the preset number of loops, the slave port is set to a blocked state.
[0137] In this specification, the loop identifier can be used to determine whether the number of Frrp control messages of the target Frrp sub-ring is abnormal within a preset time period, and the loop identifier can be in a numerical form. The preset number of loops can be used to determine whether the target Frrp sub-ring forms a loop, and the preset number of loops can be in a numerical form.
[0138] This specification does not limit the initialization value of the loop identifier. For example, the initialization value of the loop identifier may be 0.
[0139] This specification does not limit the preset increment rule. For example, when the number of packets counted is greater than a preset threshold, the loop identifier may be increased by 1.
[0140] The preset statistical period may include a continuous period, which is not limited in this specification. For example, if the preset period is 1 second, the preset statistical period may be continuous for 10 seconds.
[0141] For example, the preset duration period may be 1s, and the preset number of loops may be 10. The network device may count the number of messages corresponding to the target Frrp subring according to the subring ID corresponding to the target Frrp subring carried in the message, and may determine whether the number of messages received within 1s is greater than a preset threshold value. If the number of messages is greater than the preset threshold value, the loop identifier may be increased by 1; and determine whether the loop identifier is greater than the preset number of loops 10 within the continuous duration period. If the loop identifier is greater than 10, the slave port is set to a blocked state.
[0142] In one embodiment shown, the number of Frrp control messages received within a preset time period is counted to determine whether the number of messages is greater than a preset threshold; if the number of messages is not greater than the preset threshold, the path identifier in the cache is incremented according to a preset increment rule; it is determined whether the path identifier is greater than a preset path number within a preset statistical period; if the path identifier is greater than the preset path number, the slave port is set to a forwarding state, and the path identifier is set to an initialization value.
[0143] In this specification, the path identifier can be used to determine whether the number of messages of the target Frrp sub-ring is normal within a preset time period, and the path identifier can be in a numerical form. The preset path number can be used to determine whether the target Frrp sub-ring does not form a loop, and the preset path number can be in a numerical form.
[0144] This specification does not limit the initialization value of the path identifier. For example, the initialization value of the path identifier may be 0.
[0145] This specification does not limit the preset increment rule. For example, when the number of packets counted is not greater than a preset threshold, the path identifier may be incremented by 1.
[0146] For example, the preset time period may be 1s, and the preset number of paths may be 8. The network device may count the number of messages corresponding to the target Frrp sub-ring according to the sub-ring ID corresponding to the target Frrp sub-ring carried in the message, and may determine whether the number of messages received within 1s is not greater than a preset threshold value. If the number of messages is not greater than the preset threshold value, the path identifier may be increased by 1; determine whether the loop identifier is greater than a preset number of paths 8 within a preset statistical period, and if the path identifier is greater than 8, set the master port or the slave port to a forwarding state.
[0147] In one embodiment shown, if the path identifier is greater than the preset path number, it is further determined whether a hello message is received; if no hello message is received, the master port and the slave port are set to a forwarding state, and the path identifier is set to an initialization value.
[0148] In the Frrp domain, the hello message is used to detect the loop integrity of the network. Specifically, the network device may be the master node of the target Frrp sub-ring, and the network device may send a hello message from the master port corresponding to the target Frrp sub-ring to the slave port. If the slave port receives the hello message, the target Frrp sub-ring is currently a loop. In this case, the master port and the slave port cannot be set to the forwarding state.
[0149] For example, the network device can determine that the path identifier is greater than the preset path number 8, and then further determine whether a hello message is received. If no hello message is received, the master port and the slave port can be set to a forwarding state and the path identifier can be set to 0.
[0150] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of this specification, the technical solutions in this specification are described below in conjunction with system embodiments.
[0151] The target Frrp domain may include a major ring 1, a sub-ring 1, and a sub-ring 2. The network device may receive a message and extract a target vlan ID carried in the message, and may match the target vlan ID with an ID list configured by the network device.
[0152] If the network device is an intersection node in the target Frrp domain, the network device may be configured with the main ring 1 and the sub-ring 1. If the target vlan ID carried by the message successfully matches the vlan ID of the sub-ring 1 included in the ID list configured by the network device, it may be further determined whether the edge port corresponding to the sub-ring 1 in the network device is in a forwarding state, and if it is determined that the edge port is in a forwarding state, the message may be forwarded from the edge port, and if it is determined that the main ring port corresponding to the main ring 1 is in a forwarding state, the message may also be forwarded from the main ring port.
[0153] If the network device can be the sub-ring master node of the sub-ring 1, and if the target VLAN ID carried by the message successfully matches the VLAN ID of the sub-ring 1 included in the ID list of the network device, it can be further determined whether the master port and the slave port of the network device are both in the forwarding state. If it is determined that the master port and the slave port of the network device are both in the forwarding state, the message can be forwarded from the master port or the slave port of the network device.
[0154] If the network device is a master ring node of the main ring 1, and the target VLAN ID carried by the message successfully matches the VLAN ID of the sub-ring 1 included in the ID list of the network device, it can be further determined whether the main ring ports of the network device and the main ring 1 are both in forwarding state. If so, the message can be forwarded from the main ring port of the network device.
[0155] The preset time period may be 1s, the preset number of loops may be 10, and the preset number of paths may be 8. The network device may count the number of Frrp control messages corresponding to the target Frrp sub-ring according to the vlan ID corresponding to the target Frrp sub-ring carried in the message, and may determine whether the number of messages received within 1s is greater than a preset threshold value. If the number of messages is greater than the preset threshold value, the loop identifier may be increased by 1, and it may be further determined whether the loop identifier within the preset statistical period is greater than the preset number of loops 10. If the loop identifier is greater than 10, the master port or the slave port is set to a blocking state. If the number of Frrp control messages is not greater than the preset threshold value, the path identifier may be increased by 1; determine whether the loop identifier is greater than the preset number of paths 8. If the path identifier is greater than 8, it may be further determined whether a hello message is received. If the hello message is not received, the master port and the slave port may be set to a forwarding state, and the path identifier may be set to 0.
[0156] Corresponding to the embodiment of the message forwarding control method, this specification also provides an embodiment of a message forwarding control device.
[0157] See also Figure 5 , Figure 5It is a structural diagram of an electronic device in which a message forwarding control device is located in an embodiment of this specification. At the hardware level, the device includes a processor 502, an internal bus 504, a network interface 506, a memory 508, and a non-volatile memory 510, and of course may also include hardware required for other services. One or more embodiments of this specification can be implemented based on software, such as the processor 502 reading the corresponding computer program from the non-volatile memory 510 into the memory 508 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0158] See also Figure 6 , Figure 6 1 is a block diagram of a message forwarding control device in an embodiment of the present specification. The message forwarding control device can be applied to Figure 5 In the electronic device shown, the technical solution of this specification is implemented. The message forwarding control device is applied to a network device, the network device is configured with at least one Frrp subring of the target Frrp domain; each Frrp subring of the at least one Frrp subring is configured with a different control VLAN, and the control VLAN corresponds to a different VLAN ID; the subring node is configured with an ID list, and the ID list includes the VLAN ID corresponding to each Frrp subring included in the at least one Frrp subring configured by the network device; the method includes:
[0159] The receiving unit 602 is used to receive a message and extract a target VLAN ID carried in the message;
[0160] A determination unit 604 is used to determine whether the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring in the vlan IDs corresponding to the respective Frrp sub-rings included in the ID list;
[0161] The forwarding unit 606 is used to forward the message from the port corresponding to any Frrp sub-ring if the target VLAN ID carried by the message successfully matches the VLAN ID corresponding to any Frrp sub-ring in the VLAN ID list corresponding to each Frrp sub-ring.
[0162] In this embodiment, the device may further include a statistical unit, configured to:
[0163] Counting the number of Frrp control messages received within a preset time period, and determining whether the number of messages is greater than a preset threshold;
[0164] If the number of packets is greater than a preset threshold, the loop identifier in the cache is incremented according to a preset increment rule;
[0165] Determine whether the loop identifier is greater than a preset loop count within a preset statistical period;
[0166] If the loop identifier is greater than the preset loop number, the port corresponding to any Frrp sub-ring is set to a blocking state.
[0167] In this embodiment, the statistical unit may also be used for:
[0168] Counting the number of Frrp control messages received within a preset time period, and determining whether the number of messages is greater than a preset threshold;
[0169] If the number of packets is not greater than a preset threshold, the path identifier in the cache is incremented according to a preset increment rule;
[0170] Determine whether the passage identification is greater than a preset passage number within a preset statistical period;
[0171] If the path identifier is greater than the preset path number, further determining whether a hello message is received;
[0172] If no hello message is received, the port corresponding to any Frrp sub-ring is set to a forwarding state, and the path identifier is set to an initialization value.
[0173] See also Figure 7 , Figure 7 1 is a block diagram of a message forwarding control device in an embodiment of the present specification. The message forwarding control device can be applied to Figure 5 In the electronic device shown, the technical solution of this specification is implemented. The message forwarding control device is applied to a network device; the network device is configured with a Frrp main ring of a target Frrp domain; each Frrp sub-ring included in the target Frrp domain is configured with a different control VLAN, and the control VLAN corresponds to a different VLAN ID; the network device is configured with an ID list, and the ID list includes the VLAN ID corresponding to each Frrp sub-ring included in the target Frrp domain and the VLAN ID corresponding to the control VLAN configured by the Frrp main ring; the method includes:
[0174] The receiving unit 702 is used to receive a message and extract a target VLAN ID carried in the message;
[0175] A determination unit 704 is used to determine whether the target VLAN ID carried by the message successfully matches the VLAN ID corresponding to any Frrp sub-ring or Frrp main ring in the ID list;
[0176] The forwarding unit 706 is configured to forward the message from the port corresponding to the Frrp main ring if the target VLAN ID carried by the message successfully matches the VLAN ID corresponding to any Frrp sub-ring or Frrp main ring in the ID list.
[0177] See also Figure 8 , Figure 8 1 is a block diagram of a message forwarding control device in an embodiment of the present specification. The message forwarding control device can be applied to Figure 5 In the electronic device shown, the technical solution of this specification is implemented. Wherein, the message forwarding control device is applied to a network device, the network device is configured with a Frrp main ring of a target Frrp domain and at least one Frrp sub-ring of the target Frrp domain; each Frrp sub-ring of the at least one Frrp sub-ring is configured with a different control VLAN, and the control VLAN corresponds to a different VLAN ID; the network device is configured with an ID list, and the ID list includes the VLAN ID corresponding to each Frrp sub-ring included in the at least one Frrp sub-ring configured by the network device and the VLAN ID corresponding to the control VLAN configured by the Frrp main ring; the method includes:
[0178] The receiving unit 802 is used to receive a message and extract a target VLAN ID carried in the message;
[0179] A determination unit 804 is used to determine whether the target VLAN ID carried by the message successfully matches the VLAN ID corresponding to any Frrp sub-ring or the Frrp main ring in the ID list;
[0180] A forwarding unit 806 is configured to forward the message from a port corresponding to the Frrp main ring and an edge port corresponding to any Frrp sub-ring if a target VLAN ID carried by the message matches a VLAN ID corresponding to any Frrp sub-ring in the ID list;
[0181] Alternatively, if the target vlan ID carried by the message successfully matches the vlanID corresponding to the Frrp primary ring in the ID list, the message is forwarded from the port corresponding to the Frrp primary ring.
[0182] 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.
[0183] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are 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 scheme of this specification. Ordinary technicians in this field can understand and implement it without paying creative work.
[0184] The devices, modules or units described in the embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0185] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0186] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0187] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0188] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0189] The foregoing describes specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0190] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "one", "said" and "said" used in one or more embodiments of this specification 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 herein refers to and includes any or all possible combinations of one or more associated listed items.
[0191] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, 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 one or more embodiments of this specification, 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".
[0192] The above description is merely a preferred embodiment of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be included in the scope of protection of one or more embodiments of the present specification.
[0193] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
Claims
1. A message forwarding control method, applied to a network device, wherein the network device is configured with at least one Frrp subring of a target Frrp domain; each Frrp subring of the at least one Frrp subring is configured with a different control VLAN, and the control VLAN corresponds to a different VLAN ID; the network device is configured with an ID list, and the ID list includes the VLAN IDs corresponding to each Frrp subring included in the at least one Frrp subring configured by the network device; the method comprises: Receive a message, and extract the target vlan ID carried in the message; Determine whether the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring in the vlan IDs corresponding to each Frrp sub-ring included in the ID list; If the target vlan ID carried in the message successfully matches the vlan ID corresponding to any Frrp sub-ring in the vlan IDs corresponding to the respective Frrp sub-rings included in the ID list, the message is forwarded from the port corresponding to any Frrp sub-ring.
2. The method according to claim 1, if the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring in the vlan IDs corresponding to the respective Frrp sub-rings included in the ID list, forwarding the message from the port corresponding to the any Frrp sub-ring, comprising: If the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring in the vlan IDs corresponding to the respective Frrp sub-rings included in the ID list, further determining whether the port corresponding to any Frrp sub-ring in the network device is in a forwarding state; If it is determined that the port in the network device corresponding to any one of the Frrp sub-rings is in a forwarding state, the message is forwarded from the port in the network device corresponding to any one of the Frrp sub-rings.
3. The method according to claim 1, further comprising: Counting the number of Frrp control messages received within a preset time period, and determining whether the number of messages is greater than a preset threshold; If the number of packets is greater than a preset threshold, the loop identifier in the cache is incremented according to a preset increment rule; Determine whether the loop identifier is greater than a preset loop count within a preset statistical period; If the loop identifier is greater than the preset loop number, the port corresponding to any Frrp sub-ring is set to a blocking state.
4. The method according to claim 1, further comprising: Counting the number of Frrp control messages received within a preset time period, and determining whether the number of messages is greater than a preset threshold; If the number of packets is not greater than a preset threshold, the path identifier in the cache is incremented according to a preset increment rule; Determine whether the passage identification is greater than a preset passage number within a preset statistical period; If the path identifier is greater than the preset path number, further determining whether a hello message is received; If no hello message is received, the port corresponding to any Frrp sub-ring is set to a forwarding state, and the path identifier is set to an initialization value.
5. A message forwarding control method, applied to a network device; the network device is configured with a Frrp main ring of a target Frrp domain; each Frrp sub-ring included in the target Frrp domain is configured with a different control VLAN, and the control VLAN corresponds to a different VLAN ID; the network device is configured with an ID list, and the ID list includes the VLAN ID corresponding to each Frrp sub-ring included in the target Frrp domain and the VLAN ID corresponding to the control VLAN configured by the Frrp main ring; the method comprises: Receive a message, and extract the target vlan ID carried in the message; Determine whether the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring or Frrp main ring in the ID list; If the target vlan ID carried in the message successfully matches the vlan ID corresponding to any Frrp sub-ring or Frrp main ring in the ID list, the message is forwarded from the port corresponding to the Frrp main ring.
6. The method according to claim 5, if the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring or Frrp main ring in the ID list, forwarding the message from the port corresponding to the Frrp main ring, comprising: If the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring or Frrp main ring in the ID list, further determining whether the primary port and the secondary port corresponding to the network device and the Frrp main ring are both in forwarding state; If both the primary port and the secondary port of the network device are in a forwarding state, the message is forwarded from the primary port or the secondary port of the network device.
7. A message forwarding control method, applied to a network device, wherein the network device is configured with a Frrp main ring of a target Frrp domain and at least one Frrp sub-ring of the target Frrp domain; each Frrp sub-ring of the at least one Frrp sub-ring is configured with a different control VLAN, and the control VLAN corresponds to a different VLAN ID; the network device is configured with an ID list, and the ID list includes the VLAN ID corresponding to each Frrp sub-ring included in the at least one Frrp sub-ring configured by the network device and the VLAN ID corresponding to the control VLAN configured by the Frrp main ring; the method comprises: Receive a message, and extract the target vlan ID carried in the message; Determine whether the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring or the Frrp main ring in the ID list; If the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring in the ID list, the message is forwarded from the port corresponding to the Frrp main ring and the edge port corresponding to any Frrp sub-ring; Alternatively, if the target vlan ID carried by the message successfully matches the vlan ID corresponding to the Frrp primary ring in the ID list, the message is forwarded from the port corresponding to the Frrp primary ring.
8. A message forwarding control device, applied to a network device, wherein the network device is configured with at least one Frrp subring of a target Frrp domain; each Frrp subring of the at least one Frrp subring is configured with a different control VLAN, and the control VLAN corresponds to a different VLAN ID; the subring node is configured with an ID list, and the ID list includes the VLAN IDs corresponding to each Frrp subring included in the at least one Frrp subring configured by the network device; the device includes: A receiving unit, used for receiving a message and extracting a target vlan ID carried in the message; a determination unit, configured to determine whether a target vlan ID carried by the message successfully matches a vlan ID corresponding to any of the vlan IDs corresponding to the respective Frrp sub-rings in the ID list; A forwarding unit is used to forward the message from a port corresponding to any Frrp sub-ring if a target vlan ID carried by the message matches a vlan ID corresponding to any Frrp sub-ring in the vlan ID list corresponding to each Frrp sub-ring.
9. A message forwarding control device, applied to a network device; the network device is configured with a Frrp main ring of a target Frrp domain; each Frrp sub-ring included in the target Frrp domain is configured with a different control VLAN, and the control VLAN corresponds to a different VLAN ID; the network device is configured with an ID list, and the ID list includes the VLAN ID corresponding to each Frrp sub-ring included in the target Frrp domain and the VLAN ID corresponding to the control VLAN configured by the Frrp main ring; The device comprises: A receiving unit, used for receiving a message and extracting a target vlan ID carried in the message; a determination unit, configured to determine whether a target vlan ID carried in the message successfully matches a vlan ID corresponding to any Frrp sub-ring or Frrp main ring in the ID list; A forwarding unit is used to forward the message from the port corresponding to the Frrp main ring if the target vlan ID carried by the message successfully matches the vlan ID corresponding to any Frrp sub-ring or Frrp main ring in the ID list.
10. A message forwarding control device, applied to a network device, wherein the network device is configured with a Frrp main ring of a target Frrp domain and at least one Frrp sub-ring of the target Frrp domain; each Frrp sub-ring of the at least one Frrp sub-ring is configured with a different control VLAN, and the control VLAN corresponds to a different VLAN ID; the network device is configured with an ID list, and the ID list includes the VLAN ID corresponding to each Frrp sub-ring included in the at least one Frrp sub-ring configured by the network device and the VLAN ID corresponding to the control VLAN configured by the Frrp main ring; The device comprises: A receiving unit, used for receiving a message and extracting a target vlan ID carried in the message; a determination unit, configured to determine whether a target vlan ID carried in the message successfully matches a vlan ID corresponding to any Frrp sub-ring or the Frrp main ring in the ID list; a forwarding unit, configured to forward the message from a port corresponding to the Frrp main ring and an edge port corresponding to any Frrp sub-ring if a target VLAN ID carried by the message matches a VLAN ID corresponding to any Frrp sub-ring in the ID list; Alternatively, if the target vlan ID carried by the message successfully matches the vlan ID corresponding to the Frrp primary ring in the ID list, the message is forwarded from the port corresponding to the Frrp primary ring.
11. An electronic device, comprising a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are interconnected via the bus; The memory stores machine-readable instructions, and the processor executes the message forwarding control method according to any one of claims 1 to 7 by calling the machine-readable instructions.
12. A machine-readable storage medium, wherein the machine-readable storage medium stores machine-readable instructions, and when the machine-readable instructions are called and executed by a processor, the message forwarding control method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method, system and node equipment for improving dependability of fast looped network
CN101141367A
Method and device for transmitting control message based on ethernet multi-ring network
CN101662421A
Method for transmitting sub-loop protocol message in virtual channel
CN101815023A
Message processing method for tangent ring networks and Ethernet switch
CN102215165A
Buffer flush optimization in ethernet ring protection networks
US20180062974A1
