A dpdk-based alg implementation method and system

An implementation method and user-mode technology, applied in the field of Internet communication, can solve problems such as single access control function and limited throughput, and achieve the effect of avoiding limited throughput

CN112787998BActive Publication Date: 2022-04-08ZHENGZHOU XINDA JIEAN INFORMATION TECH
7 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Publication Date
2022-04-08

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The present invention relates to a kind of ALG realization method and system based on DPDK, and the method includes configuring a control reverse proxy in the user mode Nginx program, proxying to the server; using the control reverse proxy as a static control connection listening address, and through The client accesses the static control connection listening address; the user state Nginx program disconnects from the client and establishes a connection with the server, and the user state Nginx program is used to forward the control connection data packet between the client and the server; the user state Nginx The program is based on the DPDK+FreeBSD+Nginx architecture, and performs protocol analysis and rewriting on the control connection data packet and related control actions; the server pushes the stream to the dynamic media connection listening address of the user-mode Nginx program, and the user-mode Nginx program uses the local media port to send streaming to the client. The present invention can realize the ALG function based on the DPDK user mode protocol stack layer, open up the business of multi-channel protocol, and satisfy the application scenario of high concurrency and large throughput of ALG.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The present invention relates to the technical field of Internet communication, in particular to a DPDK-based ALG implementation method and system. Background technique

[0002] Ordinary NAT realizes the IP address and port translation function in the TCP or UDP message header, but it is powerless to the fields in the application layer data load. In many application layer protocols, such as multi-SIP, RTSP, FTP, etc., TCP / UDP The payload contains address or port information, which cannot be effectively translated by NAT, which may lead to service failure. The NATALG technology can convert the address in the application layer message, so as to ensure the correctness of the application layer communication.

[0003] The traditional Linux kernel ALG can solve the ALG conversion of the address in the control connection data packet of SIP, RTSP, FTP and other protocols passing through the nat device, but because it is implemented based on the Linux kernel m...

Examples

Embodiment 1

[0046] Such as figure 1 As shown, a DPDK-based ALG implementation method provided by an embodiment of the present invention includes the following steps:

[0047] Step 1: Configure a control reverse proxy in the user mode Nginx program, and proxy to the server;

[0048] Step 2: use the control reverse proxy as the static control connection listening address, and access the static control connection listening address through the client;

[0049] Step 3: the user state Nginx program disconnects from the client, and establishes a connection with the server, and the user state Nginx program is used to forward the control connection data packet between the client and the server;

[0050] Step 4: The user state Nginx program is based on the DPDK+FreeBSD+Nginx architecture, and performs protocol analysis and rewriting and related control actions on the control connection data packet;

[0051] Step 5: The server pushes the stream to the user state Nginx program dynamic media connect...

Embodiment 2

[0055] On the basis of the above-mentioned embodiment 1, the difference between the embodiment of the present invention and the above-mentioned embodiment is that step 4 is optimized, and when the client communicates with the server, the user state Nginx program is connected to the media in the data packet The receiving port is rewritten, and the reverse proxy configuration is made correspondingly, so as to ensure the normal transmission of the media stream, specifically:

[0056] When the user-mode Nginx program receives the SETUP command sent from the client to the server, it rewrites the media receiving port in the control connection packet as the dynamic media connection listening port, and at the same time, the user-mode Nginx program sends the dynamic media reverse proxy configuration;

[0057] When the user-mode Nginx program receives the SETUP Reply command sent from the server to the client, it rewrites the media sending port in the control connection packet as the loc...

Embodiment 3

[0059] In order to avoid the limitation of ALG throughput, the embodiment of the present invention also provides a DPDK-based ALG implementation method, which is different from the above-mentioned embodiments in that the DPDK+FreeBSD+Nginx architecture described in step 4 includes the user-mode Nginx program , FreeBSD user mode protocol stack, a plurality of CPU cores and a plurality of network cards, each of which includes a plurality of network card queues;

[0060] A worker process of the user state Nginx program is correspondingly bound to a CPU core, and is responsible for processing the control connection packets on the corresponding network card queues of all network cards;

[0061] The FreeBSD user state protocol stack forwards the control connection data packet taken out from the network card queue through the protocol stack routing, and transmits to the user state Nginx program.

[0062] In this example, if figure 2 As shown, the worker process labels are worker0~w...