CN116367236A - Message forwarding method, device and computer readable storage medium - Google Patents

Message forwarding method, device and computer readable storage medium Download PDF

Info

Publication number
CN116367236A
CN116367236A CN202111588923.XA CN202111588923A CN116367236A CN 116367236 A CN116367236 A CN 116367236A CN 202111588923 A CN202111588923 A CN 202111588923A CN 116367236 A CN116367236 A CN 116367236A
Authority
CN
China
Prior art keywords
message
pdr
forwarding
destination
packet
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
Application number
CN202111588923.XA
Other languages
Chinese (zh)
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.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp 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 China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202111588923.XA priority Critical patent/CN116367236A/en
Publication of CN116367236A publication Critical patent/CN116367236A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/08Load balancing or load distribution
    • H04W28/09Management thereof
    • H04W28/0958Management thereof based on metrics or performance parameters
    • H04W28/0967Quality of Service [QoS] parameters
    • H04W28/0983Quality of Service [QoS] parameters for optimizing bandwidth or throughput
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/82Miscellaneous aspects
    • H04L47/825Involving tunnels, e.g. MPLS
    • 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
    • H04L61/2535Multiple local networks, e.g. resolving potential IP address conflicts
    • 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/2592Translation of Internet protocol [IP] addresses using tunnelling or encapsulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The disclosure relates to a message forwarding method, a message forwarding device and a computer readable storage medium, and relates to the technical field of communication. The method of the present disclosure comprises: receiving a message transmitted by an N3 interface; searching a first packet detection rule PDR matched with the message according to the full tunnel endpoint identification F-TEID of the message; determining whether a destination terminal and a source terminal of the message belong to the same group according to the first PDR; and under the condition that the destination terminal and the source terminal of the message belong to the same group of terminals, the message is sent from the N3 interface to a base station connected with the destination terminal so as to be sent to the destination terminal through the base station.

Description

