CN111490939A - High-performance windows network card driving method supporting advanced strategy configuration - Google Patents
High-performance windows network card driving method supporting advanced strategy configuration Download PDFInfo
- Publication number
- CN111490939A CN111490939A CN202010234449.XA CN202010234449A CN111490939A CN 111490939 A CN111490939 A CN 111490939A CN 202010234449 A CN202010234449 A CN 202010234449A CN 111490939 A CN111490939 A CN 111490939A
- Authority
- CN
- China
- Prior art keywords
- flow
- network card
- routing table
- address
- forwarding
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 32
- 230000008569 process Effects 0.000 claims description 13
- 230000000977 initiatory effect Effects 0.000 claims description 3
- 230000000750 progressive effect Effects 0.000 claims 1
- 230000005540 biological transmission Effects 0.000 abstract description 5
- 238000010845 search algorithm Methods 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000001914 filtration Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000000903 blocking effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/70—Virtual switches
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
- G06F16/9027—Trees
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/30—Routing of multiclass traffic
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/38—Flow based routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/48—Routing tree calculation
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a high-performance windows network card driving method supporting advanced strategy configuration.A virtual network card is established locally and used for receiving flow sent to a set IP address; constructing a routing table, adding a forwarding routing rule for setting an IP sending flow data packet, and intercepting the flow; forwarding the flow in the rule to a local virtual network card according to the routing table rule; reading the flow obtained by the virtual network card, matching the rules of the routing table, if the target IP address of the flow is consistent with the IP address set in the routing table, configuring a high-level policy route for the sent flow, forwarding the data flow to a high-speed server, and forwarding the data flow to the target address through the high-speed server. The correct routing rule can be quickly matched through the Reddish Black Tree search algorithm, the time consumption of data matching is reduced, the routing table is cooperated with the virtual network card to realize network forwarding, excessive system memory is not occupied, and the flow transmission efficiency is improved.
Description
Technical Field
The invention belongs to the technical field of distribution of high-level strategy routing tables, and particularly relates to a high-performance windows network card driving method supporting high-level strategy configuration.
Background
Policy routing is a more flexible packet routing forwarding mechanism than routing based on the target network. The router will decide how to handle the data packets to be routed through the routing map, which decides the router to forward the next hop of a data packet. Applying policy routing, a routing graph must be specified for policy routing and created. A routing graph is composed of a plurality of policies, and each policy defines 1 or more matching rules and corresponding operations. After applying policy routing, an interface checks all packets received by the interface, and data packets that do not conform to any policy in the routing graph are forwarded and processed according to a normal route, and data packets that conform to a certain policy in the routing graph are processed according to operations defined in the policy.
Policy routing may cause packets to be forwarded according to a user-specified policy. For some administrative purposes, such as QoS requirements or VPN topologies, policy routing may be used requiring that certain routes must traverse a particular path. For example, a policy may specify that packets originating from a network can only be forwarded to a particular interface.
The Routing table (Routing Information Base) is used to store the path pointing to a specific network address, and defines a transmission path for each data traffic passing through the router, and the data packet will be transmitted to the destination address according to the address set by the Routing table, and the Routing table contains the following Information: network target, network mask, gateway, interface, crossing number. As shown in fig. 1, RT1-RT4 is a router, and in the conventional transmission mode, when a local PC sends a packet to a target IP, multiple data forwarding may occur, which may greatly increase the delay and even cause connection timeout. In the process of network data transmission, if a data packet is not forwarded, the data packet can directly connect a target address through a routing table provided by an operator, in the process, a certain address is directly connected, extremely high delay occurs, and a certain address cannot be connected.
The existing data flow distribution technology mainly comprises the following two types:
1. agent specific processes: the method can fix the data traffic sent by a certain process to the outside. However, there are some defects that it can only proxy the data sent by a specific process, and if the data is sent by other processes, it can not realize forwarding; it is possible to trigger the security mechanism of some software.
2. Iptables are AN IP packet filtering system integrated with the latest version 3.5L inux kernel if L inux system is connected to the Internet or L AN, a server or proxy server connecting L AN and the Internet, the system facilitates better control of IP packet filtering and firewall configuration on L inux system.
Disclosure of Invention
Aiming at the technical problems, the invention provides a windows network card driving method supporting high-level strategy configuration and high performance, a virtual network card is established locally to receive data, when the rule matching is carried out on the transmitted data, the correct routing rule can be matched quickly and accurately through a red-black tree searching algorithm, the time spent in the data matching can be greatly reduced, the network forwarding is realized by the routing table in cooperation with the virtual network card, so that excessive system memory cannot be occupied, the access delay of a user to certain specific addresses is reduced, and frequent network fluctuation in the access process is solved.
The technical scheme of the invention is as follows:
a windows network card driving method supporting high-level strategy configuration and high performance comprises the following steps:
s01: establishing a virtual network card locally, wherein the virtual network card is used for receiving the flow sent to the set IP address;
s02: constructing a routing table, adding a forwarding routing rule for setting an IP sending flow data packet, and intercepting the flow;
s03: forwarding the flow in the rule to a local virtual network card according to the routing table rule;
s04: reading the flow obtained by the virtual network card, matching the rules of the routing table, if the target IP address of the flow is consistent with the IP address set in the routing table, configuring a high-level policy route for the sent flow, forwarding the data flow to a high-speed server, and forwarding the data flow to the target address through the high-speed server.
In a preferred technical solution, the method for constructing the routing table in step S02 includes:
s21: sequentially adding nodes to the set IP address according to the structure of the red-black tree to obtain a red-black tree data structure;
s22: and storing the routing table rule according to the red and black tree data structure to obtain the constructed routing table.
In an optimal technical solution, the step S04 of matching the routing table rule by performing a lookup operation on the data structure of the blacktree includes sequentially and progressively looking up from the first parent node to the child node of the data structure of the blacktree, and if the corresponding IP address is found, the matching is successful, otherwise, the matching is unsuccessful.
In a preferred technical solution, the step S04 further includes that the virtual network card detects the server delay, including the following steps:
s41: initiating flow from a local target address, and forwarding the flow through a high-speed server;
s42: the target address sends the data to the high-speed server, the high-speed server returns the data to the local, the consumed time of the process is recorded, and a history model is constructed;
s43: sequentially transmitting data to each high-speed server and sequentially building a history model;
s44: if the delay of the current high-speed server is larger than the delay of other high-speed servers, the forwarded high-speed server is redirected, and the high-speed server with the lowest delay is selected for forwarding.
In the preferred technical scheme, the virtual network card establishes a virtual network to manage the IP address of the traffic.
Compared with the prior art, the invention has the advantages that:
1. the invention establishes the virtual network card to receive data locally, and can quickly and accurately match the correct routing rule through the red and black tree search algorithm when the rule matching is carried out on the transmitted data, thereby greatly reducing the time spent in data matching.
2. The invention realizes the network forwarding by the routing table in cooperation with the virtual network card, thereby not occupying excessive system memory and causing system blocking, thereby achieving the purposes of reducing the access delay of a user to certain specific addresses and solving the frequent network fluctuation in the access process.
3. In the process of sending the data traffic to the server, the invention can select the server with the lowest time delay by combining the current server condition to achieve the aim of dynamic adjustment, compared with iptables under L inux, the invention is more intelligent and efficient, and accords with the development direction of the current era.
Drawings
The invention is further described with reference to the following figures and examples:
fig. 1 is a schematic diagram of a conventional traffic forwarding flow;
FIG. 2 is a flow forwarding diagram according to the present invention;
FIG. 3 is a flowchart of a high-performance windows network card driving method supporting advanced policy configuration according to the present invention;
fig. 4 is a flow chart of the flow forwarding according to the routing table in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings in conjunction with the following detailed description. It should be understood that the description is intended to be exemplary only, and is not intended to limit the scope of the present invention. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present invention.
Example (b):
the preferred embodiments of the present invention will be further described with reference to the accompanying drawings.
As shown in fig. 2, in the data sending process after traffic redirection of the present invention, a high-speed server is used as a transit station of traffic, and if a high delay occurs when traffic of a user is directly sent to a target address or a connection failure occurs due to an excessively high delay, a low-delay transit server is required to forward the traffic.
As shown in fig. 3, a high-performance windows network card driving method supporting advanced policy configuration according to the present invention includes the following steps:
s01: establishing a virtual network card locally, wherein the virtual network card is used for receiving the flow sent to the set IP address;
s02: constructing a routing table, adding a forwarding routing rule for setting an IP sending flow data packet, and intercepting the flow;
s03: forwarding the flow in the rule to a local virtual network card according to the routing table rule;
s04: reading the traffic acquired by the virtual network card, matching the rules of the routing table, if the target IP address of the traffic is consistent with the IP address set in the routing table, configuring a high-level policy route for the sent traffic, forwarding the data traffic to the high-speed server, and forwarding the data traffic to the target address through the high-speed server, as shown in fig. 4.
The method for constructing the routing table comprises the following steps:
s21: sequentially adding nodes to the set IP address according to the structure of the red-black tree to obtain a red-black tree data structure;
s22: and storing the routing table rule according to the red and black tree data structure to obtain the constructed routing table.
And constructing the address to be forwarded in a routing table, and forwarding the address to the local virtual network card network when a data packet addressed to the set address exists.
In step S04, the routing table rules are matched by performing a lookup operation on the data structure of the blacktree, including sequentially and progressively looking up from the first father node to the child node of the data structure of the blacktree, and if a corresponding IP address is found, the matching is successful, otherwise, the matching is unsuccessful.
Because the number of the data packets is large and the flow rate has many flow directions, the matching rule needs to be optimized, and the data packets can be orderly and quickly matched to the required address by constructing the red and black tree structure, so that the working efficiency is improved.
The virtual network card can also detect the server delay, and the method comprises the following steps:
s41: initiating flow from a local target address, and forwarding the flow through a high-speed server;
s42: the target address sends the data to the high-speed server, the high-speed server returns the data to the local, the consumed time of the process is recorded, and a history model is constructed;
s43: sequentially transmitting data to each high-speed server and sequentially building a history model;
s44: if the delay of the current high-speed server is larger than the delay of other high-speed servers, the forwarded high-speed server is redirected, and the high-speed server with the lowest delay is selected for forwarding. The smooth connection is ensured.
The data packet can be sent to the server with the lowest delay, and the flow transmission efficiency can be improved to the greatest extent.
Because the amount of traffic is large, the traffic needs to be managed centrally, so a virtual network environment needs to be established locally, and the virtual network environment cannot conflict with the existing IP address, otherwise, a data flow error occurs.
It is to be understood that the above-described embodiments of the present invention are merely illustrative of or explaining the principles of the invention and are not to be construed as limiting the invention. Therefore, any modification, equivalent replacement, improvement and the like made without departing from the spirit and scope of the present invention should be included in the protection scope of the present invention. Further, it is intended that the appended claims cover all such variations and modifications as fall within the scope and boundaries of the appended claims or the equivalents of such scope and boundaries.
Claims (5)
1. A windows network card driving method supporting high-level strategy configuration and high performance is characterized by comprising the following steps:
s01: establishing a virtual network card locally, wherein the virtual network card is used for receiving the flow sent to the set IP address;
s02: constructing a routing table, adding a forwarding routing rule for setting an IP sending flow data packet, and intercepting the flow;
s03: forwarding the flow in the rule to a local virtual network card according to the routing table rule;
s04: reading the flow obtained by the virtual network card, matching the rules of the routing table, if the target IP address of the flow is consistent with the IP address set in the routing table, configuring a high-level policy route for the sent flow, forwarding the data flow to a high-speed server, and forwarding the data flow to the target address through the high-speed server.
2. The method for supporting high-performance windows network card driver for advanced policy configuration according to claim 1, wherein the method for constructing the routing table in step S02 includes:
s21: sequentially adding nodes to the set IP address according to the structure of the red-black tree to obtain a red-black tree data structure;
s22: and storing the routing table rule according to the red and black tree data structure to obtain the constructed routing table.
3. The method as claimed in claim 1, wherein the step S04 of matching the routing table rules by performing a lookup operation on the data structure of the red-black tree includes sequentially performing progressive lookup from the first parent node to the child node of the data structure of the red-black tree, and if a corresponding IP address is found, the matching is successful, otherwise, the matching is unsuccessful.
4. The method for driving a windows network card supporting high performance of advanced policy configuration according to claim 1, wherein the step S04 further includes the step of the virtual network card detecting the server delay, including the following steps:
s41: initiating flow from a local target address, and forwarding the flow through a high-speed server;
s42: the target address sends the data to the high-speed server, the high-speed server returns the data to the local, the consumed time of the process is recorded, and a history model is constructed;
s43: sequentially transmitting data to each high-speed server and sequentially building a history model;
s44: if the delay of the current high-speed server is larger than the delay of other high-speed servers, the forwarded high-speed server is redirected, and the high-speed server with the lowest delay is selected for forwarding.
5. The method as claimed in claim 1, wherein the virtual network card establishes a virtual network to manage the IP address of the traffic.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010234449.XA CN111490939A (en) | 2020-03-30 | 2020-03-30 | High-performance windows network card driving method supporting advanced strategy configuration |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010234449.XA CN111490939A (en) | 2020-03-30 | 2020-03-30 | High-performance windows network card driving method supporting advanced strategy configuration |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111490939A true CN111490939A (en) | 2020-08-04 |
Family
ID=71812556
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010234449.XA Pending CN111490939A (en) | 2020-03-30 | 2020-03-30 | High-performance windows network card driving method supporting advanced strategy configuration |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111490939A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112087395A (en) * | 2020-08-28 | 2020-12-15 | 浪潮云信息技术股份公司 | Service type hierarchical flow control method |
CN113923273A (en) * | 2021-09-29 | 2022-01-11 | 深信服科技股份有限公司 | Data packet control method and related device |
CN115529272A (en) * | 2022-11-03 | 2022-12-27 | 苏州浪潮智能科技有限公司 | Data processing method and device based on policy routing, equipment and storage medium |
CN113923273B (en) * | 2021-09-29 | 2024-05-28 | 深信服科技股份有限公司 | Data packet control method and related device |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110299537A1 (en) * | 2010-06-04 | 2011-12-08 | Nakul Pratap Saraiya | Method and system of scaling a cloud computing network |
CN104506549A (en) * | 2014-12-31 | 2015-04-08 | 北京奇虎科技有限公司 | Method, device and system for establishing online game connection |
CN104506670A (en) * | 2014-12-31 | 2015-04-08 | 北京奇虎科技有限公司 | Method, device and system for establishing online game connection |
CN108111619A (en) * | 2017-12-28 | 2018-06-01 | 西安抱朴通信科技有限公司 | A kind of data distribution method and device, computer equipment, storage medium |
CN108124301A (en) * | 2017-12-29 | 2018-06-05 | 深圳市智搜信息技术有限公司 | A kind of connection method of wireless aps and its system |
US20180248986A1 (en) * | 2010-06-21 | 2018-08-30 | Nicira, Inc. | Private ethernet overlay networks over a shared ethernet in a virtual environment |
CN108566358A (en) * | 2017-12-22 | 2018-09-21 | 广州赛意信息科技股份有限公司 | A kind of iOS system network traffic interception method and system under the mobile phone based on iPhone |
CN110290117A (en) * | 2019-06-06 | 2019-09-27 | 新华三信息安全技术有限公司 | A kind of method and device of Match IP Address |
CN110601921A (en) * | 2019-09-16 | 2019-12-20 | 腾讯科技(深圳)有限公司 | Method and device for detecting data packet transmission parameters and data packet transmission system |
-
2020
- 2020-03-30 CN CN202010234449.XA patent/CN111490939A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110299537A1 (en) * | 2010-06-04 | 2011-12-08 | Nakul Pratap Saraiya | Method and system of scaling a cloud computing network |
US20180248986A1 (en) * | 2010-06-21 | 2018-08-30 | Nicira, Inc. | Private ethernet overlay networks over a shared ethernet in a virtual environment |
CN104506549A (en) * | 2014-12-31 | 2015-04-08 | 北京奇虎科技有限公司 | Method, device and system for establishing online game connection |
CN104506670A (en) * | 2014-12-31 | 2015-04-08 | 北京奇虎科技有限公司 | Method, device and system for establishing online game connection |
CN108566358A (en) * | 2017-12-22 | 2018-09-21 | 广州赛意信息科技股份有限公司 | A kind of iOS system network traffic interception method and system under the mobile phone based on iPhone |
CN108111619A (en) * | 2017-12-28 | 2018-06-01 | 西安抱朴通信科技有限公司 | A kind of data distribution method and device, computer equipment, storage medium |
CN108124301A (en) * | 2017-12-29 | 2018-06-05 | 深圳市智搜信息技术有限公司 | A kind of connection method of wireless aps and its system |
CN110290117A (en) * | 2019-06-06 | 2019-09-27 | 新华三信息安全技术有限公司 | A kind of method and device of Match IP Address |
CN110601921A (en) * | 2019-09-16 | 2019-12-20 | 腾讯科技(深圳)有限公司 | Method and device for detecting data packet transmission parameters and data packet transmission system |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112087395A (en) * | 2020-08-28 | 2020-12-15 | 浪潮云信息技术股份公司 | Service type hierarchical flow control method |
CN112087395B (en) * | 2020-08-28 | 2022-06-24 | 浪潮云信息技术股份公司 | Service type hierarchical flow control method |
CN113923273A (en) * | 2021-09-29 | 2022-01-11 | 深信服科技股份有限公司 | Data packet control method and related device |
CN113923273B (en) * | 2021-09-29 | 2024-05-28 | 深信服科技股份有限公司 | Data packet control method and related device |
CN115529272A (en) * | 2022-11-03 | 2022-12-27 | 苏州浪潮智能科技有限公司 | Data processing method and device based on policy routing, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11134012B2 (en) | Communication system, communication device, controller, and method and program for controlling forwarding path of packet flow | |
US11212215B2 (en) | Routing optimizations in a network computing environment | |
US8416712B2 (en) | Method and device for installing and distributing routes | |
US8897134B2 (en) | Notifying a controller of a change to a packet forwarding configuration of a network element over a communication channel | |
US7069336B2 (en) | Policy based routing system and method for caching and VPN tunneling | |
WO2018010529A1 (en) | Method and apparatus for an information-centric mac layer | |
JP2001500345A (en) | Routing in multilayer distributed network elements | |
JP2002507364A (en) | A mechanism for packet field replacement in multilayer distributed network elements | |
US20150124625A1 (en) | Ad-hoc on-demand routing through central control | |
EP3903461B1 (en) | Packet analysis and filtering | |
CN102137024A (en) | Message processing method, exit routing device and border routing device | |
CN101312438A (en) | Router and route updating method thereof | |
US20230291682A1 (en) | Method and device for processing data packet, storage medium, and electronic device | |
CN109600326B (en) | Method, node and system for forwarding data or message | |
CN111490939A (en) | High-performance windows network card driving method supporting advanced strategy configuration | |
US8023517B2 (en) | System and method for improving network performance and security by controlling topology information | |
US7969995B2 (en) | Method and apparatus for constructing a forwarding database for a data communications network | |
CN113794618B (en) | Redundant network communication method and device based on virtual network card and terminal equipment | |
CN113542099A (en) | Data transmission method, device, electronic equipment, medium and product | |
CN101909005A (en) | Method and device for processing forwarding table | |
CN113518104B (en) | Data message processing method, transfer equipment and system | |
Cisco | clear clns cache to distance (ISO CLNS) | |
CN114257544A (en) | Traffic processing method, traffic processing device and network equipment | |
CN113840016A (en) | Message processing method and device and computer readable storage medium | |
US20210250274A1 (en) | Communication Method Implemented by a First Router of an Autonomous System Using an Interior Gateway Protocol |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200804 |