CN115460143A - Message processing method and device and electronic equipment - Google Patents

Message processing method and device and electronic equipment Download PDF

Info

Publication number
CN115460143A
CN115460143A CN202210911416.3A CN202210911416A CN115460143A CN 115460143 A CN115460143 A CN 115460143A CN 202210911416 A CN202210911416 A CN 202210911416A CN 115460143 A CN115460143 A CN 115460143A
Authority
CN
China
Prior art keywords
message
address
target
source
information corresponding
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.)
Withdrawn
Application number
CN202210911416.3A
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.)
Shandong Inspur Science Research Institute Co Ltd
Original Assignee
Shandong Inspur Science Research Institute 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 Shandong Inspur Science Research Institute Co Ltd filed Critical Shandong Inspur Science Research Institute Co Ltd
Priority to CN202210911416.3A priority Critical patent/CN115460143A/en
Publication of CN115460143A publication Critical patent/CN115460143A/en
Withdrawn legal-status Critical Current

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/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities

Abstract

The invention provides a message processing method, a message processing device and electronic equipment, wherein the method comprises the following steps: determining a source IP address of a target message; the target message is an internet protocol version 6 IPv6 message; and packaging the segment identification list in the strategy information corresponding to the target message to a route extension header (SRH) of the target message to obtain an IPv 6-based segment route SRv6 message, wherein the strategy information corresponding to the target message comprises a source IP address of the target message. According to the message processing method provided by the invention, the source IP address of the target message is determined, and the source IP address is configured in the strategy information of the target message, so that the user identity information corresponding to the target message can be conveniently determined according to the source IP address, and further, the differentiated strategy information can be conveniently configured for different users according to the user identity information, and further, the function requirement of providing differentiated network bearing for different users is realized.

Description

