Traffic data processing method and device
By detecting the faulty module in the distributed network equipment and transferring its traffic data to the same functional module on the backup equipment for processing, the problem of unstable traffic transmission of the entire machine caused by the failure of a single module of the main equipment is solved, and a more stable traffic switching is achieved. .
Patent Information
- Application Number
- CN202410813529.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-10-08
AI Technical Summary
The failure of a single module of the main device of a distributed network device causes unstable traffic transmission of the entire machine. Existing technologies cannot effectively solve this problem.
By detecting the type of the faulty module, the traffic data to which it belongs is transferred to the normal module with the same function on the backup device for processing, avoiding the need for complete machine switching and ensuring stable transmission of traffic data.
It realizes that the stability of traffic transmission of the entire machine is not affected when the main equipment module fails, improves the stability of traffic switching of the faulty module, and reduces the impact of HA switching on the network.
Smart Images

Figure CN118748656A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a flow data processing method and device. Background Art
[0002] Distributed network equipment consists of multiple boards. In order to further enhance stability during service deployment, HA (High Availability) is usually adopted, that is, two devices are deployed, one of which is the primary device used to process current traffic and services, and the other is the backup device. When the primary device fails, the backup device immediately takes over the primary device to ensure uninterrupted services.
[0003] In the common implementation of HA for distributed devices, when any module in the main device fails, the HA master and standby will be swapped. However, during the HA switching process, the device will transfer the service traffic to the standby device by closing and opening interfaces and sending ARP (Address Resolution Protocol) messages, which will inevitably affect the overall network. Packet loss and delay may occur in the brief moment of the whole machine switching. This is because it is difficult for high-availability hot standby devices to achieve completely imperceptible switching. After the master-slave switching, if there are omissions in data synchronization, users may also need to rebuild the session and re-authenticate.
[0004] In summary, in the prior art, the failure of a single module of the main device of the distributed network device causes the entire device to switch, which easily leads to the problem of unstable traffic transmission of the entire device. Currently, no effective solution has been proposed to this problem. Summary of the invention
[0005] The present application provides a flow data processing method and device to at least solve the technical problem in the prior art that the failure of a single module of a main device of a distributed network device causes the switching of the entire machine, which easily leads to poor stability in the flow transmission of the entire machine.
[0006] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a flow data processing method is provided, which is applied to a distributed network device, wherein the distributed network device includes a main device and a backup device. The method includes: in the case where it is detected that any module on the main device is a faulty module, determining the module category to which the faulty module belongs; according to the module category to which the faulty module belongs, transferring the flow data to be passed through the faulty module to a normal module on the backup device that has the same function as the faulty module.
[0007] Optionally, the module category to which the fault module belongs is a first-category module or a second-category module, wherein the first-category module is used for traffic interaction between the main device and the upstream device and / or downstream device of the distributed network device, and the second-category module is a module in the main device that is different from the first-category module.
[0008] Optionally, according to the module category to which the faulty module belongs, the traffic data to be passed through the faulty module is transferred to a normal module on the backup device that has the same function as the faulty module, including: when the faulty module belongs to a first-category module, controlling the faulty module to execute a preset operation of an interface, wherein the preset operation is used to clear a first MAC table in an upstream device and / or a downstream device, wherein the upstream device and the downstream device are devices that perform traffic interaction with the distributed network device, and the first MAC table is used to establish a traffic transmission channel between the upstream device and / or the downstream device and the main device; controlling the backup device to send a target message to the upstream device and / or the downstream device, wherein the target message is used to create a second MAC table in the upstream device and / or the downstream device, wherein the second MAC table is used to establish a traffic transmission channel between the upstream device and / or the downstream device and the backup device; after the second MAC table is successfully created, according to the module flow order of the traffic data, transferring the traffic data to be passed through the faulty module to a normal first-category module on the backup device.
[0009] Optionally, after the flow data to be passed through the failed first-category module is transferred to the normal first-category module on the standby device, the flow data processing method further includes: detecting whether the normal first-category module on the standby device has the M functions required to process the flow data; if the normal first-category module on the standby device has the M functions required to process the flow data, processing the flow data through the normal first-category module, and forwarding the processed flow data to the output interface module, wherein the output interface module is a module on the main device or the standby device for outputting flow data to downstream devices; if the normal first-category module on the standby device does not have the M functions required to process the flow data, forwarding the flow data to a target module, and collaboratively processing the flow data through the target module and the normal first-category module on the standby device, wherein the target module is used to provide functions that the normal first-category module does not have when processing the flow data, and the target module is located on the main device or the standby device; forwarding the processed flow data to the output interface module.
[0010] Optionally, according to the module category to which the faulty module belongs, the traffic data to be passed through the faulty module is transferred to a normal module on the backup device that has the same function as the faulty module, including: when the faulty module belongs to a first-category module, obtaining the traffic peak value of the faulty module within a historical time period; when the traffic peak value is greater than the bandwidth upper limit of the communication link between the main device and the backup device, expanding the bandwidth upper limit of the communication link to be greater than or equal to the traffic peak value; when the traffic peak value is less than or equal to the bandwidth upper limit of the communication link, transferring the traffic data to be passed through the faulty module to a normal first-category module on the backup device.
[0011] Optionally, in the case that the fault module belongs to the first type of module, the traffic peak value of the fault module within the historical time period is obtained, including: obtaining the traffic rate of each interface in the fault module at K moments in the historical time period, wherein K is an integer greater than 1, and the fault module includes S interfaces, and S is an integer greater than 1; summing the traffic rates of the S interfaces at the same moment to obtain K traffic rate thresholds corresponding to the S interfaces at the K moments, wherein each traffic rate threshold is the sum of the traffic rates of the S interfaces at one of the K moments; and taking the maximum value of the K traffic rate thresholds as the traffic peak value.
[0012] Optionally, the traffic data processing method also includes: when the faulty module belongs to a first type of module and any interface in the faulty module belongs to a member interface in the aggregation port, the modules where each member interface in the aggregation port is located are grouped into a module group to be switched, wherein the module group to be switched completes the traffic switching as a whole when traffic switching is performed; and the traffic data that needs to be processed by the module group to be switched is transferred to a normal module group on the backup device that has the same function as the module group to be switched.
[0013] Optionally, according to the module category to which the faulty module belongs, the traffic data to be passed through the faulty module is transferred to a normal module on the backup device that has the same function as the faulty module, including: when the faulty module belongs to the second category of modules, obtaining the proportion of traffic data carried in N modules of the main device before the faulty module fails, wherein N is an integer greater than 1, and the N modules are modules with the same function as the faulty module; calculating the product of the traffic data proportion and the traffic peak of the main device in a preset time period to obtain the traffic threshold of the faulty module; when the traffic threshold is greater than the bandwidth upper limit of the communication link between the main device and the backup device, expanding the bandwidth upper limit of the communication link to be greater than or equal to the traffic threshold; when the traffic threshold is less than or equal to the bandwidth upper limit of the communication link, transferring the traffic data to be passed through the faulty module to a normal module on the backup device that has the same function as the faulty module.
[0014] Optionally, in the case that the faulty module belongs to the second category of modules, the proportion of traffic data carried by the N modules of the main device before the faulty module fails is obtained, including: obtaining the total traffic data carried by the N modules in the preset time period; calculating the ratio of the traffic data carried by the faulty module in the preset time period before the faulty module fails to the total traffic data, to obtain the traffic data proportion.
[0015] According to another aspect of the present application, a flow data processing device is also provided, including: a determination unit, used to determine the module category to which any module on the main device belongs when it is detected that the faulty module is a faulty module; a flow processing unit, used to transfer the flow data to be passed through the faulty module to a normal module on the backup device having the same function as the faulty module according to the module category to which the faulty module belongs.
[0016] In the present application, when it is detected that the module through which the flow data is to flow on the main device is a faulty module, the flow data to be processed by the faulty module is transferred to a normal module on the backup device with the same function as the faulty module for processing.
[0017] From the above content, it can be seen that in the present application, when there is a faulty module on the main device, there is no need to perform master-slave switching of the entire machine, but only perform traffic switching on the master-slave devices for the faulty module, thereby solving the technical problem in the prior art that the whole machine switching is caused by the failure of a single module of the main device of the distributed network device, which easily leads to poor stability of the whole machine traffic transmission, thereby achieving the technical effect of improving the stability of traffic switching for the faulty module. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0019] Figure 1 is a flow chart of an optional flow data processing method according to an embodiment of the present application;
[0020] Figure 2 is a schematic diagram of the structure of an optional distributed network device according to an embodiment of the present application;
[0021] Figure 3 This is a schematic diagram of an optional process for determining the type of a fault module according to an embodiment of the present application;
[0022] Figure 4 is a schematic diagram of an optional flow trend before switching according to an embodiment of the present application;
[0023] Figure 5 is a schematic diagram of an optional flow processing process for a first type of module that has a fault according to an embodiment of the present application;
[0024] Figure 6 is a schematic diagram of another optional flow processing process for a first type module having a fault according to an embodiment of the present application;
[0025] Figure 7 is a schematic diagram of an optional aggregation port traffic forwarding according to an embodiment of the present application;
[0026] Figure 8 It is a schematic diagram of an optional flow processing process for a second type of module that has a fault according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] It should also be noted that the information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) collected by this application are information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with the relevant laws, regulations and standards of the relevant regions, necessary confidentiality measures are taken, and public order and good customs are not violated, and corresponding operation portals are provided for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.
[0030] In addition, in this application, when collecting and analyzing customer information, the corresponding operation entrance is provided for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered.
[0031] For the convenience of description, some nouns or terms involved in the embodiments of the present application are explained below:
[0032] SSM board: refers to the service board.
[0033] SIOM board: refers to a control IO board that has the functions of both SSM board and IOM board.
[0034] SCM board: It is a module or a module of similar nature that is responsible for system control functions of distributed equipment.
[0035] IOM board: a module with a network interface for input and output functions or a module of similar nature. IO board and SIOM refer to control IO boards that have the functions of both SSM board and IOM board.
[0036] Other boards: Except for SCM boards and IOM boards, other boards have CPU, memory and other components to complete specific functions. Such boards are not used for global system control and have no interfaces for traffic input and output.
[0037] HA Link: It is the HA communication link, that is, the connection between the primary and backup devices, used for synchronizing HA data, negotiating HA status, etc.
[0038] According to an embodiment of the present application, an embodiment of a traffic data processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0039] It should be noted that a distributed network system can be used as the execution subject of the traffic data processing method of the embodiment of the present application, wherein the distributed network system can be a system that combines software and hardware.
[0040] Figure 1 is a flow chart of an optional flow data processing method according to an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:
[0041] Step S101, when any module on the main device is detected as a faulty module, determining the module category to which the faulty module belongs;
[0042] Step S102: according to the module category to which the faulty module belongs, the flow data to be passed through the faulty module is transferred to a normal module on a standby device that has the same function as the faulty module.
[0043] Optionally, during the processing of traffic data, the distributed network system can control the normal module on the backup device with the same function as the faulty module to carry out the traffic processing work of the faulty module on the main device, and keep the normal modules on the main device except the faulty module to process the traffic data.
[0044] Optionally, the modules include but are not limited to SCM board, IOM board, SSM board, and SSM board.
[0045] Optionally, the fault type of the fault module includes but is not limited to software fault and hardware fault, such as program crash, network interface shutdown, CPU memory abnormality, etc.
[0046] Optionally, when a module on the main device fails, the distributed network system detects the failed module on the main device and forwards the traffic data that needs to be processed by the failed module to a normal module on the backup device with the same function as the failed module through the HA Link for processing.
[0047] Optionally, the main device includes multiple modules. When the distributed network system detects a faulty module, the faulty module is shut down, and the remaining modules in the main device continue to process traffic data without being affected.
[0048] Optionally, modules in the main device except the faulty module and normal modules on the backup device that have the same functions as the faulty module process the traffic data in stages. For example, one module encrypts the traffic data, one module filters the traffic data, one module is used to transmit the traffic data to an external device, and so on.
[0049] It can be seen from the contents of the above steps S101 and S102 that in the present application, when it is detected that the module through which the flow data is to flow on the main device is a faulty module, the flow data that needs to be processed by the faulty module will be transferred to a normal module on the backup device that has the same function as the faulty module for processing.
[0050] From the above content, it can be seen that in the present application, when there is a faulty module on the main device, there is no need to perform master-slave switching of the entire machine, but only perform traffic switching on the master-slave devices for the faulty module, thereby solving the technical problem in the prior art that the whole machine switching is caused by the failure of a single module of the main device of the distributed network device, which easily leads to poor stability of the whole machine traffic transmission, thereby achieving the technical effect of improving the stability of traffic switching for the faulty module.
[0051] In an optional embodiment, the module category to which the fault module belongs is a first-category module or a second-category module, wherein the first-category module is used for traffic interaction between the main device and the upstream device and / or downstream device of the distributed network device, and the second-category module is a module in the main device that is different from the first-category module.
[0052] Optionally, the first type of modules are IOM boards, and the second type of modules are other boards.
[0053] Optionally, other boards refer to boards other than SCM boards and IOM boards that have CPU, memory and other components for completing specific functions. Such boards are not used for global system control and have no interfaces for traffic input and output, that is, the second type of module is a module in the main device that is different from the first type of module and the control module (SCM board).
[0054] It should be noted that the traffic data method in the embodiment of the present application is mainly applied to distributed network devices, wherein the distributed network device is a multi-module device designed to overcome hardware bottlenecks. The CPU and bandwidth of traditional network devices have certain bottlenecks and often cannot meet the actual needs of large-traffic services. The distributed network device combines hardware modules to improve performance exponentially.
[0055] Some common distributed network devices usually contain multiple business modules for processing network traffic. By distributing the network traffic load to multiple business modules, the traffic processing capacity is improved. In the face of large-traffic business scenarios, multi-module distributed network devices have strong performance advantages. In addition, distributed network devices can usually also contain other modules with specific functions, such as system control modules specifically used to configure and control the device, and IO modules with traffic input and output functions. The above are only some of the commonly used modules for distributed network devices.
[0056] For example, a distributed network device structure such as Figure 2 As shown, in the embodiment of the present application, the modules of various functions of the distributed network device are referred to by abbreviations, wherein each module can also be referred to as a board, such as Figure 2 As shown, SSM card refers to the service card (including Figure 2 SSM card 1, SSM card 2, SSM card 3), SCM refers to the main control card (also called system control card, including Figure 2 The main SCM board, standby SCM board), IOM refers to the IO board, and SIOM refers to the control IO board that has the functions of both the SSM board and the IOM board. In particular, some distributed network devices use two or more SCMs to work together, one of which is the main control board of the main device. When the SCM board on the main device fails, the main control board on the standby device takes over its work.
[0057] The above-mentioned board names or abbreviations are only used to clearly describe the application scenarios of the embodiments. For the convenience of explanation, the modules responsible for the system control function or modules of similar nature in the distributed network device are uniformly described as the main control board, referred to as the SCM board, and the modules with network interfaces and capable of inputting and outputting flow data or modules of similar nature are uniformly described as input and output boards, i.e., IOM boards. IOM boards can have other functions at the same time, such as IOM boards with business flow processing functions are often referred to as SIOM boards in actual application scenarios, but in the embodiments of the present application, because they also have the function of inputting and outputting flow data, SIOM boards are also referred to as IOM boards. In addition to the SCM board and the IOM board, there are original parts such as CPU, memory, etc. on other boards for completing specific functions. Such boards are not used for system global control, and there is no interface for the input and output of flow, so in the embodiments of the present application, they are uniformly referred to as other boards.
[0058] Optionally, after the distributed network system detects a faulty module on the master device, Figure 3 As shown, first of all, it is necessary to determine the type of the faulty module. When the faulty module type is an SCM board, this application solution is not applicable, and conventional master-slave switching of the entire machine must be adopted. When the faulty module type is an IOM board (i.e., a first-class module), the roles of the master and standby devices in HA are not exchanged at this time, and only some modules and interfaces of the standby device bear the flow data processed by the first-class modules that need to fail on the main device. When the faulty module type is other boards (i.e., a second-class module), the roles of the master and standby devices in HA are not exchanged at this time, and only some modules of the standby device bear the flow data processed by the second-class modules that need to fail on the main device. After the processing is completed, it is transmitted back to the main device and then to the downstream device. Maintain the current working mode until the faulty module on the main device returns to normal.
[0059] From the above content, it can be seen that when a module on the main device fails, the type of the failed module is first determined, and different methods are adopted for switching according to different types of failed modules, thereby avoiding the switching of the entire machine and reducing the impact range of HA switching.
[0060] In an optional embodiment, when the fault module belongs to the first type of module, the fault module is controlled to execute a preset operation of the interface, wherein the preset operation is used to clear a first MAC table in an upstream device and / or a downstream device, wherein the upstream device and the downstream device are devices for performing traffic interaction with the distributed network device, and the first MAC table is used to establish a traffic transmission channel between the upstream device and / or the downstream device and the main device; the backup device is controlled to send a target message to the upstream device and / or the downstream device, wherein the target message is used to create a second MAC table in the upstream device and / or the downstream device, wherein the second MAC table is used to establish a traffic transmission channel between the upstream device and / or the downstream device and the backup device; after the second MAC table is successfully created, the traffic data to be passed through the fault module is transferred to a normal first type module on the backup device.
[0061] Optionally, after the second MAC table is successfully created, the distributed network system may transfer the traffic data to be passed through the faulty module to the normal first-category module on the standby device according to the module flow order of the traffic data.
[0062] Optionally, after a certain IOM board of the main device fails, the distributed network system transfers the traffic of the failed IOM board to the backup device for processing, and the services of the non-faulty boards will not be affected in any way.
[0063] Optionally, when transferring the traffic of a faulty IOM board to a backup device for processing, the distributed network system first controls the faulty IOM board of the main device to close all interfaces and then open them again to clear the first MAC table entry of the upstream device and / or downstream device, and then controls the IOM board corresponding to the backup device to take over its work. The backup device sends a free ARP message to the upstream device and / or downstream device to update the second MAC table entry of the upstream device and / or downstream device, that is, to inform the upstream device and / or downstream device that the interface currently connected to it is the IOM board interface of the backup device, and the IOM board of the backup device takes over the IOM board of the main device to process the traffic data.
[0064] Optionally, the switching mode can be set after the faulty function board of the main device returns to normal, and the traffic of the IOM board corresponding to the standby device can be automatically / manually switched back to the original IOM board of the main device. The switching process includes: the IOM board of the standby device closes all interfaces and then opens them again to clear the second MAC table entries of the upstream device and / or the downstream device, and the IOM board of the main device takes over its work and sends a free ARP message to the upstream device and / or the downstream device to update the first MAC table entries of the upstream device and / or the downstream device, that is, to inform the upstream device and / or the downstream device that the interface currently connected to it is the IOM board interface of the main device.
[0065] For example, Figure 4 As shown, Figure 4 The bold line in the figure indicates the actual flow data direction of the IOM board. When the IOM board in the main device is in normal working condition, the flow data flows from the upstream device into the main device through network cable 1, flows out of the main device from network cable 2 to the downstream device. When the IOM board in the main device is faulty, the flow data flows from the upstream device into the main device through network cable 3, flows out of the main device from network cable 4 to the downstream device.
[0066] It should be noted that the outgoing interface of the traffic data entering the device from network cable 1 before the failure is not necessarily located on the failed IOM board, so network cable 2 is not necessarily the outgoing line of the traffic. The outgoing interface of the traffic data entering the backup device from network cable 3 after the failure is not necessarily located on the same IOM board, so network cable 4 is not necessarily the outgoing line of the traffic data.
[0067] From the above content, it can be seen that when the faulty module is a first-class module that fails, the traffic transmission channel between the upstream and downstream devices and the main device can be cleared by controlling the first-class module that fails to execute the opening and closing operations of the interface, and the traffic transmission channel between the upstream and downstream devices and the backup device can be established by controlling the backup device to send the target message to the upstream and downstream devices, so as to realize the processing of the traffic data between the upstream and downstream devices and the faulty module of the distributed network device through the normal first-class module on the backup device.
[0068] In an optional embodiment, after the flow data to be passed through the failed first-class module is transferred to the normal first-class module on the standby device, the distributed network system can detect whether the normal first-class module on the standby device has M functions required to process the flow data, wherein M is an integer greater than or equal to 1; if the normal first-class module on the standby device has the M functions required to process the flow data, the flow data is processed by the normal first-class module, and the processed flow data is forwarded to the output interface module, wherein the output interface module is a module on the main device or the standby device for outputting flow data to downstream devices; if the normal first-class module on the standby device does not have the M functions required to process the flow data, the flow data is forwarded to the target module, and the flow data is collaboratively processed by the target module and the normal first-class module on the standby device, wherein the target module is used to provide functions that the normal first-class module does not have when processing the flow data, and the target module is located on the main device or the standby device; the processed flow data is forwarded to the output interface module.
[0069] Optionally, Figure 5 is a flow chart of an optional IOM board processing traffic according to an embodiment of the present application, such as Figure 5 As shown, when a normal IOM board on the standby device starts to process traffic data, the distributed network system first detects whether the IOM board has all the functions for processing traffic data (corresponding to the M functions mentioned above), for example, traffic data needs to be encrypted and / or decrypted, but not all IOM boards have data encryption and / or data decryption functions. If the IOM board has all the functions for processing traffic data, the IOM board is directly used to process traffic data; if the IOM board does not have all the functions for processing traffic data, the traffic data needs to be forwarded to the target board (i.e., the target module) on the main device or the standby device to process the traffic data with the IOM board system, wherein the target board needs to be a board that can be used normally and the target board gives priority to the normal board on the main device (in other words, unless the corresponding target board on the main device is faulty, the corresponding board on the standby device will be selected.
[0070] For example, if the traffic data needs to be encrypted, decrypted and filtered, but the normal first-class module on the backup device only has an encryption function, then after using the normal first-class module on the backup device to encrypt the traffic data, the encrypted traffic data can be forwarded to a target board with decryption and filtering functions on the main device, and the target board will complete the decryption and filtering of the traffic data.
[0071] In addition, if Figure 5 As shown, the processed traffic data will be forwarded to the output interface IOM card (ie, the output receiving module), wherein the output interface IOM card is a card on the main device or the backup device for outputting traffic data to the downstream device.
[0072] In an optional embodiment, in the process of forwarding the processed traffic data to the output interface IOM board, a fast forwarding function can be set, including: a session and other information can be created on the IOM board where the input interface is located, and the session information can also be called an IOM session. The next time there is a traffic matching session, the output interface module and the specific output interface of the traffic data are directly determined based on the IOM session.
[0073] It should be noted that the target card will give priority to the normal card on the main device. When the corresponding target card on the main device is faulty, the corresponding target card on the backup device will be selected. For example, if the IOM card A of the main device fails and the corresponding card B of the backup device is enabled, when the traffic enters from card B, if card B does not have all the functions of processing and forwarding traffic data, a card on the main device will still be used as the target card, for example Figure 6 As shown, in Figure 6 In the figure, the bold line indicates that due to the failure of IOM board A, IOM board B of the standby device enters the working state, and the traffic data enters the main device from network cable 3. IOM board B transmits the traffic data to the target board for processing based on the HA link. After the target board completes the processing of the traffic data, it is sent to the IOM board corresponding to the output interface, that is, Figure 6 IOM board C in.
[0074] From the above content, it can be seen that before forwarding the traffic data to the backup device, it is necessary to detect whether the normal first-class module on the backup device has all the functions of processing the traffic data. Depending on whether the detection result has all the functions of processing the traffic data, different forwarding processes are implemented, thereby achieving the technical effect of ensuring the normal processing of the traffic data.
[0075] In an optional embodiment, when the faulty module belongs to a first-category module, the traffic peak value of the faulty module within a historical time period is obtained; when the traffic peak value is greater than the bandwidth upper limit of the communication link between the primary device and the backup device, the bandwidth upper limit of the communication link is expanded to be greater than or equal to the traffic peak value; when the traffic peak value is less than or equal to the bandwidth upper limit of the communication link, the traffic data to be passed through the faulty module is transferred to a normal first-category module on the backup device.
[0076] It can be understood that the above historical time period is a time period with a preset duration before the fault module fails and does not end at the time of the fault occurrence.
[0077] From the above content, it can be seen that when the faulty module belongs to the first type of module, it is necessary to determine whether the traffic peak of the faulty module in the preset time period exceeds the bandwidth upper limit of the HA connection. If it exceeds the bandwidth upper limit of the HA communication link, it is necessary to increase the bandwidth of the HA communication link or use whole machine switching. When the traffic peak of the faulty module in the preset time period does not exceed the bandwidth upper limit of the HA connection, the traffic data that needs to be processed by the faulty module is transferred to the normal module on the backup device with the same function as the faulty module for processing, thereby realizing normal processing of the traffic data.
[0078] It should be noted that, when the traffic peak is greater than the bandwidth upper limit of the communication link between the primary device and the backup device, if the distributed network system expands the bandwidth upper limit of the communication link to be greater than or equal to the traffic peak, the communication link can continue to be used to transfer the traffic data that needs to be processed by the failed first-class module to the normal first-class module on the backup device.
[0079] In an optional embodiment, when the fault module belongs to the first type of module, in the process of obtaining the traffic peak value of the fault module in a historical time period, the distributed network system can obtain the traffic rate of each interface in the fault module at K moments in the historical time period, wherein K is an integer greater than 1, and the fault module includes S interfaces, and S is an integer greater than 1; summing up the traffic rates of the S interfaces at the same moment to obtain K traffic rate thresholds corresponding to the S interfaces at the K moments, wherein each traffic rate threshold is the sum of the traffic rates of the S interfaces at one of the K moments; and taking the maximum value of the K traffic rate thresholds as the traffic peak value.
[0080] Specifically, assuming that the traffic peak value of the faulty IOM board in the preset time period is recorded as R, the traffic peak value R can be calculated by the following formula (1):
[0081]
[0082] In formula (1), R i It indicates the actual service flow rate of a certain interface i on the faulty IOM board at a certain moment. S is the number of interfaces being used by the faulty IOM board. Max is used to obtain the maximum value over a period of time. It represents the sum of the traffic rates of the S interfaces at the i-th moment among the K moments. The historical time period can be customized by technical personnel in this field according to the actual scenario, wherein the historical time period includes K moments. The longer the historical time period, the more conservative the calculation result is, which is suitable for networks with strong traffic bursts. The shorter the historical time period, the more real-time the calculation result is, which is suitable for networks with relatively stable traffic.
[0083] From the above content, we can know that we can optimize the bandwidth of the HA communication connection by calculating the sum of the actual traffic rates of each interface of the first type of module that has failed, and selecting the maximum value in the past period of time to determine whether the value exceeds the bandwidth upper limit of the HA communication connection. If the bandwidth upper limit of the HA communication link is exceeded, it is necessary to increase the bandwidth of the HA communication link or use the whole machine switch.
[0084] In an optional embodiment, when the faulty module belongs to the first type of module and any interface in the faulty module belongs to a member interface in the aggregation port, the modules where each member interface in the aggregation port is located are grouped into a module group to be switched, wherein the module group to be switched completes traffic switching as a whole when traffic switching is performed; and the traffic data that needs to be processed by the module group to be switched is transferred to a normal module group on the backup device that has the same function as the module group to be switched.
[0085] For example, when the master device has an aggregation port based on protocols such as LACP (Link Aggregation Control Protocol), if the aggregation port spans across IOM boards, the IOM boards involved in the aggregation port need to be considered as a whole, called an IOM board group (IOM GROUP). A board group is considered an indivisible unit and can only be transferred as a whole during switching. Figure 7 As shown in the diagram, each of the boards A and C has an interface combined as an aggregation port based on the LACP protocol, so boards A and C form a SIOM GROUP, and on the corresponding standby device, boards B and D are also a SIOM GROUP. When one of the boards A and C fails, they can only be switched as a whole, and boards B and D need to enter the working state at the same time to replace boards A and C.
[0086] From the above content, it can be seen that when the faulty module is the first type of module that fails, and when any interface in the faulty module belongs to a member interface in the aggregation port, they need to be switched as a whole, and all the traffic that needs to be processed by the faulty module of the main device and each interface in the aggregation port to which it belongs must be transferred to the normal module on the backup device that has the same function as the faulty module and each interface group in the aggregation port to which the normal module belongs for processing, thereby achieving the technical effect that the traffic can be processed normally.
[0087] In an optional embodiment, when the faulty module belongs to the second category module, the proportion of traffic data carried in N modules of the main device before the faulty module fails is obtained, wherein N is an integer greater than 1, and the N modules are modules having the same function as the faulty module; the product of the traffic data proportion and the traffic peak value of the main device in a preset time period is calculated to obtain the traffic threshold of the faulty module; when the traffic threshold is greater than the bandwidth upper limit of the communication link between the main device and the backup device, the bandwidth upper limit of the communication link is expanded to be greater than or equal to the traffic threshold; when the traffic threshold is less than or equal to the bandwidth upper limit of the communication link, the traffic data to be passed through the faulty module is transferred to a normal module on the backup device having the same function as the faulty module.
[0088] Specifically, when the faulty module belongs to the second type of module, it is necessary to calculate the proportion of traffic data carried by the faulty module in the N modules of the master device (which can be represented by p), and it is necessary to calculate the product of the traffic data proportion and the traffic peak value of the master device in the preset time period, so as to obtain the traffic threshold of the faulty module. The traffic threshold R of the faulty module can be calculated by formula (2):
[0089]
[0090] In formula (2), T i Indicates the actual traffic rate of a certain interface i of the whole machine, N is the number of interfaces currently in use on the whole machine, and max is used to obtain the maximum value within the preset time period. It represents the sum of the actual traffic rates of all interfaces of the whole machine. The preset time period can be customized by technicians in this field according to the actual scenario. The longer the preset time period, the more conservative the calculation result, which is suitable for networks with strong traffic bursts. The shorter the preset time period, the more real-time the calculation result, which is suitable for networks with relatively stable traffic.
[0091] Optional, such as Figure 8 As shown in the figure, the bold arrow indicates the forwarding path. When the faulty module belongs to the second type of module, the same type of boards and cards jointly carry the service traffic. When a board and card (non-IOM board and card) fails, the overall performance or resources of this type of board and card may be insufficient. Therefore, it is necessary to transfer part of the traffic to the backup device for processing based on the HA connection to avoid insufficient performance or resources of the main device. Therefore, the actual carrying traffic that was originally required to be allocated to the faulty module for processing needs to be transmitted to the backup device through the HA communication link, and processed by the backup module corresponding to the faulty module. After processing, it is transmitted back to the main device through the HA communication link and forwarded to the downstream device through the main device network interface.
[0092] From the above content, it can be known that it is possible to determine whether the above estimated value R exceeds the bandwidth upper limit of the HA connection. If the estimated value exceeds the bandwidth upper limit of the HA communication link, it is necessary to increase the bandwidth of the HA communication link or use the whole machine switch. In order to ensure that this method can be implemented after any other board fails, it is necessary to ensure that the bandwidth upper limit of the HA communication link is higher than the R value of any other board.
[0093] In an optional embodiment, when the faulty module belongs to the second category of modules, in order to obtain the proportion of traffic data carried in the N modules of the main device before the faulty module fails, the total traffic data carried by the N modules in the preset time period can be obtained; the ratio of the traffic data carried by the faulty module in the preset time period before the faulty module fails to the total traffic data is calculated to obtain the traffic data proportion.
[0094] Optionally, when there are multiple modules, such as boards for routine traffic processing and boards for QOS control, these boards usually share the traffic processing work. Multiple boards of the same type share the same traffic processing work. By calculating the traffic proportion of the faulty module, the traffic carried by the faulty module can be accurately known.
[0095] Specifically, the actual traffic proportion carried by the faulty module is as shown in the calculation formula (3), where p is the proportion, w is the traffic data carried by the faulty module in the preset time period, N is the total number of boards of the same type, and wi is the traffic data carried by any one of the N modules in the preset time period.
[0096]
[0097] For example, five SSM boards share the routine processing of traffic. The traffic distribution weight of the SSM board in the load distribution algorithm determines the proportion of traffic actually carried by the current faulty module. If the weights of the five SSM boards are the same, the proportion of traffic actually carried by the faulty module is 1 / 5.
[0098] From the above content, it can be seen that in the present application, when there is a faulty module on the main device, there is no need to perform master-slave switching of the entire machine, but only perform traffic switching on the master-slave devices for the faulty module, thereby solving the technical problem in the prior art that the whole machine switching is caused by the failure of a single module of the main device of the distributed network device, which easily leads to poor stability of the whole machine traffic transmission, thereby achieving the technical effect of improving the stability of traffic switching for the faulty module.
[0099] According to an embodiment of the present application, an embodiment of a flow data processing device is also provided. The flow data processing device includes: a flow processing unit and a flow control unit.
[0100] Optionally, the determination unit is used to determine the module category to which the faulty module belongs when it is detected that any module on the main device is a faulty module; the traffic processing unit is used to transfer the traffic data to be passed through the faulty module to a normal module on the backup device that has the same function as the faulty module according to the module category to which the faulty module belongs.
[0101] Optionally, the module category to which the fault module belongs is a first-category module or a second-category module, wherein the first-category module is used for traffic interaction between the main device and the upstream device and / or downstream device of the distributed network device, and the second-category module is a module in the main device that is different from the first-category module.
[0102] Optionally, the traffic processing unit includes: a first control subunit, a second control subunit and a first processing subunit. The first control subunit is used to control the fault module to execute the preset operation of the interface when the fault module belongs to the first type of module, wherein the preset operation is used to clear the first MAC table in the upstream device and / or the downstream device, the upstream device and the downstream device are devices that interact with the distributed network device, and the first MAC table is used to establish a traffic transmission channel between the upstream device and / or the downstream device and the main device; the second control subunit is used to control the backup device to send a target message to the upstream device and / or the downstream device, wherein the target message is used to create a second MAC table in the upstream device and / or the downstream device, wherein the second MAC table is used to establish a traffic transmission channel between the upstream device and / or the downstream device and the backup device; the first processing subunit is used to transfer the traffic data to be passed through the fault module to the normal first type of module on the backup device after the second MAC table is successfully created.
[0103] Optionally, the first processing subunit includes: a first detection subunit, a second processing subunit, a first forwarding subunit and a second forwarding subunit. Among them, the first detection subunit is used to detect whether the normal first-class module on the backup device has the M functions required to process the traffic data, wherein M is an integer greater than or equal to 1; the second processing subunit is used to process the traffic data through the normal first-class module when the normal first-class module on the backup device has the M functions required to process the traffic data, and forward the processed traffic data to the output interface module, wherein the output interface module is a module on the main device or the backup device for outputting traffic data to the downstream device; the first forwarding subunit is used to forward the traffic data to the target module when the normal first-class module on the backup device does not have the M functions required to process the traffic data, and the traffic data is collaboratively processed by the target module and the normal first-class module on the backup device, wherein the target module is used to provide the function that the normal first-class module does not have when processing the traffic data, and the target module is located on the main device or the backup device, and the second forwarding subunit is used to forward the processed traffic data to the output interface module.
[0104] Optionally, the traffic processing unit includes: a first acquisition subunit, a third processing subunit and a fourth processing subunit. The first acquisition subunit is used to obtain the traffic peak value of the faulty module in the historical time period when the faulty module belongs to the first type of module; the third processing subunit is used to expand the bandwidth upper limit of the communication link between the main device and the backup device to be greater than or equal to the traffic peak value when the traffic peak value is greater than the bandwidth upper limit of the communication link between the main device and the backup device; the fourth processing subunit is used to transfer the traffic data to be passed through the faulty module to the normal first type of module on the backup device when the traffic peak value is less than or equal to the bandwidth upper limit of the communication link.
[0105] Optionally, the first acquisition sub-unit includes: a first acquisition sub-module, a first calculation sub-module and a first confirmation sub-module. The first acquisition sub-module is used to obtain the flow rate of each interface in the fault module at K moments in the historical time period, wherein K is an integer greater than 1, and the fault module includes S interfaces, and S is an integer greater than 1; the first calculation sub-module is used to sum the flow rates of the S interfaces at the same moment to obtain K flow rate thresholds corresponding to the S interfaces at the K moments, wherein each flow rate threshold is the sum of the flow rates of the S interfaces at one of the K moments; the first confirmation sub-module is used to take the maximum value of the K flow rate thresholds as the flow peak value.
[0106] Optionally, the flow data processing device further includes: a first switching unit and a first processing unit. The first switching unit is used to group the modules where each member interface in the aggregation port is located into a module group to be switched when the faulty module belongs to the first type of module and any one interface in the faulty module belongs to a member interface in the aggregation port, wherein the module group to be switched completes the flow switching as a whole when the flow switching is performed; the first processing unit is used to transfer the flow data that needs to be processed by the module group to be switched to a normal module group on the backup device that has the same function as the module group to be switched.
[0107] Optionally, the traffic processing unit includes: a second acquisition subunit, a second calculation subunit, a fifth processing subunit and a sixth processing subunit. The second acquisition subunit is used to obtain the proportion of traffic data carried by the N modules of the main device before the fault module fails, when the fault module belongs to the second type of module, wherein N is an integer greater than 1, and the N modules are modules with the same function as the fault module; the second calculation subunit is used to calculate the product of the traffic data proportion and the traffic peak value of the main device in a preset time period to obtain the traffic threshold of the fault module; the fifth processing subunit is used to expand the bandwidth upper limit of the communication link between the main device and the backup device to be greater than or equal to the traffic threshold when the traffic threshold is greater than the bandwidth upper limit of the communication link between the main device and the backup device; the sixth processing subunit is used to transfer the traffic data to be passed through the fault module to a normal module on the backup device with the same function as the fault module when the traffic threshold is less than or equal to the bandwidth upper limit of the communication link.
[0108] Optionally, the second acquisition subunit includes: a second acquisition submodule and a second calculation submodule. The second acquisition submodule is used to obtain the total flow data carried by the N modules in the preset time period; the second calculation submodule is used to calculate the ratio of the flow data carried by the faulty module in the preset time period before the fault occurs to the total flow data, so as to obtain the flow data ratio.
[0109] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0110] The above-mentioned embodiments or examples disclosed in the present application are not exhaustive, but are only illustrative of some embodiments or examples, and are not intended to be specific limitations on the scope of protection disclosed in the present application. In the absence of contradiction, each step in a certain embodiment or example in the present application can be implemented as an independent example, and the steps can be combined arbitrarily. For example, the scheme after removing some steps in a certain embodiment or example can also be implemented as an independent example, and the order of the steps in a certain embodiment or example can be arbitrarily exchanged. In addition, the optional methods or optional examples in a certain embodiment or example can be combined arbitrarily; in addition, the various embodiments or examples can be combined arbitrarily, for example, some or all steps of different embodiments or examples can be combined arbitrarily, and a certain embodiment or example can be combined arbitrarily with the optional methods or optional examples of other embodiments or examples.
[0111] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0112] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0113] In addition, each functional unit in each embodiment of the present 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0114] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0115] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A flow data processing method, characterized in that: The flow data processing method is applied to a distributed network device, wherein the distributed network device includes a main device and a backup device, including: In the case where it is detected that any module on the main device is a faulty module, determining the module category to which the faulty module belongs; According to the module category to which the faulty module belongs, the flow data to be passed through the faulty module is transferred to a normal module on the standby device that has the same function as the faulty module.
2. The flow data processing method according to claim 1, characterized in that: The module category to which the fault module belongs is a first-category module or a second-category module, wherein the first-category module is used for traffic interaction between the main device and the upstream device and / or downstream device of the distributed network device, and the second-category module is a module in the main device that is different from the first-category module.
3. The flow data processing method according to claim 1, characterized in that: According to the module category to which the faulty module belongs, transferring the flow data to be passed through the faulty module to a normal module on the standby device having the same function as the faulty module comprises: In the case where the fault module belongs to the first type of module, controlling the fault module to execute a preset operation of the interface, wherein the preset operation is used to clear a first MAC table in an upstream device and / or a downstream device, the upstream device and the downstream device are devices that perform traffic interaction with the distributed network device, and the first MAC table is used to establish a traffic transmission channel between the upstream device and / or the downstream device and the master device; Controlling the standby device to send a target message to the upstream device and / or the downstream device, wherein the target message is used to create a second MAC table in the upstream device and / or the downstream device, wherein the second MAC table is used to establish a traffic transmission channel between the upstream device and / or the downstream device and the standby device; After the second MAC table is successfully created, the traffic data to be passed through the faulty module is transferred to the normal first-category module on the standby device.
4. The flow data processing method according to claim 3, characterized in that: After transferring the flow data to be passed through the faulty module to the normal first-category module on the standby device, the flow data processing method further includes: Detecting whether the normal first-category module on the standby device has M functions required to process the traffic data, where M is an integer greater than or equal to 1; In the case where the normal first-category module on the standby device has M functions required to process the traffic data, the traffic data is processed by the normal first-category module, and the processed traffic data is forwarded to the output interface module, wherein the output interface module is a module on the main device or the standby device for outputting traffic data to a downstream device; In the case where the normal first-category module on the standby device does not have the M functions required to process the traffic data, forwarding the traffic data to a target module, and collaboratively processing the traffic data through the target module and the normal first-category module on the standby device, wherein the target module is used to provide the functions that the normal first-category module does not have when processing the traffic data, and the target module is located in the main device or the standby device; The processed traffic data is forwarded to the outbound interface module.
5. The flow data processing method according to claim 1, characterized in that: According to the module category to which the faulty module belongs, transferring the flow data to be passed through the faulty module to a normal module on the standby device having the same function as the faulty module comprises: When the faulty module belongs to the first type of module, obtaining a traffic peak value of the faulty module in a historical time period; In the case where the traffic peak value is greater than the bandwidth upper limit of the communication link between the primary device and the backup device, expanding the bandwidth upper limit of the communication link to be greater than or equal to the traffic peak value; When the traffic peak value is less than or equal to the bandwidth upper limit of the communication link, the traffic data to be passed through the faulty module is transferred to the normal first-category module on the standby device.
6. The flow data processing method according to claim 5, characterized in that: In the case that the faulty module belongs to the first type of module, obtaining the traffic peak value of the faulty module in a historical time period includes: Obtaining the traffic rate of each interface in the fault module at K moments in the historical time period, where K is an integer greater than 1, the fault module includes S interfaces, and S is an integer greater than 1; Sum the flow rates of the S interfaces at the same time to obtain K flow rate thresholds corresponding to the S interfaces at the K time points, wherein each flow rate threshold is the sum of the flow rates of the S interfaces at one of the K time points; The maximum value among the K traffic rate thresholds is taken as the traffic peak value.
7. The flow data processing method according to any one of claims 1 to 6, characterized in that: The flow data processing method further includes: In the case where the faulty module belongs to the first type of module and any one interface in the faulty module belongs to a member interface in the aggregation port, the modules where each member interface in the aggregation port is located are grouped into a module group to be switched, wherein the module group to be switched completes the traffic switching as a whole when performing traffic switching; The flow data that needs to be processed by the module group to be switched is transferred to a normal module group on the standby device that has the same function as the module group to be switched.
8. The flow data processing method according to claim 1, characterized in that: According to the module category to which the faulty module belongs, transferring the flow data to be passed through the faulty module to a normal module on the standby device having the same function as the faulty module comprises: In the case where the faulty module belongs to the second type of module, obtaining a proportion of traffic data carried in N modules of the master device before the faulty module fails, wherein N is an integer greater than 1, and the N modules are modules having the same function as the faulty module; Calculate the product of the flow data ratio and the flow peak value of the master device in a preset time period to obtain the flow threshold of the fault module; When the traffic threshold is greater than the bandwidth upper limit of the communication link between the primary device and the backup device, the bandwidth upper limit of the communication link is expanded to be greater than or equal to the traffic threshold; When the traffic threshold is less than or equal to the bandwidth upper limit of the communication link, the traffic data to be passed through the faulty module is transferred to a normal module on the standby device that has the same function as the faulty module.
9. The flow data processing method according to claim 8, characterized in that: In the case where the faulty module belongs to the second type of module, obtaining the proportion of traffic data carried by the N modules of the master device before the faulty module fails includes: Obtaining total traffic data carried by the N modules in the preset time period; The ratio of the flow data carried by the fault module in the preset time period before the fault occurs to the total flow data is calculated to obtain the flow data proportion.
10. A flow data processing device, characterized in that: include: A determination unit, configured to determine the module category to which any module on the main device belongs when it is detected that the module is a faulty module; The flow processing unit is used to transfer the flow data to be passed through the faulty module to a normal module on a backup device having the same function as the faulty module according to the module category to which the faulty module belongs.
