A flow monitoring method and system based on intelligent network card
Create virtual monitoring ports in the server environment through smart network cards to achieve lossless mirroring and management of network traffic, solve the problems of bandwidth occupation and network transformation in existing technologies, and provide efficient traffic monitoring and management solutions.
Patent Information
- Application Number
- CN202211574040.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-08
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2042-12-08
AI Technical Summary
Existing network traffic monitoring methods occupy actual physical bandwidth, affect user services, and require modification of the existing network, which increases the complexity of network planning and deployment.
Adopt a traffic monitoring method based on smart network cards. By configuring smart network cards in the server environment, create virtual monitoring ports, use mirroring technology to obtain traffic models, and monitor and manage traffic characteristics according to preset filtering rules to achieve lossless mirroring of traffic. and fine-grained control.
It realizes traffic monitoring and analysis without occupying actual physical bandwidth, avoids additional network transformation, and provides more fine-grained traffic management. The design principle is reliable and the structure is simple.
Smart Images

Figure CN115914003B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of network traffic monitoring, and in particular relates to a traffic monitoring method and system based on an intelligent network card. Background Art
[0002] Network traffic monitoring is widely used in network management, intrusion monitoring, protocol analysis, traffic engineering and other fields. It is also an important basis for summarizing network traffic characteristics and analyzing network behavior. Therefore, network traffic monitoring is gradually gaining attention in the industry. Network traffic monitoring is an important means of obtaining network performance parameters, the basis for network security assessment, intrusion monitoring and protection, the basic means for studying new network technologies, and a powerful supplement to network management. Therefore, network traffic monitoring is of great significance.
[0003] Network traffic monitoring requires the collection of network traffic first. Common methods are to use SPAN ports, splitter cables, or network splitter TAPs to collect data from routers, switches, firewalls, and servers. These methods will occupy the actual physical bandwidth of the link, resulting in reduced user bandwidth, which may affect the user's normal business. On the other hand, the existing network needs to be remodeled, additional links need to be added, splitter cables need to be used, and traffic analysis servers need to be used, which increases the complexity of network planning and deployment.
[0004] This is a shortcoming of the prior art. Therefore, in view of the above defects in the prior art, it is very necessary to provide a flow monitoring method and system based on a smart network card. Summary of the invention
[0005] In view of the defects of the above-mentioned existing network traffic monitoring method in the prior art that it occupies the actual physical tape library, affects user services, and requires the transformation of the existing network, increasing the complexity of the network, the present invention provides a traffic monitoring method and system based on a smart network card to solve the above-mentioned technical problems.
[0006] In a first aspect, the present invention provides a flow monitoring method based on a smart network card, comprising the following steps:
[0007] S 1. Configure the smart network card in the server environment and create a virtual monitoring port in the smart network card;
[0008] S 2. Use the virtual monitoring port to obtain the traffic model of the traffic to be monitored, and monitor the traffic characteristics according to the pre-set filtering rules;
[0009] S 3. According to the traffic feature monitoring results and the pre-set supervision method, the network actions of the abnormal traffic subjects are supervised and restricted;
[0010] S4. After the abnormality is resolved, the network action of the traffic subject is restored according to the preset recovery method;
[0011] S 5. Delete the idle virtual monitoring port.
[0012] Furthermore, the specific steps of step S1 are as follows:
[0013] S 11. Installing a smart network card in the server system, the smart network card having a plurality of virtual function ports and an external port;
[0014] S 12. Obtain the host to be monitored and its network card, the virtual machine to be monitored and its virtual network card in the server system;
[0015] S 13. Each network card and virtual network card selects a virtual function port of the smart network card for connection, and creates a forwarding link from each selected virtual function port to the external port;
[0016] S 14. Log in to the intelligent network card system of the host to be monitored or the physical host of the virtual machine to be monitored, and create a virtual monitoring port for each forwarding link.
[0017] Furthermore, the specific steps of step S2 are as follows:
[0018] S 21. Pre-set filtering rules;
[0019] S 22. Use the mirroring technology on the smart network card to mirror the traffic of the host to be monitored or the virtual machine to be monitored in the forwarding link to the corresponding virtual monitoring port;
[0020] S 23. Determine whether to add filtering rules;
[0021] If yes, go to step S24;
[0022] If not, go to step S25;
[0023] S 24. Obtain the type of filtering rule to be added, and add the filtering rule;
[0024] S 25. The virtual monitoring port obtains the traffic model of the traffic on the corresponding forwarding link, and uses the filtering rules to determine whether the corresponding traffic characteristics are abnormal.
[0025] Furthermore, the specific steps of step S24 are as follows:
[0026] S 241. Obtain the type of filtering rule to be added;
[0027] When the filtering rule to be added is filtering based on source IP and destination IP, proceed to step S242;
[0028] When the filtering rule to be added is to add a filtering rule according to the transmission protocol number and the protocol port number, the process goes to step S243;
[0029] When the filtering rule to be added is to add a filtering rule based on the protocol field, proceed to step S244;
[0030] When the filtering rule to be added is a custom specific rule, proceed to step S245;
[0031] S 242. The filtering rule is based on the host or virtual machine level, and the user traffic is monitored for abnormalities, and the process goes to step S 3;
[0032] S 243. The filtering rule is based on the service traffic type of the entire network, and the network is monitored for abnormal protocol traffic attacks, and the process goes to step S 3;
[0033] S 244. The filtering rules are based on the detailed fields of the protocol, monitoring the protocol interaction process to identify whether there are any anomalies;
[0034] S 245. The filtering rule is to monitor specific users or specific business traffic.
[0035] Furthermore, the specific steps of step S3 are as follows:
[0036] S 31. Determine whether there is any abnormality in the flow characteristic monitoring results;
[0037] If not, return to step S2;
[0038] If yes, go to step S32;
[0039] S 32. Determine the abnormality level;
[0040] When the abnormality level is a minor abnormality, go to step S33;
[0041] When the abnormality level is a medium abnormality, go to step S34;
[0042] When the abnormality level is a severe abnormality, go to step S35;
[0043] S 33. The smart network card sends a log to the log system to record the abnormal behavior log of the host or virtual machine, and then proceeds to step S4;
[0044] S 34. The smart network card sends a log to the log system, records the abnormal behavior log of the host or virtual machine, and issues an information alarm, and then goes to step S4;
[0045] S 35. The smart network card limits the flow rate of the forwarding link, restricts applications, or isolates users, and the process goes to step S4.
[0046] Furthermore, the specific steps of step S4 are as follows:
[0047] S41. Determine the preset recovery method;
[0048] When the preset recovery mode is the automatic mode, proceed to step S42;
[0049] When the preset recovery mode is manual mode, go to step S47;
[0050] S42. Determine whether a host or virtual machine with a severe abnormality level has an abnormality again within a set time period;
[0051] If yes, go to step S44;
[0052] If not, proceed to step S43;
[0053] S43. The smart network card removes the regulatory restrictions on the host or virtual machine and proceeds to step S 5;
[0054] S44. Determine whether the number of abnormalities that occur in the host or virtual machine within the set time period is greater than the set number;
[0055] If yes, go to step S45;
[0056] If not, proceed to step S46;
[0057] S45. Isolate the access users of the host or virtual machine and proceed to step S5;
[0058] S46. The smart network card maintains monitoring restrictions on the host or virtual machine, and proceeds to step S5;
[0059] S47. After receiving the user instruction, the smart network card releases the monitoring restriction on the host or virtual machine and proceeds to step S5.
[0060] Furthermore, the specific steps of step S5 are as follows:
[0061] S 51. Determine whether there is an idle virtual monitoring port in the smart network card;
[0062] If yes, go to step S52;
[0063] If not, return to step S2;
[0064] S52. Delete the idle virtual monitoring port and return to step S2.
[0065] In a second aspect, the present invention provides a flow monitoring system based on a smart network card, comprising:
[0066] A virtual machine monitoring port creation module, used to configure a smart network card in a server environment and create a virtual monitoring port in the smart network card;
[0067] The flow monitoring module is used to obtain the flow model of the flow to be monitored using the virtual monitoring port, and monitor the flow characteristics according to the pre-set filtering rules;
[0068] The monitoring and restriction module is used to monitor and restrict the network actions of abnormal traffic entities based on the traffic feature monitoring results and the pre-set supervision method;
[0069] The supervision release module is used to restore the network action of the traffic subject according to the preset recovery method after the abnormality is resolved;
[0070] The idle monitoring port deletion module is used to delete idle virtual monitoring ports.
[0071] Furthermore, the virtual machine monitoring port creation module includes:
[0072] An intelligent network card installation unit is used to install an intelligent network card in a server system, wherein the intelligent network card is provided with a plurality of virtual function ports and an external port;
[0073] The subject to be monitored and the network card acquisition unit are used to acquire the host to be monitored and its network card, the virtual machine to be monitored and its virtual network card in the server system;
[0074] A forwarding link creation unit, used to select a virtual function port of the intelligent network card for connection with each network card and virtual network card, and to create a forwarding link from each selected virtual function port to an external port;
[0075] A virtual monitoring port creation unit, used to log in to the intelligent network card system of the physical host of the host to be monitored or the virtual machine to be monitored, and create a virtual monitoring port for each forwarding link;
[0076] The traffic monitoring module includes:
[0077] A filtering rule presetting unit, used to pre-set filtering rules;
[0078] A traffic mirroring unit is used to use a mirroring technology on the smart network card to mirror the inbound and outbound traffic of the host to be monitored or the virtual machine to be monitored on the forwarding link to the corresponding virtual monitoring port;
[0079] A filtering rule adding judgment unit is used to judge whether a filtering rule needs to be added;
[0080] A filtering rule adding unit, used to obtain the type of filtering rule to be added and add the filtering rule when a filtering rule needs to be added;
[0081] The traffic monitoring unit is used to obtain the traffic model of the traffic on the corresponding forwarding link through the virtual monitoring port, and use the filtering rules to determine whether the corresponding traffic characteristics are abnormal;
[0082] The monitoring and restriction modules include:
[0083] A flow monitoring result judgment unit, used to judge whether there is an abnormality in the flow characteristic monitoring result;
[0084] An abnormality level judgment unit is used to judge the abnormality level when there is an abnormality in the flow characteristic monitoring result;
[0085] A light exception log recording unit, which is used for the intelligent network card to send a log to the log system when the exception level is a light exception, recording the abnormal behavior log of the host or virtual machine;
[0086] The medium abnormal information alarm unit is used to send a log to the log system when the abnormal level is medium abnormal, record the abnormal behavior log of the host or virtual machine, and issue an information alarm;
[0087] The heavy exception limiting unit is used to limit the traffic rate of the forwarding link, restrict applications, or isolate users on the smart network card when the exception level is heavy.
[0088] Furthermore, the supervision release module includes:
[0089] A recovery mode determination unit, used for determining a preset recovery mode;
[0090] The abnormality recurrence judgment unit is used to judge whether the host or virtual machine with a severe abnormality level has an abnormality again within a set time period when the preset recovery mode is the automatic mode;
[0091] A first regulatory restriction release unit, configured to release the regulatory restriction of the host or virtual machine by the smart network card when no abnormality occurs again within a set time period;
[0092] The abnormality frequency determination unit is used to determine whether the number of abnormalities occurring in the host or virtual machine within the set time period is greater than the set number when the abnormality occurs again within the set time period;
[0093] An access user isolation unit is used to isolate access users of a host or virtual machine when the number of exceptions exceeds a set number;
[0094] A monitoring limit judgment unit, used for the smart network card to maintain monitoring limits on the host or virtual machine when the number of abnormalities is less than or equal to the set number;
[0095] A second monitoring restriction releasing unit, configured to release the monitoring restriction on the host or virtual machine after the smart network card receives a user instruction when the preset recovery mode is a manual mode;
[0096] The idle monitoring port deletion module includes:
[0097] An idle virtual monitoring port determination unit, used to determine whether there is an idle virtual monitoring port in the smart network card;
[0098] The idle virtual monitoring port deleting unit is used to delete the idle virtual monitoring port when there is an idle virtual monitoring port.
[0099] The beneficial effects of the present invention are:
[0100] The flow monitoring method and system based on the smart network card provided by the present invention realizes the creation and deletion of the virtual monitoring port through the smart network card, and binds it with the corresponding network port of the host or virtual machine to be monitored, and losslessly mirrors the flow of the corresponding network port of the host or virtual machine to be monitored to the virtual monitoring port, so that flow monitoring, analysis and control can be performed on the smart network card. The present invention monitors, analyzes and controls specific flow by adding specified filtering rules, does not occupy actual physical bandwidth, does not require the use of additional splitter cables and flow analysis servers, and does not require changes to the existing network. At the same time, it is closer to users and can perform more fine-grained flow supervision.
[0101] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect.
[0102] It can be seen that compared with the prior art, the present invention has outstanding substantive features and significant progress, and the beneficial effects of its implementation are also obvious. BRIEF DESCRIPTION OF THE DRAWINGS
[0103] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0104] Figure 1 It is a flow chart of Example 1 of the flow monitoring method based on the smart network card of the present invention.
[0105] Figure 2 It is a flow chart of Example 2 of the flow monitoring method based on the smart network card of the present invention.
[0106] Figure 3 It is a schematic diagram of a flow monitoring system based on a smart network card of the present invention.
[0107] Figure 4 This is a schematic diagram of virtual machine traffic monitoring by a virtual monitoring port in an intelligent network card in embodiment 3 of the present invention.
[0108] In the figure, 1-virtual machine monitoring port creation module; 1.1-intelligent network card installation unit; 1.2-to-be-monitored subject and network card acquisition unit; 1.3-forwarding link creation unit; 1.4-virtual monitoring port creation unit; 2-traffic monitoring module; 2.1-filtering rule preset unit; 2.2-traffic mirroring unit; 2.3-filtering rule adding judgment unit; 2.4-filtering rule adding unit; 2.5-traffic monitoring unit; 3-monitoring restriction module; 3.1-traffic monitoring result judgment unit; 3.2-abnormal level judgment unit; 3.3-light abnormal log recording unit; 3.4-medium abnormal information alarm unit; 3.5-heavy abnormal Normal restriction unit; 4-regulation release module; 4.1-recovery mode judgment unit; 4.2-abnormal reoccurrence judgment unit; 4.3-regulatory restriction first release unit; 4.4-abnormal frequency judgment unit; 4.5-access user isolation unit; 4.6-monitoring restriction judgment unit; 4.7-monitoring restriction second release unit; 5-idle monitoring port deletion module; 5.1-idle virtual monitoring port judgment unit; 5.2-idle virtual monitoring port deletion unit; 6-server; 7-intelligent network card; VM1-first virtual machine; VM2-second virtual machine; vf1-first virtual function port; vf2-second virtual machine function port; vp 1-virtual network card of the first virtual machine VM1; vp2-virtual network card of the second virtual machine VM2; vs 1-first virtual monitoring port; vs 2-second virtual monitoring port. DETAILED DESCRIPTION
[0109] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0110] Embodiment 1:
[0111] like Figure 1 As shown, the present invention provides a flow monitoring method based on a smart network card, comprising the following steps:
[0112] S 1. Configure the smart network card in the server environment and create a virtual monitoring port in the smart network card;
[0113] S 2. Use the virtual monitoring port to obtain the traffic model of the traffic to be monitored, and monitor the traffic characteristics according to the pre-set filtering rules;
[0114] S 3. According to the traffic feature monitoring results and the pre-set supervision method, the network actions of the abnormal traffic subjects are supervised and restricted;
[0115] S4. After the abnormality is resolved, the network action of the traffic subject is restored according to the preset recovery method;
[0116] S 5. Delete the idle virtual monitoring port.
[0117] Embodiment 2:
[0118] like Figure 2 As shown, the present invention provides a flow monitoring method based on a smart network card, comprising the following steps:
[0119] S 1. Configure the smart network card in the server environment and create a virtual monitoring port in the smart network card; the specific steps of step S1 are as follows:
[0120] S 11. Installing a smart network card in the server system, the smart network card having a plurality of virtual function ports and an external port;
[0121] S 12. Obtain the host to be monitored and its network card, the virtual machine to be monitored and its virtual network card in the server system;
[0122] S 13. Each network card and virtual network card selects a virtual function port of the smart network card for connection, and creates a forwarding link from each selected virtual function port to the external port;
[0123] S 14. Log in to the intelligent network card system of the host to be monitored or the physical host of the virtual machine to be monitored, and create a virtual monitoring port for each forwarding link;
[0124] S 2. Use the virtual monitoring port to obtain the traffic model of the traffic to be monitored, and monitor the traffic characteristics according to the pre-set filtering rules; the specific steps of step S2 are as follows:
[0125] S 21. Pre-set filtering rules;
[0126] S 22. Use the mirroring technology on the smart network card to mirror the traffic of the host to be monitored or the virtual machine to be monitored in the forwarding link to the corresponding virtual monitoring port;
[0127] S 23. Determine whether to add filtering rules;
[0128] If yes, go to step S24;
[0129] If not, go to step S25;
[0130] S24. Obtain the type of filtering rule to be added and add the filtering rule; the specific steps of step S24 are as follows:
[0131] S 241. Obtain the type of filtering rule to be added;
[0132] When the filtering rule to be added is filtering based on source IP and destination IP, proceed to step S242;
[0133] When the filtering rule to be added is to add a filtering rule according to the transmission protocol number and the protocol port number, the process goes to step S243;
[0134] When the filtering rule to be added is to add a filtering rule based on the protocol field, proceed to step S244;
[0135] When the filtering rule to be added is a custom specific rule, proceed to step S245;
[0136] S 242. The filtering rule is based on the host or virtual machine level, and the user traffic is monitored for abnormalities, and the process goes to step S 3;
[0137] S 243. The filtering rule is based on the service traffic type of the entire network, and the network is monitored for abnormal protocol traffic attacks, and the process goes to step S 3;
[0138] S 244. The filtering rules are based on the detailed fields of the protocol, monitoring the protocol interaction process to identify whether there are any anomalies;
[0139] S 245. The filtering rule is to monitor specific users or specific business traffic;
[0140] S 25. The virtual monitoring port obtains the traffic model of the traffic on the corresponding forwarding link, and uses the filtering rules to determine whether the corresponding traffic characteristics are abnormal;
[0141] S 3. According to the traffic feature monitoring results and the pre-set supervision method, the network actions of the abnormal traffic subject are supervised and restricted; the specific steps of step S 3 are as follows:
[0142] S 31. Determine whether there is any abnormality in the flow characteristic monitoring results;
[0143] If not, return to step S2;
[0144] If yes, go to step S32;
[0145] S 32. Determine the abnormality level;
[0146] When the abnormality level is a minor abnormality, go to step S33;
[0147] When the abnormality level is a medium abnormality, go to step S34;
[0148] When the abnormality level is a severe abnormality, go to step S35;
[0149] S 33. The smart network card sends a log to the log system to record the abnormal behavior log of the host or virtual machine, and then proceeds to step S4;
[0150] S 34. The smart network card sends a log to the log system, records the abnormal behavior log of the host or virtual machine, and issues an information alarm, and then goes to step S4;
[0151] S 35. The smart network card limits the traffic speed of the forwarding link, restricts applications, or isolates users, and the process goes to step S4;
[0152] S4. After the abnormality is resolved, the network action of the traffic subject is restored according to the preset recovery method; the specific steps of step S4 are as follows:
[0153] S41. Determine the preset recovery method;
[0154] When the preset recovery mode is the automatic mode, proceed to step S42;
[0155] When the preset recovery mode is manual mode, go to step S47;
[0156] S42. Determine whether a host or virtual machine with a severe abnormality level has an abnormality again within a set time period;
[0157] If yes, go to step S44;
[0158] If not, proceed to step S43;
[0159] S43. The smart network card removes the regulatory restrictions on the host or virtual machine and proceeds to step S 5;
[0160] S44. Determine whether the number of abnormalities that occur in the host or virtual machine within the set time period is greater than the set number;
[0161] If yes, go to step S45;
[0162] If not, proceed to step S46;
[0163] S45. Isolate the access users of the host or virtual machine and proceed to step S5;
[0164] S46. The smart network card maintains monitoring restrictions on the host or virtual machine, and proceeds to step S5;
[0165] S47. After receiving the user instruction, the smart network card releases the monitoring restriction on the host or virtual machine and proceeds to step S5;
[0166] S 5. Delete the idle virtual monitoring port; the specific steps of step S5 are as follows:
[0167] S 51. Determine whether there is an idle virtual monitoring port in the smart network card;
[0168] If yes, go to step S52;
[0169] If not, return to step S2;
[0170] S52. Delete the idle virtual monitoring port and return to step S2.
[0171] Embodiment 3:
[0172] like Figure 4 As shown, a smart network card 7 is installed in the server 6. When the first virtual machine VM1 in the server 6 sends traffic, the virtual network card vp 1 of the first virtual machine VM1 sends the traffic to the first virtual function port vf 1 of the smart network card, and then forwards it to the outside of the server via the forwarding link to the external port P1; when receiving packets, the external port P1 receives the traffic destined for the first virtual machine VM1, and sends it to the virtual network card vp 1 port of the first virtual machine VM1 via the first function port vf 1 to complete the message reception.
[0173] When the second virtual machine VM2 in the server 6 sends traffic, the virtual network card vp2 of the second virtual machine VM2 sends the traffic to the second virtual function port vf2 of the smart network card, and then forwards it to the outside of the server via the forwarding link to the external port P1; when receiving packets, the external port P1 receives the traffic destined for the second virtual machine VM2, and sends it to the virtual network card vp2 port of the second virtual machine VM2 via the second function port vf2 to complete the message reception.
[0174] To monitor all inbound and outbound traffic of the first virtual machine VM1:
[0175] For the first virtual machine VM1 that needs to be monitored, log in to the smart network card system of the physical host where the first virtual machine VM1 is located, and dynamically create a first virtual monitoring port vs 1 as needed;
[0176] Using the mirroring technology on the smart network card 7, the inbound and outbound traffic of the first virtual machine VM1 is simultaneously mirrored to the first virtual monitoring port vs 1;
[0177] The smart network card 7 receives the complete inbound and outbound traffic of the first virtual machine VM1 through the first virtual monitoring port vs 1. According to the traffic analysis, its traffic model can be confirmed, and whether there is abnormal behavior;
[0178] If it is determined that the first virtual machine VM1 has abnormal behavior, and the abnormal behavior is a minor abnormality, a log is sent to the log system to record the abnormal behavior log of the first virtual machine VM1; when the abnormal behavior is a major abnormality, the first virtual machine VM1 is subjected to operations such as traffic speed limiting, application access restriction, and user isolation.
[0179] When you want to monitor the specific application traffic between the second virtual machine VM2 and the first virtual machine VM1:
[0180] For the second virtual machine VM2 that needs to be monitored, you can log in to the smart network card system of the physical host where the second virtual machine VM2 is located, and dynamically create a second virtual monitoring port vs 2 as needed;
[0181] Set filtering rules on the smart network card 7, the filtering source IP is the IP of the second virtual machine VM2, the destination IP is the IP of the first virtual machine VM1, and the traffic that needs to match a specific protocol number is mirrored to the second virtual monitoring port vs 2;
[0182] The smart network card 7 receives the specific protocol traffic sent from the second virtual machine VM2 to the first virtual machine VM1 through the second virtual monitoring port vs 2. According to the traffic analysis, its traffic model can be confirmed, and whether there is abnormal behavior;
[0183] If it is determined that the second virtual machine VM2 has abnormal behavior, and the abnormal behavior is a minor abnormality, a log is sent to the log system to record the abnormal behavior log of the second virtual machine VM2; when the abnormal behavior is a major abnormality, the second virtual machine VM21 is subjected to operations such as traffic speed limiting, application access restriction, and user isolation.
[0184] Embodiment 4:
[0185] like Figure 3 As shown, the present invention provides a flow monitoring system based on a smart network card, comprising:
[0186] The virtual machine monitoring port creation module 1 is used to configure the smart network card in the server environment and create a virtual monitoring port in the smart network card; the virtual machine monitoring port creation module 1 includes:
[0187] The smart network card installation unit 1.1 is used to install a smart network card in the server system, and the smart network card is provided with a plurality of virtual function ports and an external port;
[0188] The subject to be monitored and the network card acquisition unit 1.2 is used to acquire the host to be monitored and its network card, the virtual machine to be monitored and its virtual network card in the server system;
[0189] The forwarding link creation unit 1.3 is used to select a virtual function port of the intelligent network card for each network card and virtual network card to connect, and to create a forwarding link from each selected virtual function port to an external port;
[0190] A virtual monitoring port creation unit 1.4 is used to log in to the intelligent network card system of the host to be monitored or the physical host of the virtual machine to be monitored, and create a virtual monitoring port for each forwarding link;
[0191] The flow monitoring module 2 is used to obtain the flow model of the flow to be monitored using the virtual monitoring port, and monitor the flow characteristics according to the pre-set filtering rules; the flow monitoring module 2 includes:
[0192] The filtering rule presetting unit 2.1 is used to pre-set filtering rules;
[0193] The traffic mirroring unit 2.2 is used to use the mirroring technology on the smart network card to mirror the traffic of the host to be monitored or the virtual machine to be monitored in the inbound and outbound directions on the forwarding link to the corresponding virtual monitoring port;
[0194] A filtering rule adding judgment unit 2.3 is used to judge whether a filtering rule needs to be added;
[0195] The filtering rule adding unit 2.4 is used to obtain the type of filtering rule to be added and add the filtering rule when a filtering rule needs to be added;
[0196] The traffic monitoring unit 2.5 is used for the virtual monitoring port to obtain the traffic model of the traffic on the corresponding forwarding link, and use the filtering rules to determine whether the corresponding traffic characteristics are abnormal;
[0197] The monitoring and restriction module 3 is used to monitor and restrict the network actions of the abnormal traffic subject according to the traffic feature monitoring results and the preset supervision method; the monitoring and restriction module 3 includes:
[0198] The flow monitoring result judgment unit 3.1 is used to judge whether there is an abnormality in the flow characteristic monitoring result;
[0199] The abnormality level judgment unit 3.2 is used to judge the abnormality level when there is an abnormality in the flow characteristic monitoring result;
[0200] A light exception log recording unit 3.3, used for sending a log to a log system when the exception level is a light exception, recording an abnormal behavior log of a host or a virtual machine;
[0201] The medium abnormal information alarm unit 3.4 is used for, when the abnormal level is medium abnormal, the intelligent network card sends a log to the log system, records the abnormal behavior log of the host or virtual machine, and issues an information alarm;
[0202] Heavy exception limiting unit 3.5, used for limiting the traffic rate of the forwarding link, restricting applications or isolating users by the smart network card when the exception level is heavy;
[0203] The supervision release module 4 is used to restore the network action of the traffic subject according to a preset recovery method after the abnormality is resolved; the supervision release module 4 includes:
[0204] The recovery mode determination unit 4.1 is used to determine the preset recovery mode;
[0205] The abnormality recurrence judgment unit 4.2 is used to judge whether the host or virtual machine with a severe abnormality level has an abnormality again within a set time period when the preset recovery mode is the automatic mode;
[0206] A first regulatory restriction release unit 4.3, configured to release the regulatory restriction of the host or virtual machine by the smart network card when no abnormality occurs again within a set time period;
[0207] The abnormality frequency determination unit 4.4 is used to determine whether the number of abnormalities occurring in the host or virtual machine within the set time period is greater than the set number when the abnormality occurs again within the set time period;
[0208] The access user isolation unit 4.5 is used to isolate the access user of the host or virtual machine when the number of abnormalities is greater than a set number;
[0209] The monitoring restriction judgment unit 4.6 is used for the intelligent network card to maintain the monitoring restriction on the host or virtual machine when the number of abnormalities is less than or equal to the set number;
[0210] The second monitoring restriction release unit 4.7 is used to release the monitoring restriction on the host or virtual machine after the smart network card receives the user instruction when the preset recovery mode is the manual mode;
[0211] The idle monitoring port deletion module 5 is used to delete an idle virtual monitoring port; the idle monitoring port deletion module 5 includes:
[0212] An idle virtual monitoring port determination unit 5.1 is used to determine whether there is an idle virtual monitoring port in the smart network card;
[0213] The idle virtual monitoring port deleting unit 5.2 is used to delete an idle virtual monitoring port when there is an idle virtual monitoring port.
[0214] Although the present invention has been described in detail by referring to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, and all of these shall be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A flow monitoring method based on smart network card, characterized in that: The steps include: S1. Configure the smart network card in the server environment and create a virtual monitoring port in the smart network card; the specific steps of step S1 are as follows: S11. Install a smart network card in the server system, the smart network card has several virtual function ports and an external port; S12. Obtain the host to be monitored and its network card, the virtual machine to be monitored and its virtual network card in the server system; S13. Each network card and virtual network card selects a virtual function port of the smart network card for connection, and creates a forwarding link for each selected virtual function port to the external port; S14. Log in to the intelligent network card system of the physical host of the host to be monitored or the virtual machine to be monitored, and create a virtual monitoring port for each forwarding link; S2. Use the virtual monitoring port to obtain the traffic model of the traffic to be monitored, and monitor the traffic characteristics according to the pre-set filtering rules; The specific steps of step S2 are as follows: S21. Pre-set filtering rules; S22. Use mirroring technology on the smart NIC to mirror the traffic of the host to be monitored or the virtual machine to be monitored in the forwarding link in the inbound and outbound directions to the corresponding virtual monitoring port; S23. Determine whether to add filtering rules; If yes, go to step S24; If not, proceed to step S25; S24. Get the type of filtering rules to be added and add filtering rules; the specific steps of step S24 are as follows: S241. Get the type of filtering rule to be added; When the filtering rule to be added is filtering based on source IP and destination IP, proceed to step S242; When the filtering rule to be added is to add a filtering rule according to the transmission protocol number and the protocol port number, proceed to step S243; When the filtering rule to be added is to add a filtering rule based on the protocol field, proceed to step S244; When the filtering rule to be added is a custom specific rule, proceed to step S245; S242. The filtering rules are based on the host or virtual machine level, monitoring whether there is an abnormality in user traffic, and proceeding to step S3; S243 filtering rules based on the entire network traffic type, monitoring the network for abnormal protocol traffic attacks, proceed to step S3; S244. The filtering rules are based on the detailed fields of the protocol, and the protocol interaction process is monitored to identify whether there are any abnormalities; S245. The filtering rules are to monitor specific users or specific business traffic; S25. The virtual monitoring port obtains the traffic model of the corresponding forwarding link and uses the filtering rules to determine whether the corresponding traffic characteristics are abnormal; S3. According to the traffic feature monitoring results and the pre-set supervision method, the network actions of the abnormal traffic subject are supervised and restricted; the specific steps of step S3 are as follows: S31. Determine whether there is an abnormality in the flow characteristic monitoring results; If not, return to step S2; If yes, go to step S32; S32. Determine the abnormal level; When the abnormality level is a minor abnormality, proceed to step S33; When the abnormality level is a medium abnormality, go to step S34; When the abnormality level is a severe abnormality, go to step S35; S33. The smart NIC sends a log to the log system to record abnormal behavior logs of the host or virtual machine, and proceeds to step S4; S34. The smart NIC sends a log to the log system while recording abnormal behavior logs of the host or virtual machine, and issues an information alarm, and proceeds to step S4; S35. The smart network card limits the traffic speed of the forwarding link, restricts applications or isolates users, and proceeds to step S4; S4. After the abnormality is resolved, the network action of the traffic subject is restored according to the preset recovery method; the specific steps of step S4 are as follows: S41. Determine the preset recovery method; When the preset recovery mode is the automatic mode, proceed to step S42; When the preset recovery mode is manual mode, go to step S47; S42. Determine whether a host or virtual machine with a severe abnormality level has an abnormality again within a set time period; If yes, go to step S44; If not, proceed to step S43; S43. The smart network card removes the regulatory restrictions on the host or virtual machine and proceeds to step S5; S44. Determine whether the number of abnormalities that occur in the host or virtual machine within the set time period is greater than the set number; If yes, go to step S45; If not, proceed to step S46; S45. Isolate the access users of the host or virtual machine and proceed to step S5; S46. The smart network card maintains monitoring restrictions on the host or virtual machine, and proceeds to step S5; S47. After receiving the user instruction, the smart network card releases the monitoring restriction on the host or virtual machine and proceeds to step S5; S5. Delete the idle virtual monitoring port; the specific steps of step S5 are as follows: S51. Determine whether there is an idle virtual monitoring port in the smart network card; If yes, go to step S52; If not, return to step S2; S52. Delete the idle virtual monitoring port and return to step S2.
2. A flow monitoring system based on smart network card, characterized in that: include: A virtual machine monitoring port creation module (1) is used to configure a smart network card in a server environment and create a virtual monitoring port in the smart network card; The virtual machine monitoring port creation module (1) includes: A smart network card installation unit (1.1) is used to install a smart network card in a server system, wherein the smart network card is provided with a plurality of virtual function ports and an external port; The subject to be monitored and the network card acquisition unit (1.2) is used to acquire the host to be monitored and its network card, the virtual machine to be monitored and its virtual network card in the server system; A forwarding link creation unit (1.3) is used to select a virtual function port of the smart network card for each network card and virtual network card to connect, and to create a forwarding link from each selected virtual function port to an external port; A virtual monitoring port creation unit (1.4), used for logging into the intelligent network card system of the host to be monitored or the physical host of the virtual machine to be monitored, and creating a virtual monitoring port for each forwarding link; The flow monitoring module (2) is used to obtain the flow model of the flow to be monitored using the virtual monitoring port, and monitor the flow characteristics according to the pre-set filtering rules; the flow monitoring module (2) includes: A filtering rule presetting unit (2.1), used for presetting filtering rules; The traffic mirroring unit (2.2) is used to use the mirroring technology on the smart network card to mirror the inbound and outbound traffic of the host to be monitored or the virtual machine to be monitored on the forwarding link to the corresponding virtual monitoring port; A filtering rule adding judgment unit (2.3) is used to judge whether a filtering rule needs to be added; A filtering rule adding unit (2.4) is used to obtain the type of filtering rule to be added and add the filtering rule when a filtering rule needs to be added; A traffic monitoring unit (2.5) is used to obtain a traffic model of traffic on a corresponding forwarding link through a virtual monitoring port, and to determine whether a corresponding traffic feature is abnormal using a filtering rule; The monitoring and limiting module (3) is used to monitor and limit the network actions of the abnormal traffic subject according to the traffic characteristic monitoring results and the pre-set monitoring method; the monitoring and limiting module (3) includes: A flow monitoring result judgment unit (3.1), used to judge whether there is an abnormality in the flow characteristic monitoring result; The abnormality level judgment unit (3.2) is used to judge the abnormality level when there is an abnormality in the flow characteristic monitoring result; A light exception log recording unit (3.3), used for, when the exception level is a light exception, the smart network card sends a log to the log system to record the abnormal behavior log of the host or virtual machine; A medium abnormality information alarm unit (3.4), which is used to send a log to the log system when the abnormality level is a medium abnormality, record the abnormal behavior log of the host or virtual machine, and issue an information alarm; A heavy anomaly limiting unit (3.5) is used to limit the traffic rate of the forwarding link, restrict applications, or isolate users on the smart network card when the anomaly level is a heavy anomaly; The supervision release module (4) is used to restore the network action of the traffic subject according to a preset recovery method after the abnormality is resolved; the supervision release module (4) includes: A recovery mode determination unit (4.1), used for determining a preset recovery mode; The abnormality recurrence judgment unit (4.2) is used to judge whether the host or virtual machine with a severe abnormality level has an abnormality again within a set time period when the preset recovery mode is the automatic mode; A first regulatory restriction release unit (4.3), configured to release the regulatory restriction of the host or virtual machine by the smart network card when no abnormality occurs again within a set time period; The abnormality frequency judgment unit (4.4) is used to judge whether the number of abnormalities occurring in the host or virtual machine within the set time period is greater than the set number when the abnormality occurs again within the set time period; An access user isolation unit (4.5) is used to isolate access users of a host or a virtual machine when the number of exceptions is greater than a set number; A monitoring restriction judgment unit (4.6), used for maintaining the monitoring restriction of the host or virtual machine by the smart network card when the number of abnormal occurrences is less than or equal to the set number of abnormal occurrences; A second monitoring restriction release unit (4.7), configured to release the monitoring restriction on the host or virtual machine after the smart network card receives a user instruction when the preset recovery mode is a manual mode; The idle monitoring port deletion module (5) is used to delete an idle virtual monitoring port; the idle monitoring port deletion module (5) comprises: An idle virtual monitoring port determination unit (5.1), used to determine whether there is an idle virtual monitoring port in the smart network card; The idle virtual monitoring port deletion unit (5.2) is used to delete the idle virtual monitoring port when there is an idle virtual monitoring port.