Message processing method and device and electronic equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for processing a packet, and an electronic device.
Background
The segment routing SRv6 Protocol based on IPv6 (Internet Protocol Version 6, version 6 of the network Protocol) provides a more flexible and efficient networking technology for traditional private line services, and its routing policy control mainly implements policy matching and execution for data packets according to local segment identifiers and destination addresses. As SRv6 technology gradually sinks towards metropolitan area networks and access networks, providing differentiated network bearers for different users becomes an important requirement of SRv6 networks.
Because the SRv6 protocol lacks the identification of information such as user identification, it is difficult to support this requirement, and the functional requirement of providing differentiated network bearers for different users cannot be realized.
Disclosure of Invention
The invention provides a message processing method, a message processing device and electronic equipment, which are used for solving the defect that differentiated services cannot be provided for different users in the prior art and realizing the functional requirement of providing differentiated network bearing for the different users.
The invention provides a message processing method, which comprises the following steps:
determining a source IP address of a target message; the target message is an internet protocol version 6 IPv6 message;
packaging a segment identification list in the strategy information corresponding to the target message to a route extension header (SRH) of the target message to obtain an IPv 6-based segment route (SRv 6) message; the strategy information corresponding to the target message comprises a source IP address of the target message.
According to the method for processing the message provided by the invention, the determining the source IP address of the target message comprises the following steps:
receiving the target message sent by a target terminal;
identifying the IP address of the target terminal;
and determining the IP address of the target terminal as the source IP address of the target message.
According to the message processing method provided by the invention, the policy information corresponding to the target message further comprises a destination IP address and a segment identifier list, and the policy information corresponding to the target message is further determined by the following method:
determining user identity information corresponding to the target terminal based on the IP address of the target terminal;
and determining a destination IP address and a segment identification list corresponding to the user identity information as the strategy information corresponding to the target message.
According to the message processing method provided by the invention, the destination IP address and the segment identification list corresponding to the user identity information are determined in the following way:
receiving first input information of a user; the first input information comprises a destination IP address and a segment identification list corresponding to each user identity information;
and determining a destination IP address and a segment identification list corresponding to the current user identity information based on the first input information.
According to a method for processing a packet provided by the present invention, determining user identity information corresponding to a target terminal based on an IP address of the target terminal includes:
inquiring user identity information corresponding to the IP address of the target terminal in the configuration information;
the configuration information is generated by receiving second input information of the user, and the second input information includes user identity information corresponding to the IP address of each target terminal.
The invention also provides a message processing device, which comprises:
the first processing module is used for determining a source IP address of a target message; the target message is an internet protocol version 6 IPv6 message;
and the second processing module is used for packaging the segment identification list in the strategy information corresponding to the target message to a route extension header (SRH) of the target message to obtain an IPv 6-based segment route SRv6 message, wherein the strategy information corresponding to the target message comprises a source IP address of the target message.
According to the message processing device provided by the invention, the first processing module is further configured to receive the target message sent by a target terminal; identifying the IP address of the target terminal; and determining the IP address of the target terminal as the source IP address of the target message.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein when the processor executes the program, the processor realizes the message processing method according to any one of the above.
The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements a method of processing a message as described in any of the above.
The present invention also provides a computer program product comprising a computer program, which when executed by a processor implements the method for processing a message as described in any of the above.
According to the message processing method, the message processing device and the electronic equipment, the source IP address of the target message is determined, and the source IP address is configured in the strategy information of the target message, so that the user identity information corresponding to the target message can be conveniently determined according to the source IP address, and further, the differentiated strategy information can be conveniently configured for different users according to the user identity information, and further, the function requirement of providing differentiated network bearing for different users is realized.
Drawings
In order to more clearly illustrate the present invention or the technical solutions in the prior art, the drawings used 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 some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flow chart of a message processing method provided by the present invention;
fig. 2 is a schematic structural diagram of a message processing apparatus provided in the present invention;
fig. 3 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
The following describes a message processing method, apparatus and electronic device according to the present invention with reference to fig. 1 to fig. 3.
The execution subject of the message processing method according to the embodiment of the present invention may be a controller, and in some embodiments, the execution subject may also be a server, where a specific type of the execution subject is not limited. The following describes a message processing method according to an embodiment of the present invention by taking a controller as an example.
As shown in fig. 1, the method for processing a packet according to the embodiment of the present invention mainly includes step 110 and step 120.
Step 110, determining a source IP address of a target message; the target message is an internet protocol version 6 IPv6 message.
It should be noted that the Segment Routing (SR) protocol is a source Routing protocol, a source node specifies a path for an application packet, converts the path into an ordered Segment list, and encapsulates the Segment list into a packet header, and an intermediate node located on the path only needs to forward the Segment list according to the path specified in the packet header.
In order to support the Segment Routing Protocol in IPv6 (Internet Protocol Version 6, version 6 of the network Protocol), an extension Header, i.e., a Segment Routing Header (SRH), is added behind a basic Header of an IPv6 message, so as to obtain an SRv6 (IPv 6 Segment Routing, segment Routing based) message.
Because the SRv6 protocol lacks a matching identification mechanism for the source IP address, the source IP address of the target message can be determined when the IPv6 message is received.
In some embodiments, the source IP address entry may be configured in advance in the policy information of the target packet. When the target message is received, the source IP address carried by the target message can be identified.
For example, after identifying a source IP address carried by a target packet, the routing device may encapsulate, for the target packet, policy information corresponding to the source IP address, and according to the policy information corresponding to the target packet, encapsulate a corresponding segment identifier list to a route extension header SRH of the current target packet, to obtain an IPv 6-based segment route SRv6 packet.
In some embodiments, determining the source IP address of the target packet includes receiving the target packet sent by the target terminal.
It can be understood that, when receiving a target message sent by a target terminal, the IP address of the target terminal may be identified, and the IP address of the target terminal is determined as the source IP address of the target message.
In the embodiment, the source IP address of the target packet can be obtained by identifying the IP address of the target terminal, so that differentiated services for different users can be conveniently realized for the source IP address subsequently.
And step 120, encapsulating the segment identifier list in the policy information corresponding to the target message to the route extension header SRH of the target message to obtain an IPv 6-based segment route SRv6 message.
It can be understood that, after the target packet is received, the segment identifier list in the policy information corresponding to the target packet may be encapsulated to the SRH of the target packet, where the SRH of the target packet at least includes the segment identifier list of the target packet, and then the node in the intermediate transmission process may be determined according to the SRH of the target packet.
The strategy information corresponding to the target message comprises a source IP address of the target message. After the source IP address of the target message is determined, the source IP address may be encapsulated into the policy information corresponding to the target message, and the user identity corresponding to the target message is determined according to the source IP address, so as to continue to configure other differentiated policy information for the target message according to different user identities.
According to the message processing method provided by the embodiment of the invention, the source IP address of the target message is determined, and the source IP address is configured in the strategy information of the target message, so that the user identity information corresponding to the target message can be conveniently determined according to the source IP address, and further, the differentiated strategy information can be conveniently configured for different users according to the user identity information, and further, the functional requirement of providing differentiated network bearing for different users is realized.
In some embodiments, the policy information corresponding to the target packet further includes a destination IP address and a segment identifier list. The strategy information corresponding to the target message is also determined by the following method: and determining user identity information corresponding to the target terminal based on the IP address of the target terminal.
In some embodiments, determining user identity information corresponding to the target terminal based on the IP address of the target terminal includes: and inquiring user identity information corresponding to the IP address of the target terminal in the configuration information.
It is understood that the configuration information includes user identity information corresponding to the IP address of the target terminal.
The configuration information is generated by receiving second input information of the user, and the second input information includes user identity information corresponding to the IP address of each target terminal.
In this embodiment, the IP addresses of the target terminals related to the respective users may be collected and counted in advance, and the second input information may be input and stored through the API interface of the user program, so as to determine the configuration information.
After the IP address of the target terminal is determined, the user identity information corresponding to the IP address of the target terminal may be queried in the configuration information, and then the user identity information corresponding to the target terminal is determined.
In the embodiment, the user identity information corresponding to the target terminal can be accurately determined in a pre-configuration mode, so that the user identity information and the target message can be conveniently associated.
After the user identity information is determined, a destination IP address and a segment identifier list corresponding to the user identity information may be determined as policy information corresponding to the target packet.
In some embodiments, the destination IP address and segment identification list corresponding to the user identity information is determined in the following manner.
First input information of a user may be received. The first input information comprises destination IP addresses and segment identification lists corresponding to the user identity information.
In this case, the destination IP address and the segment identifier list corresponding to each user identity information may be matched in advance.
It can be understood that the destination IP address and the segment identifier list corresponding to the service information subscribed by different users may be determined according to the service information subscribed by the different users, and then the first input information may be configured to perform input. And determining a destination IP address and a segment identification list corresponding to the current user identity information based on the first input information.
In this embodiment, the destination IP address and the segment identifier list corresponding to each user can be determined by receiving the first input information of the user, so that differentiated services can be provided for different users.
The following describes a message processing apparatus provided in the present invention, and the message processing apparatus described below and the message processing method described above may be referred to correspondingly.
Referring to fig. 2, the apparatus for processing a packet according to the embodiment of the present invention includes a first processing module 210 and a second processing module 220.
The first processing module 210 is configured to determine a source IP address of the target packet; the target message is an internet protocol version 6 IPv6 message;
the second processing module 220 is configured to encapsulate the segment identifier list in the policy information corresponding to the target packet into a route extension header SRH of the target packet, to obtain an IPv 6-based segment route SRv6 packet, where the policy information corresponding to the target packet includes a source IP address of the target packet.
In other words, the first processing module 210 may issue the source IP address of the target packet to the second processing module 220, and after receiving the source IP address of the target packet, the second processing module 220 may encapsulate the source IP address in the policy information corresponding to the target packet.
According to the message processing device provided by the embodiment of the invention, the source IP address of the target message is determined, and the source IP address is configured in the strategy information of the target message, so that the user identity information corresponding to the target message can be conveniently determined according to the source IP address, and further, the differentiated strategy information can be conveniently configured for different users according to the user identity information, and further, the function requirement of providing differentiated network bearing for different users is realized.
In some embodiments, the first processing module 210 is further configured to receive a target packet sent by a target terminal; identifying an IP address of a target terminal; and determining the IP address of the target terminal as the source IP address of the target message.
In this embodiment, the first processing module 210 may transmit the IP address of the terminal device accessed by the downstream port to the second processing module 220 through an interface with the second processing module 220.
In some embodiments, the policy information corresponding to the target packet further includes a destination IP address and a segment identifier list, and the second processing module 220 is further configured to determine, based on the IP address of the target terminal, user identity information corresponding to the target terminal; and determining a destination IP address and a segment identification list corresponding to the user identity information as strategy information corresponding to the target message.
In other words, the second processing module 220 may establish a mapping relationship between the IP address of the terminal device transmitted by the processing module 210 and the identity information of the user, so as to determine the user identity information corresponding to the target terminal. The second processing module 220 allocates appropriate SRv6 policy information to the target packet accessed by the target terminal corresponding to the user according to the user identity information and the service information signed by the user.
In some embodiments, the second processing module 220 is further configured to receive first input information of a user; the first input information comprises a destination IP address and a segment identification list corresponding to each user identity information; and determining a destination IP address and a segment identification list corresponding to the current user identity information based on the first input information.
In some embodiments, the second processing module 220 is further configured to query, in the configuration information, user identity information corresponding to the IP address of the target terminal; the configuration information is generated by receiving second input information of the user, and the second input information includes user identity information corresponding to the IP address of each target terminal.
In some embodiments, when the terminal device is to switch the accessed first processing module 210, the terminal device interacts with the second processing module 220 first, and notifies the second processing module 220 of the IP address information of the first processing module 210 to be switched, so that the second processing module 220 that manages and controls the first processing module 210 issues the SRv6 policy information corresponding to the IP address of the terminal device to the first processing module 210 in advance.
Fig. 3 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 3: a processor (processor) 310, a communication Interface (communication Interface) 320, a memory (memory) 330 and a communication bus 340, wherein the processor 310, the communication Interface 320 and the memory 330 communicate with each other via the communication bus 340. The processor 310 may call logic instructions in the memory 330 to perform a method of processing a message, the method comprising: determining a source IP address of a target message; the target message is an internet protocol version 6 IPv6 message; and encapsulating the segment identification list in the strategy information corresponding to the target message to a route extension header (SRH) of the target message to obtain an IPv 6-based segment route SRv6 message, wherein the strategy information corresponding to the target message comprises a source IP address of the target message.
In addition, the logic instructions in the memory 330 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, and various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, where the computer program product includes a computer program, the computer program can be stored on a non-transitory computer readable storage medium, and when the computer program is executed by a processor, the computer can execute the method for processing a message provided by the above methods, and the method includes: determining a source IP address of a target message; the target message is an internet protocol version 6 IPv6 message; and packaging the segment identification list in the strategy information corresponding to the target message to a route extension header (SRH) of the target message to obtain an IPv 6-based segment route SRv6 message, wherein the strategy information corresponding to the target message comprises a source IP address of the target message.
In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, the computer program, when being executed by a processor, implementing a method for processing a message provided by the above methods, the method including: determining a source IP address of a target message; the target message is an internet protocol version 6 IPv6 message; and encapsulating the segment identification list in the strategy information corresponding to the target message to a route extension header (SRH) of the target message to obtain an IPv 6-based segment route SRv6 message, wherein the strategy information corresponding to the target message comprises a source IP address of the target message.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
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 should 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 (10)

