CN114389997B - Method and device for acquiring IPv6 address prefix of mobile terminal - Google Patents

Method and device for acquiring IPv6 address prefix of mobile terminal Download PDF

Info

Publication number
CN114389997B
CN114389997B CN202210158538.XA CN202210158538A CN114389997B CN 114389997 B CN114389997 B CN 114389997B CN 202210158538 A CN202210158538 A CN 202210158538A CN 114389997 B CN114389997 B CN 114389997B
Authority
CN
China
Prior art keywords
tunnel information
mobile terminal
prefix
session
information
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.)
Active
Application number
CN202210158538.XA
Other languages
Chinese (zh)
Other versions
CN114389997A (en
Inventor
吴桑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
WUHAN HONGXU INFORMATION TECHNOLOGY CO LTD
Original Assignee
WUHAN HONGXU INFORMATION TECHNOLOGY 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 WUHAN HONGXU INFORMATION TECHNOLOGY CO LTD filed Critical WUHAN HONGXU INFORMATION TECHNOLOGY CO LTD
Priority to CN202210158538.XA priority Critical patent/CN114389997B/en
Publication of CN114389997A publication Critical patent/CN114389997A/en
Application granted granted Critical
Publication of CN114389997B publication Critical patent/CN114389997B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling

Abstract

The invention provides a method and a device for acquiring an IPv6 address prefix of a mobile terminal, wherein the method comprises the following steps: matching with a tunnel information session lookup table based on target tunnel information in a data packet in the mobile user plane interface; extracting IPv6 address prefix and prefix length of the mobile terminal corresponding to the target tunnel information in the IPv6 prefix information extension field under the condition that session information matched with the target tunnel information exists in the tunnel information session lookup table and the ICMPv6 route notification message carried by the data packet carries the IPv6 prefix information extension field; the tunnel information session inquiry table is used for storing the corresponding relation between the tunnel information of the mobile terminal surfing the internet and the session. The method and the device for acquiring the IPv6 address prefix of the mobile terminal can acquire the real IPv6 address prefix of the mobile terminal under the condition that only the signaling interface which only transmits the IPv6 interface address is accessed.

Description

Method and device for acquiring IPv6 address prefix of mobile terminal
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for obtaining an IPv6 address prefix of a mobile terminal.
Background
Currently, various mobile network signaling analysis systems which have been widely applied extract international mobile subscriber identification codes (IMSI, international Mobile Subscriber Identity), mobile subscriber ISDN numbers (MSISDN, mobile Subscriber ISDN number), base station identifications (Cell IDs) and IP addresses of mobile terminals from signaling and user plane data of network elements accessing a mobile network, obtain internet surfing data of a user from the user plane data, and correlate the signaling and user plane data of the same user, thereby identifying identity information and location information of various application data.
IPv6 (Internet Protocol Version, internet protocol version 6) is an upgraded version of IPv4 (Internet Protocol Version, internet protocol version 4). The most significant change in IPv6 versus IPv4 is the increase in the length of the IP address from 32 bits to 128 bits. The 128-bit IPv6 address is divided into an address prefix and an interface address. In the case where a prefix proxy is not employed, the mobile terminal address prefix is typically the first 64 bits and the interface address is the last 64 bits. Wherein the address prefix is assigned to the mobile terminal by the network device; the interface address may be generated by the terminal itself or may be issued by the network.
The mobile network, part of the signaling interface will issue the mobile terminal real IPv6 prefix, e.g. the N4 interface in 5G, and the S11 and Sx interfaces in 4G. However, part of the signaling interfaces do not issue the IPv6 prefix of the mobile terminal, for example, the IPv6 interface address is issued in the N2 and N11 signaling interfaces of 5G, and the IPv6 interface address is issued in the network side of the S1-MME signaling interface of 4G. In general, the signaling analysis system adopts multi-interface association, and can acquire the real IPv6 prefix of the mobile terminal through interfaces such as N4 or S11.
Under the condition of limited signaling access, such as the condition that only a 5G signaling surface N2 interface and a user surface N3 interface are accessed, a 4G signaling surface S1-MME interface and a user surface S1-U interface are accessed, the real IPv6 prefix of the mobile terminal cannot be obtained through other signaling interfaces. Therefore, when only the signaling interface which only issues the address of the IPv6 interface is accessed, but the signaling interface which issues the IPv6 prefix is not accessed, and the signaling interface which issues the IPv6 prefix is not accessed, there is a problem of how to acquire the real IPv6 prefix of the mobile terminal.
Disclosure of Invention
The invention provides a method and a device for acquiring an IPv6 address prefix of a mobile terminal, which are used for solving the defect that the IPv6 address prefix cannot be acquired under the condition that only a signaling interface which only transmits an IPv6 interface address is accessed and a signaling interface which transmits the IPv6 prefix is not accessed in the prior art, and realizing the acquisition of the IPv6 address prefix under the condition that only the signaling interface which only transmits the IPv6 interface address is accessed and the signaling interface which transmits the IPv6 prefix is not accessed.
The invention provides a method for acquiring an IPv6 address prefix of a mobile terminal, which comprises the following steps:
matching with a tunnel information session lookup table based on target tunnel information in a data packet in the mobile user plane interface;
extracting an IPv6 address prefix and a prefix length of the mobile terminal corresponding to the target tunnel information in the IPv6 prefix information extension field under the condition that session information matched with the target tunnel information exists in the tunnel information session lookup table and the ICMPv6 route notification message carried by the data packet carries the IPv6 prefix information extension field;
the tunnel information session lookup table is used for storing the corresponding relation between the tunnel information of the mobile terminal surfing the internet and the session.
According to the method for obtaining the IPv6 address prefix of the mobile terminal provided by the invention, before the target tunnel information in the data packet in the interface of the mobile user plane is matched with the tunnel information session lookup table, the method further comprises the following steps:
based on the mobile signaling interface, obtaining the tunnel information of each mobile terminal surfing the Internet;
and establishing the tunnel information session lookup table based on the tunnel information of the internet surfing of each mobile terminal.
According to the method for obtaining the mobile terminal IPv6 address prefix provided by the present invention, after extracting the IPv6 address prefix and the prefix length of the mobile terminal corresponding to the target tunnel information in the IPv6 prefix information extension field, the method further includes:
and updating the session corresponding to the target tunnel information based on the IPv6 address prefix and the prefix length of the mobile terminal corresponding to the target tunnel information.
According to the method for acquiring the IPv6 address prefix of the mobile terminal provided by the invention, after acquiring the tunnel information of each mobile terminal surfing the internet based on the mobile signaling interface, the method further comprises the following steps:
and storing the tunnel information of each mobile terminal surfing the Internet in the session of each mobile terminal.
According to the method for acquiring the IPv6 address prefix of the mobile terminal provided by the invention, the updating of the session corresponding to the target tunnel information based on the IPv6 address prefix and the prefix length of the mobile terminal corresponding to the target tunnel information comprises the following steps:
and updating the IPv6 address prefix and the prefix length of the mobile terminal in the session corresponding to the target tunnel information based on the IPv6 address prefix and the prefix length of the mobile terminal corresponding to the target tunnel information.
According to the method for obtaining the IPv6 address prefix of the mobile terminal provided by the invention, before the target tunnel information in the data packet in the interface of the mobile user plane is matched with the tunnel information session lookup table, the method further comprises the following steps:
acquiring the data packet based on a mobile user interface;
and acquiring target tunnel information in the data packet.
The invention also provides a device for acquiring the IPv6 address prefix of the mobile terminal, which comprises:
the matching module is used for matching with the tunnel information session lookup table based on the target tunnel information in the data packet in the mobile user interface;
a first obtaining module, configured to extract an IPv6 address prefix and a prefix length of a mobile terminal corresponding to the target tunnel information in the IPv6 prefix information extension field, where session information matched with the target tunnel information exists in the tunnel information session lookup table and the ICMPv6 route notification message carried by the data packet carries the IPv6 prefix information extension field;
the tunnel information session lookup table is used for storing the corresponding relation between the tunnel information of the mobile terminal surfing the internet and the session.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the method for acquiring the IPv6 address prefix of the mobile terminal according to any one of the above when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of obtaining a mobile terminal IPv6 address prefix as described in any of the above.
The invention also provides a computer program product comprising a computer program which when executed by a processor implements a method of obtaining a mobile terminal IPv6 address prefix as described in any of the above.
According to the method and the device for acquiring the IPv6 address prefix of the mobile terminal, the ICMPv6 router notification message in the user plane data packet is related through the target tunnel information, the ICMPv6 router notification message is analyzed, the IPv6 address prefix of the mobile terminal is acquired, the real IPv6 address prefix of the mobile terminal can be acquired under the condition that only the signaling interface which only issues the IPv6 interface address is accessed and the signaling interface which issues the IPv6 prefix is not accessed, and the problem that the real IPv6 address prefix of the mobile terminal is acquired under the condition that only the signaling interface which only issues the IPv6 interface address is accessed and the signaling interface which issues the IPv6 prefix is not accessed can be solved.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the invention, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a method for obtaining an IPv6 address prefix of a mobile terminal according to the present invention;
FIG. 2 is a second flow chart of a method for obtaining an IPv6 address prefix of a mobile terminal according to the present invention;
fig. 3 is a schematic structural diagram of an apparatus for acquiring an IPv6 address prefix of a mobile terminal according to the present invention;
fig. 4 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the description of embodiments of the present invention, the terms "first," "second," "third," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance and not order.
In describing embodiments of the present invention, it should be noted that, unless explicitly stated and limited otherwise, the terms "mounted," "connected," and "connected" should be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in embodiments of the present invention will be understood in detail by those of ordinary skill in the art.
The following describes a method and apparatus for acquiring an IPv6 address prefix of a mobile terminal according to the present invention with reference to fig. 1 to fig. 4.
Fig. 1 is a flow chart of a method for obtaining an IPv6 address prefix of a mobile terminal according to the present invention. As shown in fig. 1, an execution body of a method for obtaining an IPv6 address prefix of a mobile terminal according to an embodiment of the present invention may be a device for obtaining an IPv6 address prefix of a mobile terminal, where the method includes: step 101 and step 102.
In order to facilitate description of the method for acquiring the IPv6 address prefix of the mobile terminal provided by the embodiment of the present invention, an implementation process of the method for acquiring the IPv6 address prefix of the mobile terminal provided by the embodiment of the present invention is described below by taking an access 5g N2 signaling interface and an N3 data interface as examples, and it can be understood that the 5g N2 signaling interface is an interface that only issues an address of the IPv6 interface.
Step 101, matching with a tunnel information session lookup table based on target tunnel information in a data packet in a mobile user plane interface; the tunnel information session inquiry table is used for storing the corresponding relation between the tunnel information of the mobile terminal surfing the internet and the session.
Specifically, tunnel information in a data packet in the mobile user plane interface may be obtained as target tunnel information.
Tunnel information, which may include the IP address and TEID (tunnel endpoint identification Tunnel Endpoint Identifier) of the tunnel, and the like.
The tunnel information session lookup table is a pre-established table, and each record in the table is used for describing a correspondence between tunnel information and a session. The tunnel information corresponds to the session, which indicates that the tunnel information is the tunnel information of a certain mobile terminal for surfing the internet, the session is the session of the mobile terminal, and the mobile terminal is the mobile terminal corresponding to the tunnel information.
The session may be indicated by session information. Session and session information one-to-one. Alternatively, the session information may be a pointer to the session.
Illustratively, table 1 shows a tunnel information session lookup table.
Table 1 tunnel information session lookup table
IP address of tunnel TEID of tunnel Session pointer
10.0.0.1 0x00000001 0x12345600
10.0.0.3 0x00000002 0x12345700
10.0.0.2 0x00000006 0x12345800
10.0.0.4 0x00000003 0x12345900
As can be seen from table 1, when the IP address of a tunnel in the user plane data is 10.0.0.3 and the TEID of the tunnel is 0x00000002, the pointer of the corresponding session is 0x12345700, and the session of the mobile terminal corresponding to the tunnel information can be accessed by using the pointer, thereby obtaining the identity information, the location information, and the like of the mobile terminal.
The protocol layers typical of N3 user plane data are shown in table 2.
Table 2 N3 user plane data protocol layer table
MAC layer
Tunnel outer layer IP layer
UDP layer
GTP layer
Tunnel inner layer IP layer
Inner layer transmission layer of tunnel
Tunnel inner layer data
As shown in table 2, the address of the tunnel outer IP layer is the tunneling address of the network device, and corresponds to the tunneling layer address. In addition, the GTP layer includes a tunnel TEID, so that the IP address of the tunnel and the TEID of the tunnel can be extracted from the N3 user plane packet.
After extracting the target tunnel information such as the IP address of the tunnel and the TEID of the tunnel, the target tunnel information may be used as a key to match the tunnel information session lookup table, and whether a record of session information matched with the target tunnel information exists in the tunnel information session lookup table is queried.
When the tunnel information in any record in the tunnel information session lookup table is the same as the target tunnel information, it is described that there is a record of session information matching the target tunnel information, and the session information in the record is the session information matching the target tunnel information.
In the case where the tunnel information in each record in the tunnel information session lookup table is different from the target tunnel information, it is indicated that there is no record of session information matching the target tunnel information.
Step 102, extracting an IPv6 address prefix and a prefix length of the mobile terminal corresponding to the target tunnel information in the IPv6 prefix information extension field when session information matched with the target tunnel information exists in the tunnel information session lookup table and the ICMPv6 route notification message carried by the data packet carries the IPv6 prefix information extension field.
Specifically, if session information matching the target tunnel information exists in the tunnel information session lookup table, it may be determined whether the packet is an ICMPv6 packet.
If yes, the ICMPv6 data packet can be analyzed, and the type of the ICMPv6 data packet can be further judged.
If the ICMPv6 packet is of the type of the route advertisement message (Router Advertisement), i.e. the packet carries an ICMPv6 route advertisement message, it may be further determined whether the ICMPv6 route advertisement message carries an IPv6 prefix information (prefix information) extension field.
If so, the IPv6 prefix and IPv6 prefix length can be extracted from the field. The IPv6 prefix is the real prefix of the IPv6 address of the mobile terminal corresponding to the target tunnel information.
According to the embodiment of the invention, the ICMPv6 router notification message in the user plane data packet is related to the target tunnel information, the ICMPv6 router notification message is analyzed, the IPV6 address prefix of the mobile terminal is obtained, the real IPv6 address prefix of the mobile terminal can be obtained under the condition that only the signaling interface which only issues the IPv6 interface address is accessed and the signaling interface which issues the IPv6 prefix is not accessed, and the problem that the real IPv6 address prefix of the mobile terminal is obtained under the condition that only the signaling interface which only issues the IPv6 interface address is accessed and the signaling interface which issues the IPv6 prefix is not accessed can be solved.
Based on the content of any of the foregoing embodiments, before matching with the tunnel information session lookup table based on the target tunnel information in the data packet in the mobile user plane interface, the method further includes: based on the mobile signaling interface, obtaining the tunnel information of each mobile terminal surfing the Internet.
Specifically, the tunnel information of each mobile terminal surfing the internet can be obtained based on the target message transmitted by the mobile signaling interface.
Taking an access 5g N2 signaling interface and an N3 data interface as an example, when a user accesses the internet to activate a session, the core network issues PDU Session Resource Setup Request a message through the N2 signaling, wherein the message carries UP Transport Layer Information information elements including a user plane tunnel transport layer address (IP address of a tunnel) at the core network side and a tunnel TEID at the core network side; after receiving the message, the base station side sends PDU Session Resource Setup Response a message to the core network side, wherein the message carries UP Transport Laye rInformation information units including the address of the tunnel transport layer of the user plane of the base station side and the tunnel TEID of the base station side. When the base station sends a data packet to the core network, the N3 interface data packet carries the IP address and the TEID of the tunnel at the core network side; when the base station receives the data packet from the core network, the N3 interface data packet carries the IP address and TEID of the tunnel at the base station side.
And establishing a tunnel information session inquiry table based on the tunnel information of each mobile terminal surfing the Internet.
Specifically, a tunnel information session lookup table may be established based on the tunnel information and the corresponding session information of each mobile terminal surfing the internet.
According to the embodiment of the invention, the tunnel information of each mobile terminal surfing the Internet is acquired based on the mobile signaling interface, and the tunnel information session lookup table is established based on the tunnel information of each mobile terminal surfing the Internet, so that the real IPv6 address prefix of the mobile terminal can be acquired under the condition that only the signaling interface which only transmits the IPv6 interface address is accessed and the signaling interface which transmits the IPv6 prefix is not accessed based on the corresponding relation between the tunnel information of the mobile terminal surfing the Internet and the session and the corresponding relation between the tunnel information and the ICMPv6 router notification message.
Based on the foregoing any embodiment, after extracting the IPv6 address prefix and the prefix length of the mobile terminal corresponding to the target tunnel information in the IPv6 prefix information extension field, the method further includes: based on IPv6 address prefix and prefix length of mobile terminal corresponding to target tunnel information, updating session corresponding to target tunnel information.
Specifically, after the IPv6 address prefix and the prefix length of the mobile terminal corresponding to the target tunnel information are obtained, the session corresponding to the target tunnel information may be updated according to the session information corresponding to the target tunnel information.
According to the embodiment of the invention, based on the IPv6 address prefix and the prefix length of the mobile terminal corresponding to the target tunnel information, the session corresponding to the target tunnel information is updated, and the matching of the associated information such as the subsequent identity information and/or the position information can be realized.
Based on the foregoing any one of the embodiments, after obtaining the tunnel information of each mobile terminal surfing the internet based on the mobile signaling interface, the method further includes: and storing the tunnel information of each mobile terminal surfing the Internet in the session of each mobile terminal.
Specifically, for each obtained tunnel information of the mobile terminal for surfing the internet, the tunnel information of the mobile terminal for surfing the internet and other identity information and/or location information and the like can be stored in the session of the mobile terminal.
According to the embodiment of the invention, the tunnel information of each mobile terminal on the Internet is stored in the session of the mobile terminal, so that the matching of the associated information such as the follow-up identity information and/or the position information can be realized.
Based on the content of any of the foregoing embodiments, updating the session corresponding to the target tunnel information based on the IPv6 address prefix and the prefix length of the mobile terminal corresponding to the target tunnel information includes: based on the IPv6 address prefix and the prefix length of the mobile terminal corresponding to the target tunnel information, updating the IPv6 address prefix and the prefix length of the mobile terminal in the session corresponding to the target tunnel information.
Specifically, the IPv6 address prefix and prefix length of the mobile terminal corresponding to the target tunnel information may be updated into the session corresponding to the target tunnel information, so that the IPv6 address prefix and prefix length of the mobile terminal in the session corresponding to the target tunnel information are respectively the IPv6 address prefix and prefix length of the mobile terminal corresponding to the target tunnel information.
According to the embodiment of the invention, the IPv6 address prefix and the prefix length of the mobile terminal corresponding to the target tunnel information are updated into the session corresponding to the target tunnel information, so that the matching of the associated information such as the subsequent identity information and/or the position information can be realized.
Based on the content of any of the foregoing embodiments, before matching with the tunnel information session lookup table based on the target tunnel information in the data packet in the mobile user plane interface, the method further includes: based on the mobile user interface, a data packet is acquired.
In particular, the data packet of the interface may be acquired based on the mobile user plane interface.
And acquiring target tunnel information in the data packet.
Specifically, after the data packet is acquired, the protocol layer structure of the user interface may be moved, and information such as the IP address and TEID of the tunnel in the data packet may be acquired as the target tunnel information.
According to the embodiment of the invention, the data packet is acquired based on the mobile user plane interface, the target tunnel information in the data packet is acquired, the ICMPv6 router advertisement message in the user plane data packet can be related through the target tunnel information, so that the ICMPv6 router advertisement message in the user plane data packet can be related through the target tunnel information, the IPV6 address prefix of the mobile terminal is acquired, the real IPv6 address prefix of the mobile terminal can be acquired under the condition that only the signaling interface which only issues the IPv6 interface address is accessed and the signaling interface which issues the IPv6 prefix is not accessed, and the problem that the real IPv6 address prefix of the mobile terminal is acquired under the condition that only the signaling interface which only issues the IPv6 interface address is accessed and the signaling interface which issues the IPv6 prefix is not accessed can be solved.
Fig. 2 is a second flowchart of a method for obtaining an IPv6 address prefix of a mobile terminal according to the present invention. As shown in fig. 2, the method for acquiring the IPv6 address prefix of the mobile terminal may include the following steps:
step 201, based on a mobile signaling interface, obtaining the tunnel information of each mobile terminal surfing the internet and storing the tunnel information in the session of each mobile terminal;
step 202, establishing a tunnel information session lookup table based on the tunnel information of each mobile terminal surfing the Internet;
step 203, matching with a tunnel information session lookup table based on the target tunnel information in the data packet in the mobile user plane interface;
204, extracting an IPv6 address prefix and a prefix length of the mobile terminal corresponding to the target tunnel information in the IPv6 prefix information extension field when session information matched with the target tunnel information exists in the tunnel information session lookup table and the ICMPv6 route notification message carried by the data packet carries the IPv6 prefix information extension field;
step 205, updating the session corresponding to the target tunnel information based on the prefix and the prefix length of the IPv6 address of the mobile terminal corresponding to the target tunnel information.
The device for acquiring the mobile terminal IPv6 address prefix provided by the present invention is described below, and the device for acquiring the mobile terminal IPv6 address prefix described below and the method for acquiring the mobile terminal IPv6 address prefix described above may be referred to correspondingly.
Fig. 3 is a schematic structural diagram of an apparatus for acquiring an IPv6 address prefix of a mobile terminal according to the present invention. Based on the foregoing content of any one of the foregoing embodiments, as shown in fig. 3, the apparatus includes a matching module 301 and a first obtaining module 302, where:
a matching module 301, configured to match with a tunnel information session lookup table based on target tunnel information in a data packet in the mobile user plane interface;
a first obtaining module 302, configured to extract, when session information matched with the target tunnel information exists in the tunnel information session lookup table and the ICMPv6 route notification message carried by the data packet carries an IPv6 prefix information extension field, an IPv6 address prefix and a prefix length of the mobile terminal corresponding to the target tunnel information in the IPv6 prefix information extension field;
the tunnel information session inquiry table is used for storing the corresponding relation between the tunnel information of the mobile terminal surfing the internet and the session.
Specifically, the matching module 301 and the first acquisition module 302 are electrically connected.
The matching module 301 may obtain tunnel information in a data packet in the mobile user plane interface as target tunnel information; the target tunnel information is used as a key word to match the tunnel information session lookup table.
If session information matching the target tunnel information exists in the tunnel information session lookup table, the first obtaining module 302 may determine whether the data packet is an ICMPv6 data packet.
If yes, the first obtaining module 302 may parse the ICMPv6 data packet, and further determine the type of the ICMPv6 data packet.
If the ICMPv6 packet is of the type of route advertisement message (Router Advertisement), the first obtaining module 302 may further determine whether the ICMPv6 route advertisement message carries an IPv6 prefix information (prefix information) extension field.
If so, the first acquisition module 302 may extract the IPv6 prefix and the IPv6 prefix length from the field. The IPv6 prefix is the real prefix of the IPv6 address of the mobile terminal corresponding to the target tunnel information.
Optionally, the apparatus for acquiring the IPv6 address prefix of the mobile terminal may further include:
the second acquisition module is used for acquiring the internet tunnel information of each mobile terminal based on the mobile signaling interface;
and the table building module is used for building a tunnel information session inquiry table based on the tunnel information of the Internet surfing of each mobile terminal.
Optionally, the apparatus for acquiring the IPv6 address prefix of the mobile terminal may further include:
and the session updating module is used for updating the session corresponding to the target tunnel information based on the IPv6 address prefix and the prefix length of the mobile terminal corresponding to the target tunnel information.
Optionally, the second obtaining module may include:
and the storage unit is used for storing the tunnel information of each mobile terminal on the internet in the session of each mobile terminal.
Optionally, the session updating module may be specifically configured to update the IPv6 address prefix and the prefix length of the mobile terminal in the session corresponding to the target tunnel information based on the IPv6 address prefix and the prefix length of the mobile terminal corresponding to the target tunnel information.
Optionally, the apparatus for acquiring the IPv6 address prefix of the mobile terminal may further include:
the third acquisition module is used for acquiring the data packet based on the mobile user interface;
and the fourth acquisition module is used for acquiring the target tunnel information in the data packet.
The device for acquiring the mobile terminal IPv6 address prefix provided by the embodiment of the present invention is used to execute the method for acquiring the mobile terminal IPv6 address prefix provided by the present invention, and its implementation manner is consistent with the implementation manner of the method for acquiring the mobile terminal IPv6 address prefix provided by the present invention, and the same beneficial effects can be achieved, which is not repeated here.
The device for acquiring the mobile terminal IPv6 address prefix is used for the method for acquiring the mobile terminal IPv6 address prefix in the previous embodiments. Therefore, the description and definition in the method for acquiring the IPv6 address prefix of the mobile terminal in the foregoing embodiments may be used for understanding each execution module in the embodiments of the present invention.
According to the embodiment of the invention, the ICMPv6 router notification message in the user plane data packet is related to the target tunnel information, the ICMPv6 router notification message is analyzed, the IPV6 address prefix of the mobile terminal is obtained, the real IPv6 address prefix of the mobile terminal can be obtained under the condition that only the signaling interface which only issues the IPv6 interface address is accessed and the signaling interface which issues the IPv6 prefix is not accessed, and the problem that the real IPv6 address prefix of the mobile terminal is obtained under the condition that only the signaling interface which only issues the IPv6 interface address is accessed and the signaling interface which issues the IPv6 prefix is not accessed can be solved.
Fig. 4 is a schematic structural diagram of an electronic device according to the present invention, as shown in fig. 4, the electronic device may include: processor 410, communication interface (Communications Interface) 420, memory 430 and communication bus 440, wherein processor 410, communication interface 420 and memory 430 communicate with each other via communication bus 440. Processor 410 may invoke logic instructions in memory 430 to perform a method of retrieving a mobile terminal IPv6 address prefix, the method comprising: matching with a tunnel information session lookup table based on target tunnel information in a data packet in the mobile user plane interface; extracting IPv6 address prefix and prefix length of the mobile terminal corresponding to the target tunnel information in the IPv6 prefix information extension field under the condition that session information matched with the target tunnel information exists in the tunnel information session lookup table and the ICMPv6 route notification message carried by the data packet carries the IPv6 prefix information extension field; the tunnel information session inquiry table is used for storing the corresponding relation between the tunnel information of the mobile terminal surfing the internet and the session.
Further, the logic instructions in the memory 430 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform 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, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The processor 410 in the electronic device provided in the embodiment of the present application may invoke the logic instruction in the memory 430, and its implementation manner is consistent with the implementation manner of the method for obtaining the IPv6 address prefix of the mobile terminal provided in the present application, and may achieve the same beneficial effects, which are not described herein again.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, are capable of performing the method for obtaining an IPv6 address prefix of a mobile terminal provided by the above methods, the method comprising: matching with a tunnel information session lookup table based on target tunnel information in a data packet in the mobile user plane interface; extracting IPv6 address prefix and prefix length of the mobile terminal corresponding to the target tunnel information in the IPv6 prefix information extension field under the condition that session information matched with the target tunnel information exists in the tunnel information session lookup table and the ICMPv6 route notification message carried by the data packet carries the IPv6 prefix information extension field; the tunnel information session inquiry table is used for storing the corresponding relation between the tunnel information of the mobile terminal surfing the internet and the session.
When the computer program product provided in the embodiment of the present application is executed, the method for obtaining the IPv6 address prefix of the mobile terminal is implemented, and the specific implementation manner of the method is consistent with the implementation manner described in the embodiment of the foregoing method, and the same beneficial effects may be achieved, which is not described herein again.
In yet another aspect, the present invention further provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the above-provided methods of obtaining an IPv6 address prefix of a mobile terminal, the method comprising: matching with a tunnel information session lookup table based on target tunnel information in a data packet in the mobile user plane interface; extracting IPv6 address prefix and prefix length of the mobile terminal corresponding to the target tunnel information in the IPv6 prefix information extension field under the condition that session information matched with the target tunnel information exists in the tunnel information session lookup table and the ICMPv6 route notification message carried by the data packet carries the IPv6 prefix information extension field; the tunnel information session inquiry table is used for storing the corresponding relation between the tunnel information of the mobile terminal surfing the internet and the session.
When the computer program stored on the non-transitory computer readable storage medium provided in the embodiment of the present application is executed, the method for obtaining the IPv6 address prefix of the mobile terminal is implemented, and the specific implementation manner of the method is consistent with the implementation manner described in the embodiment of the foregoing method, and the same beneficial effects may be achieved, which is not repeated herein.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. A method for obtaining an IPv6 address prefix of a mobile terminal, comprising:
matching with a tunnel information session lookup table based on target tunnel information in a data packet in the mobile user plane interface;
extracting an IPv6 address prefix and a prefix length of the mobile terminal corresponding to the target tunnel information in the IPv6 prefix information extension field under the condition that session information matched with the target tunnel information exists in the tunnel information session lookup table and the ICMPv6 route notification message carried by the data packet carries the IPv6 prefix information extension field;
the tunnel information session lookup table is used for storing the corresponding relation between the tunnel information of the mobile terminal surfing the internet and the session.
2. The method for obtaining the IPv6 address prefix of the mobile terminal according to claim 1, wherein before the matching with the tunnel information session lookup table based on the target tunnel information in the data packet in the mobile user plane interface, the method further comprises:
based on the mobile signaling interface, obtaining the tunnel information of each mobile terminal surfing the Internet;
and establishing the tunnel information session lookup table based on the tunnel information of the internet surfing of each mobile terminal.
3. The method for obtaining the IPv6 address prefix of the mobile terminal according to claim 1, wherein after extracting the IPv6 address prefix and the prefix length of the mobile terminal corresponding to the target tunnel information in the IPv6 prefix information extension field, the method further comprises:
and updating the session corresponding to the target tunnel information based on the IPv6 address prefix and the prefix length of the mobile terminal corresponding to the target tunnel information.
4. The method for obtaining the IPv6 address prefix of the mobile terminal according to claim 2, wherein after obtaining the tunnel information of each mobile terminal for surfing the internet based on the mobile signaling interface, the method further comprises:
and storing the tunnel information of each mobile terminal surfing the Internet in the session of each mobile terminal.
5. The method for obtaining the IPv6 address prefix of the mobile terminal according to claim 3, wherein updating the session corresponding to the target tunnel information based on the IPv6 address prefix and the prefix length of the mobile terminal corresponding to the target tunnel information includes:
and updating the IPv6 address prefix and the prefix length of the mobile terminal in the session corresponding to the target tunnel information based on the IPv6 address prefix and the prefix length of the mobile terminal corresponding to the target tunnel information.
6. The method for obtaining the IPv6 address prefix of the mobile terminal according to any one of claims 1 to 5, wherein before the matching with the tunnel information session lookup table based on the target tunnel information in the data packet in the mobile user plane interface, the method further comprises:
acquiring the data packet based on a mobile user interface;
and acquiring target tunnel information in the data packet.
7. An apparatus for acquiring an IPv6 address prefix of a mobile terminal, comprising:
the matching module is used for matching with the tunnel information session lookup table based on the target tunnel information in the data packet in the mobile user interface;
a first obtaining module, configured to extract an IPv6 address prefix and a prefix length of a mobile terminal corresponding to the target tunnel information in the IPv6 prefix information extension field, where session information matched with the target tunnel information exists in the tunnel information session lookup table and the ICMPv6 route notification message carried by the data packet carries the IPv6 prefix information extension field;
the tunnel information session lookup table is used for storing the corresponding relation between the tunnel information of the mobile terminal surfing the internet and the session.
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 retrieving a mobile terminal IPv6 address prefix as claimed in any one of claims 1 to 6 when the program is executed by the processor.
9. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor implements a method of obtaining a mobile terminal IPv6 address prefix according to any of claims 1 to 6.
CN202210158538.XA 2022-02-21 2022-02-21 Method and device for acquiring IPv6 address prefix of mobile terminal Active CN114389997B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210158538.XA CN114389997B (en) 2022-02-21 2022-02-21 Method and device for acquiring IPv6 address prefix of mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210158538.XA CN114389997B (en) 2022-02-21 2022-02-21 Method and device for acquiring IPv6 address prefix of mobile terminal

Publications (2)

Publication Number Publication Date
CN114389997A CN114389997A (en) 2022-04-22
CN114389997B true CN114389997B (en) 2023-06-06

Family

ID=81205441

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210158538.XA Active CN114389997B (en) 2022-02-21 2022-02-21 Method and device for acquiring IPv6 address prefix of mobile terminal

Country Status (1)

Country Link
CN (1) CN114389997B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010016241A1 (en) * 2008-08-06 2010-02-11 パナソニック株式会社 Prefix allocation administration system and mobile terminal, and prefix allocation administration device
CN101702800A (en) * 2009-11-19 2010-05-05 中国科学院计算技术研究所 Agent mobile communication system and method
CN103167058A (en) * 2013-04-02 2013-06-19 深圳市共进电子股份有限公司 Method for acquiring Internet protocol version 6 (IPv6) prefix by adopting internet control message protocol version 6 (ICMPv6) to generate client address
CN111034250A (en) * 2017-08-14 2020-04-17 三星电子株式会社 Method for handling locally offloaded anchored User Plane Functions (UPF) in 5G cellular networks
CN112166580A (en) * 2018-05-21 2021-01-01 华为技术有限公司 Method and apparatus for communication
CN112217846A (en) * 2019-07-10 2021-01-12 电信科学技术研究院有限公司 Data transmission method and device
CN112584461A (en) * 2019-09-30 2021-03-30 华为技术有限公司 Router advertisement message sending method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3652981B1 (en) * 2017-08-14 2022-04-13 Samsung Electronics Co., Ltd. Method and apparatus for processing anchor user plane function (upf) for local offloading in 5g cellular network
EP3673682B1 (en) * 2017-09-28 2023-12-27 Ofinno, LLC Smf, amf and upf relocation during ue registration

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010016241A1 (en) * 2008-08-06 2010-02-11 パナソニック株式会社 Prefix allocation administration system and mobile terminal, and prefix allocation administration device
CN102113357A (en) * 2008-08-06 2011-06-29 松下电器产业株式会社 Prefix allocation administration system and mobile terminal, and prefix allocation administration device
CN101702800A (en) * 2009-11-19 2010-05-05 中国科学院计算技术研究所 Agent mobile communication system and method
CN103167058A (en) * 2013-04-02 2013-06-19 深圳市共进电子股份有限公司 Method for acquiring Internet protocol version 6 (IPv6) prefix by adopting internet control message protocol version 6 (ICMPv6) to generate client address
CN111034250A (en) * 2017-08-14 2020-04-17 三星电子株式会社 Method for handling locally offloaded anchored User Plane Functions (UPF) in 5G cellular networks
CN112166580A (en) * 2018-05-21 2021-01-01 华为技术有限公司 Method and apparatus for communication
CN112217846A (en) * 2019-07-10 2021-01-12 电信科学技术研究院有限公司 Data transmission method and device
CN112584461A (en) * 2019-09-30 2021-03-30 华为技术有限公司 Router advertisement message sending method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"2000-2005 S5_Index meeting 09-44".3GPP tsg_sa\WG5_TM.2007,全文. *
J. Brzozowski ; Comcast Cable ; G. Van De Velde ; Alcatel-Lucent ; .Unique IPv6 Prefix Per Hostdraft-ietf-v6ops-unique-ipv6-prefix-per-host-00.IETF .2015,全文. *

Also Published As

Publication number Publication date
CN114389997A (en) 2022-04-22

Similar Documents

Publication Publication Date Title
CN106412142B (en) Resource equipment address obtaining method and device
US9003008B2 (en) Domain name system, information processing method and apparatus of domain name system
CN109729183B (en) Request processing method, device, equipment and storage medium
WO2019062593A1 (en) Packet transmission method and device, and computer readable storage medium
CN110602724A (en) Network configuration method and communication device
CN110012118B (en) Method and controller for providing Network Address Translation (NAT) service
CN111328108A (en) 5G service data processing method and device and shunting equipment
US20220174586A1 (en) Network connection control method and related products
CN103312708A (en) Lease file based IP (internet protocol) setting method and system
CN107360269A (en) Domain name analysis system optimization method, device, equipment and storage medium
CN103763195B (en) A kind of method and device of transmitting message
CN106302384A (en) DNS message processing method and device
CN102547553B (en) Method, system and device for accessing service based on wireless application protocol (WAP)
EP3018930B1 (en) Service data management method, apparatus and system
US20140143383A1 (en) Handling device generated data
CN104253878A (en) VLAN (Virtual Local Area Network) information management system and method of DHCP (Dynamic Host Configuration Protocol) RELAY termination sub-interface
US9276896B2 (en) Method and apparatus of establishing a connection between devices using cached connection information
US20120233352A1 (en) Method and system for managing internet address based on terminal
EP2466815A1 (en) Method and system for initiating forwarding of communicaiton, information and data message and for routing configuration
US20160344664A1 (en) Direct client-to-client internet relay chat for softap clients
CN114389997B (en) Method and device for acquiring IPv6 address prefix of mobile terminal
TWI513239B (en) Network device and method for routing
TWI735633B (en) Data transmission method, equipment, device and system
US20120331154A1 (en) Method and apparatus of establishing a connection between devices using cached connection information
US20230164111A1 (en) Method and apparatus for sending domain name system request

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Yuan Yu

Inventor after: Ma Tao

Inventor after: Wu Sang

Inventor before: Wu Sang