Message forwarding method, device and computer readable storage medium
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method, an apparatus, and a computer readable storage medium for forwarding a message.
Background
Forwarding or limiting of user traffic in 5G networks by UPF (User Plane Function ). The forwarding or limiting rules need to be issued by SMF and part of the functions need to be implemented by N4 interface private IEs.
Currently, when the UPF forwards user traffic, all traffic needs to be forwarded through a DN (Data Network) according to rules issued by the SMF.
Disclosure of Invention
The inventors found that: when terminals in the same area (for example, the same park) communicate, the UPF also forwards the message through the DN, which causes bandwidth waste and increases communication delay.
One technical problem to be solved by the present disclosure is: how to improve the efficiency of message forwarding and reduce the waste of bandwidth.
According to some embodiments of the present disclosure, a method for forwarding a message is provided, including: receiving a message transmitted by an N3 interface; searching a first packet detection rule PDR matched with the message according to the full tunnel endpoint identification F-TEID of the message; determining whether a destination terminal and a source terminal of the message belong to the same group according to the first PDR; and under the condition that the destination terminal and the source terminal of the message belong to the same group of terminals, the message is sent from the N3 interface to a base station connected with the destination terminal so as to be sent to the destination terminal through the base station.
In some embodiments, determining whether the destination terminal and the source terminal of the message belong to the same group according to the first PDR includes: determining slice identification information or a data network name DNN corresponding to the message according to the first PDR; determining a group corresponding to the slice identification information or DNN as a group to be matched; matching the destination IP address of the message with the IP address segment corresponding to the group to be matched; if the matching is successful, the destination terminal and the source terminal of the message are determined to belong to the same group.
In some embodiments, the IP address segments corresponding to the groups are stored in different hash tables according to the mask lengths, and the destination IP address of the message is matched with the IP address segment corresponding to the group to be matched by the longest prefix.
In some embodiments, before searching for the first PDR matched to the message according to the F-TEID of the message, the method further includes: determining whether the message is a general wireless packet service tunnel protocol user plane GTPU message; under the condition that the message is a GTPU message, determining whether the message is a message of a transmission protocol data unit (T-PDU) type; and under the condition that the message is a T-PDU type message, recording the information of the message, wherein the information of the message comprises an inner layer data offset.
In some embodiments, after recording the information of the message, the method further includes: determining whether the message is an uplink message; under the condition that the message is an uplink message, distributing the message to a corresponding first working thread according to a source IP address of an inner layer of the message, wherein the message with the same source IP address of the inner layer is distributed to the same working thread; and searching a first PDR matched with the message according to the F-TEID of the message, and determining whether the destination terminal and the source terminal of the message belong to the same group or not according to the first PDR and executing the same group in a first working thread corresponding to the message.
In some embodiments, searching for a first PDR for a message match based on the F-TEID of the message includes: after a first PDR matched with a message is found according to the F-TEID of the message, a first message forwarding rule is obtained according to the first PDR, wherein the first message forwarding rule comprises: forwarding behavior rules FAR, buffering behavior rules BAR, quality of service enforcement rules QER, using at least one of reporting rules URR; newly creating a first fast forwarding table item, and adding the first fast forwarding table item into a least recently used LRU linked list of a source terminal and a five-tuple hash table of a first working thread corresponding to a message, wherein the first fast forwarding table item comprises: and executing the buffer memory information of the first PDR according to the five-tuple information of the message.
In some embodiments, before determining whether the destination terminal and the source terminal of the packet belong to the same group according to the first PDR, further includes: decapsulating the message according to the first PDR; processing the message according to the first message forwarding rule; determining whether a token exceeding the length of the message exists in a quality of service (QoS) -meter token bucket; in case there is a token exceeding the length of the message, determining from the first PDR whether the destination terminal and the source terminal of the message belong to the same group is performed.
In some embodiments, the base station for transmitting the message from the N3 interface to the destination terminal connection includes: searching a second PDR matched with the message according to the destination IP address of the message; processing the message according to the second PDR; inquiring a corresponding route according to the external destination IP address of the message; and sending the message from the N3 interface to the base station connected with the destination terminal according to the route.
In some embodiments, before searching for the second PDR matched to the message according to the destination IP address of the message, the method further includes: distributing the message to a corresponding second working thread according to the destination IP address of the inner layer of the message, wherein the message with the same destination IP address of the inner layer is distributed to the same working thread; and searching a second PDR matched with the message according to the destination IP address of the message, processing the message according to the second PDR, inquiring a corresponding route according to the outer layer destination IP address of the message, and sending the message from the N3 interface to a base station connected with the destination terminal according to the route to execute the message in a second working thread corresponding to the message.
In some embodiments, processing the message according to the second PDR includes: obtaining a second message forwarding rule according to a second PDR, wherein the second message forwarding rule comprises: forwarding behavior rules FAR, buffering behavior rules BAR, quality of service enforcement rules QER, using at least one of reporting rules URR; newly creating a second fast forwarding table item, and adding the second fast forwarding table item into a least recently used LRU linked list of a destination terminal and a five-tuple hash table of a second working thread corresponding to the message, wherein the second fast forwarding table item comprises: and executing the caching information of the second PDR according to the five-tuple information of the message.
In some embodiments, before querying the corresponding route according to the external destination IP address of the packet, the method further includes: processing the message according to the second message forwarding rule; determining whether a token exceeding the length of the message exists in a quality of service (QoS) -meter token bucket; and in the case that a token exceeding the length of the message exists, encapsulating the outer layer header of the message and calculating a check value.
In some embodiments, the method further comprises: in case the destination terminal and the source terminal of the message do not belong to the same group of terminals, the message is sent from the N6 interface to the data network DN for sending to the destination terminal via the DN.
In some embodiments, the method further comprises: receiving exchange policy configuration information, wherein the exchange policy configuration information comprises: slice identification information or DNN corresponding to different groups and IP address fields corresponding to different groups; and storing the exchange strategy configuration information.
In some embodiments, the method further comprises: and carrying out signaling interaction of a Packet Forwarding Control Protocol (PFCP) through an N4 interface and a Session Management Function (SMF), wherein the signaling of the PFCP comprises: the PFCP session corresponds to the PDR.
According to other embodiments of the present disclosure, there is provided a message forwarding apparatus, including: the receiving unit is used for receiving the message transmitted by the N3 interface; the searching unit is used for searching a first packet detection rule PDR matched with the message according to the full tunnel endpoint identification F-TEID of the message; the determining unit is used for determining whether the destination terminal and the source terminal of the message belong to the same group according to the first PDR; and the sending unit is used for sending the message from the N3 interface to the base station connected with the destination terminal so as to be sent to the destination terminal through the base station under the condition that the destination terminal and the source terminal of the message belong to the terminals in the same group.
According to still further embodiments of the present disclosure, there is provided a packet forwarding apparatus, including: a processor; and a memory coupled to the processor for storing instructions that, when executed by the processor, cause the processor to perform the message forwarding method of any of the embodiments described above.
According to still further embodiments of the present disclosure, a non-transitory computer readable storage medium is provided, having a computer program stored thereon, wherein the program, when executed by a processor, implements the message forwarding method of any of the previous embodiments.
In the method, the matched first PDR is searched after the message transmitted by the N3 interface is received, whether the destination terminal and the source terminal of the message belong to the same group or not is determined according to the first PDR, if the message belongs to the same group, the message is directly transmitted to the base station connected with the destination terminal through the N3 interface, so that the message is transmitted to the destination terminal, the message is not required to be transmitted to the DN through the N6 interface, the message is bypassed and transmitted to the destination terminal, the message forwarding efficiency is improved, and the waste of bandwidth is reduced.
Other features of the present disclosure and its advantages will become apparent from the following detailed description of exemplary embodiments of the disclosure, which proceeds with reference to the accompanying drawings.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of 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 disclosure, and other drawings may be obtained according to these drawings without inventive effort to a person of ordinary skill in the art.
Fig. 1 illustrates a flow diagram of a message forwarding method of some embodiments of the present disclosure.
Fig. 2 illustrates a node schematic diagram of a VPP of some embodiments of the disclosure.
Fig. 3 shows a flow diagram of a message forwarding method according to further embodiments of the present disclosure.
Fig. 4 illustrates a logical structure diagram of a packet forwarding device according to some embodiments of the present disclosure.
Fig. 5 illustrates a schematic diagram of a packet forwarding device according to some embodiments of the present disclosure.
Fig. 6 is a schematic structural diagram of a packet forwarding device according to other embodiments of the present disclosure.
Fig. 7 is a schematic structural diagram of a packet forwarding device according to still other embodiments of the present disclosure.
Detailed Description
The following description of the technical solutions in the embodiments of the present disclosure will be made clearly and completely with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are only some embodiments of the present disclosure, not all embodiments. The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses. Based on the embodiments in this disclosure, all other embodiments that a person of ordinary skill in the art would obtain without making any inventive effort are within the scope of protection of this disclosure.
The present disclosure proposes a message forwarding method, described below in conjunction with fig. 1 to 4.
Fig. 1 is a flow chart of some embodiments of a method of forwarding a message of the present disclosure. As shown in fig. 1, the method of this embodiment includes: steps S102 to S108.
In step S102, a message incoming from the N3 interface is received.
The data packet is transmitted by the N3 interface and comprises an IP data message.
The scheme of the present disclosure may be implemented using VPP. The VPP is highly modular, allowing new graph nodes to be "plugged in" without modifying the underlying code base. Any number of packet processing solutions may be constructed from different forwarding graphs. Graph nodes (only key parts are listed, as shown in fig. 2) can be added between VPP packet transceiving flows to realize a forwarding function. As shown in fig. 2, the newly added graph node includes: upu-GTPU-input (GTPU (tunnelling protocol user plane) message input node), upu-wokers-handoff (job distribution node), upu-flow-process (stream processing node), upu-rules-process (rule processing node), upu-inner-classification (inner classification node), upu-GTPU-encap (GTPU encapsulation node).
As shown in fig. 2, after the data packet is transmitted from the N3 interface, the existing graph nodes dpdk-input (data plane development suite-input) of the VPP are utilized, and the next node of the message (GTPU message) of the IP-input, IP-lookup, IP-local, IP-UDP-lookup and other graph nodes register the port ip+udp destination port 2152 is upu-GTPU-input. Determining whether the message is a GTPU message; in the case that the message is a GTPU message, the message is sent to upu-GTPU-input for processing.
In step S104, the first PDR (Packet Detection Rule ) matched with the message is searched according to the F-TEID (Fully Qualified Tunnel Endpoint Identifier, full tunnel endpoint identification) of the message.
For example, the packet enters the UPF, first a matched PFCP session, i.e., an N4 session, is found, if any, all associated PDRs are found, and the packet is matched according to the priority, resulting in a matched PDR. The first PDR may be one or more.
In some embodiments, before matching the packet to the PDR, the GTPU packet may also be classified to determine whether the packet is of the T-PDU (Transport Protocol Data Unit ) type; and under the condition that the message is a T-PDU type message, recording the information of the message, wherein the information of the message comprises an inner layer data offset.
For example, as shown in fig. 2, the upu-GTPU-input node processes messages according to the GTPU message type (msg-type); if the message is a T-PDU message, the record key information, such as inner_data_offset (inner data offset), is sent to the next node, and if the message is another type of message, special processing, such as Echo Request message, can be directly replied. The inner layer offset may be used for decapsulation and the like.
Further, in some embodiments, determining whether the message is an uplink message; under the condition that the message is an uplink message, distributing the message to a corresponding first working thread according to a source IP address of an inner layer of the message, wherein the message with the same source IP address of the inner layer is distributed to the same working thread; and searching a first PDR matched with the message according to the F-TEID of the message, and determining whether the destination terminal and the source terminal of the message belong to the same group or not according to the first PDR and executing the same group in a first working thread corresponding to the message.
For example, as shown in fig. 2, when the upu-wokers-handoff node confirms that the PDU (Protocol Data Unit ) type=1 (UL PDU SESSION INFORMATION, uplink PDU session information) carried by the message, the PDU is distributed to upu-flow-process nodes of a designated first working thread according to an inner layer source IP address (i.e., a packet sending terminal IP), so that all traffic of the same session is ensured to be processed in the same working thread, and performance problems caused by locking are avoided.
And performing PDR matching by upu-flow-process nodes in the first working thread according to the message F-TEID to obtain a matched first PDR.
In some embodiments, after finding a first PDR matched with the message according to the F-TEID of the message, obtaining a first message forwarding rule according to the first PDR; and newly creating a first quick forwarding table entry, and adding the first quick forwarding table entry into a LRU (Least Recently Used ) linked list of the source terminal and a five-tuple hash table of the first working thread corresponding to the message.
The first message forwarding rule includes: FAR (Forwarding Action Rules, forwarding behavior rules), BAR (Buffering Action Rule, buffering behavior rules), QER (Qos Enforment Rules, quality of service enforcement rules), URR (Usage Reporting Rules ), the first fast forwarding table entry for example comprises: and executing the buffer memory information of the first PDR according to the five-tuple information of the message. The first fast forwarding table entry is used for fast forwarding of the subsequent received message with the same five-tuple.
For example, as shown in fig. 2, the upu-flow-process node obtains the FAR/QER/URR rule associated with the first PDR, creates a LRU linked list of the first fast forwarding entry joining session (packet sending terminal) and a five-tuple hash table of the current first working thread, and sends the five-tuple hash table to the rule processing node upu-rule-process.
In step S106, it is determined whether the destination terminal and the source terminal of the message belong to the same group according to the first PDR.
In some embodiments, before determining whether the destination terminal and the source terminal of the message belong to the same group according to the first PDR, the message may be decapsulated according to the first PDR; processing the message according to the first message forwarding rule; determining whether there are tokens exceeding the length of the message in a QoS-meter token bucket; in case there is a token exceeding the length of the message, determining from the first PDR whether the destination terminal and the source terminal of the message belong to the same group is performed.
For example, as shown in fig. 2, the upu-rule-process node performs a GTPU decapsulation operation according to Outer Header Removal (outer header removal) value of the first PDR, where no encapsulation rule is added, processes the message according to FAR/QER/URR, and sends the message to upu-inner-class node after confirming that the token bucket of the Qos-meter has tokens exceeding the message length. The terminal can be speed limited by QER.
In some embodiments, slice identification information or DNN (Data Network Name ) corresponding to the message is determined according to the first PDR; determining a group corresponding to the slice identification information or DNN as a group to be matched; matching the destination IP address of the message with the IP address segment corresponding to the group to be matched; if the matching is successful, the destination terminal and the source terminal of the message are determined to belong to the same group.
The slice identification information is, for example, S-nsai (Single Network Slice Selection Assistance Information, single network slice assistance information). The correspondence between the slice identification information or DNN and the group and the IP address field may be preconfigured, for example, the terminals in the same campus are used as a group, and have the same DNN, and the IP address field corresponding to the IP address of the terminal in the group is correspondingly configured with the DNN.
In some embodiments, the IP address segments corresponding to the groups are stored in different hash tables according to the mask lengths, and the destination IP address of the message is matched with the IP address segment corresponding to the group to be matched by the longest prefix. For example, a plurality of hash tables are used for storing the IP address field corresponding to the S-NSSAI/DNN according to the mask length, so that the longest prefix matching times can be reduced, and the forwarding performance can be improved.
For example, as shown in fig. 2, the upu-inner-classife node finds a hash table storing a corresponding IP address field according to DNN or slice information, and performs longest prefix matching on the destination IP; if the hash table is hit, the destination terminal and the source terminal of the message belong to the same group.
In step S108, in the case where the destination terminal and the source terminal of the message belong to the same group of terminals, the message is transmitted from the N3 interface to the base station to which the destination terminal is connected, so as to be transmitted to the destination terminal through the base station.
If the destination terminal and the source terminal belong to the same group, the message can be directly sent from the N3 interface to the destination terminal through the base station, and the message does not need to be forwarded to DN and forwarded through a central server and the like. Terminals in the same group can be connected with the same base station, and in this case, the forwarding efficiency of the message is higher.
In some embodiments, step S108 may further include: in step S110, in the case where the destination terminal and the source terminal of the message do not belong to the same group of terminals, the message is sent from the N6 interface to the DN so as to be sent to the destination terminal via the DN.
For example, as shown in fig. 2, the upu-inner-classify node determines a hash table corresponding to a destination IP miss, and the message flows 10, 11, 12 sequentially pass through nodes such as IP-lookup, IP-rewrite and the like according to a destination IP query route, and finally send the message to the DN from the N6 interface.
In the above embodiment, after receiving the packet transmitted by the N3 interface, the matching first PDR is searched, and according to the first PDR, it is determined whether the destination terminal and the source terminal of the packet belong to the same group, if so, the packet is directly sent to the base station connected with the destination terminal through the N3 interface, so that the packet is sent to the destination terminal, and is not required to be sent to the DN through the N6 interface, and is sent to the destination terminal again by bypassing the DN, thereby improving the efficiency of packet forwarding and reducing the waste of bandwidth.
How the message is sent to the destination terminal via the N3 interface is described below in connection with fig. 3.
Fig. 3 is a flowchart of another embodiment of a method for forwarding a message according to the present disclosure. As shown in fig. 3, the method of this embodiment includes: steps S302 to S308.
In step S302, a second PDR matched with the message is found according to the destination IP address of the message.
The second PDR may be one or more. In some embodiments, before searching for the second PDR matched with the message according to the destination IP address of the message, the message is distributed to a corresponding second working thread according to the destination IP address of the inner layer of the message, where the messages with the same destination IP address of the inner layer are distributed to the same working thread; the subsequent flow is performed by the second worker thread.
For example, as shown in fig. 2, the upu-inner-classification node sends a message to the upu-works-handoff node in the case that the destination terminal and the source terminal of the message belong to the same group of terminals. upu-works-handle node distributes to upu-flow-process node of appointed second working thread according to destination IP address (receiving terminal IP), and working threads of two terminals are possibly different, so that re-thread distribution is needed.
In step S304, the message is processed according to the second PDR.
In some embodiments, obtaining a second message forwarding rule according to a second PDR; newly creating a second fast forwarding table item, adding the second fast forwarding table item into an LRU linked list of a destination terminal and a five-tuple hash table of a second working thread corresponding to the message, wherein the second message forwarding rule comprises: FAR, BAR, QER, URR, the second fast forwarding table entry comprises: and executing the caching information of the second PDR according to the five-tuple information of the message.
For example, as shown in fig. 2, the upu-flow-process node performs PDR matching according to the destination IP address to obtain a second PDR, obtains rules such as FAR/QER/URR associated with the second PDR, creates a second fast forwarding table entry, adds the second fast forwarding table entry to the LRU linked list of the session (packet receiving terminal) and the five-tuple hash table of the current second working thread, and sends the second fast forwarding table entry to the rule processing node upu-rule-process.
In step S306, the corresponding route is queried according to the destination IP address of the outer layer of the message.
In some embodiments, before querying the corresponding route according to the external destination IP address of the message, processing the message according to the second message forwarding rule; determining whether there are tokens in the QoS-meter token bucket that exceed the length of the message; and in the case that a token exceeding the length of the message exists, encapsulating the outer layer header of the message and calculating a check value.
For example, as shown in fig. 2, the upu-rule-process node processes the message according to the second message forwarding rule, for example, the speed limit can be performed on the terminal by the QER. upu-rule-process node determines that there is an encapsulation rule, determines whether there is a token exceeding the length of the message in the QoS-meter token bucket, and sends the message to upu-gtpu-encap node if there is a token exceeding the length of the message in the QoS-meter token bucket. upu-gtpu-encap node encapsulates the outer header according to Outer Header Creation (outer header creation) and calculates checksum.
In step S308, the message is sent from the N3 interface to the base station to which the destination terminal is connected according to the route.
For example, as shown in fig. 2, the upu-gtpu-encap node queries the route according to the outer layer destination IP, sequentially passes through nodes such as IP-wakeup, IP-rewrite and the like, and finally sends the route to the base station connected with the destination terminal from the N3 interface, so as to complete one local data exchange.
The method of the above embodiment may be implemented by a VPP module in the packet forwarding device, and the functional outline of each newly added graph node is as follows:
upu-gtpu-input: processing the received GTPU message, classifying and recording the offset of the inner layer;
upu-wokers-handoff: distributing the flow corresponding to the same terminal to the same working thread;
upu-flow-process: first packet matching, and maintaining a five-tuple fast forwarding table;
upu-rule-process: processing the message according to rules such as PDR/FAR/URR/BAR/QER;
upu-inner-classify, classifying according to the IP of the inner layer message destination, and maintaining a hash table of the IP address field;
upu-gtpu-encap: and packaging the GTPU header for the message according to the rule.
The message forwarding device may be a UPF. As shown in fig. 4, the packet forwarding device may be logically divided into the following functional modules:
UPC (user plane connection) module: PFCP (Packet Forwarding Control Protocol ) signaling interaction is performed with SMF (Session Management Function ) through an N4 interface, so that functions of node management, session management and the like are realized, and session information is issued to Redis. In some embodiments, the signaling interaction of the PFCP is performed with the SMF through the N4 interface, where the signaling of the PFCP includes: the PFCP session corresponds to the PDR.
Redis module: providing a publishing and subscribing channel of session information and statistical information; the statistical information includes at least one of traffic, status.
A Sess-mgr (session management) module: subscribing session information, establishing a table entry, providing PDR matching of a first data packet of the session, reporting statistical information and the like; the module may be disposed inside the VPP module;
VPP module: managing millions of quick forwarding table items, receiving data traffic of N3, N6 and N9 interfaces, carrying out high-efficiency forwarding according to rules such as FAR/BAR/QER/URR provided by a set-mgr, classifying the traffic according to a destination IP address segment, and carrying out local quick exchange on data of terminals in the same group;
configuration modules such as Web/etcd/api-mgr (interface management)/Monitor and the like realize configuration management, service registration, system state monitoring, interface display functions of signaling and statistical information, support the corresponding relation between configuration S-NSSAI/DNN and IP address fields, and support a local exchange strategy when static configuration is started.
In some embodiments, exchange policy configuration information is received and stored. Exchanging policy configuration information includes: slice identification information or DNN corresponding to different groups and IP address fields corresponding to different groups. The slice identification information or the correspondence of DNNs to IP address fields may be stored directly.
The method of the embodiment can distinguish the data sent by the terminal to DN or to another terminal of the same group, and support the local quick exchange of the L3 flow. The corresponding relation between the S-NSSAI/DNN and the IP address field is supported, the local exchange strategy is supported to be statically configured in the starting file, and the SMF is not required to issue additional rules, so that the method is easy to deploy and use. Under the condition that traffic forwarding from the terminal to the DN is not affected, communication among different groups of terminals can be limited at the same time, and multiplexing QER is supported to limit the speed of the terminals. Based on the forwarding node map of the VPP,
is easy to expand, and other enhancement functions can be realized based on the expansion.
The present disclosure further provides a packet forwarding apparatus, which is described below in conjunction with fig. 5. The message forwarding device may be a UPF or disposed within a UPF.
Fig. 5 is a block diagram of some embodiments of a packet forwarding device of the present disclosure. As shown in fig. 5, the apparatus 50 of this embodiment includes: receiving unit 510, searching unit 520, determining unit 530, and transmitting unit 540.
The receiving unit 510 is configured to receive a packet incoming from the N3 interface.
The searching unit 520 is configured to search for a packet-matched first packet detection rule PDR according to the full tunnel endpoint identifier F-TEID of the packet.
The determining unit 530 is configured to determine whether the destination terminal and the source terminal of the packet belong to the same group according to the first PDR.
In some embodiments, the determining unit 530 is configured to determine slice identification information or a data network name DNN corresponding to the packet according to the first PDR; determining a group corresponding to the slice identification information or DNN as a group to be matched; matching the destination IP address of the message with the IP address segment corresponding to the group to be matched; if the matching is successful, the destination terminal and the source terminal of the message are determined to belong to the same group.
In some embodiments, the IP address segments corresponding to the groups are stored in different hash tables according to the mask lengths, and the destination IP address of the message is matched with the IP address segment corresponding to the group to be matched by the longest prefix.
The sending unit 540 is configured to send the message from the N3 interface to a base station to which the destination terminal is connected, so as to send the message to the destination terminal through the base station, where the destination terminal and the source terminal of the message belong to the same group of terminals.
In some embodiments, the apparatus 50 further includes a packet distribution unit 550 configured to determine whether the packet is a GTPU packet of the user plane of the gprs tunneling protocol; under the condition that the message is a GTPU message, determining whether the message is a message of a transmission protocol data unit (T-PDU) type; and under the condition that the message is a T-PDU type message, recording the information of the message, wherein the information of the message comprises an inner layer data offset.
In some embodiments, the packet distribution unit 550 is further configured to determine whether the packet is an uplink packet; under the condition that the message is an uplink message, distributing the message to a corresponding first working thread according to a source IP address of an inner layer of the message, wherein the message with the same source IP address of the inner layer is distributed to the same working thread; the determining unit 520 is configured to perform determining, in a first working thread corresponding to the message, whether the destination terminal and the source terminal of the message belong to the same group according to the first PDR.
In some embodiments, the searching unit 520 is further configured to obtain a first packet forwarding rule according to the first PDR after searching for the first PDR matched with the packet according to the F-TEID of the packet, where the first packet forwarding rule includes: forwarding behavior rules FAR, buffering behavior rules BAR, quality of service enforcement rules QER, using at least one of reporting rules URR; newly creating a first fast forwarding table item, and adding the first fast forwarding table item into a least recently used LRU linked list of a source terminal and a five-tuple hash table of a first working thread corresponding to a message, wherein the first fast forwarding table item comprises: and executing the buffer memory information of the first PDR according to the five-tuple information of the message.
In some embodiments, the determining unit 530 is further configured to decapsulate the packet according to the first PDR; processing the message according to the first message forwarding rule; determining whether a token exceeding the length of the message exists in a quality of service (QoS) -meter token bucket; in case there is a token exceeding the length of the message, determining from the first PDR whether the destination terminal and the source terminal of the message belong to the same group is performed.
In some embodiments, the sending unit 540 is further configured to find a second PDR matched with the packet according to the destination IP address of the packet; processing the message according to the second PDR; inquiring a corresponding route according to the external destination IP address of the message; and sending the message from the N3 interface to the base station connected with the destination terminal according to the route.
In some embodiments, the sending unit 540 is further configured to, before searching for the second PDR matched with the message according to the destination IP address of the message, distribute the message to a corresponding second working thread according to the destination IP address of the inner layer of the message, where the messages with the same destination IP address of the inner layer are distributed to the same working thread; and searching a second PDR matched with the message according to the destination IP address of the message, processing the message according to the second PDR, inquiring a corresponding route according to the outer layer destination IP address of the message, and sending the message from the N3 interface to a base station connected with the destination terminal according to the route to execute the message in a second working thread corresponding to the message.
In some embodiments, the sending unit 540 is configured to obtain a second packet forwarding rule according to a second PDR, where the second packet forwarding rule includes: forwarding behavior rules FAR, buffering behavior rules BAR, quality of service enforcement rules QER, using at least one of reporting rules URR; newly creating a second fast forwarding table item, and adding the second fast forwarding table item into a least recently used LRU linked list of a destination terminal and a five-tuple hash table of a second working thread corresponding to the message, wherein the second fast forwarding table item comprises: and executing the caching information of the second PDR according to the five-tuple information of the message.
In some embodiments, the sending unit 540 is further configured to process the packet according to the second packet forwarding rule before querying the corresponding route according to the outer destination IP address of the packet; determining whether a token exceeding the length of the message exists in a quality of service (QoS) -meter token bucket; and in the case that a token exceeding the length of the message exists, encapsulating the outer layer header of the message and calculating a check value.
In some embodiments, the sending unit 540 is further configured to send the packet from the N6 interface to the data network DN for sending to the destination terminal via the DN, in a case where the destination terminal and the source terminal of the packet do not belong to the same group of terminals.
In some embodiments, the apparatus further comprises: a configuration unit 560, configured to receive switching policy configuration information, where the switching policy configuration information includes: slice identification information or DNN corresponding to different groups and IP address fields corresponding to different groups; and storing the exchange strategy configuration information.
In some embodiments, the apparatus further comprises: a user plane connection unit 570, configured to perform signaling interaction of a packet forwarding control protocol PFCP through an N4 interface and a session management function SMF, where the signaling of the PFCP includes: the PFCP session corresponds to the PDR.
In the above embodiment, the receiving unit 510, the searching unit 520, the determining unit 530, the sending unit 540, and the message distributing unit 550 may be implemented by using VPP, which corresponds to the VPP module in the above embodiment. The configuration unit 560 corresponds to the configuration module such as Web/etcd/api-mgr (interface management)/Monitor (Monitor) in the foregoing embodiment, and the user plane connection unit 570 corresponds to the UPC module in the foregoing embodiment.
The message forwarding apparatuses in embodiments of the present disclosure may each be implemented by various computing devices or computer systems, as described below in connection with fig. 6 and 7.
Fig. 6 is a block diagram of some embodiments of a packet forwarding device of the present disclosure. As shown in fig. 6, the apparatus 60 of this embodiment includes: a memory 610 and a processor 620 coupled to the memory 610, the processor 620 being configured to perform the message forwarding method in any of the embodiments of the present disclosure based on instructions stored in the memory 610.
The memory 610 may include, for example, system memory, fixed nonvolatile storage media, and the like. The system memory stores, for example, an operating system, application programs, boot Loader (Boot Loader), database, and other programs.
Fig. 7 is a block diagram of other embodiments of a packet forwarding device of the present disclosure. As shown in fig. 7, the apparatus 70 of this embodiment includes: memory 710 and processor 720 are similar to memory 610 and processor 620, respectively. Input/output interface 730, network interface 740, storage interface 750, and the like may also be included. These interfaces 730, 740, 750, as well as the memory 710 and the processor 720, may be connected by a bus 760, for example. The input/output interface 730 provides a connection interface for input/output devices such as a display, a mouse, a keyboard, a touch screen, etc. The network interface 740 provides a connection interface for various networking devices, such as may be connected to a database server or cloud storage server, or the like. Storage interface 750 provides a connection interface for external storage devices such as SD cards, U-discs, and the like.
It will be appreciated by those skilled in the art that embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the disclosure. It will be understood that each flowchart and/or block of the flowchart illustrations and/or block diagrams, and combinations of flowcharts 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.
The foregoing description of the preferred embodiments of the present disclosure is not intended to limit the disclosure, but rather to enable any modification, equivalent replacement, improvement or the like, which fall within the spirit and principles of the present disclosure.

