A data access method and device, storage medium, and computer program product
By extending the flag and option bits of DHCPv4 messages, an IPv4 tunnel is established between the terminal device and the gateway device to allocate IPv6 addresses. This solves the problem of CPE power consumption and resource occupation caused by home routers not supporting IPv6, and realizes convenient allocation of IPv6 addresses and low-power transmission.
Patent Information
- Application Number
- CN202410866999.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2026-01-20
- Estimated Expiration
- 2044-06-28
AI Technical Summary
In fixed-line broadband scenarios, the lack of IPv6 support by home routers means that terminal devices can only be assigned IPv4 addresses, requiring CPE to perform NAT46 translation, which increases device power consumption and hardware resource usage.
By extending DHCPv4 messages and introducing flag and option bits to request IPv6 address prefixes, an IPv4 tunnel is established between the terminal device and the gateway device to allocate IPv6 addresses, simplifying the message transmission process.
It reduces the power consumption and hardware resource usage of CPE devices and simplifies the IPv6 address allocation process.
Smart Images

Figure CN118803101B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of communication, and in particular to a data access method and device, a storage medium, and a computer program product. BACKGROUND
[0002] In recent years, with the continuous promotion of Internet Protocol Version 6 (IPv6) transformation and the continuous evolution of IPv6 new technologies, the global IPv6 traffic has increased significantly. With the continuous increase of IPv6 traffic proportion, IPv6 single stack technology is also evolving forward.
[0003] In the current fixed network broadband scenario, basically end-to-end supports IPv6. The only problem is that the home router may not support IPv6, so the terminal device can only be allocated an Internet Protocol Version 4 (IPv4) address. When the entire external network and content run in IPv6 single stack, the message sent from the home network of the Customer Premises Equipment (CPE) needs to be an IPv6 message to ensure normal access to services. In this case, the CPE needs to perform NAT46 conversion to complete access to the IPv6 network and services.
[0004] However, the above solution requires the CPE to support stateful NAT46 conversion and DNS46 technology, which requires improving the device performance of the CPE, resulting in the problems of increased device power consumption and hardware resource occupation of the CPE. SUMMARY
[0005] The present application provides a data access method and device, a storage medium, and a computer program product, which can reduce the device power consumption and hardware resource occupation of the CPE.
[0006] The technical solution of the present application is implemented as follows:
[0007] In a first aspect, the present application provides a data access method applied to a terminal device, which comprises the following steps:
[0008] sending a first message with a first flag bit set to a first value to a gateway device to request the gateway device to allocate an Internet Version 6 (IPv6) address;
[0009] receiving a second message returned by the gateway device, wherein the first flag bit of the second message is the first value, the first field is an IPv6 address prefix requested by the terminal device, and the first option bit is the length of the IPv6 address prefix;
[0010] The IPv6 address information of the terminal device is generated by using an IPv6 address prefix, and data plane access is performed with an IPv6 service end based on the IPv6 address information.
[0011] In a second aspect, the application provides a data access method applied to a gateway device, the method comprising:
[0012] receiving a first message sent by a terminal device, wherein a first flag bit of the first message is a first value;
[0013] sending a second message to the terminal device to allocate an IPv6 address prefix to the terminal device, wherein the first flag bit of the second message is set to the first value, a first field is filled with the IPv6 address prefix requested by the terminal device, and a first option bit is filled with an IPv6 address prefix length.
[0014] In a third aspect, the application provides a terminal device, comprising:
[0015] a first sending unit configured to send a first message with a first flag bit set to a first value to a gateway device to request the gateway device to allocate an Internet Protocol version six (IPv6) address;
[0016] a first receiving unit configured to receive a second message returned by the gateway device, wherein the first flag bit of the second message is the first value, a first field is the IPv6 address prefix requested by the terminal device, and a first option bit is an IPv6 address prefix length.
[0017] a data plane access unit configured to generate IPv6 address information of the terminal device by using an IPv6 address prefix, and perform data plane access with an IPv6 service end based on the IPv6 address information.
[0018] In a fourth aspect, the application provides a gateway device, comprising:
[0019] a second receiving unit configured to receive a first message sent by a terminal device, wherein a first flag bit of the first message is a first value;
[0020] a second sending unit configured to send a second message to the terminal device to allocate an IPv6 address prefix to the terminal device, wherein the first flag bit of the second message is set to the first value, a first field is filled with the IPv6 address prefix requested by the terminal device, and a first option bit is filled with an IPv6 address prefix length.
[0021] In a fifth aspect, the application provides a terminal device, comprising a first processor and a first memory, wherein the first processor implements the above-mentioned data access method when executing a running program stored in the first memory.
[0022] In a sixth aspect, the application provides a gateway device, comprising a second processor and a second memory; the second processor implements the data access method when executing a program stored in the second memory.
[0023] In a seventh aspect, the application provides a storage medium, which stores a computer program, the computer program is executed by a first processor to implement the data access method applied to the terminal device, or the computer program is executed by a second processor to implement the data access method applied to the gateway device.
[0024] In an eighth aspect, the application provides a computer program product, which comprises a computer program, the computer program is executed by a first processor to implement the data access method applied to the terminal device, or the computer program is executed by a second processor to implement the data access method applied to the gateway device.
[0025] The application provides a data access method and device, a storage medium and a computer program product, the method comprising: sending a first message with a first flag bit set to a first value to a gateway device to request the gateway device to request allocation of an Internet Protocol version 6 (IPv6) address; receiving a second message returned by the gateway device, the second message having the first flag bit as the first value, a first field as an IPv6 address prefix requested by the terminal device, and a first option bit as a length of the IPv6 address prefix; generating IPv6 address information of the terminal device by using the IPv6 address prefix, and performing data plane access with an IPv6 server based on the IPv6 address information. The implementation scheme is used to extend the messages transmitted between the terminal device and the gateway device, wherein the first flag bit is used to request allocation of the IPv6 address, the first field represents the requested IPv6 address prefix, and the first option bit represents the length of the IPv6 address prefix. The terminal device allocates the IPv6 address of the terminal device by performing message transmission with the gateway device. The message transmission operation is simple to implement and can be implemented on a CPE with any performance parameter, thereby reducing the device power consumption and hardware resource occupation of the CPE. BRIEF DESCRIPTION OF DRAWINGS
[0026] Figure 1 FIG. 1 is a schematic diagram of a current network;
[0027] Figure 2 FIG. 2 is a flowchart of a terminal device accessing an IPv6 server;
[0028] Figure 3 FIG. 3 is a flowchart of a data access method provided by an embodiment of the application Figure 1 ;
[0029] Figure 4A schematic diagram of an exemplary format of a DHCPv4 message provided for an embodiment of the present application;
[0030] Figure 5 A schematic diagram of an exemplary format of a flags field provided for an embodiment of the present application;
[0031] Figure 6 A flowchart of a data access method provided for an embodiment of the present application Figure 2 ;
[0032] Figure 7 A flowchart of an exemplary data plane IPv6 access method provided for an embodiment of the present application
[0033] Figure 8 A structure diagram of a terminal device provided for an embodiment of the present application Figure 1 ;
[0034] Figure 9 A structure diagram of a terminal device provided for an embodiment of the present application Figure 2 ;
[0035] Figure 10 A structure diagram of a gateway device provided for an embodiment of the present application Figure 1 ;
[0036] Figure 11 A structure diagram of a gateway device provided for an embodiment of the present application Figure 2 . DETAILED DESCRIPTION
[0037] In order to enable a person skilled in the art to better understand the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings, which are only used for reference and are not intended to limit the embodiments of the present application.
[0038] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0039] In the following description, "some embodiments" are referred to, which describe a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict. It should also be noted that the terms "first\second\third" referred to in the embodiments of the present application are only used to distinguish similar objects, and do not represent a specific order of the objects. Understandably, "first\second\third" can be interchanged with a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0040] Currently, in the scenario of fixed network home broadband, the router used in the home may not support IPv6, therefore, the terminal device can only be assigned to an IPv4 address, and when the entire external network and content run in IPv6 single stack, the message sent from the home network of the CPE needs to be an IPv6 message to ensure normal access of the service, in this case, the CPE needs to perform NAT46 conversion, that is, after the terminal device accesses the external message using the IPv4 private network address to reach the CPE, the CPE converts the IPv4 message into an IPv6 message through the NAT46 technology, and then forwards it to the external network for IPv6 access.
[0041] The network schematic diagram can refer to Figure 1 , the home network supports IPv4, the external network is an IPv6 single stack network, only supports IPv6, the home network includes a dual stack terminal device, a home router that only supports IPv4, a dual stack CPE that connects the home network and the external network, and a server that only supports IPv6 in the external network.
[0042] From the perspective of accessing the IPv6 server from the terminal device, it is assumed that the IPv6 address prefix obtained by the CPE from the operator network is 1212:0:0:1:: / 64, and it is assumed that the IPv4 address pool configured for the CPE for destination address conversion is 192.168.100.0 / 24.
[0043] Correspondingly, based on Figure 1 the process of the terminal device accessing the IPv6 server can refer to Figure 2 , including:
[0044] 1. The terminal device first initiates a DNS4 request to request the IPv4 address of the external server (www.abc.com); the DNS4 request is forwarded to the CPE.
[0045] 2. The CPE requests the IPv6 address of the external server (www.abc.com) from the DNS server through DNS6.
[0046] It should be noted that since the external network is an IPv6 network, the CPE requests an IPv6 address of the external server.
[0047] 3. The DNS server returns a DNS6 response to the CPE, which carries the IPv6 address information 2001:db8::101 of the CPE.
[0048] 4. The CPE generates and saves a NAT46 table item for the IPv6 address according to a configured IPv4 address pool: 192.168.100.1<-->2001.db8::101.
[0049] 5. The CPE sends a DNS4 response to the terminal device, which carries an IPv4 address of the external server: 192.168.100.1.
[0050] 6. The terminal device initiates an IPv4 access packet to the external server, where the source address information is 192.168.1.2 and the destination address information is 192.168.100.1.
[0051] 7. After the above packet reaches the CPE, the CPE performs NAT46 conversion.
[0052] It should be noted that the CPE converts the destination address 192.168.100.1 to 2001:db8::101 according to the previous NAT record, performs NAT46 conversion on the source address: 192.168.1.2<-->1212:0:0:1::1, and generates a conversion table item.
[0053] 8. The CPE performs data plane IPv6 access, where the source address information is 1212:0:0:1::1 and the destination address information is 2001:db8::101.
[0054] The above scheme requires the CPE to support stateful NAT46 conversion and DNS46 technology, which greatly increases the device complexity of the CPE and occupies more hardware resources, thereby increasing the device power consumption and hardware resource occupation of the CPE.
[0055] To solve the above problem, an embodiment of the present application provides a data access method, as shown in Figure 3 The method can include the following steps.
[0056] S101, a first packet with a first flag bit set to a first value is sent to a gateway device to request the gateway device to allocate an Internet Protocol version six (IPv6) address.
[0057] In some embodiments, the terminal device can be referred to as a user equipment (UE). The terminal device can be a personal communication service (PCS) phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), etc. The terminal device can also be a smart phone, a tablet computer, a palm computer, a mobile station (MS), a mobile terminal, etc. The terminal device can communicate with one or more network devices via a radio access network (RAN). For example, the terminal device can be a mobile telephone (also known as a "cellular" phone) or a computer with a mobile telephone or the like, e.g., a terminal device can also be a portable, pocket, hand-held, computer- included, or car-mounted mobile device which exchanges voice and / or data with a radio access network. The terminal device can also be a device with wireless communication function, a computing device, or other processing device connected to a wireless modem, a wearable device, a terminal device in a future evolved network, etc. The embodiments of the present application are not limited in this regard.
[0058] In the embodiments of the present application, the terminal device is a dual stack terminal device.
[0059] In the embodiments of the present application, the gateway device is a dual stack CPE.
[0060] In the embodiments of the present application, the terminal device sets the first flag of the first message to a first value, indicating that the first message is used to request allocation of an IPv6 address.
[0061] In the embodiments of the present application, the first message is an extended dynamic host configuration protocol version 4 (DHCPv4) message.
[0062] In the embodiments of the present application, the DHCPv4 message is extended so that the DHCPv4 message can request and allocate an IPv6 address. The extension of the DHCPv4 message includes the following three aspects.
[0063] In a first aspect, a first flag bit is added in a flags field of the extended DHCPv4 message; when the first flag bit is a first value, it indicates that an IPv6 address is requested; and when the first flag bit is a second value, it indicates that an IPv4 address is requested.
[0064] The format of the extended DHCPv4 message can be found in Figure 4 , and the identification field is a flags field.
[0065] In an optional embodiment, the last bit of a Must Be Zero (MBZ) field in the flags field is S (the first flag bit). The format of the flags field can be found in Figure 5 , where B is a broadcast identifier, and MBZ is reserved for future use and is set to zero.
[0066] In an optional embodiment, the first value of S can be 1, and the second value of S can be 0. When S = 1, it indicates that the DHCPv4 message is used to request an IPv6 address; and when S = 0, it indicates that the DHCPv4 message is used to request an IPv4 address.
[0067] It should be noted that the specific values of the first value and the second value can be selected according to actual conditions, and the embodiments of the present application do not make specific limitations.
[0068] In a second aspect, if the first flag bit is the first value, the first address field and the second address field of the extended DHCPv4 message are redefined as the first field of the requested IPv6 address prefix.
[0069] In the embodiments of the present application, when S = 1 in the flags, the meanings of the ciaddr (first address) field and the yiaddr (second address) field are redefined as the IPv6 prefix requested by the user, as shown in Figure 4 The ciaddr field and the yiadrr field together form a v6prefix field (first field).
[0070] In the embodiments of the present application, the ciaddr field and the yiaddr field are 64 bits.
[0071] In a third aspect, a first option bit and a second option bit are added in the extended DHCPv4 message; the first option bit represents the length of the IPv6 address prefix, and the second option bit represents the allocated IPv6 address prefix.
[0072] In the embodiment of the present application, two option bits are added, which are assumed to be option 253 (first option bit) and option 254 (second option bit). The option 253 represents the prefix length of the IPv6 address, and the option 254 represents the allocated IPv6 address prefix.
[0073] It should be noted that the option 253 and the option 254 are only optional first option bit and second option bit added, and specifically, two options not occupied in the options can be selected as the first option bit and the second option bit, and the embodiment of the present application does not make specific limitation.
[0074] In the embodiment of the present application, the IPv6 address prefix length can be 60, 64, etc., and specifically, can be selected according to actual conditions, and the embodiment of the present application does not make specific limitation.
[0075] In the embodiment of the present application, the IPv4 tunnel is established between the terminal device and the gateway device for message transmission, wherein the source end point information of the IPv4 tunnel is the IPv4 address information of the terminal device, and the destination end point information of the IPv4 tunnel is the IPv4 address information of the IPv6 service end.
[0076] It should be noted that the gateway device is a gateway device performing message forwarding between the terminal device and the IPv6 service end.
[0077] In the embodiment of the present application, the terminal device sends the first message to the gateway device through the IPv4 tunnel.
[0078] In an optional embodiment, the terminal device sends a DHCP Discovery message (first message) to the gateway device, and the S bit of the message is 1.
[0079] S102, receiving the second message returned by the gateway device, the first flag bit of the second message is a first value, the first field is the IPv6 address prefix requested by the terminal device, and the first option bit is the IPv6 address prefix length.
[0080] In the embodiment of the present application, the gateway device returns a DHCP ACK message (second message) to the terminal device, the S bit of the message is 1, the value of the v6prefix field is the allocated IPv6 address prefix generated by the gateway device based on the IPv6 prefix delegation (PrefixDelegation, PD) prefix pre-acquired, and the value of the option 253 is the IPv6 address prefix length value.
[0081] It should be noted that the gateway device can provide the terminal device with the IPv6 address prefix after receiving the first message sent by the terminal device, and then allocate the IPv6 address prefix to the terminal device after the terminal device confirms the request for allocating the IPv6 address prefix.
[0082] In the embodiment of the application, the terminal device first receives the third message returned by the gateway device; the first flag bit of the third message is the first value, the first field is the IPv6 address prefix requested by the terminal device, and the first option bit is the IPv6 address prefix length; the third message is used to provide the terminal device with the IPv6 address prefix length first; then the terminal device sends the fourth message to the gateway device to confirm the IPv6 address prefix provided by the gateway device through the third message; the first flag bit of the fourth message is set to the first value, the first option bit is filled with the IPv6 address prefix length, and the second option bit is filled with the allocated IPv6 address prefix; after the terminal device confirms the IPv6 address prefix provided by the network device, the gateway device allocates the IPv6 address prefix to the terminal device, specifically, the terminal device receives the second message returned by the gateway device, and the network device carries the IPv6 address prefix allocated to the terminal device through the second message.
[0083] In an optional embodiment, the CPE returns a DHCP Offer message (the third message) to the terminal device, the S bit of the message is equal to 1, the value of option 254 is the IPv6 address prefix requested by the terminal device, and the value of option 253 is the IPv6 address prefix length value. Then, the terminal device sends a DHCP Request message (the fourth message), the S bit of the message is equal to 1, the value of the v6prefix field is the allocated IPv6 address prefix, and the value of option 253 is the IPv6 address prefix length value.
[0084] In the embodiment of the application, the second message is a DHCPv4 message. The third message and the fourth message are both DHCPv4 messages.
[0085] It should be noted that the format of the DHCPv4 message is described in S101, which will not be repeated here.
[0086] S103, generating the IPv6 address information of the terminal device by using the IPv6 address prefix, and performing data plane access with the IPv6 service end based on the IPv6 address information.
[0087] In the embodiment of the application, the terminal device generates the IPv6 address information of itself according to the IPv6 address prefix determined from the fourth message.
[0088] For example, the terminal device acquires an IPv6 address prefix 1212:0:0:1::0, and generates its own IPv6 address information: 1212:0:0:1::1.
[0089] It should be noted that if the home router in the home network only supports IPv4, an IPv6-over-IPv4 tunnel needs to be established to realize direct access between the terminal device and the gateway device, wherein the tunnel source address information of the IPv6-over-IPv4 tunnel is the IPv4 address information of the terminal device, the tunnel destination address information is the IPv4 address information of the IPv6 server, the tunnel inner message source address information is the IPv6 address information of the terminal device, and the tunnel inner message destination address information is the IPv6 address information of the IPv6 server.
[0090] In the embodiment of the application, the gateway device and the IPv6 server are still connected by an IPv6 tunnel. The terminal device performs data plane access to the IPv6 server through the IPv6-over-IPv4 tunnel between the terminal device and the gateway device and the IPv6 tunnel between the gateway device and the IPv6 server.
[0091] It can be understood that the message transmitted between the terminal device and the gateway device is extended, wherein the first flag bit is used to request allocation of an IPv6 address, the first field represents the requested IPv6 address prefix, and the first option bit represents the length of the IPv6 address prefix. The terminal device allocates the IPv6 address of the terminal device through message transmission between the terminal device and the gateway device. The message transmission operation is simple to implement and can be implemented on a CPE with any performance parameters, thereby reducing the device power consumption and hardware resource occupation of the CPE.
[0092] Based on the above embodiment, the embodiment of the application further provides a data access method, as shown in Figure 6 The method can be applied to a gateway device and can include the following steps.
[0093] S201, receiving a first message sent by a terminal device, wherein a first flag bit of the first message is a first value.
[0094] S202, sending a second message to the terminal device to allocate an IPv6 address prefix to the terminal device, wherein the first flag bit of the second message is set to the first value, the first field is filled with the IPv6 address prefix requested by the terminal device, and the first option bit is filled with the length of the IPv6 address prefix.
[0095] In the embodiment of the application, the gateway device pre-acquires an IPv6 PD prefix to allocate an IPv6 address prefix to the terminal device.
[0096] In the embodiment of the present application, an IPv4 tunnel is established between the gateway device and the terminal device for message transmission; wherein, the source endpoint information of the IPv4 tunnel is the IPv4 address information of the terminal device, and the destination endpoint information of the IPv4 tunnel is the IPv4 address information of the IPv6 service end.
[0097] In the embodiment of the present application, the third message is first sent to the terminal device to provide the requested IPv6 address prefix to the terminal device; the first flag bit of the third message is set to the first value, the first field is filled with the IPv6 address prefix requested by the terminal device, and the first option bit is filled with the IPv6 address prefix length; after receiving the fourth message sent by the terminal device, the first flag bit of the fourth message is the first value, the first option bit is the IPv6 address prefix length, and the second option bit is the allocated IPv6 address prefix; it is indicated that the terminal device confirms the IPv6 address prefix, and at this time, the second message is sent to the terminal device to allocate the IPv6 address prefix to the terminal device.
[0098] In the embodiment of the present application, the first message and the second message are extended DHCPv4 messages.
[0099] In the embodiment of the present application, the format of the extended DHCPv4 message includes the following three aspects of improvement.
[0100] Firstly, a first flag bit is extended in the flag field of the extended DHCPv4 message; the first flag bit is the first value, which indicates that the IPv6 address is requested to be allocated, and the first flag bit is the second value, which indicates that the IPv4 address is requested to be allocated.
[0101] Secondly, if the first flag bit is the first value, the first address field and the second address field of the extended DHCPv4 message are redefined as the first field of the requested IPv6 address prefix.
[0102] Thirdly, the first option bit and the second option bit are newly added in the extended DHCPv4 message; wherein, the first option bit represents the IPv6 address prefix length, and the second option bit represents the allocated IPv6 address prefix.
[0103] In the embodiment of the present application, after the second message is sent to the terminal device, the data plane access of the terminal device is also performed through the IPv6-over-IPv4 tunnel between the terminal device and the terminal device, and the IPv6 tunnel between the terminal device and the IPv6 service end; wherein, the tunnel source address information of the IPv6-over-IPv4 tunnel is the IPv4 address information of the terminal device, the tunnel destination address information is the IPv4 address information of the IPv6 service end, the tunnel inner message source address information is the IPv6 address information of the terminal device, and the tunnel inner message destination address information is the IPv6 address information of the IPv6 service end.
[0104] It can be understood that the message transmitted between the terminal device and the gateway device is extended, wherein the first flag bit is used to request allocation of an IPv6 address, the first field represents a requested IPv6 address prefix, and the first option bit represents an IPv6 address prefix length. The terminal device allocates the IPv6 address of the terminal device through message transmission between the terminal device and the gateway device. The message transmission operation is simple to implement and can be implemented on a CPE with any performance parameter, thereby reducing device power consumption and hardware resource occupation of the CPE.
[0105] Based on the above embodiment, an embodiment of the present application proposes a data plane IPv6 access method, as shown in the following figure. Figure 7 The method can include the following steps.
[0106] 1. An IPv4 tunnel is established between a terminal and a CPE.
[0107] Wherein the source endpoint is 192.168.1.2 and the destination endpoint is 192.168.3.1.
[0108] It should be noted that the CPE pre-acquires an IPv6 PD prefix of 1212::0:0:1:: / 64.
[0109] 2. The terminal sends an extended DHCP Discovery message.
[0110] Wherein S of the extended DHCP Discovery message is 1.
[0111] 3. The CPE returns an extended DHCP Offer message to the terminal.
[0112] Wherein S of the extended DHCP Offer message is 1, v6prefix is 1212:0:0:1::0, and option253 is 64.
[0113] 4. The terminal sends an extended DHCP Request message.
[0114] Wherein S of the extended DHCP Request message is 1, option254 is 1212:0:0:1::0, and option253 is 64.
[0115] 5. The CPE returns an extended DHCP ACK message to the terminal.
[0116] Wherein S of the extended DHCP ACK message is 1, v6prefix is 1212:0:0:1::0, and option253 is 64.
[0117] 6. The terminal generates its own IPv6 address 1212:0:0:1::1 according to the acquired IPv6 prefix.
[0118] 7. The terminal performs data plane access through an IPv6 over IPv4 tunnel.
[0119] In the formula, the tunnel source IP is 192.168.1.2, and the tunnel destination IP is 192.168.3.1.
[0120] In the formula, the tunnel source IP is 192.168.1.2, and the tunnel destination IP is 192.168.3.1.
[0121] 8. The CPE removes the outer IPv4 tunnel.
[0122] 9. The CPE performs IPv6 data plane access.
[0123] In the formula, the tunnel source IP is 192.168.1.2, and the tunnel destination IP is 192.168.3.1.
[0124] Based on the above embodiment, an embodiment of the present application provides a terminal device 1. As shown in the figure, the terminal device 1 comprises: Figure 8
[0125] A first sending unit 10 configured to send a first message with a first flag bit set as a first value to a gateway device to request the gateway device to allocate an Internet Protocol version 6 (IPv6) address;
[0126] A first receiving unit 11 configured to receive a second message returned by the gateway device, wherein the first flag bit of the second message is the first value, a first field is an IPv6 address prefix requested by the terminal device, and a first option bit is an IPv6 address prefix length;
[0127] A data plane access unit 12 configured to generate IPv6 address information of the terminal device by using the IPv6 address prefix, and perform data plane access with an IPv6 service end based on the IPv6 address information.
[0128] Optionally, the first receiving unit 11 is further configured to receive a third message returned by the gateway device, wherein the first flag bit of the third message is the first value, the first field is the IPv6 address prefix requested by the terminal device, and the first option bit is the IPv6 address prefix length.
[0129] The first sending unit 10 is further configured to send a fourth message to the gateway device to confirm the IPv6 address prefix provided by the gateway device through the third message; a first flag bit of the fourth message is set as the first value, a first option bit is filled with an IPv6 address prefix length, and a second option bit is filled with an allocated IPv6 address prefix.
[0130] The first receiving unit 11 is further configured to receive the second message returned by the gateway device.
[0131] Optionally, the first message and the second message are extended dynamic host configuration protocol Internet protocol version four (DHCPv4) messages.
[0132] Optionally, a first flag bit is extended in a flag field of the extended DHCPv4 message; the first flag bit is of a first value to represent a request for allocation of an IPv6 address, and the first flag bit is of a second value to represent a request for allocation of an IPv4 address; if the first flag bit is of the first value, a first address field and a second address field of the extended DHCPv4 message are redefined as a first field of a requested IPv6 address prefix; a first option bit and a second option bit are newly added in the extended DHCPv4 message; the first option bit represents an IPv6 address prefix length, and the second option bit represents an allocated IPv6 address prefix.
[0133] Optionally, the data plane access unit 12 is further configured to perform data plane access with the IPv6 server through an IPv6-over-IPv4 tunnel between the gateway device and the terminal device and an IPv6 tunnel between the gateway device and the IPv6 server in sequence; tunnel source address information of the IPv6-over-IPv4 tunnel is IPv4 address information of the terminal device, tunnel destination address information is IPv4 address information of the IPv6 server, tunnel-in message source address information is IPv6 address information of the terminal device, and tunnel-in message destination address information is IPv6 address information of the IPv6 server.
[0134] Optionally, an IPv4 tunnel is established between the terminal device and the gateway device to perform message transmission; source endpoint information of the IPv4 tunnel is IPv4 address information of the terminal device, and destination endpoint information of the IPv4 tunnel is IPv4 address information of the IPv6 server.
[0135] The terminal device provided in the embodiment of the present application sends a first message with a first flag bit set to a first value to a gateway device to request the gateway device to allocate an Internet Protocol version 6 (IPv6) address; receives a second message returned by the gateway device, the first flag bit of the second message being the first value, the first field being an IPv6 address prefix requested by the terminal device, and the first option bit being an IPv6 address prefix length; generates IPv6 address information of the terminal device by using the IPv6 address prefix, and performs data plane access with an IPv6 server based on the IPv6 address information. As can be seen, the terminal device provided in the embodiment extends the messages transmitted between the terminal device and the gateway device, wherein the first flag bit is used to request allocation of the IPv6 address, the first field represents the IPv6 address prefix requested, and the first option bit represents the IPv6 address prefix length. The terminal device allocates the IPv6 address of the terminal device by performing message transmission with the gateway device. The message transmission operation is simple to implement and can be implemented on a CPE with any performance parameters, thereby reducing the device power consumption and hardware resource occupation of the CPE.
[0136] Figure 9 A constituent structure of a terminal device 1 provided in the embodiment of the present application Figure 2 In actual applications, based on the same disclosure concept of the above embodiment, as shown in Figure 9 The terminal device 1 of the embodiment includes a first processor 13, a first memory 14, and a first communication bus 15.
[0137] The first processor 13 can be at least one of an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a CPU, a controller, a microcontroller, or a microprocessor. It can be understood that, for different devices, the electronic device used to implement the above processor functions can also be other devices, which are not specifically limited in the embodiment.
[0138] In the embodiment of the present application, the first communication bus 15 is used to realize the connection and communication between the first processor 13 and the first memory 14; and the first processor 13 realizes the following data access method when executing the running program stored in the first memory 14.
[0139] The first message with the first flag bit set to the first value is sent to the gateway device to request the gateway device to allocate an Internet Protocol version 6 (IPv6) address; a second message returned by the gateway device is received, the first flag bit of the second message is the first value, a first field is an IPv6 address prefix requested by the terminal device, and a first option bit is an IPv6 address prefix length; an IPv6 address information of the terminal device is generated by using the IPv6 address prefix, and data plane access is performed with an IPv6 server based on the IPv6 address information.
[0140] Further, the first processor 13 is further configured to receive a third message returned by the gateway device; the first flag bit of the third message is the first value, a first field is an IPv6 address prefix requested by the terminal device, and a first option bit is an IPv6 address prefix length; a fourth message is sent to the gateway device to confirm the IPv6 address prefix provided by the gateway device through the third message; the first flag bit of the fourth message is set to the first value, the first option bit is filled with the IPv6 address prefix length, and a second option bit is filled with the allocated IPv6 address prefix; the second message returned by the gateway device is received.
[0141] Further, the first message and the second message are extended Dynamic Host Configuration Protocol (DHCPv4) messages.
[0142] Further, a first flag bit is extended in a flag field of the extended DHCPv4 message; the first flag bit is the first value to represent a request for allocation of an IPv6 address, and the first flag bit is the second value to represent a request for allocation of an IPv4 address; if the first flag bit is the first value, a first address field and a second address field of the extended DHCPv4 message are redefined as a first field of a requested IPv6 address prefix; a first option bit and a second option bit are added in the extended DHCPv4 message; the first option bit represents an IPv6 address prefix length, and the second option bit represents an allocated IPv6 address prefix.
[0143] Further, the first processor 13 is further configured to perform data plane access with the IPv6 server through an IPv6 over IPv4 tunnel between the terminal device and the gateway device and an IPv6 tunnel between the gateway device and the IPv6 server in sequence; tunnel source address information of the IPv6 over IPv4 tunnel is IPv4 address information of the terminal device, tunnel destination address information is IPv4 address information of the IPv6 server, in-tunnel message source address information is IPv6 address information of the terminal device, and in-tunnel message destination address information is IPv6 address information of the IPv6 server.
[0144] Further, an IPv4 tunnel is established between the terminal device and the gateway device for message transmission, wherein source endpoint information of the IPv4 tunnel is IPv4 address information of the terminal device, and destination endpoint information of the IPv4 tunnel is IPv4 address information of the IPv6 service end.
[0145] Based on the above embodiment, the embodiment of the present application provides a gateway device 2, as shown in the figure, which comprises: Figure 10
[0146] A second receiving unit 20 is configured to receive a first message sent by a terminal device, wherein a first flag bit of the first message is a first value.
[0147] A second sending unit 21 is configured to send a second message to the terminal device to allocate an IPv6 address prefix to the terminal device, wherein the first flag bit of the second message is set as the first value, a first field is filled with the IPv6 address prefix requested by the terminal device, and a first option bit is filled with an IPv6 address prefix length.
[0148] Optionally, the second sending unit 21 is further configured to send a third message to the terminal device to provide the terminal device with the requested IPv6 address prefix, wherein the first flag bit of the third message is set as the first value, the first field is filled with the IPv6 address prefix requested by the terminal device, and the first option bit is filled with the IPv6 address prefix length.
[0149] The second receiving unit 20 is further configured to receive a fourth message sent by the terminal device, wherein the first flag bit of the fourth message is the first value, the first option bit is an IPv6 address prefix length, and the second option bit is an allocated IPv6 address prefix.
[0150] The second sending unit 21 is further configured to send the second message to the terminal device.
[0151] Optionally, the first message and the second message are extended DHCPv4 messages.
[0152] Optionally, a first flag bit is extended in the flag field of the extended DHCPv4 message; the first flag bit is of a first value, indicating a request for allocation of an IPv6 address, and the first flag bit is of a second value, indicating a request for allocation of an IPv4 address; if the first flag bit is of the first value, the first address field and the second address field of the extended DHCPv4 message are redefined as a first field of a requested IPv6 address prefix; the extended DHCPv4 message further includes a first option bit and a second option bit; the first option bit represents an IPv6 address prefix length, and the second option bit represents an allocated IPv6 address prefix.
[0153] Optionally, the gateway device 2 further includes a data plane access unit.
[0154] The data plane access unit is configured to perform data plane access of the terminal device via an IPv6-over-IPv4 tunnel between the terminal device and the gateway device 2 and an IPv6 tunnel between the terminal device and the IPv6 server; wherein the tunnel source address information of the IPv6-over-IPv4 tunnel is IPv4 address information of the terminal device, the tunnel destination address information of the IPv6-over-IPv4 tunnel is IPv4 address information of the IPv6 server, the tunnel inner message source address information of the IPv6-over-IPv4 tunnel is IPv6 address information of the terminal device, and the tunnel inner message destination address information of the IPv6-over-IPv4 tunnel is IPv6 address information of the IPv6 server.
[0155] Optionally, an IPv4 tunnel is established between the gateway device and the terminal device for message transmission; wherein the source endpoint information of the IPv4 tunnel is IPv4 address information of the terminal device, and the destination endpoint information of the IPv4 tunnel is IPv4 address information of the IPv6 server.
[0156] The gateway device provided in the embodiment of the present application receives a first message sent by a terminal device, the first flag bit of the first message is of a first value; sends a second message to the terminal device to allocate an IPv6 address prefix to the terminal device; the first flag bit of the second message is set to the first value, the first field is filled with an IPv6 address prefix requested by the terminal device, and the first option bit is filled with an IPv6 address prefix length. As can be seen, the gateway device provided in the embodiment extends messages transmitted between the terminal device and the gateway device, wherein the first flag bit is used to request allocation of an IPv6 address, the first field represents a requested IPv6 address prefix, and the first option bit represents an IPv6 address prefix length; the terminal device allocates an IPv6 address by performing message transmission with the gateway device; the message transmission operation is simple to implement and can be implemented on a CPE with any performance parameter, thereby reducing device power consumption and hardware resource occupation of the CPE.
[0157] Figure 11A constituent structure of a gateway device 2 provided for an embodiment of the present application is shown Figure 2 In actual application, based on the same disclosure concept of the above embodiment, as shown in the figure, Figure 11 The gateway device 2 of the embodiment includes a second processor 22, a second memory 23 and a second communication bus 24.
[0158] The second processor 22 can be at least one of ASIC, DSP, DSPD, PLD, FPGA, CPU, controller, microcontroller, microprocessor. It can be understood that for different devices, the electronic device for realizing the function of the processor can also be other, and the embodiment is not limited specifically.
[0159] In the embodiment of the present application, the second communication bus 24 is used to realize the connection and communication between the second processor 22 and the second memory 23; when the second processor 22 executes the running program stored in the second memory 23, the following data access method is realized:
[0160] Receiving a first message sent by a terminal device, the first flag bit of the first message is a first value; sending a second message to the terminal device to allocate an IPv6 address prefix to the terminal device; the first flag bit of the second message is set to the first value, the first field is filled with the IPv6 address prefix requested by the terminal device, and the first option bit is filled with the length of the IPv6 address prefix.
[0161] Further, the second processor 22 is further used to send a third message to the terminal device; to provide the requested IPv6 address prefix to the terminal device; the first flag bit of the third message is set to the first value, the first field is filled with the IPv6 address prefix requested by the terminal device, and the first option bit is filled with the length of the IPv6 address prefix; receiving a fourth message sent by the terminal device, the first flag bit of the fourth message is the first value, and the first option bit is the length of the IPv6 address prefix, and the second option bit is the allocated IPv6 address prefix; sending the second message to the terminal device.
[0162] Further, the first message and the second message are extended DHCPv4 messages.
[0163] Further, a first flag bit is extended in a flag field of the extended DHCPv4 packet; the first flag bit is a first value, which represents a request for allocation of an IPv6 address; the first flag bit is a second value, which represents a request for allocation of an IPv4 address; if the first flag bit is the first value, a first address field and a second address field of the extended DHCPv4 packet are redefined as a first field of a requested IPv6 address prefix; a first option bit and a second option bit are newly added in the extended DHCPv4 packet; the first option bit represents an IPv6 address prefix length, and the second option bit represents an allocated IPv6 address prefix.
[0164] Further, the second processor 22 is further configured to perform data plane access of the terminal device through an IPv6-over-IPv4 tunnel between the terminal device and the gateway device and an IPv6 tunnel between the terminal device and the IPv6 service end; wherein tunnel source address information of the IPv6-over-IPv4 tunnel is IPv4 address information of the terminal device, tunnel destination address information of the IPv6-over-IPv4 tunnel is IPv4 address information of the gateway device, inner-tunnel message source address information is IPv6 address information of the terminal device, and inner-tunnel message destination address information is IPv6 address information of the gateway device.
[0165] Further, an IPv4 tunnel is established between the gateway device and the terminal device for message transmission; wherein source endpoint information of the IPv4 tunnel is IPv4 address information of the terminal device, and destination endpoint information of the IPv4 tunnel is IPv4 address information of the IPv6 service end.
[0166] The embodiment of the present application provides a storage medium, which has a computer program stored thereon, the computer readable storage medium stores one or more programs, the one or more programs can be executed by one or more processors, and the computer program implements the data access method.
[0167] Based on the above embodiment, the embodiment of the present application provides a computer program product, which includes a computer program, the computer program can be executed by one or more processors, and the computer program implements the data access method.
[0168] It should be noted that, in this text, the term "comprising", "including" or any other variant thereof is intended to cover a non-exclusive inclusion, so that a process, method, article or apparatus that includes a list of elements not only includes those elements, but also includes other elements not expressly listed or inherent to such process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.
[0169] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be realized by means of software and necessary general hardware platforms, of course, they can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / random access memory (RAM), a magnetic disk, an optical disk) and includes a number of instructions for causing an image display device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present disclosure.
[0170] The above description is only a preferred embodiment of the present application, and is not intended to limit the protection scope of the present application.
Claims
1. A data access method, characterized in that, Applied to a terminal device, the method includes: Send a first message to the gateway device with the first flag bit set to the first value to request the gateway device to allocate an Internet Protocol version 6 (IPv6) address; The system receives a second message returned by the gateway device, wherein the first flag bit of the second message is the first value, the first field is the IPv6 address prefix requested by the terminal device, and the first option bit is the IPv6 address prefix length; the first message and the second message are extended Dynamic Host Configuration Protocol Internet Protocol version 4 (DHCPv4) messages. The IPv6 address information of the terminal device is generated using the IPv6 address prefix, and data plane access is performed with the IPv6 server based on the IPv6 address information; The step of accessing the data plane with the IPv6 server based on the IPv6 address includes: The terminal device sequentially accesses the IPv6 server through an IPv6-overlapping IPv4 tunnel with the gateway device and an IPv6 tunnel between the gateway device and the IPv6 server. The source address information of the IPv6-overlapping IPv4 tunnel is the IPv4 address information of the terminal device, the destination address information is the IPv4 address information of the IPv6 server, the source address information of the packets within the tunnel is the IPv6 address information of the terminal device, and the destination address information of the packets within the tunnel is the IPv6 address information of the IPv6 server.
2. The method according to claim 1, characterized in that, The receipt of the second message returned by the gateway device includes: The third message returned by the gateway device is received; the first flag bit of the third message is the first value, the first field is the IPv6 address prefix requested by the terminal device, and the first option bit is the IPv6 address prefix length. A fourth message is sent to the gateway device to confirm the IPv6 address prefix provided by the gateway device through the third message; the first flag bit of the fourth message is set to the first value, the first option bit is filled with the IPv6 address prefix length, and the second option bit is filled with the allocated IPv6 address prefix; Receive the second message returned by the gateway device.
3. The method according to claim 1, characterized in that, The extended DHCPv4 message extends the flag field by one first flag bit; if the first flag bit is a first value, it indicates a request for IPv6 address allocation, and if the first flag bit is a second value, it indicates a request for IPv4 address allocation. If the first flag bit is a first value, then the first address field and the second address field of the extended DHCPv4 message are redefined as the first field of the requested IPv6 address prefix; The extended DHCPv4 message adds a first option bit and a second option bit; wherein the first option bit represents the IPv6 address prefix length, and the second option bit represents the assigned IPv6 address prefix.
4. The method according to claim 1, characterized in that, An IPv4 tunnel is established between the terminal device and the gateway device for message transmission; wherein, the source endpoint information of the IPv4 tunnel is the IPv4 address information of the terminal device, and the destination endpoint information of the IPv4 tunnel is the IPv4 address information of the IPv6 server.
5. A data access method, characterized in that, Applied to a gateway device, the method includes: The receiving terminal device sends a first message, wherein the first flag bit of the first message is a first value; A second message is sent to the terminal device to allocate an IPv6 address prefix to the terminal device; the first flag bit of the second message is set to the first value, the first field is filled with the IPv6 address prefix requested by the terminal device, and the first option bit is filled with the IPv6 address prefix length; the first message and the second message are extended DHCPv4 messages; After sending the second message to the terminal device, the method further includes: The terminal device accesses the data plane through an IPv6-overlapping IPv4 tunnel with the terminal device and an IPv6 tunnel with the IPv6 server; wherein, the source address information of the IPv6-overlapping IPv4 tunnel is the IPv4 address information of the terminal device, the destination address information of the tunnel is the IPv4 address information of the IPv6 server, the source address information of the packets within the tunnel is the IPv6 address information of the terminal device, and the destination address information of the packets within the tunnel is the IPv6 address information of the IPv6 server.
6. The method according to claim 5, characterized in that, Sending the second message to the terminal device includes: A third message is sent to the terminal device to provide the terminal device with the requested IPv6 address prefix; the first flag bit of the third message is set to the first value, the first field is filled with the IPv6 address prefix requested by the terminal device, and the first option bit is filled with the IPv6 address prefix length; The terminal device receives a fourth message, wherein the first flag bit of the fourth message is the first value, the first option bit is the IPv6 address prefix length, and the second option bit is the allocated IPv6 address prefix. The second message is sent to the terminal device.
7. The method according to claim 5, characterized in that, The extended DHCPv4 message extends the flag field by one first flag bit; if the first flag bit is a first value, it indicates a request for IPv6 address allocation, and if the first flag bit is a second value, it indicates a request for IPv4 address allocation. If the first flag bit is a first value, then the first address field and the second address field of the extended DHCPv4 message are redefined as the first field of the requested IPv6 address prefix; The extended DHCPv4 message adds a first option bit and a second option bit; wherein the first option bit represents the IPv6 address prefix length, and the second option bit represents the assigned IPv6 address prefix.
8. The method according to claim 5, characterized in that, An IPv4 tunnel is established between the gateway device and the terminal device for message transmission; wherein, the source endpoint information of the IPv4 tunnel is the IPv4 address information of the terminal device, and the destination endpoint information of the IPv4 tunnel is the IPv4 address information of the IPv6 server.
9. A terminal device, characterized in that, The terminal device includes: The first sending unit is configured to send a first message to the gateway device with the first flag bit set to the first value, in order to request the gateway device to allocate an Internet version 6 (IPv6) address. The first receiving unit is configured to receive a second message returned by the gateway device, wherein the first flag bit of the second message is the first value, the first field is the IPv6 address prefix requested by the terminal device, and the first option bit is the IPv6 address prefix length; the first message and the second message are extended Dynamic Host Configuration Protocol Internet Protocol version 4 (DHCPv4) messages. The first data plane access unit is used to generate the IPv6 address information of the terminal device using the IPv6 address prefix, and to perform data plane access with the IPv6 server based on the IPv6 address information. The first data plane access unit is further configured to sequentially access the IPv6 server through an IPv6-overlapping IPv4 tunnel between the gateway device and the IPv4 server, and an IPv6 tunnel between the gateway device and the IPv6 server; wherein the source address information of the IPv6-overlapping IPv4 tunnel is the IPv4 address information of the terminal device, the destination address information of the tunnel is the IPv4 address information of the IPv6 server, the source address information of the packets within the tunnel is the IPv6 address information of the terminal device, and the destination address information of the packets within the tunnel is the IPv6 address information of the IPv6 server.
10. A gateway device, characterized in that, The gateway device includes: The second receiving unit is used to receive a first message sent by the terminal device, wherein the first flag bit of the first message is a first value. The second sending unit is configured to send a second message to the terminal device to allocate an IPv6 address prefix to the terminal device; the first flag bit of the second message is set to the first value, the first field is filled with the IPv6 address prefix requested by the terminal device, and the first option bit is filled with the IPv6 address prefix length; the first message and the second message are extended DHCPv4 messages; The second data plane access unit is used to access the data plane of the terminal device through an IPv6-overlapping IPv4 tunnel between the terminal device and the IPv6 tunnel between the terminal device and the IPv6 server; wherein, the source address information of the IPv6-overlapping IPv4 tunnel is the IPv4 address information of the terminal device, the destination address information of the tunnel is the IPv4 address information of the IPv6 server, the source address information of the packets within the tunnel is the IPv6 address information of the terminal device, and the destination address information of the packets within the tunnel is the IPv6 address information of the IPv6 server.
11. A terminal device, characterized in that, The terminal device includes: a first processor and a first memory; when the first processor executes the running program stored in the first memory, it implements the method as described in any one of claims 1-4.
12. A gateway device, characterized in that, The gateway device includes a second processor and a second memory; when the second processor executes the running program stored in the second memory, it implements the method as described in any one of claims 5-8.
13. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a first processor, it implements the method as described in any one of claims 1-4, or when it is executed by a second processor, it implements the method as described in any one of claims 5-8.
14. A computer program product, comprising a computer program, characterized in that, The computer program, when executed by the first processor, implements the method as described in any one of claims 1 to 4, or, when executed by the second processor, implements the method as described in any one of claims 5 to 8.
Citation Information
Patent Citations
Method, system and device for acquiring IPv6 (Internet Protocol Version 6) configuration information from IPv6 transition network
CN102158563A
Message transmission method and device
CN107580079A