A method and apparatus for processing message data
By setting control switch configuration information for the preset message processing model of network equipment and controlling it to turn on or off, the performance bottleneck caused by insufficient network equipment resources is solved, communication stability is improved, and flexible topological changes are available.
Patent Information
- Application Number
- CN202211729847.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2042-12-30
AI Technical Summary
In the prior art, network equipment has performance bottlenecks due to insufficient cache resources, which affects communication stability, especially when the BUM message traffic is large in VXLAN tunnels.
By setting control switch configuration information for the preset message processing model, controlling it to turn on or off, and enabling the preset message processing model only when needed, to reduce the pressure on the computing resources and storage resources of the network device.
It effectively solves the performance bottleneck caused by insufficient resources in network equipment, improves communication stability, and has the flexibility to adjust the switch state in time as network topology changes.
Smart Images

Figure CN115865700B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network communication technologies, and in particular, to a method and apparatus for processing packet data. Background Art
[0002] Currently, Virtual Extensible Local Area Network (VXLAN) is a network virtualization technology belonging to Network Virtualization Over Layer 3 (NVO3), and has broad application prospects.
[0003] In the prior art, although VXLAN tunnels can be established between different VXLAN Tunnel End Points (VTEPs), the VXLAN tunnels in the logical layer 2 network with the same VXLAN Network Identifier (VNI) may form loops, and Broadcast, Unknown Unicast, Multicast (BUM) packets will generate network storms in the layer 2 loop, thus causing network congestion and affecting communication. In "A Packet Processing Method, Apparatus, Storage Medium and Electronic Device" (Publication No.: CN113364662A), a method for suppressing the layer 2 loop of BUM packets in VXLAN tunnels characterized by calculating, recording, and checking the BUM packet exchange traces is provided. However, this method may face performance bottlenecks due to insufficient computing resources and cache resources when the BUM packet traffic in the network is very large, and the communication stability is poor. Summary of the Invention
[0004] The purpose of the embodiments of this application is to provide a method, apparatus, electronic device and computer-readable storage medium for processing packet data, which can solve the performance bottleneck brought by insufficient cache resources of network devices, and achieve the technical effect of improving communication stability.
[0005] In a first aspect, the embodiments of this application provide a method for processing packet data, including:
[0006] Determine that the network device is in the automatic mode;
[0007] Obtain the control switch configuration information of the network device, where the control switch configuration information is used to control the opening or closing of a preset packet processing model, and the preset packet processing model is used to suppress the VXLAN tunnel loop in the network;
[0008] Judge whether it is in the on state according to the control switch configuration information;
[0009] If the control switch configuration information is in the enabled state, the network device processes the received BUM packets based on the preset packet processing model;
[0010] Statistically count the number of packets of the packet loss based on the preset packet processing model to obtain packet discard data;
[0011] Judge whether a preset condition is satisfied according to the packet discard data. If so, trigger the control switch configuration information to switch from the enabled state to the disabled state; if not, the control switch configuration information continues to remain in the enabled state;
[0012] If the control switch configuration information is in the disabled state, the network device does not execute the preset packet processing model and does not exclude the VXLAN tunnel interface when receiving flooded BUM packets.
[0013] In the above implementation process, the packet data processing method sets control switch configuration information for the preset packet processing model, controls the enabling or disabling of the preset packet processing model through the control switch configuration information, and the preset packet processing model is used to suppress the VXLAN tunnel loop in the network; thus, when the control switch configuration information is in the enabled state, the received BUM packets are processed accordingly based on the preset packet processing model, and the number of packets of the packet loss is statistically counted, and the state of the control switch configuration information is adjusted according to the packet discard data; when the control switch configuration information is in the disabled state, the preset packet processing model is not executed and the VXLAN tunnel interface is not excluded when receiving flooded BUM packets; thus, the packet data processing method effectively reduces the pressure on the computing resources and storage resources of the network device by adding a control switch to the preset packet processing model, solves the performance bottleneck caused by insufficient computing resources and cache resources of the network device, and realizes the technical effect of improving communication stability.
[0014] Further, before the step of obtaining the control switch configuration information of the network device, the method further includes:
[0015] Obtain the VXLAN topology configuration information of the network device;
[0016] Detect whether the VXLAN topology configuration information has changed. If so, switch the control switch configuration information to the enabled state;
[0017] If not, the control switch configuration information remains in the original state.
[0018] In the above implementation process, when it is detected that the VXLAN topology of a network device has changed according to the VXLAN topology configuration information, the control switch configuration information is triggered to be in the on state. If it is checked that the control switch configuration information is already in the on state, it remains in the on state; otherwise, the control switch configuration information remains in its original state. Thus, the method for processing the packet data has the flexibility to adjust the switch state in a timely manner as the network topology changes.
[0019] Further, after the step of counting the number of packets discarded based on the preset packet processing model to obtain packet discard data, the method further includes:
[0020] Generating network event alarm information according to the packet discard data and sending the network event alarm information to a network management terminal.
[0021] In the above implementation process, when packet loss occurs, a network event alarm is sent to the administrator of the network management terminal by sending network event alarm information, reminding the administrator that there is a VXLAN tunnel loop.
[0022] Further, before the step of determining that the network device is in the automatic mode, the method further includes:
[0023] Obtaining the mode information of the network device;
[0024] Determining whether the network device is in the automatic mode according to the mode information;
[0025] If not, it is determined that the network device is in the manual mode, and the control switch configuration information is manually configured in the manual mode; when the control switch configuration information is in the on state, the network device processes the received BUM packets based on the preset packet processing model;
[0026] If so, it is determined that the network device is in the automatic mode.
[0027] In the above implementation process, by supporting the manual mode, the administrator can manually configure the control switch configuration information in the manual mode, that is, manually turn on or off the preset packet processing model. Thus, when the network basic configuration changes to prevent the generation of loops, the administrator can manually turn on and off the preset packet processing model, improving flexibility.
[0028] Further, the step of determining whether the preset condition is satisfied according to the packet discard data includes:
[0029] Determining whether the number of discarded packets does not increase within a preset time threshold according to the packet discard data.
[0030] Further, the processing flow of the preset packet processing model is:
[0031] Obtain the BUM message;
[0032] Perform a hash calculation on the BUM message to obtain a target hash value;
[0033] Query the information table according to the target hash value and the target VXLAN identifier VNI corresponding to the BUM message to obtain a query result; wherein, the information table is used to prevent the formation of a loop for forwarding the BUM message;
[0034] Forward or discard the BUM message according to the query result.
[0035] In a second aspect, an embodiment of the present application provides a processing device for message data, including:
[0036] A determination module, configured to determine that the network device is in the automatic mode;
[0037] An acquisition module, configured to acquire the control switch configuration information of the network device, where the control switch configuration information is used to control the opening or closing of a preset message processing model, and the preset message processing model is used to suppress the VXLAN tunnel loop in the network;
[0038] A judgment module, configured to judge whether it is in the on state according to the control switch configuration information; if the control switch configuration information is in the on state, the network device performs corresponding processing on the received BUM message based on the preset message processing model; if the control switch configuration information is in the off state, the network device does not execute the preset message processing model and does not exclude the VXLAN tunnel interface when receiving the flooded BUM message;
[0039] A discard module, configured to, when the control switch configuration information is in the on state, count the number of packets discarded based on the preset message processing model to obtain packet discard data; judge whether the preset condition is satisfied according to the packet discard data, and if so, trigger the control switch configuration information to switch from the on state to the off state; if not, the control switch configuration information continues to remain in the on state.
[0040] Further, the processing device for message data further includes:
[0041] A topology detection module, configured to acquire the VXLAN topology configuration information of the network device; detect whether the VXLAN topology configuration information has changed, and if so, switch the control switch configuration information to the on state; if not, the control switch configuration information remains in the original state.
[0042] Further, the processing device for message data further includes:
[0043] An alarm module, configured to generate network event alarm information according to the packet discard data of the packet, and send the network event alarm information to a network management terminal.
[0044] Further, the determining module is specifically configured to: obtain mode information of a network device; determine whether the network device is in an automatic mode according to the mode information; if not, determine that the network device is in a manual mode, and manually configure the control switch configuration information in the manual mode; when the control switch configuration information is in an on state, the network device processes the received BUM packet based on the preset packet processing model; if so, determine that the network device is in an automatic mode.
[0045] Further, the discarding module is further configured to: determine whether the number of discarded packets does not increase within a preset time threshold according to the packet discard data.
[0046] In a third aspect, an electronic device provided in an embodiment of the present application includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, where when the processor executes the computer program, the steps of the method according to any one of the first aspects are implemented.
[0047] In a fourth aspect, a computer-readable storage medium provided in an embodiment of the present application has instructions stored thereon, and when the instructions are run on a computer, the computer is caused to execute the method according to any one of the first aspects.
[0048] In a fifth aspect, a computer program product provided in an embodiment of the present application, when run on a computer, causes the computer to execute the method according to any one of the first aspects.
[0049] Other features and advantages disclosed in the present application will be described in the subsequent description, or, some features and advantages can be inferred from the description or determined without doubt, or can be learned by implementing the above technologies disclosed in the present application.
[0050] To make the above objects, features, and advantages of the present application more obvious and understandable, the following specific preferred embodiments are given, and in conjunction with the accompanying drawings, the following detailed description is provided. Description of the Drawings
[0051] To more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required to be used in the embodiments of the present application. It should be understood that the following drawings only show some embodiments of the present application, and thus should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0052] Figure 1 It is a schematic flowchart of a method for processing message data provided by an embodiment of the present application;
[0053] Figure 2 It is a schematic flowchart of another method for processing message data provided by an embodiment of the present application;
[0054] Figure 3 It is a schematic flowchart of determining the mode of a network device provided by an embodiment of the present application;
[0055] Figure 4 It is a connection schematic diagram of a VXLAN network provided by an embodiment of the present application;
[0056] Figure 5 It is a structural block diagram of a message data processing device provided by an embodiment of the present application;
[0057] Figure 6 It is a structural block diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0058] Next, the technical solutions in the embodiments of the present application will be described with reference to the accompanying drawings in the embodiments of the present application.
[0059] It should be noted that: Similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of the present application, the terms "first", "second", etc. are only used for descriptive distinction and cannot be understood as indicating or implying relative importance.
[0060] The embodiments of the present application provide a method, apparatus, electronic device, and computer-readable storage medium for processing packet data, which can be applied to the processing of BUM packets in VXLAN; the method for processing packet data controls the opening or closing of a preset packet processing model by setting control switch configuration information for the preset packet processing model, and the preset packet processing model is used to suppress VXLAN tunnel loops in the network; thus, when the control switch configuration information is in the on state, the received BUM packets are processed accordingly based on the preset packet processing model, and the number of discarded packets is counted, and the state of the control switch configuration information is adjusted according to the packet discard data; when the control switch configuration information is in the off state, the preset packet processing model is not executed, and the VXLAN tunnel interface is not excluded when receiving flooded BUM packets; thus, the method for processing packet data adds a control switch to the preset packet processing model, enables the preset packet processing model when needed, can effectively reduce the pressure on the computing resources and storage resources of network devices brought by the preset packet processing model, solve the performance bottleneck caused by insufficient computing resources and cache resources of network devices, and achieve the technical effect of improving communication stability.
[0061] Please refer to Figure 1 , Figure 1 which is a schematic flow chart of a method for processing packet data provided by an embodiment of the present application. The method for processing packet data includes the following steps:
[0062] S100: Determine that the network device is in the automatic mode.
[0063] Exemplarily, the network device may be a VXLAN tunnel endpoint (VTEP); a preset packet processing model is configured in the network device. When the preset packet processing model is in the on state, the network device will process the received BUM packets accordingly based on the preset packet processing model, such as forwarding the BUM packets or discarding the BUM packets, etc.
[0064] In some embodiments, by determining the mode of the network device, the processing logic of the network device for BUM packets is controlled.
[0065] Exemplarily, in the automatic mode, the network device can automatically adjust the state of the control switch according to the change information of the VXLAN network topology; when it is found that the topology has changed, proceed to the next step S200.
[0066] S200: Obtain the control switch configuration information of the network device. The control switch configuration information is used to control the opening or closing of the preset packet processing model, and the preset packet processing model is used to suppress VXLAN tunnel loops in the network.
[0067] Exemplarily, by controlling the switch configuration information, a control switch is added to the preset message processing model of the network device, so that whether to enable the preset message processing model can be controlled according to the switch configuration information.
[0068] S300: Determine whether it is in the on state according to the switch configuration information;
[0069] S310: If the switch configuration information is in the on state, the network device processes the received BUM message based on the preset message processing model;
[0070] S320: Count the number of messages for the packet loss based on the preset message processing model to obtain message discard data;
[0071] S330: Determine whether the preset condition is met according to the message discard data;
[0072] S331: If so, trigger the switch configuration information to switch from the on state to the off state;
[0073] Exemplarily, when the message discard data meets the preset condition, as a representation that there is no VXLAN tunnel loop or the VXLAN tunnel loop has been released in the network device, the preset message processing model can be stopped;
[0074] S332: If not, the switch configuration information continues to remain in the on state;
[0075] S340: If the switch configuration information is in the off state, the network device does not execute the preset message processing model and does not exclude the VXLAN tunnel interface when receiving a flooded BUM message.
[0076] In some embodiments, the method for processing the message data sets switch configuration information for the preset message processing model, controls the opening or closing of the preset message processing model through the switch configuration information, and the preset message processing model is used to suppress the VXLAN tunnel loop in the network; thus, when the switch configuration information is in the on state, the received BUM message is processed accordingly based on the preset message processing model, and the number of messages for the packet loss is counted, and the state of the switch configuration information is adjusted according to the message discard data; when the switch configuration information is in the off state, the preset message processing model is not executed and the VXLAN tunnel interface is not excluded when receiving a flooded BUM message; thus, the method for processing the message data adds a control switch to the preset message processing model, enables the preset message processing model when needed, can effectively reduce the pressure on the computing resources and storage resources of the network device brought by the preset message processing model, solve the performance bottleneck brought by insufficient computing resources and cache resources of the network device, and achieve the technical effect of improving communication stability.
[0077] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of another method for processing packet data provided by an embodiment of the present application.
[0078] Exemplarily, before the step S100 of obtaining the control switch configuration information of the network device, the method further includes:
[0079] S101: Obtain the VXLAN topology configuration information of the network device;
[0080] S102: Detect whether the VXLAN topology configuration information has changed. If so, switch the control switch configuration information to the on state; if not, the control switch configuration information remains in its original state.
[0081] Exemplarily, when it is detected according to the VXLAN topology configuration information that the VXLAN topology of the network device has changed, the control switch configuration information is triggered to be in the on state. If it is checked that the control switch configuration information is already in the on state, it remains in the on state; otherwise, the control switch configuration information remains in its original state. Thus, the method for processing packet data has the flexibility to adjust the switch state in a timely manner with the change of the network topology.
[0082] In some embodiments, for the VXLAN topology configuration information, the detection object and trigger signal capable of identifying the change in the tunnel deployment in the VXLAN topology can be determined according to the specific implementation mode and characteristics of the VXLAN. Optionally, taking the static VXLAN configured manually as an example, the VXLAN Tunnel list can be selected as the detection object, or the information that the configuration command for adding a VXLAN tunnel returns successful distribution can be used as the signal for the change in the tunnel layout in the VXLAN network topology to trigger the check of the switch state of the control switch configuration information.
[0083] Exemplarily, after the step S320 of performing packet quantity statistics on the packet loss based on a preset packet processing model to obtain packet discard data, the method further includes:
[0084] S321: Generate network event alarm information according to the packet discard data and send the network event alarm information to the network management terminal.
[0085] Exemplarily, when packet loss occurs, a network event alarm is sent to the administrator of the network management terminal by sending network event alarm information to remind the administrator that there is a VXLAN tunnel loop.
[0086] Please refer to Figure 3 , Figure 3 which is a schematic flowchart of determining the mode of the network device provided by an embodiment of the present application.
[0087] Exemplarily, before the step S100: determining that the network device is in the automatic mode, the method further includes:
[0088] S110: obtaining the mode information of the network device;
[0089] S120: determining whether the network device is in the automatic mode according to the mode information;
[0090] S130: if not, determining that the network device is in the manual mode, and manually configuring the control switch configuration information in the manual mode; when the control switch configuration information is in the on state, the network device processes the received BUM packets based on a preset packet processing model;
[0091] S140: if so, determining that the network device is in the automatic mode.
[0092] Exemplarily, by supporting the manual mode, in the manual mode, the administrator can manually configure the control switch configuration information, that is, manually turn on or off the preset packet processing model; thus, when the network basic configuration changes to prevent the generation of loops, the administrator can manually turn on and off the preset packet processing model, improving flexibility.
[0093] Exemplarily, the step S330: judging whether a preset condition is satisfied according to the packet discard data includes:
[0094] Judging whether the number of discarded packets does not increase within a preset time threshold according to the packet discard data.
[0095] Exemplarily, the processing flow of the preset packet processing model is as follows:
[0096] Obtain BUM packets;
[0097] Perform hash calculation on the BUM packets to obtain a target hash value;
[0098] Query an information table according to the target hash value and the target VXLAN identifier VNI corresponding to the BUM packets to obtain a query result; wherein, the information table is used to prevent the formation of a loop for forwarding BUM packets;
[0099] Perform forwarding processing or discard processing on the BUM packets according to the query result.
[0100] In some implementation scenarios, the processing flow of the preset message processing model can be found in "A message processing method, device, storage medium and electronic device" (publication number: CN113364662A). The preset message processing model is a method for suppressing the second-layer loop of BUM messages in the VXLAN tunnel characterized by calculating, recording, and checking BUM message exchange traces; it should be noted that the embodiment of the present application does not limit the processing flow of the preset message processing model, and any relevant model for suppressing VXLAN tunnel loops in the network can be used as a preset message processing model.
[0101] In some implementation scenarios, the automatic mode and the manual mode in the message data processing method provided in the embodiment of the present application are described as follows:
[0102] 1) In automatic mode, the detection object and trigger signal that can identify changes in tunnel deployment in the VXLAN topology can be determined based on the specific implementation mode and characteristics of VXLAN. Taking the manually configured static VXLAN as an example, the VXLANTunnel list can be selected as the detection object, or the information returned by the configuration command of adding a VXLAN tunnel can be used as a signal that the tunnel layout in the VXLAN network topology has changed, triggering the check of the switch status of the control switch configuration information - if it is closed, switch to the open state, if it is open, keep it and do nothing;
[0103] When the network device operates according to the preset message processing model and discards the BUM message coming from the VXLAN tunnel loop, the corresponding packet loss count is performed in terms of function maintainability; when packet loss occurs, a network event alarm is issued to the administrator to remind that there is a VXLAN Layer 2 tunnel loop that needs to be eliminated;
[0104] When the duration of packet loss without growth reaches a preset time threshold T1, the trigger control switch configuration information is switched from the on state to the off state, and the network device stops running according to the preset message processing model. When VXLAN floods BUM messages, the VXLAN Tunnel interface is included by default. In this link, the packet loss statistics item does not grow for a preset time threshold, which is used as a representation that the VXLAN Tunnel loop in the network does not exist or has been resolved.
[0105] 2) The design of the manual mode can provide an option with human participation and strong mobility; in the manual mode, there is no need to trigger the detection object and trigger signal for switching the switch state of the control switch configuration information; when the switch state of the manually configured control switch configuration information is turned on, like in the automatic mode, the network device operates according to the preset packet processing model, but the change in the packet loss statistics item will not trigger the change in the switch state of the control switch configuration information as designed in the automatic mode; when the switch state of the manually configured control switch configuration information is turned off, like in the automatic mode, the network device stops operating according to the pre-
[0106] set packet processing model, and the VXLAN flooding BUM packets by default include the VXLAN Tunnel5 interface.
[0107] Please refer to Figure 4 , Figure 4 the connection schematic diagram of the VXLAN network provided by the embodiments of this application;
[0108] wherein, vm refers to a virtual machine (Virtual Machine).
[0109] Exemplarily, VTEP1, VTEP2, and VTEP3 are three interconnected network devices, and each network device operates according to the Figures 1 to 3 method embodiments shown; optionally, assume that the VTEPs in this example 0 are all static VXLANs, and the VXLAN network needs to be manually configured; Figure 4 The specific process steps of the VXLAN network shown are as follows:
[0110] 1. Configure VTEP1 and VTEP2 to establish Tunnel1 for VNI100;
[0111] VTEP1 is in the automatic mode; when VTEP1 receives the information that the Tunnel1 configuration command is successfully issued (the VXLAN topology configuration information changes), it triggers the check of the switch state of the control switch configuration information switch 5: if it is found to be in the off state, it is switched to the on state and starts operating according to the preset packet processing model; since there is no tunnel loop currently, the packet loss statistics item of VTEP1 is always zero;
[0112] VTEP2 is in the manual mode; because it is the first time to establish a VXLAN tunnel, the administrator surely knows that there is no tunnel loop in the current network, so the control switch configuration information is not turned on and remains in the off state; 02. Configure VTEP1 and VTEP3 to establish Tunnel2 for VNI100;
[0113] When VTEP1 receives the successful response message of sending the Tunnel2 configuration command, it triggers a check on the switch status of the control switch configuration information. If it is found to be in the open state, it keeps the open state and continues to operate according to the preset message processing model.
[0114] VTEP3 is in automatic mode, the same as VTEP1;
[0115] 53. Configure Tunnel 3 of VNI 100 between VTEP2 and VTEP3.
[0116] VTEP2 manual mode: Because the administrator is not sure whether there is a tunnel loop in the current network, the control switch configuration information is turned on from the closed state to the open state, and the system starts to run according to the preset message processing model.
[0117] VTEP3 automatic mode, as above, remains enabled and operates according to the preset message processing model.
[0118] In some embodiments, Figure 4 As shown, take the BUM message from vm1 as an example:
[0119] When the BUM message from vm1 reaches VTEP2 via VTEP1 and VTEP3, VTEP2 discards the BUM message that arrives later via VTEP3 according to the preset message processing model, makes packet loss statistics, and sends a notification to the administrator to inform the administrator of a network event alarm that a VXLAN tunnel loop has occurred.
[0120] Alternatively, when a BUM message from vm1 reaches VTEP3 via VTEP1 and then VTEP2, VTEP3 discards the BUM message that arrives later via VTEP2 according to the preset message processing model, makes packet loss statistics, and sends a notification to the administrator to inform them of a network event alarm that a VXLAN tunnel loop has occurred.
[0121] When the tunnel loop in the network is released, the packet loss statistics of VTEP1 and VTEP3 in automatic mode will no longer increase. When the non-increasing time reaches the predetermined time threshold T1, the control switch configuration information of VTEP1 and VTEP3 will be automatically adjusted to the closed state. VTEP2 in manual mode can be adjusted to the closed state by the administrator.
[0122] In summary, in the method for processing packet data provided by the embodiments of the present application, the preset packet processing model does not always operate. It is enabled when a Tunnel loop may occur due to a change in the VXLAN network topology, and continues to run when a loop appears. When there is no loop or the loop disappears, there are no operations such as calculation, storage, and inspection, which can effectively reduce the pressure on the system's computing resources and storage resources brought by the preset packet processing model, and has the flexibility to adjust the switch state in a timely manner according to changes in the network topology.
[0123] Optionally, in the method for processing packet data, the information on the change in the VXLAN network topology is not limited to the specific features mentioned in this solution, such as detecting a new tunnel in the VXLAN Tunnel list and receiving a successful return message for tunnel configuration distribution. In the description of the embodiments of the present application, these can be understood as examples. All possible static and dynamic configuration changes of VXLAN that may bring about changes in the VXLAN network topology, or changes in the underlying network topology on which they depend, can be refined and incorporated into the detection object and signal trigger entity according to specific implementation features, providing a basis for judging to dynamically turn on the switch.
[0124] Modifications and equivalent replacements made by those skilled in the art to some of the technical features thereof will not cause the essence of the corresponding technical solution to deviate from the scope of the claims of this technical solution application.
[0125] Please refer to Figure 5 , Figure 5 which is the structural block diagram of the packet data processing device provided by the embodiments of the present application. The packet data processing device includes:
[0126] A determination module 100, configured to determine that the network device is in the automatic mode;
[0127] An acquisition module 200, configured to acquire the control switch configuration information of the network device. The control switch configuration information is used to control the opening or closing of the preset packet processing model, and the preset packet processing model is used to suppress the VXLAN tunnel loop in the network;
[0128] A judgment module 300, configured to judge whether it is in the open state according to the control switch configuration information; if the control switch configuration information is in the open state, the network device processes the received BUM packets based on the preset packet processing model
[0129] If the control switch configuration information is in the closed state, the network device does not execute the preset packet processing model and does not exclude the VXLAN tunnel interface when receiving flooded BUM packets;
[0130] The discard module 400 is used to count the number of packets discarded for the packet loss based on the preset packet processing model when the switch configuration information is in the on state, and obtain the packet discard data; according to the packet discard
[0131] data, determine whether the preset condition is satisfied. If so, trigger the control switch configuration information to switch from the on state 0 to the off state; if not, control the switch configuration information to remain in the on state.
[0132] Exemplarily, the processing device for packet data further includes:
[0133] The topology detection module is used to obtain the VXLAN topology configuration information of the network device; detect whether the VXLAN topology configuration information has changed. If so, switch the control switch configuration information to the on state; if not, control the switch configuration information to remain in the original state.
[0134] 5 Exemplarily, the processing device for packet data further includes:
[0135] The alarm module is used to generate network event alarm information according to the packet discard data and send the network event alarm information to the network management terminal.
[0136] Exemplarily, the determination module 100 is specifically used to: obtain the mode information of the network device; determine whether the network device is in the automatic mode according to the mode information; if not, determine that the network device is in the manual mode, and manually configure the control switch configuration information in the manual mode; when the control switch configuration information is in the on state, the network device processes the received BUM packets based on the preset packet processing model; if so, determine that the network device is in the automatic mode.
[0137] Exemplarily, the discard module 400 is further used to: determine whether the number of discarded packets does not increase within the preset time threshold according to the packet discard data.
[0138] It should be noted that the processing device for packet data provided in the embodiments of the present application corresponds to Figures 1 to 4 the method embodiments described above. To avoid repetition, details are not described here.
[0139] The present application also provides an electronic device. Please refer to Figure 6 , Figure 6 which is a structural block diagram of an electronic device provided in an embodiment of the present application. The electronic device may include a processor 510, a communication interface 520, a memory 530, and at least one communication bus 540. Among them, the communication bus 540 is used to realize the direct connection communication between these components. Among them, the communication interface 520 of the electronic device in the embodiments of the present application is used to communicate with other node devices for signaling or data. The processor 510 may be an integrated circuit chip with signal processing capabilities.
[0140] The above-mentioned processor 510 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor 510 may also be any conventional processor, etc.
[0141] The memory 530 may be, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. The memory 530 stores computer-readable instructions. When the computer-readable instructions are executed by the processor 510, the electronic device can execute the above Figures 1 to 4 steps involved in the method embodiments.
[0142] Optionally, the electronic device may further include a storage controller and an input / output unit.
[0143] The memory 530, the storage controller, the processor 510, the peripheral interface, and the input / output unit are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses 540. The processor 510 is used to execute the executable modules stored in the memory 530, such as software function modules or computer programs included in the electronic device.
[0144] The input / output unit is used to provide the user with the creation of tasks and the creation of a start optional period or a preset execution time for the task to achieve the interaction between the user and the server. The input / output unit may be, but is not limited to, a mouse and a keyboard, etc.
[0145] It can be understood that Figure 6 the structure shown is only schematic, and the electronic device may further include more Figure 6more or fewer components shown therein, or having a configuration different from that Figure 6 shown therein. Figure 6 Each component shown therein may be implemented by hardware, software, or a combination thereof.
[0146] The embodiments of the present application also provide a storage medium, on which instructions are stored. When the instructions run on a computer, the computer program, when executed by a processor, implements the method described in the method embodiments. To avoid repetition, it will not be elaborated herein.
[0147] The present application also provides a computer program product, which, when running on a computer, causes the computer to execute the method described in the method embodiments.
[0148] In several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of the apparatus, method, and computer program product according to multiple embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order from that marked in the accompanying drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.
[0149] In addition, in each embodiment of the present application, the various functional modules may be integrated together to form an independent part, or each module may exist alone, or two or more modules may be integrated to form an independent part.
[0150] When the above-mentioned functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art or a part of this technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0151] The above are only the embodiments of this application and are not used to limit the protection scope of this application. For those skilled in the art, this application can have various changes and modifications. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of this application shall be included in the protection scope of this application. It should be noted that similar reference numerals and letters indicate similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0152] The above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in this application, and all should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
[0153] It should be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or device. Without further limitations, the element defined by the statement "including an..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.
Claims
1. A method for processing message data, characterized in that, Including: Determine that the network device is in the automatic mode; Obtain the control switch configuration information of the network device, where the control switch configuration information is used to control the enabling or disabling of a preset message processing model for suppressing VXLAN tunnel loops in the network; Determine whether the control switch configuration information is in the enabled state; If the control switch configuration information is in the enabled state, the network device performs corresponding processing on the received BUM messages based on the preset message processing model; Perform a message quantity statistics on the dropped packets generated based on the preset message processing model to obtain message discard data; Judge whether a preset condition is satisfied according to the message discard data. If so, trigger the control switch configuration information to switch from the enabled state to the disabled state; if not, the control switch configuration information remains in the enabled state; If the control switch configuration information is in the disabled state, the network device does not execute the preset message processing model and does not exclude the VXLAN tunnel interface when receiving flooded BUM messages.
2. The method for processing message data according to claim 1, wherein Before the step of obtaining the control switch configuration information of the network device, the method further includes: Obtain the VXLAN topology configuration information of the network device; Detect whether the VXLAN topology configuration information has changed. If so, switch the control switch configuration information to the enabled state; If not, the control switch configuration information remains in its original state.
3. The method for processing message data according to claim 1 or 2, characterized in that, After the step of performing a message quantity statistics on the dropped packets generated based on the preset message processing model to obtain message discard data, the method further includes: Generate network event alarm information according to the message discard data and send the network event alarm information to the network management terminal.
4. The method for processing message data according to claim 1, wherein Before the step of determining that the network device is in the automatic mode, the method further includes: Obtain the mode information of the network device; Determine whether the network device is in the automatic mode according to the mode information; If not, determine that the network device is in the manual mode, and manually configure the control switch configuration information in the manual mode; when the control switch configuration information is in the enabled state, the network device performs corresponding processing on the received BUM messages based on the preset message processing model; If so, determine that the network device is in the automatic mode.
5. The method for processing message data according to claim 1, wherein The step of judging whether a preset condition is satisfied according to the message discard data includes: Judge whether the number of discarded messages does not increase within a preset time threshold according to the message discard data.
6. The method for processing message data according to claim 1 or 5, characterized in that The processing flow of the preset message processing model is: Obtain BUM messages; Perform a hash calculation on the BUM messages to obtain a target hash value; Query an information table according to the target hash value and the target VXLAN identifier VNI corresponding to the BUM messages to obtain a query result; where the information table is used to prevent the formation of a loop for forwarding the BUM messages; Perform forwarding processing or discard processing on the BUM messages according to the query result.
7. A processing device for message data, characterized in that, Including: A determination module for determining that the network device is in the automatic mode; An acquisition module, configured to acquire control switch configuration information of a network device, where the control switch configuration information is used to control the enabling or disabling of a preset packet processing model, and the preset packet processing model is used to suppress VXLAN tunnel loops in the network; A judgment module, configured to judge whether the control switch configuration information is in an enabled state; If the control switch configuration information is in an enabled state, the network device performs corresponding processing on the received BUM packets based on the preset packet processing model; If the control switch configuration information is in a disabled state, the network device does not execute the preset packet processing model and does not exclude VXLAN tunnel interfaces when receiving flooded BUM packets; A discard module, configured to, when the control switch configuration information is in an enabled state, perform packet number statistics on the dropped packets generated based on the preset packet processing model to obtain packet discard data; Judge whether a preset condition is satisfied according to the packet discard data. If so, trigger the control switch configuration information to switch from the enabled state to the disabled state; if not, the control switch configuration information continues to remain in the enabled state.
8. The processing device for message data according to claim 7, wherein The processing device for the packet data further includes: A topology detection module, configured to acquire VXLAN topology configuration information of the network device; detect whether the VXLAN topology configuration information has changed. If so, switch the control switch configuration information to the enabled state; if not, the control switch configuration information remains in the original state.
9. An electronic device, characterized in that, including: A memory, a processor, and a computer program stored in the memory and executable on the processor, where when the processor executes the computer program, the steps of the packet data processing method according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium, characterized in that, Instructions are stored on the computer-readable storage medium, and when the instructions run on the computer, the computer is caused to execute the packet data processing method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Message processing method and device, storage medium and electronic equipment
CN113364662A
Message processing method and device
CN106161253A
Tenant service identification mapping method and system based on vCPE multi-tenant
CN111865658A