CN110932979A - Method and device for rapidly forwarding message - Google Patents

Method and device for rapidly forwarding message Download PDF

Info

Publication number
CN110932979A
CN110932979A CN201911173651.XA CN201911173651A CN110932979A CN 110932979 A CN110932979 A CN 110932979A CN 201911173651 A CN201911173651 A CN 201911173651A CN 110932979 A CN110932979 A CN 110932979A
Authority
CN
China
Prior art keywords
module
message
subsequent message
service
acceleration
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.)
Granted
Application number
CN201911173651.XA
Other languages
Chinese (zh)
Other versions
CN110932979B (en
Inventor
李日和
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN201911173651.XA priority Critical patent/CN110932979B/en
Publication of CN110932979A publication Critical patent/CN110932979A/en
Application granted granted Critical
Publication of CN110932979B publication Critical patent/CN110932979B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/2521Translation architectures other than single NAT servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/255Maintenance or indexing of mapping tables

Abstract

The invention provides a method and a device for rapidly forwarding a message, wherein the method comprises the following steps: receiving a head message of a data stream forwarded by the fast-forwarding module; establishing a data flow table item according to the first message; setting the identifier of the data stream into a first message and sending the first message carrying the identifier to a fast forwarding module so that the fast forwarding module sends the first message carrying the identifier to a service module for processing; receiving an acceleration mark determined by the service module for the first message according to the service requirement, and adding the acceleration mark into the data flow table entry; receiving a subsequent message which carries an identifier and corresponds to the first message in the data stream forwarded by the fast forwarding module; acquiring an acceleration mark corresponding to the subsequent message from the data flow table entry according to the mark carried by the subsequent message, and adding the acceleration mark into the subsequent message; and sending the subsequent message added with the acceleration mark to the fast forwarding module so that the fast forwarding module directly sends the subsequent message added with the acceleration mark. And the network forwarding performance is improved.

Description

Method and device for rapidly forwarding message
Technical Field
The present invention relates to the field of data communications, and in particular, to a method and an apparatus for fast forwarding packets.
Background
In order to solve the technical problem, the embodiment of the invention adopts the following technical scheme:
with the continuous development and maturity of network technologies, various network applications enter people's lives. The increasing of network application services, such as routing, application identification, user management, content auditing, firewall and the like, put higher requirements on the forwarding speed of data streams.
Fast forwarding is also called fast forwarding, and a cache is used for processing messages, which is a technology for forwarding data streams by software. A flow is typically described using a five-tuple of packets: the source IP address, the destination IP address, the source port, the destination port and the protocol number, and a group of messages with the same quintuple are a data stream. When the message reaches fast forwarding for the first time, the fast forwarding platform creates a flow entry for the message, and the subsequent same data flow message is associated to the flow entry and used for storing data flow processing intermediate information.
For the network equipment in the network path, the fast forwarding performs data flow matching on the received message according to the quintuple of the message, determines the data flow to which the message belongs, and then performs various application service processing according to the data flow. In the fast forwarding process, each packet needs to flow through each service (application service) for service function processing, so the processing time of each packet is
Figure BDA0002289402390000011
Where n is the number of services and Ti is the time it takes for each service to process a message.
In the existing fast forwarding service processing process, the forwarding performance of data streams which do not need to be processed by each message and have the same processing result with each message is wasted. The data flow which does not need to process each message can only process the service of the necessary message; the data stream with the same processing result of each message can only process one message.
For the above situation, the current method usually judges the logic in the service, directly exits the processing process for the message that does not need to be processed, and transmits the message to the next service.
In the prior art, there is a defect: and storing the service processing result into a corresponding flow table entry according to the matched data flow, entering the service for the message which does not need service processing, judging whether the service processing is needed in the service, and directly transmitting the message to the next service for the message which does not need processing. The technical scheme has a performance waste point, the message which does not need to be processed by the service can be judged without entering the service, the judgment can be completed before the service is entered, and the expense of the message entering the service and then exiting the service is saved.
Disclosure of Invention
In order to solve the foregoing problems, an aspect of the embodiments of the present invention is to provide a method for fast forwarding a packet, including:
receiving a head message of a data stream forwarded by a fast forwarding module;
establishing a data flow table entry according to the first message;
setting the identifier of the data stream into the header message and sending the header message carrying the identifier to the fast forwarding module, so that the fast forwarding module sends the header message carrying the identifier to a service module for processing;
receiving an acceleration mark determined by the service module for the first message according to service requirements, and adding the acceleration mark to the data flow table entry;
receiving a subsequent message which carries the identifier and corresponds to the first message in the data stream forwarded by the fast forwarding module;
acquiring an acceleration mark corresponding to the subsequent message from the data flow table entry according to the identifier carried by the subsequent message, and adding the acceleration mark into the subsequent message;
and sending the subsequent message added with the acceleration mark to the rapid forwarding module, so that the rapid forwarding module directly sends the subsequent message added with the acceleration mark out according to the acceleration mark without sending the subsequent message added with the acceleration mark to the service module.
Optionally, the method further includes:
receiving the service information determined by the service module for the first message according to the service requirement, and adding the service information into the data flow table entry;
acquiring service information corresponding to the subsequent message from the data flow table entry according to the subsequent message, and modifying the subsequent message added with the acceleration mark according to the service information;
the step of sending the subsequent message added with the acceleration flag to the fast forwarding module, so that the fast forwarding module does not send the subsequent message added with the acceleration flag to the service module according to the acceleration flag, but directly sends the subsequent message added with the acceleration flag includes:
and sending the modified subsequent message added with the acceleration mark to the rapid forwarding module, so that the rapid forwarding module does not send the modified subsequent message added with the acceleration mark to the service module according to the acceleration mark, and directly sends the modified subsequent message added with the acceleration mark.
Optionally, the service module is an NAT service module,
the step of receiving the service information determined by the service module for the first packet according to the service requirement and adding the service information to the data flow entry specifically includes:
receiving first source IP address information determined by the NAT service module for the first message according to NAT service standards, and adding the first source IP address information into the data flow table entry;
the step of acquiring the service information corresponding to the subsequent message from the data flow table entry according to the subsequent message, and modifying the subsequent message added with the acceleration flag according to the service information specifically includes:
acquiring first source IP address information corresponding to the subsequent message from the data flow table entry according to the subsequent message, and modifying the source IP address information of the subsequent message added with the acceleration mark by using the first source IP address information;
the step of sending the modified subsequent message to which the acceleration flag is added to the fast forwarding module, so that the fast forwarding module does not send the modified subsequent message to which the acceleration flag is added to the service module according to the acceleration flag, but directly sends the modified subsequent message to which the acceleration flag is added, specifically includes:
and sending the subsequent message added with the acceleration mark and carrying the first source IP address information to the rapid forwarding module, so that the rapid forwarding module does not send the subsequent message added with the acceleration mark carrying the first source IP address information to the service module according to the acceleration mark, and directly sends the subsequent message added with the acceleration mark carrying the first source IP address information.
Another aspect of the embodiments of the present invention is to provide a method for fast forwarding a packet, including:
sending a first message of a data stream to a fast forwarding platform so that the fast forwarding platform can establish a data stream table entry according to the first message;
receiving a header message carrying the identifier of the data stream sent by the fast forwarding platform,
sending the first message carrying the identifier to a service module for processing, so that the service module determines an acceleration mark for the first message according to service requirements and adds the acceleration mark to the data flow table entry;
sending a subsequent message carrying the identifier, corresponding to the first message, in the data stream to a fast forwarding platform; so that the fast forwarding platform obtains an acceleration mark corresponding to the subsequent message from the data flow table entry according to the identifier carried by the subsequent message, and adds the acceleration mark to the subsequent message;
receiving the subsequent message added with the acceleration mark,
and according to the acceleration mark, the subsequent message added with the acceleration mark is not sent to the service module, but is directly sent out.
Optionally, the step of sending the header message with the identifier to a service module for processing further includes:
sending the first message carrying the identifier to a service module for processing so that the service module can determine service information for the first message according to service requirements and add the service information to the data flow list item,
the rapid forwarding platform can conveniently acquire service information corresponding to the subsequent message from the data flow table entry according to the subsequent message, and modify the subsequent message added with the acceleration mark according to the service information;
the step of receiving the subsequent message added with the acceleration flag specifically includes:
receiving the modified subsequent message added with the acceleration mark;
the step of directly sending the subsequent message added with the acceleration mark out without sending the subsequent message added with the acceleration mark to the service module according to the acceleration mark specifically includes:
and according to the acceleration mark, the modified subsequent message added with the acceleration mark is not sent to the service module, but the modified subsequent message added with the acceleration mark is directly sent out.
Optionally, the service module is an NAT service module,
the step of sending the first message carrying the identifier to a service module for processing, so that the service module determines service information for the first message according to service requirements, and adds the service information to the data flow table entry, so that a fast forwarding platform obtains the service information corresponding to the subsequent message from the data flow table entry according to the subsequent message, and modifying the subsequent message added with the acceleration flag according to the service information specifically includes:
sending the first message carrying the identifier to the NAT service module for processing, so that the NAT service module determines first source IP address information for the first message according to NAT service standards and adds the first source IP address information to the data flow table entry; so that the fast forwarding platform can obtain the first source IP address information corresponding to the subsequent message from the data flow table entry according to the subsequent message, and modify the source IP address information of the subsequent message added with the acceleration mark by using the first source IP address information;
the step of receiving the modified subsequent message to which the acceleration flag is added specifically includes:
receiving the subsequent message which is added with the acceleration mark and carries the first source IP address information;
the step of directly sending the modified subsequent message added with the acceleration mark to the service module without sending the modified subsequent message added with the acceleration mark to the service module according to the acceleration mark specifically includes:
and according to the acceleration mark, not sending the subsequent message carrying the first source IP address information and added with the acceleration mark to the service module, but directly sending the subsequent message carrying the first source IP address information and added with the acceleration mark.
Another aspect of the embodiments of the present invention is to provide a device for fast forwarding a packet, including:
the first receiving module is used for receiving the head message of the data stream forwarded by the fast forwarding module;
the establishing module is used for establishing a data flow table item according to the first message;
the setting module is used for setting the identifier of the data stream into the first message and sending the first message carrying the identifier to the fast forwarding module so that the fast forwarding module sends the first message carrying the identifier to a service module for processing;
a second receiving module, configured to receive an acceleration flag determined by the service module for the first packet according to a service requirement, and add the acceleration flag to the data flow entry;
the first receiving module is further configured to receive a subsequent message carrying the identifier, which corresponds to the first message, in the data stream forwarded by the fast forwarding module;
an obtaining module, configured to obtain an acceleration flag corresponding to the subsequent packet from the data flow table entry according to the identifier carried in the subsequent packet,
a modification module for adding the acceleration flag to the subsequent message;
and the sending module is used for sending the subsequent message added with the acceleration mark to the rapid forwarding module, so that the rapid forwarding module does not send the subsequent message added with the acceleration mark to the service module according to the acceleration mark, and directly sends the subsequent message added with the acceleration mark.
Alternatively to this, the first and second parts may,
the second receiving module is further configured to receive service information determined by the service module for the first packet according to a service requirement, and add the service information to the data flow entry;
the obtaining module is further configured to obtain service information corresponding to the subsequent packet from the data flow table entry according to the subsequent packet,
the modification module is further configured to modify the subsequent message to which the acceleration flag is added according to the service information;
the sending module is specifically configured to:
and sending the modified subsequent message added with the acceleration mark to the rapid forwarding module, so that the rapid forwarding module does not send the modified subsequent message added with the acceleration mark to the service module according to the acceleration mark, and directly sends the modified subsequent message added with the acceleration mark.
Optionally, the service module is an NAT service module,
the second receiving module is further specifically configured to:
receiving first source IP address information determined by the NAT service module for the first message according to NAT service standards, and adding the first source IP address information into the data flow table entry;
the obtaining module is further specifically configured to:
acquiring first source IP address information corresponding to the subsequent message from the data flow table entry according to the subsequent message;
the modification module is further specifically configured to:
modifying the source IP address information of the subsequent message added with the acceleration mark by using the first source IP address information;
the sending module is further specifically configured to:
and sending the subsequent message added with the acceleration mark and carrying the first source IP address information to the rapid forwarding module, so that the rapid forwarding module does not send the subsequent message added with the acceleration mark carrying the first source IP address information to the service module according to the acceleration mark, and directly sends the subsequent message added with the acceleration mark carrying the first source IP address information.
In another aspect, an embodiment of the present invention provides a device for fast forwarding a packet, including:
the first sending module is used for sending a first message of a data stream to a fast forwarding platform so that the fast forwarding platform can establish a data stream table entry according to the first message;
a third receiving module, configured to receive a header message carrying the identifier of the data stream and sent by the fast forwarding platform,
a second sending module, configured to send the first message carrying the identifier to a service module for processing, so that the service module determines an acceleration flag for the first message according to a service requirement, and adds the acceleration flag to the data flow table entry;
the first sending module is further configured to send a subsequent message carrying the identifier, corresponding to the first message, in the data stream to a fast forwarding platform; so that the fast forwarding platform obtains an acceleration mark corresponding to the subsequent message from the data flow table entry according to the identifier carried by the subsequent message, and adds the acceleration mark to the subsequent message;
a fourth receiving module, configured to receive the subsequent message with the acceleration flag added, sent by the fast forwarding platform,
and the third sending module is used for directly sending the subsequent message added with the acceleration mark out according to the acceleration mark without sending the subsequent message added with the acceleration mark to the service module.
Optionally, the second sending module is further configured to:
sending the first message carrying the identifier to a service module for processing so that the service module can determine service information for the first message according to service requirements and add the service information to the data flow list item,
the rapid forwarding platform can conveniently acquire service information corresponding to the subsequent message from the data flow table entry according to the subsequent message, and modify the subsequent message added with the acceleration mark according to the service information;
the fourth receiving module is specifically configured to:
receiving the modified subsequent message added with the acceleration mark, which is sent by the fast forwarding platform;
the third sending module is specifically configured to:
and according to the acceleration mark, the modified subsequent message added with the acceleration mark is not sent to the service module, but the modified subsequent message added with the acceleration mark is directly sent out.
Optionally, the service module is an NAT service module,
the second sending module is further specifically configured to:
sending the first message carrying the identifier to the NAT service module for processing, so that the NAT service module determines first source IP address information for the first message according to NAT service standards and adds the first source IP address information to the data flow table entry; so that the fast forwarding platform can obtain the first source IP address information corresponding to the subsequent message from the data flow table entry according to the subsequent message, and modify the source IP address information of the subsequent message added with the acceleration mark by using the first source IP address information;
the fourth receiving module is further specifically configured to:
receiving the subsequent message which is sent by the fast forwarding platform and added with the acceleration mark and carries the first source IP address information;
the third sending module is specifically configured to:
and according to the acceleration mark, not sending the subsequent message carrying the first source IP address information and added with the acceleration mark to the service module, but directly sending the subsequent message carrying the first source IP address information and added with the acceleration mark.
The embodiment of the invention has the beneficial effects that: the network forwarding performance can be improved on the basis of not increasing the network cost.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flow chart of a method provided by an embodiment of the present invention;
FIG. 2 is a flow chart of a method provided by an embodiment of the present invention;
FIG. 3 is a flow chart of a method provided by an embodiment of the present invention;
FIG. 4 is a block diagram of an apparatus according to an embodiment of the present invention;
fig. 5 is a structural diagram of an apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
An embodiment of the present invention provides a method for quickly forwarding a packet, as shown in fig. 1, including:
s101, receiving a header message of a data stream forwarded by a fast forwarding module;
s103, establishing a data flow table according to the first message;
s105, setting the identifier of the data stream into the header message and sending the header message carrying the identifier to the fast forwarding module, so that the fast forwarding module sends the header message carrying the identifier to a service module for processing;
s107, receiving an acceleration mark determined by the service module for the first message according to service requirements, and adding the acceleration mark to the data flow table entry;
s109, receiving a subsequent message which carries the identifier and corresponds to the first message in the data stream forwarded by the fast forwarding module;
s111, acquiring an acceleration mark corresponding to the subsequent message from the data flow table entry according to the identifier carried by the subsequent message, and adding the acceleration mark into the subsequent message;
s113, sending the subsequent message added with the acceleration flag to the fast forwarding module, so that the fast forwarding module directly sends the subsequent message added with the acceleration flag out without sending the subsequent message added with the acceleration flag to the service module according to the acceleration flag.
Optionally, the embodiment of the present invention does not concern what service module is processing a packet, but provides a method capable of accelerating packet forwarding, as long as the method conforms to the following requirements: firstly, services processed by each message are not needed; and secondly, the message of the service with the two conditions can be accelerated when each message is processed by the service with the same result. In an embodiment of the present invention, there may be a plurality of service modules, for example, a network address translation NAT service module, and certainly, not only the NAT service module but also the fast forwarding module is responsible for sequentially distributing the packet to each service module for processing, for example, after the NAT service module finishes processing, the subsequent packet added with the acceleration flag may be directly sent to the next service module for processing, and the processing flow of the next service module may be the same as that of the NAT service module until the packet is processed by all service modules that need to be processed, and the flow ends.
Optionally, as shown in fig. 2, the method further includes:
s201, receiving the service information determined by the service module for the first message according to the service requirement, and adding the service information into the data flow table entry;
s203, acquiring service information corresponding to the subsequent message from the data flow table entry according to the subsequent message, and modifying the subsequent message added with the acceleration mark according to the service information;
the step S113 specifically includes:
and sending the modified subsequent message added with the acceleration mark to the rapid forwarding module, so that the rapid forwarding module does not send the modified subsequent message added with the acceleration mark to the service module according to the acceleration mark, and directly sends the modified subsequent message added with the acceleration mark.
Optionally, the service module is an NAT service module,
the step S201 specifically includes:
receiving first source IP address information determined by the NAT service module for the first message according to NAT service standards, and adding the first source IP address information into the data flow table entry;
the step S203 specifically includes:
acquiring first source IP address information corresponding to the subsequent message from the data flow table entry according to the subsequent message, and modifying the source IP address information of the subsequent message added with the acceleration mark by using the first source IP address information;
the step of sending the modified subsequent message to which the acceleration flag is added to the fast forwarding module, so that the fast forwarding module does not send the modified subsequent message to which the acceleration flag is added to the service module according to the acceleration flag, but directly sends the modified subsequent message to which the acceleration flag is added, specifically includes:
and sending the subsequent message added with the acceleration mark and carrying the first source IP address information to the rapid forwarding module, so that the rapid forwarding module does not send the subsequent message added with the acceleration mark carrying the first source IP address information to the service module according to the acceleration mark, and directly sends the subsequent message added with the acceleration mark carrying the first source IP address information.
Another aspect of the embodiments of the present invention is to provide a method for fast forwarding a packet, as shown in fig. 3, including:
s301, sending a first message of a data stream to a fast forwarding platform so that the fast forwarding platform can establish a data stream table entry according to the first message;
s303, receiving a header message carrying the identifier of the data stream sent by the fast forwarding platform,
s305, sending the header message carrying the identifier to a service module for processing, so that the service module determines an acceleration mark for the header message according to service requirements, and adds the acceleration mark to the data flow table entry;
s307, sending a subsequent message which carries the identifier and corresponds to the first message in the data stream to a fast forwarding platform; so that the fast forwarding platform obtains an acceleration mark corresponding to the subsequent message from the data flow table entry according to the identifier carried by the subsequent message, and adds the acceleration mark to the subsequent message;
s309, receiving the subsequent message added with the acceleration mark sent by the rapid forwarding platform,
s311, according to the acceleration mark, the subsequent message added with the acceleration mark is not sent to the service module, but is directly sent out.
Optionally, the step S305 further includes:
sending the first message carrying the identifier to a service module for processing, so that the service module determines service information for the first message according to service requirements, and adds the service information to the data flow table entry, so that a fast forwarding platform acquires the service information corresponding to the subsequent message from the data flow table entry according to the subsequent message, and modifies the subsequent message added with the acceleration mark according to the service information;
the step S309 specifically includes:
receiving the modified subsequent message added with the acceleration mark, which is sent by the fast forwarding platform;
the step S311 specifically includes:
and according to the acceleration mark, the modified subsequent message added with the acceleration mark is not sent to the service module, but the modified subsequent message added with the acceleration mark is directly sent out.
Optionally, the service module is an NAT service module,
the step of sending the first message carrying the identifier to a service module for processing, so that the service module determines service information for the first message according to service requirements, and adds the service information to the data flow table entry, so that a fast forwarding platform obtains the service information corresponding to the subsequent message from the data flow table entry according to the subsequent message, and modifying the subsequent message added with the acceleration flag according to the service information specifically includes:
sending the first message carrying the identifier to the NAT service module for processing, so that the NAT service module determines first source IP address information for the first message according to NAT service standards and adds the first source IP address information to the data flow table entry; so that the fast forwarding platform can obtain the first source IP address information corresponding to the subsequent message from the data flow table entry according to the subsequent message, and modify the source IP address information of the subsequent message added with the acceleration mark by using the first source IP address information;
the step of receiving the modified subsequent message added with the acceleration flag sent by the fast forwarding platform specifically includes:
receiving the subsequent message which is sent by the fast forwarding platform and added with the acceleration mark and carries the first source IP address information;
the step of directly sending the modified subsequent message added with the acceleration mark to the service module without sending the modified subsequent message added with the acceleration mark to the service module according to the acceleration mark specifically includes:
and according to the acceleration mark, not sending the subsequent message carrying the first source IP address information and added with the acceleration mark to the service module, but directly sending the subsequent message carrying the first source IP address information and added with the acceleration mark.
Another aspect of the embodiments of the present invention is to provide an apparatus for fast forwarding a packet, as shown in fig. 4, including:
a first receiving module 401, configured to receive a header of the data stream forwarded by the fast forwarding module;
an establishing module 403, configured to establish a data flow table entry according to the header message;
a setting module 405, configured to set an identifier of the data stream into the header message and send the header message carrying the identifier to the fast forwarding module, so that the fast forwarding module sends the header message carrying the identifier to a service module for processing;
a second receiving module 407, configured to receive an acceleration flag determined by the service module for the first packet according to a service requirement, and add the acceleration flag to the data flow entry;
the first receiving module 409 is further configured to receive a subsequent message which carries the identifier and corresponds to the header message in the data stream forwarded by the fast forwarding module;
an obtaining module 411, configured to obtain an acceleration flag corresponding to the subsequent packet from the data flow entry according to the identifier carried in the subsequent packet,
a modification module 413 configured to add the acceleration flag to the subsequent message;
a sending module 415, configured to send the subsequent message to which the acceleration flag is added to the fast forwarding module, so that the fast forwarding module directly sends the subsequent message to which the acceleration flag is added out without sending the subsequent message to which the acceleration flag is added to the service module according to the acceleration flag.
Alternatively to this, the first and second parts may,
the second receiving module 407 is further configured to receive service information determined by the service module for the first packet according to a service requirement, and add the service information to the data flow entry;
the obtaining module 411 is further configured to obtain service information corresponding to the subsequent packet from the data flow table entry according to the subsequent packet,
the modifying module 413 is further configured to modify the subsequent packet to which the acceleration flag is added according to the service information;
the sending module 415 is specifically configured to:
and sending the modified subsequent message added with the acceleration mark to the rapid forwarding module, so that the rapid forwarding module does not send the modified subsequent message added with the acceleration mark to the service module according to the acceleration mark, and directly sends the modified subsequent message added with the acceleration mark.
Optionally, the service module is an NAT service module,
the second receiving module 407 is further specifically configured to:
receiving first source IP address information determined by the NAT service module for the first message according to NAT service standards, and adding the first source IP address information into the data flow table entry;
the obtaining module 411 is further specifically configured to:
acquiring first source IP address information corresponding to the subsequent message from the data flow table entry according to the subsequent message;
the modification module 413 is further specifically configured to:
modifying the source IP address information of the subsequent message added with the acceleration mark by using the first source IP address information;
the sending module 415 is further specifically configured to:
and sending the subsequent message added with the acceleration mark and carrying the first source IP address information to the rapid forwarding module, so that the rapid forwarding module does not send the subsequent message added with the acceleration mark carrying the first source IP address information to the service module according to the acceleration mark, and directly sends the subsequent message added with the acceleration mark carrying the first source IP address information.
Another aspect of the embodiments of the present invention is to provide a device for fast forwarding a packet, as shown in fig. 5, including:
a first sending module 501, configured to send a first packet of a data stream to a fast forwarding platform, so that the fast forwarding platform establishes a data stream table entry according to the first packet;
a third receiving module 503, configured to receive a header message carrying the identifier of the data stream and sent by the fast forwarding platform,
a second sending module 505, configured to send the header message with the identifier to a service module for processing, so that the service module determines an acceleration flag for the header message according to a service requirement, and adds the acceleration flag to the data flow table entry;
the first sending module 501 is further configured to send a subsequent message carrying the identifier, corresponding to the first message, in the data stream to a fast forwarding platform; so that the fast forwarding platform obtains an acceleration mark corresponding to the subsequent message from the data flow table entry according to the identifier carried by the subsequent message, and adds the acceleration mark to the subsequent message;
a fourth receiving module 507, configured to receive the subsequent message with the added acceleration flag sent by the fast forwarding platform,
a third sending module 509, configured to send the subsequent message to which the acceleration flag is added directly out instead of sending the subsequent message to which the acceleration flag is added to the service module according to the acceleration flag.
Optionally, the second sending module 505 is further configured to:
sending the first message carrying the identifier to a service module for processing, so that the service module determines service information for the first message according to service requirements, and adds the service information to the data flow table entry, so that a fast forwarding platform acquires the service information corresponding to the subsequent message from the data flow table entry according to the subsequent message, and modifies the subsequent message added with the acceleration mark according to the service information;
the fourth receiving module 507 is specifically configured to:
receiving the modified subsequent message added with the acceleration mark, which is sent by the fast forwarding platform;
the third sending module 509 is specifically configured to:
and according to the acceleration mark, the modified subsequent message added with the acceleration mark is not sent to the service module, but the modified subsequent message added with the acceleration mark is directly sent out.
Optionally, the service module is an NAT service module,
the second sending module 505 is further specifically configured to:
sending the first message carrying the identifier to the NAT service module for processing, so that the NAT service module determines first source IP address information for the first message according to NAT service standards and adds the first source IP address information to the data flow table entry; so that the fast forwarding platform can obtain the first source IP address information corresponding to the subsequent message from the data flow table entry according to the subsequent message, and modify the source IP address information of the subsequent message added with the acceleration mark by using the first source IP address information;
the fourth receiving module 507 is further specifically configured to:
receiving the subsequent message which is sent by the fast forwarding platform and added with the acceleration mark and carries the first source IP address information;
the third sending module 509 is specifically configured to:
and according to the acceleration mark, not sending the subsequent message carrying the first source IP address information and added with the acceleration mark to the service module, but directly sending the subsequent message carrying the first source IP address information and added with the acceleration mark.
The embodiment of the invention has the beneficial effects that: the network forwarding performance can be improved on the basis of not increasing the network cost.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (12)

1. A method for fast forwarding a packet is characterized by comprising the following steps:
receiving a head message of a data stream forwarded by a fast forwarding module;
establishing a data flow table entry according to the first message;
setting the identifier of the data stream into the header message and sending the header message carrying the identifier to the fast forwarding module, so that the fast forwarding module sends the header message carrying the identifier to a service module for processing;
receiving an acceleration mark determined by the service module for the first message according to service requirements, and adding the acceleration mark to the data flow table entry;
receiving a subsequent message which carries the identifier and corresponds to the first message in the data stream forwarded by the fast forwarding module;
acquiring an acceleration mark corresponding to the subsequent message from the data flow table entry according to the identifier carried by the subsequent message, and adding the acceleration mark into the subsequent message;
and sending the subsequent message added with the acceleration mark to the rapid forwarding module, so that the rapid forwarding module directly sends the subsequent message added with the acceleration mark out according to the acceleration mark without sending the subsequent message added with the acceleration mark to the service module.
2. The method of claim 1, further comprising:
receiving the service information determined by the service module for the first message according to the service requirement, and adding the service information into the data flow table entry;
acquiring service information corresponding to the subsequent message from the data flow table entry according to the subsequent message, and modifying the subsequent message added with the acceleration mark according to the service information;
the step of sending the subsequent message added with the acceleration flag to the fast forwarding module, so that the fast forwarding module does not send the subsequent message added with the acceleration flag to the service module according to the acceleration flag, but directly sends the subsequent message added with the acceleration flag includes:
and sending the modified subsequent message added with the acceleration mark to the rapid forwarding module, so that the rapid forwarding module does not send the modified subsequent message added with the acceleration mark to the service module according to the acceleration mark, and directly sends the modified subsequent message added with the acceleration mark.
3. The method according to claim 2, wherein the service module is an NAT service module, and the step of receiving the service information determined by the service module for the first packet according to the service requirement and adding the service information to the data flow entry specifically includes:
receiving first source IP address information determined by the NAT service module for the first message according to NAT service standards, and adding the first source IP address information into the data flow table entry;
the step of acquiring the service information corresponding to the subsequent message from the data flow table entry according to the subsequent message, and modifying the subsequent message added with the acceleration flag according to the service information specifically includes:
acquiring first source IP address information corresponding to the subsequent message from the data flow table entry according to the subsequent message, and modifying the source IP address information of the subsequent message added with the acceleration mark by using the first source IP address information;
the step of sending the modified subsequent message to which the acceleration flag is added to the fast forwarding module, so that the fast forwarding module does not send the modified subsequent message to which the acceleration flag is added to the service module according to the acceleration flag, but directly sends the modified subsequent message to which the acceleration flag is added, specifically includes:
and sending the subsequent message added with the acceleration mark and carrying the first source IP address information to the rapid forwarding module, so that the rapid forwarding module does not send the subsequent message added with the acceleration mark carrying the first source IP address information to the service module according to the acceleration mark, and directly sends the subsequent message added with the acceleration mark carrying the first source IP address information.
4. A method for fast forwarding a packet is characterized by comprising the following steps:
sending a first message of a data stream to a fast forwarding platform so that the fast forwarding platform can establish a data stream table entry according to the first message;
receiving a header message carrying the identifier of the data stream sent by the fast forwarding platform,
sending the first message carrying the identifier to a service module for processing, so that the service module determines an acceleration mark for the first message according to service requirements and adds the acceleration mark to the data flow table entry;
sending a subsequent message carrying the identifier, corresponding to the first message, in the data stream to a fast forwarding platform; so that the fast forwarding platform obtains an acceleration mark corresponding to the subsequent message from the data flow table entry according to the identifier carried by the subsequent message, and adds the acceleration mark to the subsequent message;
receiving the subsequent message added with the acceleration mark sent by the fast forwarding platform,
and according to the acceleration mark, the subsequent message added with the acceleration mark is not sent to the service module, but is directly sent out.
5. The method of claim 4, wherein the step of sending the header message carrying the identifier to a service module for processing further comprises:
sending the first message carrying the identifier to a service module for processing so that the service module can determine service information for the first message according to service requirements and add the service information to the data flow list item,
the rapid forwarding platform can conveniently acquire service information corresponding to the subsequent message from the data flow table entry according to the subsequent message, and modify the subsequent message added with the acceleration mark according to the service information;
the step of receiving the subsequent message added with the acceleration flag sent by the fast forwarding platform specifically includes:
receiving the modified subsequent message added with the acceleration mark, which is sent by the fast forwarding platform;
the step of directly sending the subsequent message added with the acceleration mark out without sending the subsequent message added with the acceleration mark to the service module according to the acceleration mark specifically includes: and according to the acceleration mark, the modified subsequent message added with the acceleration mark is not sent to the service module, but the modified subsequent message added with the acceleration mark is directly sent out.
6. The method of claim 5, wherein the traffic module is a NAT traffic module,
the step of sending the first message carrying the identifier to a service module for processing, so that the service module determines service information for the first message according to service requirements, and adds the service information to the data flow table entry, so that a fast forwarding platform obtains the service information corresponding to the subsequent message from the data flow table entry according to the subsequent message, and modifying the subsequent message added with the acceleration flag according to the service information specifically includes:
sending the first message carrying the identifier to the NAT service module for processing, so that the NAT service module determines first source IP address information for the first message according to NAT service standards and adds the first source IP address information to the data flow table entry; so that the fast forwarding platform can obtain the first source IP address information corresponding to the subsequent message from the data flow table entry according to the subsequent message, and modify the source IP address information of the subsequent message added with the acceleration mark by using the first source IP address information;
the step of receiving the modified subsequent message added with the acceleration flag sent by the fast forwarding platform specifically includes:
receiving the subsequent message which is sent by the fast forwarding platform and added with the acceleration mark and carries the first source IP address information;
the step of directly sending the modified subsequent message added with the acceleration mark to the service module without sending the modified subsequent message added with the acceleration mark to the service module according to the acceleration mark specifically includes:
and according to the acceleration mark, not sending the subsequent message carrying the first source IP address information and added with the acceleration mark to the service module, but directly sending the subsequent message carrying the first source IP address information and added with the acceleration mark.
7. An apparatus for fast forwarding a packet, comprising:
the first receiving module is used for receiving the head message of the data stream forwarded by the fast forwarding module;
the establishing module is used for establishing a data flow table item according to the first message;
the setting module is used for setting the identifier of the data stream into the first message and sending the first message carrying the identifier to the fast forwarding module so that the fast forwarding module sends the first message carrying the identifier to a service module for processing;
a second receiving module, configured to receive an acceleration flag determined by the service module for the first packet according to a service requirement, and add the acceleration flag to the data flow entry;
the first receiving module is further configured to receive a subsequent message carrying the identifier, which corresponds to the first message, in the data stream forwarded by the fast forwarding module;
an obtaining module, configured to obtain an acceleration flag corresponding to the subsequent packet from the data flow table entry according to the identifier carried in the subsequent packet,
a modification module for adding the acceleration flag to the subsequent message;
and the sending module is used for sending the subsequent message added with the acceleration mark to the rapid forwarding module, so that the rapid forwarding module does not send the subsequent message added with the acceleration mark to the service module according to the acceleration mark, and directly sends the subsequent message added with the acceleration mark.
8. The apparatus of claim 7,
the second receiving module is further configured to receive service information determined by the service module for the first packet according to a service requirement, and add the service information to the data flow entry;
the obtaining module is further configured to obtain service information corresponding to the subsequent packet from the data flow table entry according to the subsequent packet,
the modification module is further configured to modify the subsequent message to which the acceleration flag is added according to the service information;
the sending module is specifically configured to:
and sending the modified subsequent message added with the acceleration mark to the rapid forwarding module, so that the rapid forwarding module does not send the modified subsequent message added with the acceleration mark to the service module according to the acceleration mark, and directly sends the modified subsequent message added with the acceleration mark.
9. The apparatus of claim 8, wherein the service module is a NAT service module, and the second receiving module is further specifically configured to:
receiving first source IP address information determined by the NAT service module for the first message according to NAT service standards, and adding the first source IP address information into the data flow table entry;
the obtaining module is further specifically configured to:
acquiring first source IP address information corresponding to the subsequent message from the data flow table entry according to the subsequent message;
the modification module is further specifically configured to:
modifying the source IP address information of the subsequent message added with the acceleration mark by using the first source IP address information;
the sending module is further specifically configured to:
and sending the subsequent message added with the acceleration mark and carrying the first source IP address information to the rapid forwarding module, so that the rapid forwarding module does not send the subsequent message added with the acceleration mark carrying the first source IP address information to the service module according to the acceleration mark, and directly sends the subsequent message added with the acceleration mark carrying the first source IP address information.
10. An apparatus for fast forwarding a packet, comprising:
the first sending module is used for sending a first message of a data stream to a fast forwarding platform so that the fast forwarding platform can establish a data stream table entry according to the first message;
a third receiving module, configured to receive a header message carrying the identifier of the data stream and sent by the fast forwarding platform,
a second sending module, configured to send the first message carrying the identifier to a service module for processing, so that the service module determines an acceleration flag for the first message according to a service requirement, and adds the acceleration flag to the data flow table entry;
the first sending module is further configured to send a subsequent message carrying the identifier, corresponding to the first message, in the data stream to a fast forwarding platform; so that the fast forwarding platform obtains an acceleration mark corresponding to the subsequent message from the data flow table entry according to the identifier carried by the subsequent message, and adds the acceleration mark to the subsequent message;
a fourth receiving module, configured to receive the subsequent message with the acceleration flag added, sent by the fast forwarding platform,
and the third sending module is used for directly sending the subsequent message added with the acceleration mark out according to the acceleration mark without sending the subsequent message added with the acceleration mark to the service module.
11. The apparatus of claim 10, wherein the second sending module is further configured to:
sending the first message carrying the identifier to a service module for processing so that the service module can determine service information for the first message according to service requirements and add the service information to the data flow list item,
the rapid forwarding platform can conveniently acquire service information corresponding to the subsequent message from the data flow table entry according to the subsequent message, and modify the subsequent message added with the acceleration mark according to the service information;
the fourth receiving module is specifically configured to:
receiving the modified subsequent message added with the acceleration mark, which is sent by the fast forwarding platform;
the third sending module is specifically configured to:
and according to the acceleration mark, the modified subsequent message added with the acceleration mark is not sent to the service module, but the modified subsequent message added with the acceleration mark is directly sent out.
12. The apparatus of claim 11, wherein the traffic module is a NAT traffic module,
the second sending module is further specifically configured to:
sending the first message carrying the identifier to the NAT service module for processing, so that the NAT service module determines first source IP address information for the first message according to NAT service standards and adds the first source IP address information to the data flow table entry; so that the fast forwarding platform can obtain the first source IP address information corresponding to the subsequent message from the data flow table entry according to the subsequent message, and modify the source IP address information of the subsequent message added with the acceleration mark by using the first source IP address information;
the fourth receiving module is further specifically configured to:
receiving the subsequent message which is sent by the fast forwarding platform and added with the acceleration mark and carries the first source IP address information;
the third sending module is specifically configured to:
and according to the acceleration mark, not sending the subsequent message carrying the first source IP address information and added with the acceleration mark to the service module, but directly sending the subsequent message carrying the first source IP address information and added with the acceleration mark.
CN201911173651.XA 2019-11-26 2019-11-26 Method and device for rapidly forwarding message Active CN110932979B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911173651.XA CN110932979B (en) 2019-11-26 2019-11-26 Method and device for rapidly forwarding message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911173651.XA CN110932979B (en) 2019-11-26 2019-11-26 Method and device for rapidly forwarding message

Publications (2)

Publication Number Publication Date
CN110932979A true CN110932979A (en) 2020-03-27
CN110932979B CN110932979B (en) 2022-07-19

Family

ID=69852077

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911173651.XA Active CN110932979B (en) 2019-11-26 2019-11-26 Method and device for rapidly forwarding message

Country Status (1)

Country Link
CN (1) CN110932979B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101635676A (en) * 2009-08-31 2010-01-27 杭州华三通信技术有限公司 Message processing method and network equipment
CN102739502A (en) * 2011-04-01 2012-10-17 中兴通讯股份有限公司 Method for realizing network identification conversion, apparatus and system thereof
CN102739820A (en) * 2012-06-28 2012-10-17 杭州华三通信技术有限公司 Message network address conversion processing method and network equipment
CN103685032A (en) * 2013-12-09 2014-03-26 福建星网锐捷网络有限公司 Message forwarding method and network address conversion server
CN105099921A (en) * 2015-05-29 2015-11-25 杭州华三通信技术有限公司 User-based rapid business processing method and device
CN105959254A (en) * 2015-12-02 2016-09-21 杭州迪普科技有限公司 Message processing method and device
CN106330715A (en) * 2015-06-30 2017-01-11 杭州华三通信技术有限公司 Message processing method and device
CN109474518A (en) * 2017-09-07 2019-03-15 华为技术有限公司 The method and device to E-Packet
US20190173982A1 (en) * 2016-12-21 2019-06-06 Nicira, Inc. Dynamic recovery from a split-brain failure in edge nodes
CN110311866A (en) * 2019-06-28 2019-10-08 杭州迪普科技股份有限公司 A kind of method and device of fast-forwarding message

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101635676A (en) * 2009-08-31 2010-01-27 杭州华三通信技术有限公司 Message processing method and network equipment
CN102739502A (en) * 2011-04-01 2012-10-17 中兴通讯股份有限公司 Method for realizing network identification conversion, apparatus and system thereof
CN102739820A (en) * 2012-06-28 2012-10-17 杭州华三通信技术有限公司 Message network address conversion processing method and network equipment
CN103685032A (en) * 2013-12-09 2014-03-26 福建星网锐捷网络有限公司 Message forwarding method and network address conversion server
CN105099921A (en) * 2015-05-29 2015-11-25 杭州华三通信技术有限公司 User-based rapid business processing method and device
CN106330715A (en) * 2015-06-30 2017-01-11 杭州华三通信技术有限公司 Message processing method and device
CN105959254A (en) * 2015-12-02 2016-09-21 杭州迪普科技有限公司 Message processing method and device
US20190173982A1 (en) * 2016-12-21 2019-06-06 Nicira, Inc. Dynamic recovery from a split-brain failure in edge nodes
CN109474518A (en) * 2017-09-07 2019-03-15 华为技术有限公司 The method and device to E-Packet
CN110311866A (en) * 2019-06-28 2019-10-08 杭州迪普科技股份有限公司 A kind of method and device of fast-forwarding message

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
高飞: "网络设备中防火墙状态检测系统设计", 《通信技术》, no. 05, 10 May 2011 (2011-05-10) *

Also Published As

Publication number Publication date
CN110932979B (en) 2022-07-19

Similar Documents

Publication Publication Date Title
US10148573B2 (en) Packet processing method, node, and system
CN108432194B (en) Congestion processing method, host and system
EP3016329A1 (en) Service path allocation method, router and service execution entity
CN105684382A (en) Packet control method, switch and controller
CN106470136B (en) Platform test method and platform test system
CN111246453B (en) Data transmission method, user plane network element and control plane network element
CN106685827B (en) Downlink message forwarding method and AP (access point) equipment
CN107566293B (en) Method and device for limiting message speed
US20170222953A1 (en) User packet forwarding control method and processing node
CN111193756B (en) VXLAN tunnel load balancing method and related equipment
WO2017219732A1 (en) Forwarding method and device for multicast message, router, and computer storage medium
CN111803925A (en) Scheduling method and device of forwarding server of cloud game and readable storage medium
CN104780165B (en) A kind of message enters the safe verification method and equipment of label
CN103188120A (en) Detection method for packet loss of multicast business and device thereof
CN116420347A (en) Method and apparatus for multicast service support in a time sensitive network
CN109067657B (en) Message processing method and device
CN101355585B (en) System and method for protecting information of distributed architecture data communication equipment
CN104486226B (en) A kind of message processing method and device
CN106789671B (en) Service message forwarding method and device
CN110932979B (en) Method and device for rapidly forwarding message
CN113423120A (en) Data distribution processing method and device based on private network terminal and electronic equipment
CN109661037B (en) SFC message forwarding method and device
CN110601989A (en) Network traffic balancing method and device
CN106936718B (en) PPPoE message transmission method and PPPoE server
CN110336759B (en) RDMA (remote direct memory Access) -based protocol message forwarding method and device

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
GR01 Patent grant
GR01 Patent grant