1. A method for processing a message is characterized by comprising the following steps:
determining a source IP address of a target message; the target message is an internet protocol version 6 IPv6 message;
packaging a segment identification list in the strategy information corresponding to the target message to a route extension header (SRH) of the target message to obtain an IPv 6-based segment route (SRv 6) message; and the strategy information corresponding to the target message comprises a source IP address of the target message.
2. The method of claim 1, wherein the determining the source IP address of the target packet comprises:
receiving the target message sent by a target terminal;
identifying the IP address of the target terminal;
and determining the IP address of the target terminal as the source IP address of the target message.
3. The method for processing the packet according to claim 1, wherein the policy information corresponding to the target packet further includes a destination IP address and a segment identifier list, and the policy information corresponding to the target packet is further determined by:
determining user identity information corresponding to the target terminal based on the IP address of the target terminal;
and determining a destination IP address and a segment identification list corresponding to the user identity information as the strategy information corresponding to the target message.
4. The message processing method according to claim 3, wherein the destination IP address and the segment identifier list corresponding to the user identity information are determined by:
receiving first input information of a user; the first input information comprises a destination IP address and a segment identification list corresponding to each user identity information;
and determining a destination IP address and a segment identification list corresponding to the current user identity information based on the first input information.
5. The message processing method according to claim 3, wherein the determining the user identity information corresponding to the target terminal based on the IP address of the target terminal includes:
inquiring user identity information corresponding to the IP address of the target terminal in the configuration information;
the configuration information is generated by receiving second input information of the user, and the second input information includes user identity information corresponding to the IP address of each target terminal.
6. A message processing apparatus, comprising:
the first processing module is used for determining a source IP address of a target message; the target message is an internet protocol version 6 IPv6 message;
a second processing module, configured to encapsulate a segment identifier list in the policy information corresponding to the target packet to a route extension header SRH of the target packet, to obtain an IPv 6-based segment route SRv6 packet; the strategy information corresponding to the target message comprises a source IP address of the target message.
7. The message processing apparatus according to claim 6, wherein the first processing module is further configured to receive the target message sent by a target terminal; identifying the IP address of the target terminal; and determining the IP address of the target terminal as the source IP address of the target message.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of processing a message according to any one of claims 1 to 5 when executing the program.
9. A non-transitory computer-readable storage medium on which a computer program is stored, the computer program, when being executed by a processor, implementing a method for processing a message according to any one of claims 1 to 5.
10. A computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements a method of processing a message according to any one of claims 1 to 5.
CN202210911416.3A 2022-07-29 2022-07-29 Message processing method and device and electronic equipment Withdrawn CN115460143A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210911416.3A CN115460143A (en) 2022-07-29 2022-07-29 Message processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210911416.3A CN115460143A (en) 2022-07-29 2022-07-29 Message processing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN115460143A true CN115460143A (en) 2022-12-09