Claims (17)

1. A message forwarding method comprises the following steps:
receiving a message transmitted by an N3 interface;
searching a first packet detection rule PDR matched with the message according to the full tunnel endpoint identification F-TEID of the message;
determining whether a destination terminal and a source terminal of the message belong to the same group according to the first PDR;
and under the condition that the destination terminal and the source terminal of the message belong to the same group of terminals, the message is sent from the N3 interface to a base station connected with the destination terminal so as to be sent to the destination terminal through the base station.
2. The method of forwarding the message according to claim 1, wherein the determining, according to the first PDR, whether the destination terminal and the source terminal of the message belong to the same group includes:
determining slice identification information or a data network name DNN corresponding to the message according to the first PDR;
determining the group corresponding to the slice identification information or DNN as a group to be matched;
matching the destination IP address of the message with the IP address segment corresponding to the group to be matched;
if the matching is successful, determining that the destination terminal and the source terminal of the message belong to the same group.
3. The method of forwarding packets according to claim 2, wherein the IP address segments corresponding to the groups are stored in different hash tables according to mask lengths, and the destination IP address of the packet is matched with the IP address segment corresponding to the group to be matched by longest prefix.
4. The method for forwarding a packet according to claim 1, wherein before searching for the first PDR matched with the packet according to the F-TEID of the packet, the method further comprises:
determining whether the message is a general wireless packet service tunnel protocol user plane GTPU message;
determining whether the message is a message of a transport protocol data unit (T-PDU) type or not under the condition that the message is a GTPU message;
and recording information of the message under the condition that the message is a T-PDU type message, wherein the information of the message comprises an inner layer data offset.
5. The method for forwarding a message according to claim 4, wherein after recording the information of the message, further comprising:
determining whether the message is an uplink message;
distributing the message to a corresponding first working thread according to the source IP address of the inner layer of the message under the condition that the message is an uplink message, wherein the messages with the same source IP address of the inner layer are distributed to the same working thread;
and searching a first PDR matched with the message according to the F-TEID of the message, and determining whether a destination terminal and a source terminal of the message belong to the same group and are executed in a first working thread corresponding to the message according to the first PDR.
6. The method of forwarding a packet according to claim 1, wherein searching for the first PDR matched with the packet according to the F-TEID of the packet includes:
after a first PDR matched with the message is found according to the F-TEID of the message, a first message forwarding rule is obtained according to the first PDR, wherein the first message forwarding rule comprises: forwarding behavior rules FAR, buffering behavior rules BAR, quality of service enforcement rules QER, using at least one of reporting rules URR;
newly creating a first fast forwarding table entry, and adding the first fast forwarding table entry into a least recently used LRU linked list of the source terminal and a five-tuple hash table of a first working thread corresponding to the message, wherein the first fast forwarding table entry comprises: and executing the caching information of the first PDR according to the five-tuple information of the message.
7. The method for forwarding the message according to claim 6, wherein before determining whether the destination terminal and the source terminal of the message belong to the same group according to the first PDR, further comprises:
decapsulating the message according to the first PDR;
processing the message according to the first message forwarding rule;
determining whether a token exceeding the length of the message exists in a quality of service (QoS) -meter token bucket;
and if the token exceeding the length of the message exists, determining whether the destination terminal and the source terminal of the message belong to the same group according to the first PDR.
8. The method for forwarding the packet according to claim 1, wherein the sending the packet from the N3 interface to the base station to which the destination terminal is connected includes:
searching a second PDR matched with the message according to the destination IP address of the message;
processing the message according to the second PDR;
inquiring a corresponding route according to the external destination IP address of the message;
and sending the message from the N3 interface to the base station connected with the destination terminal according to the route.
9. The method for forwarding a packet according to claim 8, wherein before searching for the second PDR matched with the packet according to the destination IP address of the packet, further comprises:
distributing the message to a corresponding second working thread according to the destination IP address of the inner layer of the message, wherein the message with the same destination IP address of the inner layer is distributed to the same working thread;
and searching a second PDR matched with the message according to the destination IP address of the message, processing the message according to the second PDR, inquiring a corresponding route according to the outer layer destination IP address of the message, and sending the message from the N3 interface to a base station connected with the destination terminal according to the route to be executed in a second working thread corresponding to the message.
10. The method for forwarding the message according to claim 8, wherein the processing the message according to the second PDR includes:
obtaining a second message forwarding rule according to the second PDR, where the second message forwarding rule includes: forwarding behavior rules FAR, buffering behavior rules BAR, quality of service enforcement rules QER, using at least one of reporting rules URR;
newly creating a second fast forwarding table entry, and adding the second fast forwarding table entry into a least recently used LRU linked list of the destination terminal and a five-tuple hash table of a second working thread corresponding to the message, wherein the second fast forwarding table entry includes: and executing the caching information of the second PDR according to the five-tuple information of the message.
11. The method for forwarding a message according to claim 10, wherein before querying a corresponding route according to an outer layer destination IP address of the message, further comprises:
processing the message according to the second message forwarding rule;
determining whether a token exceeding the length of the message exists in a quality of service (QoS) -meter token bucket;
and in the case that a token exceeding the length of the message exists, encapsulating an outer layer header of the message and calculating a check value.
12. The message forwarding method of claim 1, further comprising:
and under the condition that the destination terminal and the source terminal of the message do not belong to the terminals of the same group, the message is sent to a data network DN from an N6 interface so as to be sent to the destination terminal through the DN.
13. The message forwarding method of claim 2, further comprising:
receiving switching policy configuration information, wherein the switching policy configuration information comprises: slice identification information or DNN corresponding to different groups and IP address fields corresponding to different groups;
and storing the exchange strategy configuration information.
14. The message forwarding method of claim 1, further comprising:
and carrying out signaling interaction of a data Packet Forwarding Control Protocol (PFCP) through an N4 interface and a Session Management Function (SMF), wherein the signaling of the PFCP comprises: the PFCP session corresponds to the PDR.
15. A message forwarding apparatus, comprising:
the receiving unit is used for receiving the message transmitted by the N3 interface;
the searching unit is used for searching a first packet detection rule PDR matched with the message according to the full tunnel endpoint identifier F-TEID of the message;
a determining unit, configured to determine, according to the first PDR, whether a destination terminal and a source terminal of the packet belong to the same group;
and the sending unit is used for sending the message from the N3 interface to a base station connected with the destination terminal so as to be sent to the destination terminal through the base station under the condition that the destination terminal and the source terminal of the message belong to the terminals in the same group.
16. A message forwarding apparatus, comprising:
a processor; and
a memory coupled to the processor for storing instructions that, when executed by the processor, cause the processor to perform the message forwarding method of any of claims 1-14.
17. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the program when executed by a processor realizes the steps of the method of claims 1-14.
CN202111588923.XA 2021-12-23 2021-12-23 Message forwarding method, device and computer readable storage medium Pending CN116367236A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111588923.XA CN116367236A (en) 2021-12-23 2021-12-23 Message forwarding method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111588923.XA CN116367236A (en) 2021-12-23 2021-12-23 Message forwarding method, device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116367236A true CN116367236A (en) 2023-06-30

