Packet transmission method and apparatus, device, system, and storage medium
By encapsulating the outer tunnel message header in the ring network, the packets can be quickly switched to tunnel transmission, solving the problems of broadcast storms and path switching delays in the ring network, achieving faster path switching and lower packet loss rate.
Patent Information
- Application Number
- PCT/CN2024/079847
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-08-18
- Filing Date
- 2024-03-04
- Publication Date
- 2025-02-27
AI Technical Summary
The generation of broadcast storms in the ring network leads to waste of bandwidth and processing resources, and the ring network path switching technology takes time to perform path switching after a failure occurs, resulting in packet loss.
When a network failure occurs in a ring network, the outer tunnel message header can be encapsulated so that the message can be quickly switched to the tunnel transmission, avoiding being affected by network failure, and crossing the blocking and breaking ring point.
It realizes faster loop path switching, reduces packet loss caused by network failure, and reduces the impact of network failure on service performance.
Smart Images

Figure CN2024079847_27022025_PF_FP_ABST
Abstract
Description
Message transmission method, device, equipment, system and storage medium
[0001] This application claims priority to Chinese patent application number 202311050704.5, filed on August 18, 2023, entitled “Message Transmission Method, Device, Equipment, System and Storage Medium,” the entire contents of which are incorporated herein by reference. Technical Field
[0002] The present application relates to the field of communication technology, and in particular to a message transmission method, apparatus, device, system and storage medium. Background Art
[0003] With the advancement of communications technology, the presence of ring networks in network topologies is becoming increasingly common. A ring network refers to a network consisting of multiple network devices in a ring topology, often referred to as a ring network. Because network devices process broadcast messages by replicating and propagating them to all interfaces except the one that receives them, broadcast messages entering a ring network are continuously replicated and propagated by all network devices within the ring. This results in a large number of broadcast messages within the ring network within a short period of time, consuming significant bandwidth and processing resources of network devices. This process is known as a broadcast storm. Therefore, ring network path switching technology was developed to prevent broadcast storms in ring networks.
[0004] Ring network path switching technology is to set a blocking and breaking point in the ring network when the ring network is in a fault-free state. The blocking and breaking point is used to block the transmission of messages to avoid the generation of broadcast storms. When a network fault is found in the ring network, the function of the blocking and breaking point is disabled, so that messages can be transmitted at the blocking and breaking point. The network fault message is announced in the ring network, and the forwarding table entries on each network device in the ring network are refreshed according to the network fault. The refreshed forwarding table entries are used to switch the messages affected by the fault to the backup path for transmission. The backup path is the path including the blocking and breaking point.
[0005] However, since the ring network path switching technology requires the time for fault discovery, fault message notification, and network equipment table refresh before the affected messages can be switched to the backup path for transmission, that is to say, before the path switching is realized, the affected messages will still be transmitted according to the forwarding table entries before the refresh, which will lead to the loss of the affected messages.
[0006] Summary of the Invention
[0007] The present application provides a message transmission method, apparatus, device, system and storage medium for tunnel-based message transmission in a ring network where a network failure occurs.
[0008] In the first aspect, a message transmission method is provided. Taking the first network device executing the method as an example, in the event of a network failure in a ring network, the first network device receives a first message, the first network device is any network device in the ring network that is adjacent to the location where the network failure occurs, and the ring network includes a blocking breaking point for blocking message transmission; the first message is encapsulated with a first outer tunnel message header to obtain a second message, the first outer tunnel message header indicates that the second message is transmitted based on the first tunnel, and the message transmitted by the first tunnel is not blocked by the blocking breaking point; the second message is transmitted based on the first tunnel.
[0009] In the event of a network failure in a ring network, this method rapidly switches the first message to the first tunnel for transmission by encapsulating the first outer tunnel message header. This ensures that the first message is not affected by the network failure. Because the first tunnel is not blocked by a blocking point in the ring network, the first message can bypass the blocking point. Compared to path switching methods that require fault notification and forwarding table refresh, this method reduces fault message notification time and network device table refresh time, enabling faster ring network path switching and reducing packet loss caused by network failures, thereby effectively minimizing the impact of network failures on service performance.
[0010] In one possible implementation, each port between a first network device and a blocking loop-breaking point is configured with a first tunnel, or each port of each network device in a ring network is configured with a first tunnel; transmitting a second message via the first tunnel includes: transmitting the second message via the first tunnel to a second network device corresponding to the blocking loop-breaking point, the second network device being configured to decapsulate the first outer tunnel message header of the second message to obtain the first message. Thus, the first message exits the first tunnel via the second network device, ensuring that the first message transmitted via the first tunnel is not affected by network failures while still being able to cross the blocking loop-breaking point, thereby avoiding packet loss of the first message due to network failures.
[0011] In one possible implementation, each port of each network device in the ring network is configured with a first tunnel, or each port of the first network device between the first network device and a third network device via a blocking loop point is configured with a first tunnel, where the third network device is another network device in the ring network adjacent to the location where the network failure occurred. Transmitting a second message via the first tunnel includes: transmitting the second message via the first tunnel to the third network device via the blocking loop point, where the third network device is configured to decapsulate the first outer tunnel message header of the second message to obtain the first message. Thus, the first message exits the first tunnel via the third network device, so that the first message transmitted via the first tunnel is not affected by the network failure, but can still cross the blocking loop point, thereby avoiding packet loss of the first message due to the network failure.
[0012] In one possible implementation, the first network device also receives a third message encapsulated with a second outer tunnel header, the second outer tunnel header indicating that the third message is transmitted based on the second tunnel, and the message transmitted by the second tunnel is not blocked by the blocking loop point; when the second outer tunnel header carries marking information, the second outer tunnel header is decapsulated from the third message to obtain a fourth message, and the fourth message is transmitted, and the marking information indicates that the third message passes through the blocking loop point; when the second outer tunnel header does not carry marking information, the third message is discarded. The marking information allows the first network device to identify messages that have not passed through the blocking loop point and are encapsulated with an outer tunnel header. The encapsulation of the outer tunnel header indicates that there is a network failure in the direction of the received message, and the first network device, as a network device adjacent to the location where the network failure occurs, indicates that there is also a network failure in the direction of the sent message. Therefore, if the first network device does not discard the third message, the third message will be sent in a loop in the ring network.
[0013] In the second aspect, a message transmission method is provided. Taking the second network device executing the method as an example, the second network device receives a second message sent by the first network device. The first network device is any network device in the ring network that is adjacent to the location where the network failure occurs. The ring network includes a blocking breaking point for blocking message transmission. The second network device is a network device corresponding to the blocking breaking point. The second message is encapsulated with a first outer tunnel message header. The first outer tunnel message header indicates that the second message is transmitted based on the first tunnel, and the message transmitted by the first tunnel is not blocked by the blocking breaking point. When the first tunnel is configured at each port between the first network device and the blocking breaking point, the first outer tunnel message header is decapsulated from the second message to obtain the first message; and the first message is transmitted.
[0014] According to the method, when a network failure occurs in a ring network, the first message affected by the failure can be transmitted in reverse to the second network device based on the first tunnel, and exit the first tunnel through the second network device, so that the first message is not affected by the network failure and can cross the blocking and breaking point, thereby avoiding the packet loss of the first message due to the network failure.
[0015] In one possible implementation, after receiving the second message sent by the first network device, the second network device adds marking information to the first outer tunnel message header, if each port of each network device in the ring network is configured with a first tunnel, or if each port between the first network device and the third network device in the ring network is configured with a first tunnel, to obtain a fifth message. The marking information indicates that the fifth message has passed through the blocking and loop breaking point, and the third network device is another network device in the ring network adjacent to the location where the network failure occurred. The fifth message is then transmitted. The marking information allows the third network device to identify messages that have not passed through the blocking and loop breaking point and are encapsulated with an outer tunnel message header. The encapsulation of the outer tunnel message header indicates that there is a network failure in the direction of the received message, and the first network device, as a network device adjacent to the location where the network failure occurred, indicates that there is also a network failure in the direction of the sent message. Therefore, if the first network device does not discard the second message, the second message will be sent in a loop in the ring network.
[0016] In any possible implementation of the first aspect and the second aspect, before a network failure occurs in the ring network, configuration information of the first tunnel issued by the control device is also received, and the configuration information of the first tunnel is used to transmit messages based on the first tunnel; or, in the event that a network failure occurs in the ring network, configuration information of the first tunnel issued by the control device is also received.
[0017] In a third aspect, a message transmission device is provided, which includes: a transceiver module for performing reception and / or transmission related operations performed by the first network device in the first aspect or any possible implementation of the first aspect; a processing module for performing other operations other than the reception and / or transmission related operations performed by the first network device in the first aspect or any possible implementation of the first aspect.
[0018] In a possible implementation, the transceiver module includes a receiving module and / or a sending module. The receiving module is used to perform reception-related operations, and the sending module is used to perform sending-related operations.
[0019] In one possible embodiment, the transceiver module is used to receive a first message when a network failure occurs in a ring network, and the first network device is any network device in the ring network that is adjacent to the location where the network failure occurs, and the ring network includes a blocking breaking point for blocking message transmission; the processing module is used to encapsulate the first message with a first outer tunnel message header to obtain a second message, and the first outer tunnel message header indicates that the second message is transmitted based on the first tunnel, and the message transmitted by the first tunnel is not blocked by the blocking breaking point; the transceiver module is also used to transmit the second message based on the first tunnel.
[0020] In one possible implementation, each port between the first network device and the blocking loop-breaking point is configured with a first tunnel, or each port of each network device in the ring network is configured with a first tunnel; the transceiver module is used to transmit a second message to the second network device corresponding to the blocking loop-breaking point based on the first tunnel, and the second network device is used to decapsulate the first outer tunnel message header of the second message to obtain the first message.
[0021] In one possible implementation, each port of each network device in the ring network is configured with a first tunnel, or each port of the first network device from the first network device through the blocking loop-breaking point to the third network device is configured with a first tunnel, and the third network device is another network device in the ring network adjacent to the location where the network failure occurs; the transceiver module is used to transmit the second message to the third network device through the blocking loop-breaking point based on the first tunnel, and the third network device is used to decapsulate the first outer tunnel message header of the second message to obtain the first message.
[0022] In one possible implementation, the transceiver module is also used to receive a third message encapsulated with a second outer tunnel message header, where the second outer tunnel message header indicates that the third message is transmitted based on the second tunnel, and the message transmitted by the second tunnel is not blocked by the blocking loop point; the processing module is also used to decapsulate the second outer tunnel message header of the third message when the second outer tunnel message header carries marking information, to obtain a fourth message, where the marking information indicates that the third message passes through the blocking loop point; the transceiver module is also used to transmit the fourth message.
[0023] In a possible implementation manner, the processing module is further configured to discard the third message when the second outer tunnel message header does not carry marking information.
[0024] In a fourth aspect, a message transmission device is provided, which includes: a transceiver module for performing the reception and / or transmission related operations performed by the second network device in the second aspect or any possible implementation of the second aspect; a processing module for performing other operations other than the reception and / or transmission related operations performed by the second network device in the second aspect or any possible implementation of the second aspect.
[0025] In a possible implementation, the transceiver module includes a receiving module and / or a sending module. The receiving module is used to perform reception-related operations, and the sending module is used to perform sending-related operations.
[0026] In one possible embodiment, the transceiver module is used to receive a second message sent by a first network device, the first network device is any network device in a ring network adjacent to the location where the network failure occurs, the ring network includes a blocking breaking point for blocking message transmission, the second network device is a network device corresponding to the blocking breaking point, the second message is encapsulated with a first outer tunnel message header, the first outer tunnel message header indicates that the second message is transmitted based on the first tunnel, and the message transmitted by the first tunnel is not blocked by the blocking breaking point; the processing module is used to decapsulate the first outer tunnel message header of the second message to obtain the first message when the first tunnel is configured on each port between the first network device and the blocking breaking point; the transceiver module is also used to transmit the first message.
[0027] In one possible embodiment, the processing module is also used to add marking information to the first outer tunnel message header to obtain a fifth message when a first tunnel is configured on each port of each network device in the ring network, or when a first tunnel is configured on each port between the first network device and the third network device through a blocking and breaking point in the ring network, wherein the marking information indicates that the fifth message passes through the blocking and breaking point, and the third network device is another network device in the ring network adjacent to the location where the network failure occurs; the transceiver module is also used to transmit the fifth message.
[0028] In any possible implementation of the third aspect and the fourth aspect, the transceiver module is also used to receive the configuration information of the first tunnel issued by the control device before a network failure occurs in the ring network, and the configuration information of the first tunnel is used to transmit messages based on the first tunnel; or, it is also used to receive the configuration information of the first tunnel issued by the control device in the event of a network failure in the ring network.
[0029] In a fifth aspect, a network device is provided, comprising: a processor, the processor being coupled to a memory, the memory storing at least one program instruction or code, the at least one program instruction or code being loaded and executed by the processor so that the network device implements the message transmission method as described in any one of the first or second aspects above.
[0030] Optionally, there are one or more processors and one or more memories.
[0031] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
[0032] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated on the same chip as the processor or be set on different chips. This application does not limit the type of memory and the setting method of the memory and the processor.
[0033] In a sixth aspect, a message transmission system is provided, the message transmission system comprising a first network device and a second network device;
[0034] The first network device is used to execute the method described in the first aspect or any possible implementation of the first aspect, and the second network device is used to execute the method described in the second aspect or any possible implementation of the second aspect.
[0035] In the seventh aspect, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, and the instruction is loaded and executed by a processor to enable the computer to implement the method in the above-mentioned first aspect or any possible implementation of the first aspect, or to implement the method in the above-mentioned second aspect or any possible implementation of the second aspect.
[0036] In an eighth aspect, a computer program (product) is provided, which includes: computer program code, which, when executed by a computer, enables the computer to execute the methods in the above aspects.
[0037] In a ninth aspect, a chip is provided, comprising a processor for calling and executing instructions stored in a memory from the memory, so that a communication device equipped with the chip executes the methods in the above aspects.
[0038] In the tenth aspect, another chip is provided, comprising: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the methods in the above aspects.
[0039] It should be understood that the beneficial effects achieved by the technical solutions of the third to tenth aspects of this application and the corresponding possible implementation methods can be referred to the technical effects of the first and second aspects and their corresponding possible implementation methods mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] FIG1 is a schematic diagram of a ring network transmission message provided in an embodiment of the present application;
[0041] FIG2 is a flow chart of a message transmission method provided in an embodiment of the present application;
[0042] FIG3 is a schematic diagram of a ring network tunnel configuration provided in an embodiment of the present application;
[0043] FIG4 is a schematic diagram of another ring network tunnel configuration provided in an embodiment of the present application;
[0044] FIG5 is a schematic diagram of another ring network tunnel configuration provided in an embodiment of the present application;
[0045] FIG6 is a schematic diagram of a ring network message transmission provided in an embodiment of the present application;
[0046] FIG7 is a schematic diagram of another ring network message transmission provided in an embodiment of the present application;
[0047] FIG8 is a flowchart of another message transmission method provided in an embodiment of the present application;
[0048] FIG9 is an interactive diagram of a message transmission method provided in an embodiment of the present application;
[0049] FIG10 is a schematic structural diagram of a message transmission device provided in an embodiment of the present application;
[0050] FIG11 is a schematic diagram of the structure of a network device provided in an embodiment of the present application;
[0051] FIG12 is a schematic diagram of the structure of another network device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0053] With the increasing use of ring networks, a method for transmitting messages within a ring network is needed to prevent broadcast storms. Taking ring network path switching technology as an example, referring to the schematic diagram of ring network message transmission shown in Figure 1, a blocking point is set between network device E and network device D. The blocking point is used to block message transmission, thereby preventing broadcast storms within the ring network. For example, if a broadcast message fails to reach the blocking point, it will be discarded. This does not cause the network devices in the ring network to infinitely replicate and spread the broadcast message, thus preventing the occurrence of broadcast storms.
[0054] As shown in Figure 1, for the data flow sent from network device A to network device C, when the ring network is fault-free, the data flow is transmitted from network device A to network device C via network device B; if the link between network device B and network device C fails, the transmission of the data flow will be affected by the failure, resulting in packet loss; then, the function of blocking the loop-breaking point in the ring network is turned off, that is, the blocking loop-breaking point is opened, and the data flow is switched to the backup path for transmission, that is, the data flow is transmitted from network device A to network device C via network device E and network device D, effectively avoiding packet loss caused by ring network failure.
[0055] Among them, ring network path switching technologies include but are not limited to Ethernet ring protection switching (ERPS) technology, media redundancy protocol (MRP), and distributed redundancy protocol (DRP). Regardless of the ring network path switching technology, all require the time required for fault discovery, fault message notification, and network device table refresh before the affected messages can be switched to the backup path for transmission. In other words, before the ring network path switching is implemented, the affected messages will still be transmitted according to the pre-refresh forwarding table entries, which may result in the loss of the affected messages.
[0056] An embodiment of the present application provides a message transmission method. On the basis of a ring network including a blocking ring-breaking point for blocking message transmission, a tunnel required for ring network path switching is established so that when a fault occurs, the message affected by the fault is directly switched to the tunnel for transmission, thereby avoiding the generation of a ring network broadcast storm, saving the fault message notification time and the network equipment table refresh time, compressing the time required for the ring network path switching to the fault discovery time, shortening the time required for the ring network path switching, and reducing the impact of the ring network fault on the service performance.
[0057] The message transmission method provided in the embodiments of the present application can be applied to any network device ring network scenario, including but not limited to the access layer ring network, aggregation layer ring network, or core layer ring network of a local area network; the access layer ring network, aggregation layer ring network, or core layer ring network of a metropolitan area network; and the access layer ring network, aggregation layer ring network, or core layer ring network of a backbone network. Optionally, the network device includes a switch or a router. Optionally, the subject executing the message transmission method can be a network device, or a component of a network device, such as a single board or line card on the network device, or a functional module on the network device, or a chip used to implement the method. The embodiments of the present application do not specifically limit the subject executing the method.
[0058] Referring to Figure 2, Figure 2 is a flowchart of a message transmission method provided in an embodiment of the present application. Taking the method performed by a first network device as an example, the first network device can be any network device in a ring network. As shown in Figure 2, the message transmission method includes, but is not limited to, the following steps 201-203.
[0059] Step 201: When a network failure occurs in a ring network, a first network device receives a first message. The first network device is any network device in the ring network adjacent to the location where the network failure occurs. The ring network includes a blocking point for blocking message transmission.
[0060] In an embodiment of the present application, a ring network includes a blocking loop-breaking point for blocking message transmission. By blocking the loop-breaking point, the generation of a ring network broadcast storm can be avoided. The setting of the blocking loop-breaking point can refer to the relevant description in ERPS, MRP or DRP, and will not be repeated in this embodiment of the present application. For example, the blocking loop-breaking point can be manually configured in the ring network, or the blocking loop-breaking point can be automatically negotiated by each network device in the ring network. The number of blocking loop-breaking points can be one or more, and is not limited in this embodiment of the present application.
[0061] The types of network failures are not limited in the embodiments of this application, and network failures include but are not limited to port failures, link failures, software configuration failures, etc. When the network failure is a link failure, the location of the network failure is the link between two network devices, and the network devices adjacent to the location of the network failure are the two network devices connected to the link, for example, network device B and network device C shown in Figure 1; when the network failure is a software configuration failure, the location of the network failure is the network device itself, and the network devices adjacent to the location of the network failure are the two network devices connected to the failed network device. Taking Figure 1 as an example, if network device B fails, the network devices adjacent to the location of the failure include network device A and network device C.
[0062] Since the first network device is adjacent to the location where the network fault occurs, the first network device can quickly sense the occurrence of the fault. The embodiment of the present application does not limit the method by which the first network device senses the fault. For example, the first network device senses the fault based on the link status or port status, or the first network device senses the fault based on the feedback of the adjacent network device to the detection message by sending a detection message to the adjacent network device. Optionally, the first network device can be a first message sent by an end-side device or a network device outside the ring network, and the first network device is the entry point of the first message; the first network device can also be a first message sent by a network device in the ring network.
[0063] In step 202, the first network device encapsulates the first message with a first outer tunnel message header to obtain a second message. The first outer tunnel message header indicates that the second message is transmitted based on the first tunnel, and the message transmitted through the first tunnel is not blocked by the blocking loop point.
[0064] Since a network failure occurs in the ring network, and the first network device is adjacent to the location where the network failure occurs, if the first network device continues to send the first message according to the original forwarding table entry after receiving the first message, the first message will be lost due to the network failure. In an embodiment of the present application, the first network device encapsulates the first message with a first outer tunnel message header, and switches the transmission path of the first message to the first tunnel through the first outer tunnel message header, and the first tunnel is not affected by the blocking breaking point. Among them, the first tunnel is not affected by the blocking breaking point means that the first tunnel is configured at the port at the blocking breaking point, that is, when the port at the blocking breaking point receives the second message encapsulated with the first outer tunnel message header, since the routing information of the first tunnel is configured, the second message can be forwarded through the first tunnel according to the routing information of the first tunnel, and will not be discarded due to the configuration of the blocking breaking point. Therefore, this method can achieve rapid path switching without waiting for fault notification and refreshing the forwarding table, shortening the time required for ring network path switching.
[0065] Before encapsulating the first outer tunnel header for the first message, it is necessary to first configure a tunnel in the ring network. Optionally, the tunnel can be configured in advance before a network failure occurs in the ring network, for example, the tunnel can be configured when the ring network architecture is formed; or the tunnel can be temporarily configured in the event of a network failure in the ring network. The tunnel can be configured by a control device sending corresponding tunnel configuration information to each network device in the ring network. In this case, the first network device receives the first tunnel configuration information sent by the control device, and the first tunnel configuration information is used by the first network device to transmit messages through the first tunnel.
[0066] Optionally, the tunnel protocol used in the configuration tunnel is not limited in the embodiment of the present application. The tunnel protocol is used to re-encapsulate the transmitted message in a new message header and send it, that is, to encapsulate the outer tunnel message header for the message, and the outer tunnel message header includes routing information, so that the message encapsulated with the outer tunnel message header can be transmitted in the network. Exemplarily, the tunnel protocol includes but is not limited to the point-to-point tunneling protocol (PPTP), the layer two tunneling protocol (L2TP) or the QinQ protocol. QinQ is the abbreviation of 802.1Q-in-802.1Q, which is also called virtual local area network stacking (VLAN Stacking) or double VLAN. It achieves the purpose of expanding the VLAN space by adding another layer of 802.1Q tag on the basis of the 802.1Q tagged message.
[0067] The embodiments of the present application do not limit the method for encapsulating the first outer tunnel header. Different methods for encapsulating the first outer tunnel header can be flexibly adopted for different tunnel protocols. For example, using the QinQ protocol as an example, the method for encapsulating the first outer tunnel header for the first message is to encapsulate a VLAN tag on the outer layer of the first message, so as to achieve routing forwarding through the VLAN tag encapsulated on the outermost layer.
[0068] Since the directions of message transmission in a ring network include clockwise and counterclockwise directions, it is necessary to configure a clockwise tunnel and a counterclockwise tunnel when configuring tunnels. For example, the counterclockwise tunnel can be referred to as the first tunnel, and the clockwise tunnel can be referred to as the second tunnel. The first tunnel and the second tunnel can be two independent tunnels, or the first tunnel and the second tunnel can be the same bidirectional tunnel. In the embodiments of the present application, there is no limitation on the implementation method for configuring the ring network tunnels, as long as it can ensure that in the event of a ring network failure, the messages affected by the failure can be switched to the tunnel for normal transmission.
[0069] Optionally, the result of configuring tunnels in a ring network can be that all ports of all network devices in the ring network are configured with the first tunnel and the second tunnel, so that all ports on the ring allow messages encapsulated with outer tunnel message headers to pass through without being blocked by blocking points. For example, referring to the schematic diagram of tunnel configuration shown in FIG3 , the network devices included in the ring network are switches (S) 1, S2, S3, S4, S5, S6, S7, and S8, the host (H) H1 is the terminal, server, or switch under S1, and H2 is the terminal, server, or switch under S5. The blocking point is set at the first port on S4 for connecting to S3. For a message sent from H1 to H2, the message enters the ring network from S1, i.e., S1 is the entry point, and is sent from S5 to H2 via S8, S7, and S6, i.e., S5 is the exit point. Among them, all ports in S1, S2, S3, S4, S5, S6, S7 and S8 are configured with the first tunnel and the second tunnel. Therefore, the first tunnel and the second tunnel form a closed loop in the ring network, so that for a ring network fault at any position, the affected messages can be switched to the first tunnel or the second tunnel for transmission.
[0070] Since the purpose of configuring tunnels in a ring network is to allow messages affected by a fault to be transmitted in the reverse direction and only need to pass through the blocking and loop-breaking point, the ports on both sides of the blocking and loop-breaking point can be selectively configured with either the first tunnel or the second tunnel. For example, referring to the tunnel configuration diagram shown in FIG4 , the port on S3, clockwise from the blocking and loop-breaking point, is not configured with the second tunnel, and the port on S4, counterclockwise from the blocking and loop-breaking point, is not configured with the first tunnel. In other words, the first tunnel and the second tunnel do not form a closed loop in the ring network. However, since the ports at the gap do not send messages to the blocking and loop-breaking point, there is no possibility of entering the tunnel from the ports at the gap during ring network path switching.
[0071] In a possible embodiment, the result of configuring tunnels in a ring network may also be to open a pair of first tunnels and second tunnels for each pair of adjacent network devices in the ring network. For example, referring to the schematic diagram of tunnel configuration shown in FIG5 , taking the adjacent network devices S7 and S6 as an example, the starting point of the first tunnel is the port on S7 connected to S8, the end point of the first tunnel is the port on S6 connected to S5, the starting point of the second tunnel is the port on S6 connected to S5, and the end point of the second tunnel is the port on S7 connected to S8. Among them, for the scenario of temporarily configuring tunnels in the event of a network failure in the ring network, since the location of the network failure has been determined, it is possible to temporarily only send a pair of first tunnels and second tunnels corresponding to the network devices on both sides of the location of the network failure. For example, if the location of the network failure is the link between S6 and S7, then the network devices on both sides of the location of the network failure are S6 and S7, and then the first tunnel and second tunnel corresponding to S6 and S7 shown in FIG5 can be configured.
[0072] Step 203: The first network device transmits the second message based on the first tunnel.
[0073] In the embodiment of the present application, since the first tunnel and the second tunnel that are not blocked by the blocking ring point have been configured in the ring network, therefore, in the event of a network failure in the ring network, the messages affected by the failure and transmitted in the clockwise direction in the ring network can be switched to the first tunnel for reverse transmission, and the messages affected by the failure and transmitted in the counterclockwise direction in the ring network can be switched to the second tunnel for reverse transmission, which can quickly achieve ring network path switching and reduce the impact of the ring network failure on service performance. The embodiment of the present application uses the first message as an example of a message transmitted in the clockwise direction. As for how to switch the message transmitted in the counterclockwise direction to the second tunnel, please refer to the method of switching the first message to the first tunnel, and the embodiment of the present application will not be repeated.
[0074] The manner in which the first network device transmits the second message through the first tunnel varies depending on the tunnel configuration. The following example illustrates the method of transmitting the second message through the first tunnel, taking a clockwise first message sent from H1 to H2, the first network device being S7, and a network failure occurring on the link between S7 and S6 as an example.
[0075] In the tunnel configuration scenario shown in FIG3 , since each port of each network device in the ring network is configured with a first tunnel, in the tunnel configuration scenario shown in FIG4 or FIG5 , since each port between the first network device and the blocking loop-breaking point is configured with a first tunnel, the method for transmitting the second message based on the first tunnel can be to transmit the second message to the second network device corresponding to the blocking loop-breaking point based on the first tunnel, where the second network device corresponding to the blocking loop-breaking point is S4; after receiving the second message, the second network device decapsulates the first outer tunnel message header of the second message to obtain the first message, and then continues to transmit the first message according to the forwarding table entry before the failure occurred.
[0076] For example, refer to the schematic diagram of message transmission shown in Figure 6. H1 sends a first message to S1. Based on the forwarding table entry before the failure occurs, S1 and S8 can send the first message to S7 according to the non-tunnel path; after receiving the first message, S7 finds that the link between S7 and S6 is faulty, so S7 encapsulates the first message with the first outer tunnel message header to obtain the second message; S7 sends the second message into the first tunnel for reverse transmission, that is, S7 is the tunnel entry point and the loopback point of the first message; because the first outer tunnel message header indicates that the second message is transmitted based on the first tunnel, S8, S1, S2, and S3 can send the second message to S4 corresponding to the blocking and breaking loop point; S4 decapsulates the first outer tunnel message header of the second message to obtain the first message, that is, S4 is the tunnel exit point of the first message; S4 sends the first message to S5 according to the non-tunnel path, and then S5 sends it to H2. Therefore, when a ring network failure occurs, the first message can achieve rapid path switching through the first tunnel, so that the first message is not affected by the network failure and can cross the blocking point, avoiding packet loss caused by the network failure.
[0077] In the tunnel configuration scenario shown in FIG3 , since each port of each network device in the ring network is configured with a first tunnel, in the tunnel configuration scenario shown in FIG5 , since each port between the first network device and the third network device is configured with a first tunnel after passing through the blocking loop-breaking point. The third network device is another network device in the ring network adjacent to the location where the network failure occurs, and the third network device is S6 in FIG3 or FIG5 . Therefore, the method of transmitting the second message based on the first tunnel can be to transmit the second message to the third network device based on the first tunnel through the blocking loop-breaking point; after receiving the second message, the third network device decapsulates the first outer tunnel message header of the second message to obtain the first message, and then continues to transmit the first message according to the forwarding table entry before the failure occurs.
[0078] For example, refer to the schematic diagram of message transmission shown in Figure 7. H1 sends a first message to S1. Based on the forwarding table entries before the failure occurs, S1 and S8 can send the first message to S7 along the non-tunnel path. After receiving the first message, S7 finds that the link between S7 and S6 is faulty, so S7 encapsulates the first message with the first outer tunnel message header to obtain a second message. S7 sends the second message into the first tunnel for reverse transmission, that is, S7 is the tunnel entry point and the loopback point of the first message. Since the first outer tunnel message header indicates that the second message is transmitted based on the first tunnel, S8, S1, S2, S3, S4 and S5 can send the second message to the third network device S6. S6 decapsulates the first outer tunnel message header of the second message to obtain the first message, that is, S6 is the tunnel exit point of the first message. S6 sends the first message in the reverse direction to S5 along the non-tunnel path, that is, S6 is also the loopback point of the first message, and then S5 sends it to H2. Therefore, when a ring network failure occurs, the first message can achieve rapid path switching through the first tunnel, so that the first message is not affected by the network failure and can cross the blocking point, avoiding packet loss caused by the network failure.
[0079] In the case shown in FIG7 where the third network device serves as the tunnel exit point, the second network device corresponding to the blocking and loop-breaking point will mark the first outer tunnel header of the second message in the process of forwarding the second message, that is, the second network device corresponding to the blocking and loop-breaking point is the marking point. In other words, the first outer tunnel header of the second message carries marking information, and the marking information is used to indicate that the second message has passed through the blocking and loop-breaking point. In this case, after receiving the second message, the third network device will first determine whether the first outer tunnel header of the second message carries the marking information. If the first outer tunnel header carries the marking information, the first outer tunnel header of the second message will be decapsulated to obtain the first message. If the first outer tunnel header does not carry the marking information, it indicates that the second message has not passed through the blocking and loop-breaking point, and the second message will be directly discarded, or the second message will not be processed.
[0080] The marking information enables the third network device to identify the message that has not passed through the blocking loop point and is encapsulated with the outer tunnel header. The outer tunnel header encapsulation indicates that there is a network failure in the direction of the received message, and the first network device, as a network device adjacent to the location where the network failure occurs, indicates that there is also a network failure in the direction of the sent message. Therefore, if the first network device does not discard the second message, it will cause the second message to be sent in a loop in the ring network. For example, in Figure 7, if a link failure occurs between S7 and S6, and a link failure also occurs between S2 and S3, then S2 is also a network device adjacent to the location where the network failure occurs, and S2 also executes the message transmission method shown in Figure 2. When S2 receives the second message encapsulated with the first outer tunnel header, it will discard the second message based on the fact that the first outer tunnel header does not carry marking information. If S2 decapsulates the first outer tunnel message header to obtain the first message and transmits the first message, because the link between S2 and S3 fails, S2 will re-encapsulate the first message with the second outer tunnel message header and transmit it based on the second tunnel. Similarly, S7 will also perform similar operations as S2, causing the message to be transmitted in a loop between S2 and S7.
[0081] Furthermore, for the third network device in the ring network, taking the fourth message sent from H2 to H1 as an example, in the event of a network failure in the ring network, upon receiving the fourth message, the third network device encapsulates the fourth message with the second outer tunnel message header to obtain a third message. The second outer tunnel message header indicates that the third message is transmitted via the second tunnel, and messages transmitted via the second tunnel are also not blocked by the ring-breaking point. The third message is transmitted via the second tunnel. The implementation method of the third network device transmitting the third message via the second tunnel can be referenced to the implementation method of the first network device transmitting the second message via the first tunnel, and will not be further described here.
[0082] In a scenario where the third network device transmits the third message based on the second tunnel and the third message exits the second tunnel from the first network device, optionally, the first network device also receives the third message encapsulated with the second outer tunnel message header; when the second outer tunnel message header carries marking information, the first network device decapsulates the second outer tunnel message header of the third message to obtain a fourth message, and the marking information also indicates that the third message passes through the blocking loop point; the first network device transmits the fourth message; when the second outer tunnel message header does not carry marking information, the third message is directly discarded.
[0083] The method provided in the embodiment of the present application, in the event of a network failure in a ring network, enables the first message to be quickly switched to the first tunnel for transmission by encapsulating the first outer tunnel message header, so that the first message is not affected by the network failure. Since the first tunnel is not blocked by a blocking point in the ring network, the first message can cross the blocking point. Compared with the path switching method of fault notification and forwarding table refresh, this method saves fault message notification time and network device table refresh time, achieves faster ring network path switching, reduces packet loss caused by network failures, and effectively reduces the impact of network failures on service performance.
[0084] See Figure 8, which is a flowchart of a message transmission method provided in an embodiment of the present application. Taking the method performed by a second network device as an example, the second network device can be a network device configured with a blocking point in a ring network. As shown in Figure 8, the message transmission method includes, but is not limited to, steps 801 and 802.
[0085] In step 801, a second network device receives a second message sent by a first network device. The first network device is any network device in a ring network that is adjacent to a location where a network failure occurs. The ring network includes a blocking loop-breaking point for blocking message transmission. The second network device is a network device corresponding to the blocking loop-breaking point. The second message is encapsulated with a first outer tunnel message header. The first outer tunnel message header indicates that the second message is transmitted based on the first tunnel, and the message transmitted through the first tunnel is not blocked by the blocking loop-breaking point.
[0086] Step 802: When the first tunnel is configured on each port between the first network device and the blocking loop breaking point, the first outer tunnel message header of the second message is decapsulated to obtain the first message, and the first message is transmitted.
[0087] In one possible implementation, after the second network device receives the second message sent by the first network device, it also includes: when the first tunnel is configured on each port of each network device in the ring network, or when the first tunnel is configured on each port between the first network device and the third network device in the ring network through the blocking and breaking point, adding marking information in the first outer tunnel message header to obtain a fifth message, the marking information indicates that the fifth message passes through the blocking and breaking point, and the third network device is another network device in the ring network adjacent to the location where the network failure occurs; transmitting the fifth message.
[0088] The implementation of step 801 and step 802 may refer to the implementation of the second network device in steps 201 to 203, and will not be repeated here.
[0089] See Figure 9, which is a schematic diagram illustrating interactions in a message transmission method provided by an embodiment of the present application. Taking the method performed by a first network device, a second network device, and a third network device as an example, the first and third network devices are adjacent to the location where a network fault occurred in a ring network, and the second network device is a network device in the ring network with a blocking point configured. As shown in Figure 9, the message transmission method includes, but is not limited to, steps 901 through 905.
[0090] Step 901: When a network failure occurs in a ring network, a first network device receives a first message, encapsulates the first message with a first outer tunnel message header, and obtains a second message.
[0091] Step 902: The first network device transmits a second message to the second network device based on the first tunnel.
[0092] Step 903: The second network device receives the second message and adds identification information to the first outer tunnel message header of the second message.
[0093] Step 904: The second network device transmits the second message with the identification information added to the third network device based on the first tunnel.
[0094] Step 905: The third network device receives the second message with the identification information added, decapsulates the first outer tunnel message header of the second message to obtain the first message, and transmits the first message.
[0095] The implementation of steps 901 to 905 can refer to the relevant descriptions in steps 201 to 203 and will not be repeated here.
[0096] The above describes the message transmission method of the embodiment of the present application. Corresponding to the above method, the embodiment of the present application also provides a message transmission device. Figure 10 is a structural schematic diagram of a message transmission device provided in an embodiment of the present application. Based on the following multiple modules shown in Figure 10, the message transmission device shown in Figure 10 can perform all or part of the operations performed by the first network device or the second network device. It should be understood that the device can include more additional modules than the modules shown or omit some of the modules shown therein, and the embodiment of the present application is not limited to this.
[0097] When the message transmission apparatus shown in FIG10 is applied to a first network device, the first network device may be the first network device shown in FIG2 or FIG9 . As shown in FIG10 , the apparatus includes: a transceiver module 1001 for performing the reception and / or transmission-related operations performed by the first network device in the message transmission method shown in FIG2 or FIG9 ; and a processing module 1002 for performing other operations in addition to the reception and / or transmission-related operations performed by the first network device in the message transmission method shown in FIG2 or FIG9 .
[0098] In a possible implementation, the transceiver module 1001 includes a receiving module and / or a sending module. The receiving module is used to perform reception-related operations, and the sending module is used to perform sending-related operations.
[0099] In one possible implementation, the transceiver module 1001 is used to receive a first message when a network failure occurs in a ring network, where the first network device is any network device in the ring network that is adjacent to the location where the network failure occurs, and the ring network includes a blocking breaking point for blocking message transmission; the processing module 1002 is used to encapsulate the first message with a first outer tunnel message header to obtain a second message, where the first outer tunnel message header indicates that the second message is transmitted based on the first tunnel, and the message transmitted through the first tunnel is not blocked by the blocking breaking point; the transceiver module 1001 is also used to transmit the second message based on the first tunnel.
[0100] In one possible implementation, each port between the first network device and the blocking loop-breaking point is configured with a first tunnel, or each port of each network device in the ring network is configured with a first tunnel; the transceiver module 1001 is used to transmit a second message to a second network device corresponding to the blocking loop-breaking point based on the first tunnel, and the second network device is used to decapsulate the first outer tunnel message header of the second message to obtain the first message.
[0101] In one possible implementation, each port of each network device in the ring network is configured with a first tunnel, or each port of the first network device from the first network device through the blocking loop-breaking point to the third network device is configured with a first tunnel, and the third network device is another network device in the ring network adjacent to the location where the network failure occurs; the transceiver module 1001 is used to transmit the second message to the third network device based on the first tunnel through the blocking loop-breaking point, and the third network device is used to decapsulate the first outer tunnel message header of the second message to obtain the first message.
[0102] In one possible implementation, the transceiver module 1001 is also used to receive a third message encapsulated with a second outer tunnel message header, where the second outer tunnel message header indicates that the third message is transmitted based on the second tunnel, and the message transmitted by the second tunnel is not blocked by the blocking loop point; the processing module 1002 is also used to decapsulate the second outer tunnel message header of the third message when the second outer tunnel message header carries marking information, to obtain a fourth message, where the marking information indicates that the third message passes through the blocking loop point; the transceiver module 1001 is also used to transmit the fourth message.
[0103] In a possible implementation, the processing module 1001 is further configured to discard the third message when the second outer tunnel message header does not carry marking information.
[0104] In one possible implementation, the processing module 1001 is further used to receive configuration information of the first tunnel sent by the control device before a network failure occurs in the ring network, and the configuration information of the first tunnel is used to transmit messages based on the first tunnel; or, it is also used to receive configuration information of the first tunnel sent by the control device in the event of a network failure in the ring network.
[0105] When the message transmission apparatus shown in FIG10 is applied to a second network device, the second network device may be the second network device shown in FIG8 or FIG9 . As shown in FIG10 , the apparatus includes: a transceiver module 1001 for performing the reception and / or transmission-related operations performed by the second network device in the message transmission method shown in FIG8 or FIG9 ; and a processing module 1002 for performing other operations in addition to the reception and / or transmission-related operations performed by the second network device in the message transmission method shown in FIG8 or FIG9 .
[0106] In one possible embodiment, the transceiver module 1001 is used to receive a second message sent by a first network device, where the first network device is any network device in a ring network adjacent to the location where the network failure occurs, and the ring network includes a blocking breaking point for blocking message transmission. The second network device is a network device corresponding to the blocking breaking point, and the second message is encapsulated with a first outer tunnel message header, which indicates that the second message is transmitted based on the first tunnel, and the message transmitted by the first tunnel is not blocked by the blocking breaking point; the processing module 1002 is used to decapsulate the first outer tunnel message header of the second message to obtain the first message when each port between the first network device and the blocking breaking point is configured with the first tunnel; the transceiver module 1001 is also used to transmit the first message.
[0107] In one possible implementation, the processing module 1002 is further used to add marking information to the first outer tunnel message header to obtain a fifth message when a first tunnel is configured on each port of each network device in the ring network, or when a first tunnel is configured on each port between the first network device and the third network device through a blocking and loop-breaking point in the ring network, wherein the marking information indicates that the fifth message passes through a blocking and loop-breaking point, and the third network device is another network device in the ring network adjacent to the location where the network failure occurs; the transceiver module 1001 is further used to transmit the fifth message.
[0108] In one possible implementation, the transceiver module 1001 is also used to receive the configuration information of the first tunnel sent by the control device before a network failure occurs in the ring network, and the configuration information of the first tunnel is used to transmit messages based on the first tunnel; or, it is also used to receive the configuration information of the first tunnel sent by the control device in the event of a network failure in the ring network.
[0109] It should be understood that the device provided in FIG10 is only used as an example to illustrate the division of the above-mentioned functional modules when implementing its functions. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here. The beneficial effects of the message transmission device shown in FIG10 can be referred to the beneficial effects of the message transmission method shown in FIG2 and will not be repeated here.
[0110] Referring to Figure 11 , Figure 11 shows a schematic diagram of the structure of a network device 2000 provided in accordance with an exemplary embodiment of the present application. The network device 2000 shown in Figure 11 is configured to perform the operations involved in the message transmission method shown in Figures 2 or 8 . The network device 2000 is, for example, a switch or router, and can be implemented using a general bus architecture.
[0111] As shown in FIG. 11 , the network device 2000 includes at least one processor 2001 , a memory 2003 , and at least one communication interface 2004 .
[0112] The processor 2001 is, for example, a general-purpose central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a graphics processing unit (GPU), a neural-network processing unit (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits for implementing the solution of the present application. For example, the processor 2001 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. The PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. It can implement or execute the various logic blocks, modules, and circuits described in conjunction with the disclosure of the embodiments of the present invention. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0113] Optionally, network device 2000 also includes a bus. The bus is used to transmit information between the various components of network device 2000. The bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, for example. Buses can be classified as address buses, data buses, control buses, etc. For ease of illustration, FIG11 shows only one line, but this does not mean that there is only one bus or only one type of bus.
[0114] The memory 2003 is, for example, a read-only memory (ROM) or other type of static storage device that can store static information and instructions, or a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 2003 is, for example, independent and connected to the processor 2001 via a bus. The memory 2003 can also be integrated with the processor 2001.
[0115] The communication interface 2004 uses any transceiver-like device for communicating with other devices or communication networks. The communication network can be Ethernet, a radio access network (RAN), or a wireless local area network (WLAN). The communication interface 2004 can include a wired communication interface or a wireless communication interface. Specifically, the communication interface 2004 can be an Ethernet interface, a Fast Ethernet (FE) interface, a Gigabit Ethernet (GE) interface, an Asynchronous Transfer Mode (ATM) interface, a wireless local area network (WLAN) interface, a cellular network communication interface, or a combination thereof. The Ethernet interface can be an optical interface, an electrical interface, or a combination thereof. In the embodiment of the present application, the communication interface 2004 can be used for the network device 2000 to communicate with other devices.
[0116] In a specific implementation, as an embodiment, the processor 2001 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG11 . Each of these processors may be a single-core CPU processor or a multi-core CPU processor. The processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0117] In a specific implementation, as an embodiment, the network device 2000 may include multiple processors, such as the processor 2001 and the processor 2005 shown in Figure 11. Each of these processors may be a single-core CPU or a multi-core CPU. The processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).
[0118] In a specific implementation, as an embodiment, the network device 2000 may further include an output device and an input device. The output device communicates with the processor 2001 and can display information in a variety of ways. For example, the output device can be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device communicates with the processor 2001 and can receive user input in a variety of ways. For example, the input device can be a mouse, a keyboard, a touch screen device, or a sensor device.
[0119] In some embodiments, the memory 2003 is used to store program code 2010 for executing the solution of the present application, and the processor 2001 can execute the program code 2010 stored in the memory 2003. That is, the network device 2000 can implement the message transmission method provided by the method embodiment through the processor 2001 and the program code 2010 in the memory 2003. The program code 2010 may include one or more software modules. Optionally, the processor 2001 itself may also store program code or instructions for executing the solution of the present application.
[0120] In a specific embodiment, the network device 2000 of the embodiment of the present application may correspond to the first network device in the above-mentioned method embodiments. The processor 2001 in the network device 2000 reads the instructions in the memory 2003, so that the network device 2000 shown in Figure 11 can execute all or part of the operations performed by the first network device.
[0121] Specifically, the processor 2001 is used to receive a first message by a first network device when a network failure occurs in a ring network. The first network device is any network device in the ring network that is adjacent to the location where the network failure occurs, and the ring network includes a blocking breaking point for blocking message transmission; encapsulate the first message with a first outer tunnel message header to obtain a second message, and the first outer tunnel message header indicates that the second message is transmitted based on the first tunnel, and the message transmitted by the first tunnel is not blocked by the blocking breaking point; and transmit the second message based on the first tunnel.
[0122] For the sake of brevity, other optional implementations will not be described here in detail.
[0123] For another example, the network device 2000 in an embodiment of the present application may correspond to the second network device in each of the above-mentioned method embodiments. The processor 2001 in the network device 2000 reads the instructions in the memory 2003, so that the network device 2000 shown in Figure 11 can execute all or part of the operations performed by the second network device.
[0124] Specifically, the processor 2001 is used to receive a second message sent by a first network device, where the first network device is any network device in a ring network that is adjacent to the location where the network failure occurs, and the ring network includes a blocking breaking point for blocking message transmission. The second network device is a network device corresponding to the blocking breaking point, and the second message is encapsulated with a first outer tunnel message header. The first outer tunnel message header indicates that the second message is transmitted based on the first tunnel, and the message transmitted by the first tunnel is not blocked by the blocking breaking point; when the first tunnel is configured at each port between the first network device and the blocking breaking point, the first outer tunnel message header is decapsulated from the second message to obtain the first message; and the first message is transmitted.
[0125] For the sake of brevity, other optional implementations will not be described here in detail.
[0126] The network device 2000 may also correspond to the message transmission apparatus shown in FIG10 , and each functional module in the message transmission apparatus is implemented using the software of the network device 2000. In other words, the functional modules included in the message transmission apparatus are generated by the processor 2001 of the network device 2000 after reading the program code 2010 stored in the memory 2003.
[0127] Among them, each step of the message transmission method shown in Figure 2 or Figure 8 is completed by the hardware integrated logic circuit or software instructions in the processor of the network device 2000. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a storage medium mature in the art such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.
[0128] Referring to Figure 12, Figure 12 shows a schematic diagram of the structure of a network device 2100 provided in another exemplary embodiment of the present application. The network device 2100 shown in Figure 12 is used to perform all or part of the operations involved in the message transmission method shown in Figure 2 or Figure 8. The network device 2100 is, for example, a switch, a router, etc., and the network device 2100 can be implemented using a general bus architecture.
[0129] As shown in FIG. 12 , the network device 2100 includes a main control board 2110 and an interface board 2130 .
[0130] The main control board (MCB), also known as the main processing unit (MPU) or route processor card, is used to control and manage various components in network device 2100, including routing calculations, device management, device maintenance, and protocol processing. MCB 2110 includes a central processing unit (CPU) 2111 and memory 2112.
[0131] Interface board 2130 is also known as a line processing unit (LPU), line card, or service board. It provides various service interfaces and implements data packet forwarding. Service interfaces include, but are not limited to, Ethernet interfaces and POS (Packet over SONET / SDH) interfaces. Ethernet interfaces, for example, are Flexible Ethernet Clients (FlexE Clients) interfaces. Interface board 2130 includes a central processing unit (CPU) 2131, a network processor (NPU) 2132, a forwarding table memory 2134, and a physical interface card (PIC) 2133.
[0132] The central processing unit 2131 on the interface board 2130 is used to control and manage the interface board 2130 and communicate with the central processing unit 2111 on the main control board 2110 .
[0133] The network processor 2132 is used to implement message forwarding processing. The network processor 2132 can be in the form of a forwarding chip. The forwarding chip can be a network processor (NP). In some embodiments, the forwarding chip can be implemented using an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA). Specifically, the network processor 2132 is used to forward received messages based on the forwarding table stored in the forwarding entry memory 2134. If the destination address of the message is the address of the network device 2100, the message is sent to the CPU (such as the central processing unit 2131) for processing. If the destination address of the message is not the address of the network device 2100, the next hop and outgoing interface corresponding to the destination address are searched in the forwarding table based on the destination address, and the message is forwarded to the outgoing interface corresponding to the destination address. The processing of uplink messages may include processing the message inbound interface and forwarding table lookup; the processing of downlink messages may include forwarding table lookup, etc. In some embodiments, the central processing unit may also perform the functions of the forwarding chip, such as implementing software forwarding based on a general-purpose CPU, thereby eliminating the need for a forwarding chip in the interface board.
[0134] Physical interface card 2133 implements physical layer interconnection. Raw traffic enters interface board 2130 through this card, and processed packets are sent out from this physical interface card 2133. Physical interface card 2133, also known as a daughter card, can be installed on interface board 2130. It converts optical and electrical signals into packets, performs a validity check on these packets, and then forwards them to network processor 2132 for processing. In some embodiments, central processing unit 2131 can also perform the functions of network processor 2132, such as implementing software forwarding based on a general-purpose CPU, thus eliminating the need for network processor 2132 in physical interface card 2133.
[0135] Optionally, network device 2100 includes multiple interface boards. For example, network device 2100 further includes interface board 2140, which includes a central processing unit 2141, a network processor 2142, a forwarding table entry memory 2144, and a physical interface card 2143. The functions and implementation of each component in interface board 2140 are the same as or similar to those of interface board 2130 and are not further described here.
[0136] Optionally, network device 2100 further includes a switching fabric board 2120. Switching fabric board 2120 may also be referred to as a switch fabric unit (SFU). If network device 2100 includes multiple interface boards, switching fabric board 2120 is used to exchange data between the interface boards. For example, interface board 2130 and interface board 2140 can communicate via switching fabric board 2120.
[0137] The main control board 2110 is coupled to the interface board. For example, the main control board 2110, the interface board 2130, the interface board 2140, and the switching network board 2120 are connected to the system backplane via a system bus to achieve intercommunication. In one possible implementation, an inter-process communication (IPC) channel is established between the main control board 2110 and the interface boards 2130 and 2140, and communication is performed between the main control board 2110 and the interface boards 2130 and 2140 via the IPC channel.
[0138] Logically, network device 2100 includes a control plane and a forwarding plane. The control plane includes a main control board 2110 and a central processing unit (CPU) 2111. The forwarding plane includes various components that perform forwarding, such as a forwarding table entry memory 2134, physical interface cards 2133, and a network processor 2132. The control plane performs routing functions, generates forwarding tables, processes signaling and protocol messages, and configures and maintains the network device's status. The control plane sends the generated forwarding tables to the forwarding plane. On the forwarding plane, the network processor 2132 forwards messages received by the physical interface card 2133 based on the forwarding tables sent by the control plane. The forwarding tables sent by the control plane can be stored in the forwarding table entry memory 2134. In some embodiments, the control plane and forwarding plane can be completely separate and not located on the same network device.
[0139] It's worth noting that there may be one or more main control boards (SPUs), which can include both active and standby SPUs. There may also be one or more interface boards. The higher the network device's data processing capabilities, the more interface boards it provides. Interface boards can also have one or more physical interface cards. There may be no SPUs, one or more SPUs, and multiple SPUs can provide load balancing and redundancy. In a centralized forwarding architecture, network devices may not require SPUs; the interface boards handle service data processing for the entire system. In a distributed forwarding architecture, network devices may have at least one SPU, which enables data exchange between multiple interface boards, providing high-capacity data exchange and processing capabilities. Therefore, network devices with distributed architectures have greater data access and processing capabilities than those with centralized architectures. Alternatively, a network device can consist of a single card, without a switching fabric board (SFB), integrating the functions of the interface board and the main control board. In this case, the central processing unit (CPU) on the interface board and the CPU on the main control board can be combined into a single CPU on this card, performing the combined functions of the two. This type of network device has lower data exchange and processing capabilities (for example, low-end network devices such as switches or routers). The specific architecture used depends on the specific network deployment scenario and is not specified here.
[0140] In a specific embodiment, the network device 2100 corresponds to the message transmission device applied to the first network device or the second network device shown in Figure 10. In some embodiments, the transceiver module 1001 in the message transmission device shown in Figure 10 corresponds to the physical interface card 2133 in the network device 2100, and the processing module 1002 corresponds to the central processing unit 2111 or the network processor 2132 in the network device 2100.
[0141] The present application also provides a message transmission system, which includes a first network device and a second network device. For example, the first network device is network device 2000 shown in Figure 11 or network device 2100 shown in Figure 12, and the second network device is network device 2000 shown in Figure 11 or network device 2100 shown in Figure 12. The message transmission method performed by the first network device and the second network device can be found in the description of the embodiments shown in Figures 2 and 8 above, and will not be repeated here.
[0142] An embodiment of the present application further provides a communication device, comprising: a transceiver, a memory, and a processor. The transceiver, the memory, and the processor communicate with each other via an internal connection path. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to control the transceiver to receive signals and control the transceiver to send signals. When the processor executes the instructions stored in the memory, the processor executes the method required to be executed by the first network device.
[0143] An embodiment of the present application further provides a communication device, comprising: a transceiver, a memory, and a processor. The transceiver, the memory, and the processor communicate with each other via an internal connection path. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to control the transceiver to receive signals and control the transceiver to send signals. When the processor executes the instructions stored in the memory, the processor executes the method required to be executed by the second network device.
[0144] It should be understood that the processor described above may be a CPU, or other general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor that supports the Advanced Reduced Instruction Set Machine (ARM) architecture.
[0145] Furthermore, in an optional embodiment, the memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. The memory may also include a non-volatile random access memory. For example, the memory may also store device type information.
[0146] The memory may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM), which is used as an external cache memory. By way of example and not limitation, many forms of RAM are available. For example, static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronized dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0147] An embodiment of the present application also provides a computer-readable storage medium, in which at least one instruction is stored. The instruction is loaded and executed by a processor to enable a computer to implement any of the above message transmission methods.
[0148] The embodiments of the present application further provide a computer program (product), which, when executed by a computer, can enable a processor or computer to execute the corresponding steps and / or processes in the above method embodiments.
[0149] An embodiment of the present application also provides a chip, including a processor, for calling and executing instructions stored in the memory from a memory, so that a communication device equipped with the chip executes any of the above message transmission methods.
[0150] An embodiment of the present application also provides another chip, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected through an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute any of the above message transmission methods.
[0151] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive).
[0152] Those skilled in the art will appreciate that the various method steps and modules described in conjunction with the embodiments disclosed herein can be implemented in software, hardware, firmware, or any combination thereof. In order to clearly illustrate the interchangeability of hardware and software, the steps and components of each embodiment have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0153] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0154] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer program instructions. As an example, the method of the embodiment of the present application can be described in the context of a machine executable instruction, and the machine executable instruction is such as included in the program module executed in the device on the real or virtual processor of the target. Generally speaking, a program module includes a routine, a program, a library, an object, a class, a component, a data structure, etc., which performs a specific task or realizes a specific abstract data structure. In various embodiments, the function of the program module can be merged or split between the described program modules. The machine executable instruction for the program module can be executed in a local or distributed device. In a distributed device, the program module can be located in both a local and a remote storage medium.
[0155] The computer program code for realizing the method for the embodiment of the application can be written in one or more programming languages.These computer program codes can be provided to the processor of general-purpose computer, special-purpose computer or other programmable data processing device, so that program code, when being executed by computer or other programmable data processing device, causes the function / operation specified in flow chart and / or block diagram to be implemented.Program code can be executed completely on computer, partly on computer, as independent software package, partly on computer and partly on remote computer or completely on remote computer or server.
[0156] In the context of the embodiments of the present application, computer program code or related data may be carried by any suitable carrier to enable a device, apparatus, or processor to perform the various processes and operations described above. Examples of carriers include signals, computer-readable media, and the like.
[0157] Examples of signals may include electrical, optical, radio, acoustic or other forms of propagated signals, such as carrier waves, infrared signals, etc.
[0158] A machine-readable medium may be any tangible medium that contains or stores a program for or in connection with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination thereof. More detailed examples of machine-readable storage media include an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0159] Those skilled in the art will clearly understand that, for the sake of convenience and brevity of description, the specific working processes of the above-described systems, devices, and modules can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0160] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, or can be electrical, mechanical or other forms of connection.
[0161] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0162] In addition, the functional modules in the various embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module. The above-mentioned integrated modules may be implemented in the form of hardware or software functional modules.
[0163] If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0164] In this application, the terms "first", "second", etc. are used to distinguish between identical or similar items that have substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there any limitation on quantity or execution order. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of the various examples, a first image may be referred to as a second image, and similarly, a second image may be referred to as a first image. The first image and the second image may both be images, and in some cases, may be separate and different images.
[0165] It should also be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0166] In this application, the term "at least one" means one or more, and the term "plurality" means two or more. For example, "plurality of second messages" means two or more second messages. The terms "system" and "network" are often used interchangeably herein.
[0167] It should be understood that the terminology used in the description of the various examples herein is for the purpose of describing particular examples only and is not intended to be limiting. As used in the description of the various examples and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
[0168] It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the listed items. The term "and / or" describes an association between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this application generally indicates that the associated objects are in an "or" relationship.
[0169] It will also be understood that the term “comprise” (also known as “includes,” “including,” “comprises,” and / or “comprising”) when used in this specification specifies the presence of stated features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0170] It should also be understood that the terms “if” and “if” may be interpreted to mean “when” or “upon” or “in response to determining” or “in response to detecting.” Similarly, the phrases “if it is determined that ” or “if [stated condition or event] is detected” may be interpreted to mean “upon determining ” or “in response to determining ” or “upon detecting [stated condition or event]” or “in response to detecting [stated condition or event],” depending on the context.
[0171] It should be understood that determining B based on A does not mean determining B based solely on A. B can also be determined based on A and / or other information.
[0172] It should also be understood that references throughout this specification to "one embodiment," "an embodiment," or "one possible implementation" mean that specific features, structures, or characteristics associated with that embodiment or implementation are included in at least one embodiment of the present application. Therefore, the appearance of "in one embodiment," "in an embodiment," or "one possible implementation" throughout this specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0173] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the principles of the present application should be included in the scope of protection of the present application.
Claims
1. A message transmission method, characterized in that: The method comprises: In the case where a network failure occurs in a ring network, a first network device receives a first message, wherein the first network device is any network device in the ring network adjacent to a location where the network failure occurs, and the ring network includes a blocking point for blocking message transmission; encapsulating the first message with a first outer tunnel message header to obtain a second message, wherein the first outer tunnel message header indicates that the second message is transmitted based on the first tunnel, and the message transmitted through the first tunnel is not blocked by the blocking breaking point; The second message is transmitted based on the first tunnel.
2. The method according to claim 1, characterized in that Each port between the first network device and the blocking and breaking point is configured with the first tunnel, or each port of each network device in the ring network is configured with the first tunnel; The transmitting the second message based on the first tunnel includes: The second message is transmitted to the second network device corresponding to the blocking loop breaking point based on the first tunnel, and the second network device is used to decapsulate the first outer tunnel message header of the second message to obtain the first message.
3. The method according to claim 1, characterized in that Each port of each network device in the ring network is configured with the first tunnel, or each port of the first network device from the blocking and breaking point to a third network device is configured with the first tunnel, and the third network device is another network device in the ring network adjacent to the location where the network failure occurs; The transmitting the second message based on the first tunnel includes: Based on the first tunnel transmitting the second message to the third network device through the blocking loop breaking point, the third network device is used to decapsulate the first outer tunnel message header of the second message to obtain the first message.
4. The method according to claim 1 or 3, characterized in that: The method further comprises: receiving a third message encapsulated with a second outer tunnel message header, wherein the second outer tunnel message header indicates that the third message is transmitted based on the second tunnel, and the message transmitted by the second tunnel is not blocked by the blocking breaking point; In a case where the second outer tunnel message header carries the marking information, decapsulating the second outer tunnel message header of the third message to obtain a fourth message, wherein the marking information indicates that the third message passes through the blocking loop breaking point; The fourth message is transmitted.
5. The method according to claim 4, characterized in that The method further comprises: When the second outer tunnel message header does not carry marking information, the third message is discarded.
6. A message transmission method, characterized in that: The method comprises: The second network device receives a second message sent by the first network device, the first network device is any network device adjacent to a location where a network failure occurs in a ring network, the ring network includes a blocking breaking point for blocking message transmission, the second network device is a network device corresponding to the blocking breaking point, the second message is encapsulated with a first outer tunnel message header, the first outer tunnel message header indicates that the second message is transmitted based on the first tunnel, and the message transmitted by the first tunnel is not blocked by the blocking breaking point; In a case where each port between the first network device and the blocking loop breaking point is configured with the first tunnel, decapsulating the first outer tunnel message header of the second message to obtain a first message; Transmit the first message.
7. The method according to claim 6, characterized in that After the second network device receives the second message sent by the first network device, the method further includes: In a case where each port of each network device in the ring network is configured with the first tunnel, or in a case where each port of the first network device in the ring network from the first network device through the blocking loop breaking point to the third network device is configured with the first tunnel, adding marking information to the first outer tunnel message header to obtain a fifth message, the marking information indicates that the fifth message passes through the blocking loop breaking point, and the third network device is another network device in the ring network adjacent to the location where the network fault occurs; The fifth message is transmitted.
8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: Before the network failure occurs in the ring network, receiving configuration information of the first tunnel sent by a control device, where the configuration information of the first tunnel is used to transmit messages based on the first tunnel; Alternatively, when the network failure occurs in the ring network, configuration information of the first tunnel sent by the control device is received.
9. A message transmission device, characterized in that: The device comprises: A transceiver module, used to perform the receiving and / or sending related operations performed by the first network device in the method described in any one of claims 1-5 and 8, or used to perform the receiving and / or sending related operations performed by the second network device in the method described in any one of claims 6-8; A processing module, used to perform other operations other than the reception and / or transmission related operations performed by the first network device in the method described in any one of claims 1-5 and 8, or used to perform other operations other than the reception and / or transmission related operations performed by the second network device in the method described in any one of claims 6-8.
10. A network device, characterized in that: The network device includes: a processor, the processor is coupled to a memory, the memory stores at least one program instruction or code, and the at least one program instruction or code is loaded and executed by the processor so that the network device implements the message transmission method described in any one of claims 1-5 and 8, or so that the network device implements the message transmission method described in any one of claims 6-8.
11. A message transmission system, characterized in that: The message transmission system includes a first network device and a second network device; The first network device is used to execute the message transmission method described in any one of claims 1-5 and 8, and the second network device is used to execute the message transmission method described in any one of claims 6-8.
12. A computer-readable storage medium, characterized in that: The computer storage medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor to enable the computer to implement the message transmission method as described in any one of claims 1-5 and 8, or to enable the computer to implement the message transmission method as described in any one of claims 6-8.
13. A computer program product, characterized in that The computer program product includes: a computer program code, which is loaded and executed by a computer so that the computer implements the message transmission method described in any one of claims 1-5 and 8, or so that the computer implements the message transmission method described in any one of claims 6-8.
Citation Information
Patent Citations
Message transmission method, device, equipment, system and storage medium
CN119496673A
Method and equipment for creating protecting tunnel for resisting multipoint faults of main tunnel
CN104579952A
Communication method and related equipment
CN114584509A
Ring connection node, multiring network, and route switching method
JP2013157682A