Family

ID=84297458

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210911416.3A Withdrawn CN115460143A (en) 2022-07-29 2022-07-29 Message processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN115460143A (en)

Similar Documents

Publication Publication Date Title
EP3866414A1 (en) Message processing method, apparatus, device and system
CN111246453B (en) Data transmission method, user plane network element and control plane network element
CN107046506B (en) Message processing method, flow classifier and service function example
CN106921578B (en) Method and device for generating forwarding table item
WO2014176740A1 (en) Stream classifier, service routing trigger, and message processing method and system
CN106878199B (en) Configuration method and device of access information
CN111803925B (en) Scheduling method and device of forwarding server of cloud game and readable storage medium
CN109474713B (en) Message forwarding method and device
CN107547346B (en) Message transmission method and device
WO2021043232A1 (en) Method by which host network performance requirements may be programmed, device and system
CN111698167B (en) Message processing method and device
US20150215205A1 (en) Method, Routing Bridge, and System For Sending Packet
WO2018068588A1 (en) Method and software-defined networking (sdn) controller for providing multicast service
US11929851B2 (en) Gateway selection method, device, and system
WO2021023141A1 (en) Method and apparatus for obtaining routing table entry, and device
CN107465770B (en) SDN network and non-SDN network communication method and device
CN106936718B (en) PPPoE message transmission method and PPPoE server
CN110601989A (en) Network traffic balancing method and device
CN113824789B (en) Configuration method, device, equipment and storage medium of access descriptor
CN114679370B (en) Server hosting method, device, system and storage medium
CN115460143A (en) Message processing method and device and electronic equipment
CN115190087A (en) Data transmission method, device, equipment and medium based on two-layer intermediate equipment
WO2015074258A1 (en) Method, apparatus and system for controlling forwarding of service data in virtual network
CN108259292B (en) Method and device for establishing tunnel
CN111866046A (en) Method for realizing cluster and related equipment

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20221209

WW01 Invention patent application withdrawn after publication