Family

ID=86938985

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111588923.XA Pending CN116367236A (en) 2021-12-23 2021-12-23 Message forwarding method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116367236A (en)

Similar Documents

Publication Publication Date Title
CN108768866B (en) Cross-card forwarding method and device for multicast message, network equipment and readable storage medium
CN111510378A (en) EVPN message processing method, device and system
CN102857414A (en) Forwarding table writing method and device and message forwarding method and device
CN113132229A (en) Segment identifier determination method and device
CN113098770B (en) Message sending method, route table item generating method, device and storage medium
Iannone et al. Implementing the locator/id separation protocol: Design and experience
US11956148B2 (en) Packet transmission method and device
CN101789949B (en) Method and router equipment for realizing load sharing
US7203195B2 (en) Method for packet transferring and apparatus for packet transferring
CN112788060A (en) Data packet transmission method and device, storage medium and electronic equipment
CN108259297B (en) Message processing method and device
CN113472718A (en) Service processing method, device, equipment and storage medium
CN101710864A (en) Collocation method and device for multi-gateway Linux server
CN104486226A (en) Message processing method and device
CN111464443B (en) Message forwarding method, device, equipment and storage medium based on service function chain
CN109218176B (en) Message processing method and device
CN106789671B (en) Service message forwarding method and device
CN110768911A (en) Efficient flow guiding method, device, equipment, system and storage medium
CN107809387B (en) Message transmission method, device and network system
WO2023179457A1 (en) Method, apparatus and system for identifying service connection, and storage medium
CN101577660B (en) Method and device for acquiring label forwarding list item and forwarding message
CN113098749A (en) Message sending method, device and storage medium
CN115242892B (en) Stream identifier acquisition method, device, equipment and medium
KR101952187B1 (en) Method and apparatus for processing service node ability, service classifier and service controller
CN116828024A (en) Service connection identification method, device, system and storage medium

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