Message forwarding method, device and system
By sending test messages between network devices to detect the status of VAS, the problem of SIG front-end devices being unable to detect VAS status recovery is solved, ensuring that traffic continues to be forwarded to VAS for processing when the server is normal, thus avoiding business interruption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2026-03-10
AI Technical Summary
The SIG front-end equipment was unable to detect the VAS status recovery, causing business traffic to be unable to be transferred to the restored VAS for processing.
When the first network device forwards service traffic to the third network device, multiple test messages are sent to the first server. The performance status of the first server is judged by the number of received test messages and response messages, ensuring that service traffic is forwarded to it for processing when the server is normal.
This enables the SIG front-end device to re-forward traffic to VAS for processing when VAS performance recovers, thus avoiding service interruption.
Smart Images

Figure CN121644441A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet communication, and in particular to a message forwarding method, apparatus and system. Background Technology
[0002] A Service Intelligence Gateway (SIG) system is a device / system that utilizes service awareness technology to achieve multiple functions such as traffic analysis, bandwidth management, and network security protection. The SIG system consists of a SIG front-end device and a SIG back-end device. The SIG front-end device is a forwarding device deployed on the forwarding path of service traffic for detecting service traffic. The SIG back-end device is a server connected to the SIG front-end device, used to issue policies to the SIG front-end device and process traffic information reported by the SIG front-end device.
[0003] In one application scenario, the value-added server (VAS) connects to the SIG front-end device. The SIG front-end device forwards service traffic from the user side to the VAS. After processing the service traffic, the VAS forwards it back to the SIG front-end device, which then forwards the service traffic to the network side. In other words, service traffic bypasses the VAS.
[0004] In one implementation, the SIG front-end device can use flow detection to detect the performance of the VAS. If the performance of the VAS deteriorates or fails, the SIG front-end device can directly forward the service traffic from the user side to the network side without going through the VAS, so as to ensure that the transmission of service traffic is not interrupted.
[0005] However, once service traffic no longer bypasses the VAS, the SIG front-end device can no longer use flow detection technology to monitor the VAS status. Even if the VAS returns to normal, the SIG front-end device has no way of knowing, preventing subsequent traffic from being forwarded to the restored VAS for processing. Summary of the Invention
[0006] This application provides a message forwarding method, apparatus, and system to solve the problem in the prior art where the SIG front-end device cannot detect the VAS status recovery, resulting in service traffic being unable to be forwarded to the VAS that has recovered to normal.
[0007] To achieve the above objectives, this application adopts the following technical solution:
[0008] Firstly, this application provides a message forwarding method. This method is applied to a first network device, or to modules or components within the first network device, such as chips or chip systems. The first network device is located between a second network device and a third network device, and is also connected to a first server (or, the first server is attached to the first network device). The message forwarding method may include: when the first network device forwards service traffic received from the second network device to the third network device, the first network device sends multiple first test messages to the first server. If the number of first test messages forwarded by the first server received by the first network device exceeds a first threshold, or the number of first response messages sent by the first server received by the first network device exceeds the first threshold, then the first network device forwards subsequent service traffic received from the second network device to the first server. The first response message is a response message corresponding to the first test messages, and the response code in the first response message indicates that the first server is functioning normally.
[0009] Based on the above scheme, when the service traffic forwarded by the first network device does not pass through the first server, the first node can exchange test messages with the first server to determine whether the performance of the first server is normal. If the first network device determines that the first server is normal, it can forward the service traffic to the first server. This application provides a scheme for the first network device to control whether service traffic is forwarded to the first server.
[0010] In conjunction with the first aspect mentioned above, in one possible implementation, the first server can be a VAS, and the first network device can be a SIG front-end device. Based on this, the above solution can solve the problem in the prior art where the SIG front-end device cannot detect the VAS state recovery, thus preventing it from forwarding traffic to the VAS.
[0011] In conjunction with the first aspect above, in one possible implementation, the source MAC address and destination MAC address in the Ethernet frame header of the first test message are either the local MAC addresses of the first network device or the MAC addresses agreed upon by the first network device and the first server.
[0012] In conjunction with the first aspect mentioned above, in one possible implementation, the first test message also includes an IP header, which is used to enable the first server to process the first test message.
[0013] In conjunction with the first aspect mentioned above, in one possible implementation, the first server processes the service traffic and then forwards it to the first network device. Alternatively, the first server processes the service traffic and then sends the corresponding response service traffic to the first network device.
[0014] In conjunction with the first aspect described above, in one possible implementation, when the first network device forwards the service traffic received from the second network device to the first server, the packet forwarding method further includes: the first network device sending multiple second test packets to the first server, wherein the second test packets are generated by the first network device. If the number of second test packets forwarded by the first server received by the first network device is less than a second threshold, or the number of second response packets sent by the first server received by the first network device is less than the second threshold, then the first network device forwards the subsequent service traffic received from the second network device to the third network device. The second response packet is the response packet corresponding to the second test packets, and the response code in the second response packet indicates that the first server is functioning normally.
[0015] In conjunction with the first aspect described above, in one possible implementation, when the first network device forwards the service traffic received from the second network device to the first server, the packet forwarding method further includes: the first network device marking multiple target service packets in the service traffic. If the number of target service packets forwarded by the first server received by the first network device is less than a third threshold, or the number of third response packets sent by the first server received by the first network device is less than the third threshold, then the first network device forwards the subsequent service traffic received from the second network device to the third network device. The third response packet is a response packet corresponding to the target service packet, and the response code in the third response packet indicates that the first server is functioning normally.
[0016] In a second aspect, a communication system is provided, which includes the first network device, the second network device, the third network device, and the first server mentioned in the first aspect above.
[0017] Thirdly, a communication device is provided, comprising: a processor and a memory; the memory is used to store computer program instructions, and when the communication device is running, the processor executes the computer program instructions stored in the memory to cause the communication device to perform the message forwarding method as described in any one of the first aspects above.
[0018] In conjunction with the third aspect described above, in one possible implementation, the communication device further includes a communication interface; this communication interface is used for communication between the communication device and other devices. For example, the communication interface may be a transceiver, an input / output interface, an interface circuit, an output circuit, an input circuit, a pin, or related circuitry, etc.
[0019] Fourthly, a chip or chip system is provided, comprising: a processor; the processor executes computer program instructions to cause the chip or chip system to perform the message forwarding method as described in any one of the first aspects above.
[0020] Fifthly, a computer-readable storage medium is provided, which stores computer program instructions that, when executed on a computer, enable the computer to perform the message forwarding method described in any one of the first aspects.
[0021] Sixthly, a computer program product is provided, the computer program product including computer program instructions, which, when executed on a processor, cause the processor to perform the message forwarding method described in any possible implementation of the first aspect above.
[0022] The technical effects of any of the design methods in aspects two through six can be found in the technical effects of different design methods in aspect one, and will not be repeated here. Attached Figure Description
[0023] Figure 1 This application provides a schematic diagram of the structure of a communication network according to an embodiment of the present application.
[0024] Figure 2 This is a schematic diagram of another communication network structure provided in an embodiment of this application;
[0025] Figure 3 A schematic diagram illustrating a traffic forwarding process in a redirection and injection scenario provided in an embodiment of this application;
[0026] Figure 4 A schematic diagram illustrating a traffic forwarding process in a non-re-injection scenario provided by an embodiment of this application;
[0027] Figure 5 This is a schematic diagram of another communication network structure provided in an embodiment of this application;
[0028] Figure 6 This is a schematic diagram of another communication network structure provided in an embodiment of this application;
[0029] Figure 7 A flowchart illustrating a message forwarding method provided in an embodiment of this application;
[0030] Figure 8 A schematic diagram illustrating the format of a first detection message provided in an embodiment of this application;
[0031] Figure 9 A schematic diagram illustrating another format of the first detection message provided in an embodiment of this application;
[0032] Figure 10 A schematic diagram illustrating the format of yet another first detection message provided in an embodiment of this application;
[0033] Figure 11This is a schematic diagram of the structure of a communication device provided in an embodiment of this application;
[0034] Figure 12 This is a schematic diagram of another communication device provided in an embodiment of this application. Detailed Implementation
[0035] Before introducing the embodiments of this application, some terms and related technologies involved in the embodiments of this application will be explained. It should be noted that the following explanations are for the purpose of making the embodiments of this application easier to understand, and should not be regarded as a limitation on the scope of protection claimed by the embodiments of this application.
[0036] A Service-Aware (SIG) system is a device / system that utilizes service awareness technology to perform multiple functions such as traffic analysis, bandwidth management, and network security protection. A SIG system consists of SIG front-end devices and SIG back-end devices. The SIG front-end device is a forwarding device deployed along the forwarding path of service traffic, used for detecting, analyzing, and processing service traffic. The SIG back-end device is a server connected to the SIG front-end device, used to issue policies to the SIG front-end device and process traffic information reported by the SIG front-end device.
[0037] For example, Figure 1 This is a schematic diagram of a communication network provided in this application. Figure 1 As shown, the communication network includes user equipment 101, access router 102, core router 103, Internet 104, SIG front-end device 105, and SIG back-end device 106. User equipment 101, access router 102, SIG front-end device 105, core router 103, and Internet 104 are connected sequentially, and SIG back-end device 106 is connected to SIG front-end device 105.
[0038] Traffic redirection is a function of the SIG system. The SIG front-end equipment identifies incoming service traffic and forwards eligible traffic to the VAS (Vehicle Application Server) attached to the SIG front-end equipment. The VAS is then used for further analysis and processing of the traffic.
[0039] For example, Figure 2 This is a schematic diagram of another communication network structure provided in this application. Figure 2 As shown, the communication network includes, in addition to Figure 1 In addition to user equipment 101, access router 102, core router 103, Internet 104, SIG front-end equipment 105, and SIG back-end equipment 106, it also includes VAS 107. VAS 107 is connected to the SIG front-end equipment.
[0040] Optionally, such as Figure 2As shown, the ports used by the SIG front-end device 105 to connect to the VAS 107 include an inside forwarding port and an outside forwarding port. Uplink traffic received by the SIG front-end device 105 from the user equipment 101 will be forwarded to the VAS 107 via the inside forwarding port, and downlink traffic received by the SIG front-end device 105 from the Internet 104 will be forwarded to the VAS 107 via the outside forwarding port.
[0041] Depending on the VAS functionality, traffic redirection is divided into two different types:
[0042] (1) Redirecting and Reinjecting: VAS is used to perform functions such as antivirus and traffic analysis. Traffic forwarded to VAS by the SIG front-end device is processed by VAS and then forwarded back to the SIG front-end device unchanged. Subsequently, the SIG front-end device continues to forward the traffic to its destination.
[0043] (2) No Redirection: VAS is used as a cache server. Traffic forwarded to VAS by the SIG front-end device can be directly responded to by VAS. For example, in a video service scenario, packets in the traffic sent by the user side are used to request video data from the network side, and the VAS can cache the video data, so the VAS can directly send video data to the user side.
[0044] For example, Figure 3 A schematic diagram illustrating a traffic forwarding process in a redirection and injection scenario provided in this application is shown below. Figure 3 As shown, the traffic forwarding process may include the following stages:
[0045] 301. The SIG front-end device receives uplink traffic from the user side.
[0046] 302. The SIG front-end device determines that uplink traffic from the user side needs to be redirected, and thus forwards the uplink traffic to the VAS.
[0047] Among them, the SIG front-end device forwards uplink traffic to the VAS through the internal redirection port.
[0048] 303. After processing the uplink traffic, VAS forwards it back to the SIG front-end device unchanged.
[0049] In this embodiment, the VAS processes the uplink traffic from the SIG front-end device and forwards it back to the SIG front-end device without modification. This is referred to as the VAS injecting uplink traffic back to the SIG front-end device, which will be explained uniformly here.
[0050] Among them, the SIG front-end equipment receives the uplink traffic injected by VAS through the outer redirection port.
[0051] 304. The SIG front-end device then forwards the uplink traffic injected by VAS to the network side.
[0052] 305. The SIG front-end device receives downlink traffic from the network side.
[0053] 306. The SIG front-end device determines that downlink traffic from the network side needs to be redirected, and thus forwards the downlink traffic to VAS.
[0054] Among them, the SIG front-end device forwards downlink traffic to the VAS through the outer redirection port.
[0055] 307. After processing the downlink traffic, VAS forwards it back to the SIG front-end device unchanged.
[0056] Among them, the SIG front-end equipment receives the downlink traffic injected by VAS through the internal redirection port.
[0057] 308. The SIG front-end device then forwards the downlink traffic injected by VAS to the user side.
[0058] according to Figure 3 As can be seen from the diagram, in the scenario of redirection and injection, the traffic between the user side and the network side will bypass the VAS processing.
[0059] For example, Figure 4 The diagram provided in this application illustrates a traffic forwarding process in a non-refundable scenario, as shown below. Figure 4 As shown, the traffic forwarding process may include the following stages:
[0060] 401. The SIG front-end device receives uplink traffic from the user side.
[0061] 402. The SIG front-end device determines that uplink traffic from the user side needs to be redirected, and thus forwards the uplink traffic to the VAS.
[0062] Among them, the SIG front-end device forwards uplink traffic to the VAS through the internal redirection port.
[0063] 403. As a buffer device, VAS responds to uplink traffic from the SIG front-end device and sends corresponding downlink traffic to the SIG front-end device.
[0064] Among them, the SIG front-end equipment also receives downlink traffic sent by VAS through the internal redirection port.
[0065] 404. The SIG front-end device forwards the downlink traffic sent by VAS to the user side.
[0066] according to Figure 4As can be seen from the diagram, in the scenario of switching without re-injection, VAS replaces the network side in replying to the user side with downlink traffic, and the SIG front-end device does not need to forward uplink traffic from the user side to the network side.
[0067] It should be understood that if the VAS performance deteriorates or even malfunctions, and the SIG front-end device continues to forward traffic to the VAS, it will lead to increased packet loss or even traffic interruption. Therefore, it is necessary for the SIG front-end device to be aware of the VAS's performance status.
[0068] by Figure 2 Taking the network architecture shown as an example, the SIG front-end device is physically directly connected to the VAS. In this scenario, the SIG front-end device can detect whether the VAS is faulty from the physical layer, and can then forward traffic directly to the network side or user side in a timely manner after the VAS fails, avoiding detours through the VAS and thus preventing traffic interruption.
[0069] However, as network architectures become increasingly complex, SIG front-end devices may be indirectly connected via switches, making it impossible for them to directly detect whether VAS is faulty. For example, Figure 5 A schematic diagram of another communication network provided in this application, such as Figure 5 As shown, the communication network includes, in addition to Figure 2 In addition to user equipment 101, access router 102, core router 103, internet 104, SIG front-end device 105, SIG back-end device 106, and VAS 107, the system also includes switch 108. Switch 108 is connected between SIG front-end device 105 and VAS 107. Figure 5 In the network architecture shown, if switch 108 is functioning normally but VAS107 fails, the SIG front-end device 105 will not be able to detect the VAS107 failure. The SIG front-end device 105 will still forward traffic to VAS107 through switch 108, which will cause service interruption.
[0070] As one possible implementation, the SIG front-end device can utilize flow sensing technology to determine the performance status of the VAS. For example, with... Figure 3 Taking the redirection and injection scenario as an example, the SIG front-end device adds coloring marks to the packets in the traffic forwarded to the VAS. Then, the SIG front-end device counts the number of packets with coloring marks in the traffic injected back by the VAS, thereby determining whether the VAS has experienced performance degradation or even failure.
[0071] but, Figure 4In the scenario of redirection without re-injection shown, the VAS will not forward traffic from the SIG front-end device back to the SIG front-end device, therefore, flow-following detection technology is not applicable. Furthermore, after the SIG front-end device detects a VAS failure using flow-following detection technology, the SIG will forward traffic directly to the network side or user side, bypassing the VAS. However, since the traffic bypasses the VAS, the SIG front-end device cannot use random detection technology to determine whether the VAS status has recovered, and therefore cannot subsequently forward traffic to the VAS for processing.
[0072] In view of the above problems, this application provides a packet forwarding method. When a first network device directly forwards traffic from a second network device to a third network device, the first network device can also send a detection packet to a connected first server to detect the performance of the first server. If the performance of the first server meets the requirements, the first network device will forward traffic from the second network device to the first server. The first network device can be a SIG (Special Signal Processing) foreground device, and the first server can be a VAS (Variable Access Server). Therefore, this packet forwarding method can continue to forward network traffic to the VAS for processing when the VAS's performance is normal, overcoming the problem in the prior art where the SIG foreground device cannot detect the VAS's recovery, causing traffic to be unable to continue being forwarded to the VAS for processing.
[0073] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. In the description of this application, unless otherwise stated, " / " indicates that the objects before and after are in an "or" relationship. For example, A / B can represent A or B. "And / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone, where A and B can be singular or plural. Furthermore, in the description of this application, unless otherwise stated, "multiple" refers to two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple. Furthermore, to facilitate a clear description of the technical solutions in the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that "first" and "second" are not necessarily different. Meanwhile, in the embodiments of this application, the words "exemplary" or "for example" are used to indicate that something is being used as an example, illustration, or description. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being better or more advantageous than other embodiments or design schemes. Specifically, the use of "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding. In addition, the network architecture and business scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions in the embodiments of this application and do not constitute a limitation on the technical solutions provided in the embodiments of this application. Those skilled in the art will understand that with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0074] Before introducing the message forwarding method provided in the embodiments of this application, the communication network on which the message forwarding method of this application is applied will be introduced first.
[0075] Figure 6 A schematic diagram of the structure of a communication network provided in this application is shown below. Figure 6 As shown, the communication network includes a first network device 601, a second network device 602, a third network device 603, and a first server 604. The first network device 601 is connected between the second network device 602 and the third network device 603, and the first server 604 is connected alongside the first network device.
[0076] In one possible implementation, the first network device 601 is a SIG front-end device, the first server 604 is a VAS, the second network device 602 is a user-side network device, and the third network device 603 is a network-side network device. These network devices can be forwarding devices in the network, such as routers, switches, and gateways.
[0077] As one possible implementation method, Figure 6 The communication network shown can specifically be Figure 2 or Figure 5 The network structure shown has the first network device 601 as... Figure 2 or Figure 5 The SIG front-end device in the first server is 604. Figure 2 or Figure 5 In the VAS, the second network device 602 is Figure 2 or Figure 5 The access router in the middle, the third network device 603 is Figure 2 or Figure 5 The core router in the system.
[0078] It should be understood that the above refers to... Figure 6 The illustrated communication networks and the examples of node implementations within those networks are illustrative and do not constitute a limitation on the technical solutions provided in the embodiments of this application. Those skilled in the art will recognize that, with the evolution of network architectures and the emergence of new service scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar network architectures.
[0079] The message forwarding method provided in this application embodiment can be applied to... Figure 6 In the communication network shown, the following will be combined with Figure 6 The communication network shown describes the message forwarding method provided in the embodiments of this application. Optionally, in the message forwarding method embodiments below, the first network device is... Figure 6 The first network device is 601, and the second network device is... Figure 6 The second network device 602 and the third network device are Figure 6 The third network device 603 and the first server are Figure 6 The first server in the system returned a 604 error.
[0080] Figure 7 A flowchart illustrating the message forwarding method provided in this application, such as... Figure 7 As shown, the method may include the following steps S701 to S702.
[0081] S701, when the first network device forwards the service traffic received from the second network device to the third network device, the first network device sends multiple first test messages to the first server. The first network device is connected between the second and third network devices, and the first server is connected alongside the first network device.
[0082] As one possible implementation, the second network device is connected to the user side, and the third network device is connected to the network side. The service traffic received by the first network device from the second network device is uplink service traffic sent from the user side to the network side. For example, the first network device is... Figure 2 The SIG front-end device 105, and the second network device are... Figure 2 The access router 102 and the third network device are... Figure 2 The core router in the system is 103.
[0083] As another possible implementation, the second network device is connected to the network side, and the third network device is connected to the user side. The service traffic received by the first network device from the second network device is the uplink service traffic sent from the network side to the user side. For example, the first network device is... Figure 2 The SIG front-end device 105, and the second network device are... Figure 2 The core router is 103, and the third network device is... Figure 2 Access router 102 in the middle.
[0084] In this embodiment, the first server and the first network device communicate with each other at the data link layer, and the first test message can be a data link layer message. For example, the first test message is an Ethernet frame, which includes an Ethernet frame header and a payload.
[0085] Optionally, the first test message may also include a network layer header, which is the Internet Protocol (IP) header. It should be understood that the first server will only parse and process the first test message if it includes a network layer header; otherwise, it will directly forward the first test message at Layer 2.
[0086] Optionally, the first test message may also include higher-level protocol headers such as transport layer headers and application layer headers.
[0087] As one possible implementation, the structure of the first test message can be as follows: Figure 8 As shown, the first test message includes a data link layer header, a network layer header, and a payload. The data link layer header is an Ethernet frame header, and the network layer header is an IP header. In this case, the first test message can be considered an IP packet encapsulated at the data link layer.
[0088] As another possible implementation, the structure of the first test message can be as follows: Figure 9 As shown, the first test message includes a data link layer header, a network layer header, a transport layer header, and a payload. The data link layer header is an Ethernet frame header, the network layer header is an IP header, and the transport layer header is a Transmission Control Protocol (TCP) header or a User Datagram Protocol (UDP) header. In this case, the first test message can be considered a TCP or UDP message encapsulated at the data link layer.
[0089] As another possible implementation, the structure of the first test message can be as follows: Figure 10 As shown, the first test message includes a data link layer header, a network layer header, a transport layer header, an application layer header, and a payload. The data link layer header is an Ethernet frame header, the network layer header is an IP header, the transport layer header is a TCP or UDP header, and the application layer header is a Hypertext Transfer Protocol (HTTP) header or a Hypertext Transfer Protocol Secure (HTTPS) header. In this case, the first test message can be considered an HTTP or HTTPS message encapsulated at the data link layer. For example, the first test message could be an HTTP GET message.
[0090] Optionally, depending on the role of the first server in the network, the format of the first test message sent by the first network device to the first server will also be different, and the first server will also perform different processing behaviors on the first test message.
[0091] As one possible scenario, the first server is used as Figure 3 The diagram illustrates the VAS in the redirection and injection scenario. The first test message includes a data link layer header, a network layer header, and a payload, or it includes a data link layer header, a network layer header, a transport layer header, and a payload. In other words, the first test message is an IP packet encapsulated at the data link layer, or a TCP / UDP packet encapsulated at the data link layer. The first server will process the first test message and then forward it to the first network device.
[0092] As another possible scenario, the first server is used as... Figure 4The example shown illustrates a VAS (Video Assistant for Forwarding) scenario without callback. The first test message includes a data link layer header, a network layer header, a transport layer header, an application layer header, and a payload. In other words, the first test message is an HTTP or HTTPS message encapsulated at the data link layer. The first server will process the first test message and then send the corresponding response message to the first network device.
[0093] Optionally, the port connecting the first network device to the first server includes a first forwarding port and a second forwarding port. The first network device sends a first test message through the first forwarding port and receives a first test message forwarded back by the first server through the second forwarding port. Alternatively, the first network device sends a first test message through the first forwarding port and receives a response message corresponding to the first test message sent by the first server through the first forwarding interface.
[0094] Used as the first server Figure 3 In the VAS case shown in the steering and reinjection scenario, the first steering port is the inner steering port of the VAS, and the second steering port is the outer steering port of the VAS. Alternatively, the first steering port is the outer steering port of the VAS, and the second steering port is the inner steering port of the VAS.
[0095] Used as the first server Figure 4 In the VAS case shown in the forwarding without re-injection scenario, the first forwarding port is the inner forwarding port of the VAS, and the second forwarding port is the outer forwarding port of the VAS.
[0096] As one possible scenario, the first test message is generated based on a service message from the service traffic. In this case, all fields in the first test message are identical to those in the service message from the service traffic. Alternatively, some fields in the first test message are identical to those in the service message from the service traffic, while other fields are generated by the first network device. In this case, at least one field in the data link layer header, network layer header, transport layer header, application layer header, and payload of the first test message is identical to the corresponding field in the service message.
[0097] As another possible scenario, the first test message is generated by the first network device, and all fields in the first test message are generated by the first network device.
[0098] Optionally, the source media access control (MAC) address and destination MAC address in the Ethernet frame header of the first test message generated by the first network device can be the local MAC address of the first network device, or a MAC address agreed upon by the first network device and the first server. This application does not limit whether the source MAC address and the destination MAC address are the same or different. Based on this, the first server will forward the first test message to the first network device or reply to the first network device with a response message corresponding to the first test message, according to the MAC address in the Ethernet frame header of the first test message.
[0099] As an example, in the first server used as Figure 3 In the VAS case of the redirection and back-injection scenario shown, the source MAC address in the Ethernet frame header of the first test message generated by the first network device can be the MAC address bound to the inner redirection port of the first network device, and the destination MAC address in the Ethernet frame header of the first test message generated by the first network device can be the MAC address bound to the outer redirection port of the first network device.
[0100] As another example, the first server is used as Figure 4 In the VAS case of the redirection without back-injection scenario shown, the source MAC address in the Ethernet frame header of the first test message generated by the first network device can be the MAC address bound to the inside redirection port of the first network device, and the destination MAC address in the Ethernet frame header of the first test message generated by the first network device can be the system MAC address of the first network device.
[0101] As one possible implementation, the tag field in the Ethernet frame header of the first test message generated by the first network device is set to the identification (ID) of the virtual local area network (VLAN) of the first server.
[0102] As one possible implementation, the source IP address and destination IP address in the IP header of the first test message generated by the first network device are both local IP addresses of the first network device. This application does not limit whether the source IP address and destination IP address are the same or different.
[0103] As an example, the source IP address and destination IP address in the IP header of the first test message generated by the first network device are the IP addresses bound to two different interfaces in the first network device.
[0104] Optionally, the IP header in the first test message generated by the first network device may be an IPv4 header or an IPv6 header; this application does not impose any limitation on this.
[0105] As one possible implementation, the source port and destination port in the TCP / UDP header of the first test message generated by the first network device are ports commonly used in network communication.
[0106] As one possible implementation, the first network device generates the HTTP / HTTPS header in the first test message based on the server IP address and port in the HTTP / HTTPS service messages in the forwarded service traffic.
[0107] As one possible implementation, the first network device generates the payload in the first test packet based on pre-configured information. As an example, the payload in the first test packet generated by the first network device includes at least one of the following: the ID of the first network device, the ID of the first server, the number of the first test packet, the method by which the first network device forwards the service traffic, and a timestamp.
[0108] Optionally, the first network device generates a first test packet based on service packets in the service traffic. Specifically, this includes: the first network device sampling and copying service packets received from the second network device's service traffic. Then, the first network device modifies the sampled and copied service packets to obtain the first test packet.
[0109] As one possible implementation, the first network device modifies the MAC address in the Ethernet frame header of the sampled and copied service packet, leaving other contents unchanged, thereby obtaining the first test packet. The implementation of the modified MAC address in the Ethernet frame header can be found in the previous description and will not be repeated here.
[0110] As one possible implementation, the first network device adds a coloring mark to the sampled and copied service packets, while keeping other content unchanged, thereby obtaining the first test packet.
[0111] S702. If the number of first test messages received by the first network device from the first server exceeds the first threshold, or the number of first response messages received by the first network device from the first server exceeds the first threshold, then the first network device will forward the subsequent service traffic received from the second network device to the first server. The first response message is the response message corresponding to the first test message, and the response code in the first response message indicates that the first server is functioning normally.
[0112] In this embodiment, if the number of first test messages received by the first network device from the first server exceeds a first threshold, or the number of first response messages received by the first network device from the first server exceeds the first threshold, the first network device considers the first server to be functioning normally. Subsequently, the first network device forwards subsequent service traffic received from the second network device to the first server for processing.
[0113] Optionally, the first threshold is a value less than the number of first test packets sent by the first network device. As one possible implementation, the first threshold is equal to N% of the number of first test packets sent by the first network device, where N is a constant between 0 and 100.
[0114] Optionally, the first server is used as Figure 3 In the VAS scenario shown in the redirection and injection example, the first server will forward the first test message to the first network device after processing it. Theoretically, if the first server is functioning correctly, the first network device will receive the first test message forwarded by the first server. In this case, if the number of first test messages forwarded by the first server received by the first network device exceeds a first threshold, the first network device can consider the first server to be functioning correctly.
[0115] Optionally, the first server is used as Figure 4 In the VAS scenario shown in the forwarding without resubmission, the first server will send a response message corresponding to the first test message to the first network device after processing the first test message. Theoretically, if the first server is normal, the first network device will receive the response message corresponding to the first test message sent by the first server, and the response code carried in the response message will indicate that the first server is normal. In this application, the response message carrying the response code indicating that the first server is normal in the response message corresponding to the first test message is called the first response message. In this case, if the number of first response messages sent by the first server received by the first network device is greater than a first threshold, the first network device can consider the first server to be normal.
[0116] Optionally, for multiple first test messages sent by the first network device, the first network device may only receive response messages corresponding to some of the first test messages, meaning some first test messages may not receive a response. Furthermore, some of the response messages corresponding to the first test messages may contain response codes indicating an anomaly in the first server. However, as long as the number of response messages (i.e., first response messages) indicating that the first server is functioning correctly exceeds a threshold, the first network device will still consider the first server to be functioning correctly.
[0117] In a specific example, if the first test message is an HTTP GET message and the response code in the corresponding response message is 200, then the first server is considered to be normal. If the response code in the corresponding response message is not 200, then the first server is considered to be abnormal.
[0118] Optionally, the first network device identifies the response message corresponding to the first test message based on the five-tuple information of the message. The five-tuple information includes the source IP address, destination IP address, source port, destination port, and protocol type. The destination IP address in the response message corresponding to the first test message is the same as the source IP address in the first test message; the source IP address in the response message corresponding to the first test message is the same as the destination IP address in the first test message; the destination port in the response message corresponding to the first test message is the same as the source port in the first test message; the source port in the response message corresponding to the first test message is the same as the destination port in the first test message; and the protocol type in the response message corresponding to the first test message is the same as the protocol type in the first test message.
[0119] Based on the above scheme, during the traffic forwarding process between different network devices, the first network device can also send test packets to its connected first server. Furthermore, the first network device can determine whether the first server is functioning correctly based on the number of test packets forwarded back by the first server, or the number of correct response packets sent by the first server. If the first server is determined to be functioning correctly, service traffic can be forwarded to the first server. In this application, the first server can be a VAS, and the first network device can be a SIG front-end device. The above scheme can solve the problem in the prior art where the SIG front-end device cannot detect the recovery of the VAS status, thus preventing it from forwarding traffic to the VAS.
[0120] As one possible scenario, after the first network device forwards traffic to the first server, the first server processes the traffic and then forwards it back to the first network device. Subsequently, the first network device forwards the traffic returned from the first server to the third network device. In this case, the first server acts as... Figure 3 The VAS in the shown redirection and reinjection scenario.
[0121] In another possible scenario, after the first network device forwards the service traffic to the first server, the first server processes the service traffic and then sends a response service traffic back to the first network device. Subsequently, the first network device forwards the response service traffic from the first server to the second network device. In this case, the first server acts as... Figure 4 The VAS shown is in a scenario where the steering does not re-inject.
[0122] Optionally, during the process of the first network device forwarding service traffic from the second network device to the third network device, the first network device may periodically execute the method of steps S701-S702 so that after the first server is running normally, the service traffic is forwarded to the first server for processing so as to provide value-added services for the service.
[0123] Optionally, continue to refer to Figure 7 The message forwarding method provided in this application also includes steps S703 and S704.
[0124] S703. When the first network device forwards the service traffic received from the second network device to the first server, the first network device also sends multiple second test messages to the first server. The second test messages are generated by the first network device.
[0125] The format of the second test message can be found in the previous description of the format of the first test message. The processing of the second test message by the first server can also be found in the previous description of the processing of the first test message by the first server. It will not be repeated here.
[0126] It should be understood that the MAC address in the Ethernet frame header of the second test message is different from the MAC address of the service packets in the service traffic, in order to distinguish the second test message from the service packets in the service traffic. Optionally, the IP address in the IP header of the second test message may also be different from the IP address of the service packets in the service traffic. Optionally, the port in the TCP / UDP header of the second test message may also be different from the port of the service packets in the service traffic.
[0127] As one possible implementation, the second test message is generated by the first network device, and all fields in the second test message are generated by the first network device. In this case, the implementation of each field in the second test message can refer to the implementation of each field in the first test message generated by the first network device mentioned above, and will not be repeated here.
[0128] As one possible implementation, the second test packet is generated by the first network device based on service packets in the service traffic. The first network device can sample and copy service packets from the service traffic, and then modify the MAC address in the sampled and copied service packets to obtain the second test packet. Optionally, the first network device can also modify other fields in the sampled and copied service packets.
[0129] Optionally, if the second test message is an HTTP / HTTPS message, the second test message can be generated based on the business message that the first server responded to in the business traffic, so that the first server responds to the second test message.
[0130] S704. If the number of second test messages received by the first network device from the first server is less than the second threshold, or the number of second response messages received by the first network device from the first server is less than the second threshold, then the first network device will forward the subsequent service traffic received from the second network device to the third network device. The second response message is the response message corresponding to the second test message, and the response code in the second response message indicates that the first server is functioning normally.
[0131] In this embodiment, if the number of second test messages received by the first network device from the first server is less than a second threshold, or the number of second response messages received by the first network device from the first server is less than the second threshold, the first network device considers the first server to be abnormal. Consequently, the first network device forwards subsequent service traffic received from the second network device to the third network device, instead of forwarding it to the first server for processing.
[0132] Optionally, the second threshold is a value less than the number of second test packets sent by the first network device. As one possible implementation, the second threshold is equal to M% of the number of second test packets sent by the first network device, where M is a constant between 0 and 100.
[0133] Optionally, the first server is used as Figure 3 In the VAS scenario shown in the redirection and injection example, the first server will forward the second test message to the first network device after processing it. Theoretically, if the first server is functioning normally, the first network device will receive the second test message forwarded by the first server. In this case, if the number of second test messages forwarded by the first server received by the first network device is less than a second threshold, the first network device can consider the first server to be malfunctioning.
[0134] Optionally, the first server is used as Figure 4 In the VAS scenario shown in the forwarding without resubmission, the first server will send a response message corresponding to the second test message to the first network device after processing the second test message. Theoretically, if the first server is normal, the first network device will receive the response message corresponding to the second test message sent by the first server, and the response code carried in the response message will indicate that the first server is normal. In this application, the response message carrying the response code indicating that the first server is normal in the response message corresponding to the second test message is called the second response message. In this case, if the number of second response messages sent by the first server received by the first network device is less than a second threshold, the first network device can consider the first server to be abnormal.
[0135] It should be understood that if the number of second response messages received by the first network device is less than the second threshold, it means that the sum of the number of response messages corresponding to the second test messages that the first network device did not receive and the number of response messages corresponding to the second test messages indicating an anomaly of the first server received is greater than the fourth threshold. Wherein, the fourth threshold = 1 - the second threshold.
[0136] Alternatively, the first network device can also determine whether the first server is abnormal by counting the number of response packets corresponding to the unreceived second test packets and the number of response packets corresponding to the received second test packets indicating that the first server is abnormal. These two methods are equivalent.
[0137] Based on the above scheme, the first network device can also send a second test message to the first server while forwarding service traffic to the first server. Therefore, the first network device can monitor the operational status of the first server in real time, and can promptly forward service traffic to the third network device in case of server malfunction, thus avoiding service interruption. In this application, the first server can be a VAS, and the first network device can be a SIG front-end device. The above scheme can be used to enable the SIG front-end device to monitor the operational status of the VAS.
[0138] Optionally, the payload of the second test message also carries a timestamp, and the first network device can determine the round-trip time of the first server based on the timestamp in the first test message sent and the timestamp in the first test message forwarded back by the first server.
[0139] Optionally, the first network device can also measure the jitter of the round-trip latency of the first server based on multiple measured round-trip latency measurements.
[0140] Optionally, continue to refer to Figure 7 The message forwarding method provided in this application also includes steps S705 and S706.
[0141] S705. When the first network device forwards the service traffic received from the second network device to the first server, the first network device marks multiple target service packets in the service traffic.
[0142] As one possible implementation, the first network device marks multiple target service packets in the service traffic, including: the first network device adds coloring tags to the multiple target service packets in the service traffic. For example, the first network device can set specific fields in the target service packets to specific values to achieve coloring of the target service packets. Alternatively, the first network device can add an in-situ flow information telemetry (IFIT) header to the target service packets to achieve coloring of the target service packets.
[0143] As another possible implementation, the first network device marks multiple target service packets in the service traffic, including: the first network device recording characteristic information of the multiple target service packets in the service traffic. For example, the first network device may record the 5-tuple information of the target service packets.
[0144] Optionally, depending on the role of the first server in the network, the processing behavior of the first server on the service traffic (including target service packets) will also be different. Therefore, the first network device will use different methods to mark multiple target service packets in the service traffic.
[0145] As one possible scenario, the first server is used as Figure 3 The diagram illustrates a VAS in a redirection and injection scenario. The first server processes service traffic from the first network device and then forwards the traffic back to the first network device. Correspondingly, the first server also processes the target service packets within the service traffic and then forwards them back to the first network device. In this case, the first network device can add coloring tags to multiple target service packets within the service traffic. Subsequently, the first network device can determine whether the first server is operating normally based on the number of coloring target service packets forwarded by the first server.
[0146] As another possible scenario, the first server is used as... Figure 4 The diagram illustrates a VAS (Video Assistant for Forwarding) scenario without callback. The first server processes service traffic from the first network device and then sends response service traffic to the first network device. Correspondingly, the first server also processes the target service packets within the service traffic and then sends the corresponding response packets to the first network device. In this case, the first network device can record the characteristic information of multiple target service packets in the service traffic sent from the first network device to the first server. Subsequently, the first network device can identify the response packets corresponding to the target service packets in the response service traffic based on the characteristic information of the target service packets.
[0147] S706. If the number of target service packets received by the first network device from the first server is less than the third threshold, or the number of third response packets received by the first network device from the first server is less than the third threshold, then the first network device will forward the subsequent service traffic received from the second network device to the third network device. The third response packet is the response packet corresponding to the target service packet, and the response code in the third response packet indicates that the first server is functioning normally.
[0148] In this embodiment, if the number of target service packets received by the first network device from the first server is less than a third threshold, or the number of third response packets received by the first network device from the first server is less than the third threshold, the first network device may consider the first server to be faulty. Consequently, the first network device will forward subsequent service traffic received from the second network device to the third network device, instead of forwarding it to the first server for processing.
[0149] Optionally, the third threshold is a value less than the number of target service packets. As one possible implementation, the third threshold is equal to L% of the number of target service packets, where L is a constant between 0 and 100.
[0150] Optionally, the first server is used as Figure 3 The diagram illustrates the VAS in the redirection and injection scenario. The first server processes the target service packet and then forwards it to the first network device. Theoretically, if the first server is functioning correctly, the first network device will receive the target service packets forwarded by the first server. In this case, if the number of target service packets forwarded by the first server received by the first network device is less than the third threshold, the first network device can consider the first server to be malfunctioning.
[0151] Optionally, the first server is used as Figure 4 In the VAS scenario shown in the forwarding without re-injection example, the first network device processes the target service packet in the service traffic and then sends a response packet corresponding to the target service packet to the first network device. Theoretically, if the first server is normal, the first network device will receive the response packet corresponding to the target service packet sent by the first server, and the response code carried in the response packet indicates that the first server is normal. This application refers to the response packet carrying the response code indicating that the first server is normal in the response packet corresponding to the target service packet as the third response packet. In this case, if the number of third response packets received by the first network device from the first server is less than a third threshold, the first network device can consider the first server to be abnormal.
[0152] It should be understood that if the number of third response messages received by the first network device is less than the third threshold, it means that the sum of the number of response messages corresponding to the target service messages that the first network device did not receive and the number of response messages corresponding to the target service messages indicating an anomaly of the first server that it received is greater than the fifth threshold. Wherein, the fifth threshold = 1 - the third threshold.
[0153] Alternatively, the first network device can also determine whether the first server is abnormal by counting the number of response packets corresponding to unreceived target service packets and the number of response packets corresponding to received target service packets indicating that the first server is abnormal. These two methods are equivalent.
[0154] Based on the above scheme, the first network device can also mark the target service packets in the service traffic while forwarding service traffic to the first server. Furthermore, the first network device can determine whether the first server is operating normally based on the number of received target service packets or the number of correctly responded packets corresponding to the target service packets. Therefore, the first network device can promptly forward service traffic to the third network device in case of a first server malfunction, avoiding service interruption. In this application, the first server can be a VAS, and the first network device can be a SIG front-end device. The above scheme can be used to enable the SIG front-end device to detect the operating status of the VAS.
[0155] Optionally, the first network device can also add a timestamp to the payload of the target service message. The first network device can determine the round-trip delay of the first server based on the timestamp in the target service message sent and the timestamp in the target service message forwarded back by the first server.
[0156] Optionally, during the process of the first network device forwarding service traffic to the first server, the first network device may periodically execute steps S703-S704 or S705-S706 so that the traffic can be transferred away in time after the first server fails, so as to avoid service interruption.
[0157] This application also provides a communication device for implementing the various methods described above. This communication device may also be a first network device in the above method embodiments, or a component usable in a first network device. It is understood that, in order to implement the above functions, the communication device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0158] This application embodiment can divide the communication device into functional modules according to the above method embodiment. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0159] Figure 11 A schematic diagram of the structure of a communication device provided in this application is shown, with reference to... Figure 11 The communication device 110 may include a transceiver module 1101 and a processing module 1102. This communication device 110 can be used to implement the functions performed by the first network device described above. Specifically, the transceiver module 1101 can be used to support the device in performing the sending and receiving actions in the above method embodiments, and the processing module 1102 can be used to support the device in performing the processing actions in the above method embodiments. All relevant content of each step involved in the above method embodiments can be referenced to the functional description of the corresponding functional module, and will not be repeated here.
[0160] It should be understood that the module division in the embodiments of this application is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods. For example, two or more functions may be integrated into one processing module. In addition, the integrated modules described above can be implemented in hardware or as software functional modules, and this application does not impose any restrictions on this.
[0161] In this embodiment, the communication device 110 is presented in an integrated manner, divided into various functional modules. Here, "module" can refer to a specific ASIC, circuitry, a processor and memory executing one or more software or firmware programs, integrated logic circuitry, and / or other devices that can provide the aforementioned functions. In a simplified embodiment, those skilled in the art will recognize that the communication device 110 can employ... Figure 12 The communication device 120 shown is in the form of [example device].
[0162] Figure 12 This is a schematic diagram of the structure of another communication device provided in the embodiments of this application, as shown below. Figure 12 As shown, the communication device 120 includes one or more processors 1201, a communication line 1202, and at least one communication interface. Figure 12(This is merely an example illustration using a communication interface 1203 and a processor 1201.) Optionally, a memory 1204 may also be included. The processor 1201 may be a CPU, a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of programs according to this application. The communication line 1202 may include a path for communication between different components. The communication interface 1203 may be a transceiver module for communicating with other devices or communication networks, such as Ethernet, RAN, wireless local area networks (WLAN), etc. For example, the transceiver module may be a transceiver or similar device. Optionally, the communication interface 1203 may also be a transceiver circuit located within the processor 1201, used to implement signal input and signal output of the processor. The memory 1204 may be a device with storage function. For example, it can be read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions; random access memory (RAM) or other types of dynamic storage devices capable of storing information and instructions; electrically erasable programmable read-only memory (EEPROM); compact disc read-only memory (CD-ROM) or other optical disc storage; optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.); magnetic disk storage media or other magnetic storage devices; or any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but not limited to these. The memory can exist independently and be connected to the processor via communication line 1202. The memory can also be integrated with the processor. The memory 1204 is used to store computer execution instructions for executing the scheme of this application and is controlled by the processor 1201 for execution. The processor 1201 is used to execute computer execution instructions stored in the memory 1204, thereby implementing the message forwarding method provided in the embodiments of this application. Alternatively, in the embodiments of this application, the processor 1201 executes processing-related functions in the message forwarding method provided in the following embodiments of this application, and the communication interface 1203 is responsible for communicating with other devices or communication networks; this embodiment of the application does not specifically limit this. The computer execution instructions in the embodiments of this application can also be referred to as application code; this embodiment of the application does not specifically limit this. As one embodiment, the processor 1201 may include one or more CPUs, for example... Figure 12 CPU0 and CPU1 in the CPU.
[0163] As one embodiment, the communication device 120 may include multiple processors, such as Figure 12 The processors 1201 and 1207 are described herein. Each of these processors may be a single-core processor or a multi-core processor. The processors herein may include, but are not limited to, at least one of the following: a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a microcontroller unit (MCU), or an artificial intelligence processor, and other computing devices that run software. Each computing device may include one or more cores for executing software instructions to perform calculations or processing.
[0164] As one embodiment, the communication device 120 may further include an output device 1205 and an input device 1206. The output device 1205 communicates with the processor 1201 and can display information in various ways. For example, the output device 1205 may be a liquid crystal display (LCD), a light-emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector, etc. The input device 1206 communicates with the processor 1201 and can receive user input in various ways. For example, the input device 1206 may be a mouse, keyboard, touchscreen device, or sensing device, etc.
[0165] Figure 12 The processor 1201 in the communication device 120 shown can execute the message forwarding method in the above method embodiment by calling computer execution instructions stored in the memory 1204. Since the communication device 120 provided in this embodiment can execute the above message forwarding method, the technical effects it can obtain can be referred to the above method embodiment, and will not be repeated here.
[0166] This application also provides a chip or chip system, which may include processing circuitry and interface circuitry, and can be used to execute the message forwarding method in the above embodiments.
[0167] In the various embodiments of this application, the sequence numbers of the above processes do not imply 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 this application. Those skilled in the art will recognize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented using electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. 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 illustrative. For instance, the division of units is only a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units, i.e., they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs. Additionally, the functional units in the various embodiments of this application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. In the above embodiments, implementation can be entirely or partially achieved through software, hardware, firmware, or any combination thereof. When implemented using software programs, implementation can be entirely or partially in the form of a computer program product. This computer program product includes one or more computer instructions. When computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may 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. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more media that can be integrated. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital versatile disc (DVD)), or a semiconductor medium (e.g., solid state disk (SSD)).
[0168] As used herein, the terms “component,” “module,” “system,” etc., are intended to refer to a computer-related entity, which may be hardware, firmware, a combination of hardware and software, software, or running software. For example, a component may be, but is not limited to, a process running on a processor, a processor, an object, an executable file, a running thread, a program, and / or a computer. As an example, an application running on a computing device and the computing device itself can both be components. One or more components may reside in a running process and / or thread, and components may be located in a single computer and / or distributed among two or more computers. Furthermore, these components are capable of execution from various computer-readable media having various data structures thereon. These components may communicate locally and / or remotely via signals, such as based on one or more data packets (e.g., data from a component that interacts with a local system, another component in a distributed system, and / or signals that interact with other systems via a network such as the Internet). This application presents various aspects, embodiments, or features of a system that may include multiple devices, components, modules, etc. It should be understood and acknowledged that each system may include additional devices, components, modules, etc., and / or may not include all the devices, components, modules, etc. discussed in conjunction with the accompanying drawings. Furthermore, combinations of these approaches are also possible.
[0169] Additionally, in the embodiments of this application, the term "exemplary" is used to indicate that something is used as an example, illustration, or description. Any embodiment or design described as "exemplary" in this application should not be construed as being better or more advantageous than other embodiments or designs. Specifically, the use of the term "exemplary" is intended to present the concept in a concrete manner. In the embodiments of this application, information, signal, message, and channel may sometimes be used interchangeably, and it should be noted that their intended meanings are consistent when their distinctions are not emphasized. "Of," "corresponding, relevant," and "corresponding" may sometimes be used interchangeably, and it should be noted that their intended meanings are consistent when their distinctions are not emphasized. "System" and "network" may sometimes be used interchangeably, and their intended meanings are consistent when their distinctions are not emphasized; for example, "communication network" also refers to "communication system." The network architecture and business scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0170] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A packet forwarding method, characterized by, The method is applied to a first network device, the first network device is located between a second network device and a third network device, and the first network device is also connected with a first server; the method comprises the following steps: In the case that the first network device forwards the received service traffic from the second network device to the third network device, the first network device sends a plurality of first test packets to the first server; If the number of the first test packets received by the first network device and forwarded by the first server is greater than a first threshold, or the number of first response packets sent by the first server and received by the first network device is greater than the first threshold, the first network device forwards the subsequently received service traffic from the second network device to the first server; wherein the first response packet is a response packet corresponding to the first test packet, and a response code in the first response packet indicates that the first server is normal.
2. The method of claim 1, wherein, The source media access control (MAC) address and the destination MAC address in the Ethernet frame header of the first test packet are the MAC addresses local to the first network device, or are the MAC addresses agreed upon by the first network device and the first server.
3. The method according to claim 1 or 2, characterized in that, The first test packet further comprises an Internet Protocol (IP) header, and the IP header is used for enabling the first server to process the first test packet.
4. The method according to any one of claims 1 to 3, characterized in that, The first server is configured to forward the service traffic to the first network device after processing the service traffic. Alternatively, the first server is configured to send the reply service traffic corresponding to the service traffic to the first network device after processing the service traffic.
5. The method according to any one of claims 1 to 4, characterized in that, In the case that the first network device forwards the received service traffic from the second network device to the first server, the method further comprises the following steps: The first network device sends a plurality of second test packets to the first server, wherein the second test packets are generated by the first network device; If the number of the second test packets received by the first network device and forwarded by the first server is less than a second threshold, or the number of second response packets sent by the first server and received by the first network device is less than the second threshold, the first network device forwards the subsequently received service traffic from the second network device to the third network device; wherein the second response packet is a response packet corresponding to the second test packet, and a response code in the second response packet indicates that the first server is normal.
6. The method according to any one of claims 1 to 4, characterized in that, In the case that the first network device forwards the received service traffic from the second network device to the first server, the method further comprises the following steps: The first network device marks a plurality of target service packets in the service traffic; If the first network device receives a number of the target service packets forwarded by the first server less than a third threshold value, or receives a number of third response packets sent by the first server less than a third threshold value, the first network device forwards the service traffic subsequently received from the second network device to the third network device; wherein the third response packet is a response packet corresponding to the target service packet, and a response code in the third response packet indicates that the first server is normal.
7. The method according to any one of claims 1 to 6, characterized in that, The first server is a value-added operation server VAS.
8. A communication device, characterized by The communication device comprises a processor and a memory; The memory is configured to store program instructions, which, when executed by the processor, cause the communication device to perform the method of any one of claims 1-7.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores instructions, which, when executed on a computer, cause the computer to perform the method of any one of claims 1-7.
10. A computer program product, characterised in that, The computer program product comprises computer instructions, which, when executed on a processor, cause the processor to perform the method of any one of claims 1-7.