CN115242749A - IPv6 address planning method, device, medium and equipment - Google Patents

IPv6 address planning method, device, medium and equipment Download PDF

Info

Publication number
CN115242749A
CN115242749A CN202210882823.6A CN202210882823A CN115242749A CN 115242749 A CN115242749 A CN 115242749A CN 202210882823 A CN202210882823 A CN 202210882823A CN 115242749 A CN115242749 A CN 115242749A
Authority
CN
China
Prior art keywords
address
network prefix
ipv4
prefix length
ipv6
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210882823.6A
Other languages
Chinese (zh)
Other versions
CN115242749B (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.)
Mingyang Industrial Technology Research Institute Shenyang Co ltd
Original Assignee
Mingyang Industrial Technology Research Institute Shenyang 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 Mingyang Industrial Technology Research Institute Shenyang Co ltd filed Critical Mingyang Industrial Technology Research Institute Shenyang Co ltd
Priority to CN202210882823.6A priority Critical patent/CN115242749B/en
Publication of CN115242749A publication Critical patent/CN115242749A/en
Application granted granted Critical
Publication of CN115242749B publication Critical patent/CN115242749B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides an IPv6 address planning method, a device, a medium and equipment, wherein the method comprises the following steps: acquiring the network prefix length and the subnet mask type of the IPv4 address; determining an address mapping mode based on the network prefix length and the subnet mask type of the IPv4 address; planning an IPv6 address by utilizing the IPv4 address based on the address mapping mode; therefore, the IPv4 address is directly related and converted into the IPv6 address by using an address mapping mode, so that the IPv4 address and the IPv6 address have relevance, the planning and management difficulty of the IPv6 address can be reduced, the operation, maintenance and management working orders of the IPv6 network and the scheme can be reduced, the IPv6 network and the scheme can be maintained by using the maintenance experience and habit of the IPv4 network and the scheme, the maintenance complexity caused by the independence of the double-stack IP address is avoided being doubled, and the maintenance workload of the double-stack network is reduced.

Description

IPv6 address planning method, device, medium and equipment
Technical Field
The present application relates to the field of IPv6 address planning technologies, and in particular, to a method, an apparatus, a medium, and a device for IPv6 address planning.
Background
The IPv6 address solves the problem of IPv4 address shortage due to the characteristic of unlimited 128-bit network space, and becomes the core foundation of the next generation Internet network architecture.
With the application and popularization of IPv6 scale deployment, especially the network pushing IPv4/IPv6 dual stack deployment, many security policies and routing policies are based on IP address matching, so that corresponding security policies must be considered when IPv6 is deployed. However, the IPv6 address is irrelevant to the IPv4 address at present, and is two completely incompatible address protocols, so that workload of IPv6 address planning, network deployment and later maintenance is greatly increased.
Disclosure of Invention
Aiming at the problems in the prior art, embodiments of the present invention provide an IPv6 address planning method, an apparatus, a medium, and a device, so as to solve or partially solve the technical problem in the prior art that when an IPv6 address is configured, because the IPv6 address is irrelevant to an IPv4 address, workload for IPv6 address planning, network deployment, and workload for later maintenance are increased.
In a first aspect of the present invention, a method for planning an IPv6 address is provided, where the method includes:
acquiring the network prefix length and the subnet mask type of the IPv4 address;
determining an address mapping mode based on the network prefix length and the subnet mask type of the IPv4 address;
and planning an IPv6 address by utilizing the IPv4 address based on the address mapping mode.
In the foregoing solution, the determining an address mapping manner based on the network prefix length and the subnet mask type of the IPv4 address includes:
if the subnet mask type of the IPv4 address is determined to be a natural network segment type and the network prefix length of the IPv4 address is less than 32, determining the network prefix length of the IPv6 address based on the network prefix length of the IPv4 address;
and based on the network prefix length of the IPv6 address, embedding the IPv4 address into a host bit of the IPv6 address.
In the foregoing solution, the determining the network prefix length of the IPv6 address based on the network prefix length of the IPv4 address includes:
if the network prefix length of the IPv4 address is determined to be 24, determining the network prefix length of the IPv6 address to be 112; or the like, or a combination thereof,
if the network prefix length of the IPv4 address is determined to be 16, determining the network prefix length of the IPv6 address to be 96; or the like, or, alternatively,
and if the network prefix length of the IPv4 address is determined to be 8, determining the network prefix length of the IPv6 address to be 80.
In the foregoing solution, the determining an address mapping manner based on the network prefix length and the subnet mask type of the IPv4 address includes:
if the network prefix length of the IPv4 address is determined to be 32, determining the network prefix length of the IPv6 address to be 128;
and embedding the IPv4 address into the last four sections of the IPv6 address.
In the above scheme, after each IPv4 address with the same network prefix length is converted into a corresponding IPv6 address, the network prefixes of the IPv6 addresses are the same.
In the foregoing solution, the determining an address mapping manner based on the network prefix length and the subnet mask type of the IPv4 address includes:
if the subnet mask type is determined to be the subnet mask with variable length, taking the first 64 bits of the IPv6 address as a network prefix of the IPv6 address;
and embedding the IPv4 address into a host position of the IPv6 address, and configuring different network prefixes for different IPv4 addresses.
In the foregoing solution, the configuring different network prefixes for different IPv4 addresses includes:
and sequentially increasing the fourth network prefix sequence of the corresponding IPv6 address by 1 based on the arrangement sequence of the IPv4 addresses.
In a second aspect of the present invention, an IPv6 address configuration apparatus is provided, where the apparatus includes:
the device comprises an acquisition unit, a judging unit and a judging unit, wherein the acquisition unit is used for acquiring the network prefix length and the subnet mask type of the IPv4 address;
the determining unit is used for determining an address mapping mode based on the network prefix length and the subnet mask type of the IPv4 address;
and the planning unit is used for planning the IPv6 address by utilizing the IPv4 address based on the address mapping mode.
In a third aspect of the invention, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of the first aspect.
In a fourth aspect of the invention, a computer device is provided, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method of any one of the first aspect when executing the program.
The invention provides an IPv6 address planning method, device, medium and equipment, and the method comprises: acquiring the network prefix length and the subnet mask type of the IPv4 address; determining an address mapping mode based on the network prefix length and the subnet mask type of the IPv4 address; planning an IPv6 address by utilizing the IPv4 address based on the address mapping mode; therefore, the IPv4 address is directly related and converted into the IPv6 address by using an address mapping mode, so that the IPv4 address and the IPv6 address have relevance, the deployment difficulty of the IPv6 address can be reduced, the deployment work level of the IPv6 address can be reduced, the IPv6 address can be maintained by using the network maintenance experience and habit of the IPv4 address, and the maintenance workload of a dual-stack network and a scheme can be reduced.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings.
In the drawings:
fig. 1 shows a flow diagram of an IPv6 address planning method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating an IPv6 address planning apparatus according to an embodiment of the present invention;
FIG. 3 shows a schematic diagram of a computer device architecture according to an embodiment of the invention;
fig. 4 shows a schematic diagram of a computer-readable storage medium structure according to an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
An embodiment of the present invention provides an IPv6 address planning method, as shown in fig. 1, the method mainly includes the following steps:
s110, acquiring the network prefix length and the subnet mask type of the IPv4 address;
in order to better understand the technical solution of the present embodiment, the structure of the IPv4 address is described first. Whether an IPv4 address or an IPv6 address, includes two parts: a network prefix (also called subnet mask) and a host bit. IPv4 addresses are represented in dotted decimal notation, with each portion representing a set of 8-bit addresses. For example, when the IPv4 address is 192.168.1.1/24, the corresponding decimal is 11000000 101010000000000100000001; the network prefix is the first 24 bits, i.e., 192.168.1 is the network prefix, and the last bit, 1, is the host bit.
IPv6 addresses are hexadecimal numbers separated by colons. It is divided into eight 16-bit blocks (each portion representing a set of 16-bit addresses) constituting a 128-bit address. For example, when the IPv6 address is 2403.
Taking IPv4 addresses as an example, subnet division includes two ways. The first is natural network segment division, which divides 32 bits of IPv4 address into one segment according to each 8 bits, i.e. the length of network prefix must be 8, 16 or 24. Specifically, as shown in table 1:
TABLE 1
Network prefix length/mask bits 8 16 24
Binary host bit 24 16 8
Decimal number of host 16777216 65536 256
As shown in Table 1, for example, when the network prefix length is 24, the maximum address space (number of hosts) is 2 8 = 256.
The second division manner is to perform network prefix allocation with any Length based on a Variable Length Subnet Mask (VLSM), that is, the network prefix Length can be determined to be any Length within a range of less than or equal to 32, and is mainly to adapt to Classless Inter Domain Routing (CIDR).
If the IPv4 subnet division modes are different, the corresponding IPv6 address planning modes are also different. Based on this, in this embodiment, the network prefix length and the subnet mask type of the IPv4 address need to be obtained, so as to determine the corresponding address mapping manner according to the network prefix length and the subnet mask type of the IPv4 address.
S111, determining an address mapping mode based on the network prefix length and the subnet mask type of the IPv4 address;
in one embodiment, determining an address mapping manner based on a network prefix length and a subnet mask type of an IPv4 address includes:
if the subnet mask type of the IPv4 address is determined to be the natural network segment type and the network prefix length of the IPv4 address is less than 32, determining the network prefix length of the IPv6 address based on the network prefix length of the IPv4 address;
and based on the network prefix length of the IPv6 address, embedding the IPv4 address into a host bit of the IPv6 address.
In one embodiment, the method for determining the network prefix length of the IPv6 address based on the network prefix length of the IPv4 address comprises the following steps:
if the network prefix length of the IPv4 address is determined to be 24, determining the network prefix length of the IPv6 address to be 112; or the like, or a combination thereof,
if the network prefix length of the IPv4 address is determined to be 16, determining the network prefix length of the IPv6 address to be 96; or the like, or, alternatively,
and if the network prefix length of the IPv4 address is determined to be 8, determining the network prefix length of the IPv6 address to be 80.
After the IPv4 addresses with the same network prefix (the same network prefix name and mask length) are planned to be the corresponding IPv6 addresses, the network prefixes of the IPv6 addresses are also the same.
For example, assuming that the IPv4 addresses are 192.168.1.1/24 and 192.168.1.2/24, after the two IPv4 addresses are planned as IPv6 addresses, the corresponding IPv6 addresses are: 2403. The network prefixes of the two IPv6 addresses are 2403.
Specifically, in the embodiment, the association maintenance of the IP address by the maintainer is mainly considered, and the IPv4 address and the IPv6 address have an association by mapping the 32-bit IPv4 address to the last 64-bit host bit of the IPv6 address. However, the address mapping mode not only needs to consider the expression form, but also needs to consider the constraint of the subnet mask, needs to ensure the association of the IPv6 address and the IPv4 address, and also needs to ensure the planning effectiveness of the IPv6 address, and is in the way of preventing the address network segment from colliding so as to affect the routing deployment and data forwarding. Therefore, when the network prefix length and the subnet mask type of the IPv4 address are different, the corresponding address mapping manners are also different.
Taking the IPv4 address as 192.168.1.1/24 for example, the last decimal 1 (the last eight-bit address) is the host bit, and the host bit range is 0-255. For IPv6 addresses, the host bit range is between 0 and 65536, with the last hexadecimal (last 16-bit address, network prefix length 112) as the host bit. At this time, it can be ensured that the IPv4 host bit can be changed freely without exceeding the host bit range of IPv 6. Therefore, 192.168.1.1/24 corresponds to an address mapping mode of 2403.
Similarly, for 192.168.1.1/16, the last two decimal numbers 1 are both host bits, so the last two 16-ary numbers in the IPv6 address also need to be set as host bits, and then the corresponding address mapping mode is 2403.
Similarly, the address mapping mode corresponding to 192.168.1.1/8 is 2403.
That is, when the IPv4 address with the length of the network prefix of the natural network segment/8,/16, 24 is mapped to the IPv6 address, the IPv6 address corresponds to the network prefix through the length of the network prefix of 80,/96,/112, thus not only ensuring the network prefix to be fixed and unchanged, thereby not causing network segment conflict, but also ensuring the random change in the host bit range of the IPv4 address, and simultaneously ensuring the correlation between the IPv4 address and the IPv6 address.
When the subnet mask type is the subnet mask with variable length, because the IPv4 address is in the form of four-segment decimal, and the IPv6 address is in the form of eight-segment colon sixteen mechanism, because of the difference in representation form, if the IPv4 address is converted into the IPv6 address by the one-to-one mapping method, some IPv4 addresses may not have corresponding IPv6 addresses. The following description is given by taking 192.168.1.128/30 as an example:
the network prefix length is 30, and the master bit has a value of 2 2 =4, the corresponding IPv4 addresses are: 192.168.1.128, 192.168.1.129, 192.168.1.130 and 192.168.1.131.
At this time, if the network prefix length of IPv6 is set to 126, the corresponding IPv6 addresses are: 2403.
It can be seen that 192. Therefore, for the case that the subnet mask type is the variable-length subnet mask, the address mapping mode is determined based on the network prefix length of the IPv4 address and the subnet mask type, and includes:
if the subnet mask type is determined to be the variable-length subnet mask, the first 64 bits of the IPv6 address are taken as a network prefix of the IPv6 address;
and embedding the IPv4 address into a host position of the IPv6 address, and configuring different network prefixes for different IPv4 addresses.
That is, no matter what the length of the network prefix of the IPv4 is, the present embodiment uniformly uses the last 64 bits associated with the IPv6 address as the host bit, so that there is a sufficient host bit range, and the IPv4 address is directly embedded into the host bit of the IPv 6. For differentiation, the present embodiment sets the network bit to a different number by IPv 6.
In one embodiment, different network prefixes are configured for different IPv4 addresses, and the method comprises the following steps:
and sequentially increasing the fourth bit network prefix sequence of the corresponding IPv6 address by 1 based on the arrangement sequence of the IPv4 addresses. The specific address mapping method can refer to table 2:
TABLE 2
IPv4 address IPv6 address
192.168.1.0/30 2403:DAC0:0:1:192:168:1:0/64
192.168.1.4/30 2403:DAC0:0:2:192:168:1:4/64
192.168.1.8/30 2403:DAC0:0:3:192:168:1:8/64
192.168.2.0/25 2403:DAC0:0:4:192:168:2:0/64
192.168.2.128/25 2403:DAC0:0:5:192:168:2:128/64
In table 2, taking 192.168.1.0/30 as an example, since 192.168.1.0/30 is arranged in the first bit, 192.168.1.0 is directly embedded into the host bit of the IPv6 address, and the fourth network prefix is set to 1, that is, the network prefix is 2403.
Taking 192.168.1.4/30 as an example, since 192.168.1.4/30 is arranged at the second bit, 192.168.1.4 is directly embedded into the host bit of the IPv6 address, and the fourth bit network prefix is set to 2, that is, the network prefix is 2403. And so on until the last IPv4 address.
It should be noted that, in practical applications, there is a single host address, that is, there is an IPv4 address with a network prefix length of 32. Such addresses are typically used for administrator login, routing protocol unique identifiers, and to distinguish from other IPv4 addresses. Then, for a single-host IPv4 address, determining an address mapping manner based on the network prefix length and the subnet mask type of the IPv4 address, including:
if the network prefix length of the IPv4 address is determined to be 32, determining the network prefix length of the IPv6 address to be 128;
and embedding the IPv4 address into the last four sections of the IPv6 address.
The specific mapping method can refer to table 3:
TABLE 3
Figure BDA0003764852740000081
Figure BDA0003764852740000091
In table 3, taking 172.16.1.1/32 as an example, the network prefix length of the IPv6 address can be set to 128, and 172.16.1.1 is directly embedded into the last four segments of the IPv6 address, so that the IPv6 address 2403.
And S112, planning an IPv6 address by using the IPv4 address based on the address mapping mode.
After the address mapping mode is determined, the IPv4 address can be planned to be the IPv6 address based on the address mapping mode. For a specific planning manner, reference may be made to the specific description in step S111, which is not described herein again.
In one embodiment, after planning the IPv6 address by using the IPv4 address, the method further includes:
and the IPv4 address and the IPv6 address are correspondingly stored in the mapping table, so that the subsequent maintenance of the IPv4 address and the IPv6 address is facilitated.
Therefore, the IPv6 address can be planned based on the original IPv4 address, the IPv4 address is associated with the IPv6 address, the deployment difficulty of the IPv6 network and the scheme can be reduced, the deployment work level of the IPv6 address can be reduced, the IPv6 address can be maintained by using the experience and habit of the IPv4 network and the scheme, and the maintenance work load of the dual-stack network can be reduced.
Based on the same inventive concept as the foregoing embodiment, this embodiment further provides an IPv6 address configuration apparatus, as shown in fig. 2, the apparatus includes:
an obtaining unit 21, configured to obtain a network prefix length and a subnet mask type of an IPv4 address;
a determining unit 22, configured to determine an address mapping manner based on the network prefix length and the subnet mask type of the IPv4 address;
and the planning unit 23 is configured to plan an IPv6 address by using the IPv4 address based on the address mapping manner.
Since the apparatus described in the embodiment of the present invention is an apparatus used for implementing the IPv6 address planning method according to the embodiment of the present invention, a person skilled in the art can understand the specific structure and the deformation of the apparatus based on the method described in the embodiment of the present invention, and thus details are not described herein again. All devices adopted by the method of the embodiment of the invention belong to the protection scope of the invention.
Based on the same inventive concept, the present embodiment provides a computer apparatus 300, as shown in fig. 3, including a memory 310, a processor 320, and a computer program 311 stored on the memory 310 and executable on the processor 320, wherein when the processor 320 executes the computer program 311, any step of the method described above is implemented.
Based on the same inventive concept, the present embodiment provides a computer-readable storage medium 400, as shown in fig. 4, on which a computer program 411 is stored, which computer program 411, when being executed by a processor, realizes the steps of any of the methods described in the previous paragraphs.
Through one or more embodiments of the invention, the invention has the following advantages or advantages:
the invention provides an IPv6 address planning method, device, medium and equipment, and the method comprises: acquiring the network prefix length and the subnet mask type of the IPv4 address; determining an address mapping mode based on the network prefix length and the subnet mask type of the IPv4 address; converting the IPv4 address into an IPv6 address based on the address mapping mode; therefore, the IPv4 address is directly related and converted into the IPv6 address by using an address mapping mode, so that the IPv4 address and the IPv6 address have relevance, the planning and management difficulty of the IPv6 address can be reduced, the operation, maintenance and management working orders of the IPv6 network and the scheme can be reduced, the IPv6 network and the scheme can be maintained by using the maintenance experience and habit of the IPv4 network and the scheme, the maintenance complexity caused by the independence of the double-stack IP address is avoided being doubled, and the maintenance workload of the double-stack network is reduced.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Moreover, those of skill in the art will appreciate that while some embodiments herein include some features included in other embodiments, not others, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components of a gateway, proxy server, system according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website, or provided on a carrier signal, or provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means can be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
The above description is only exemplary of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents, improvements, etc. that are within the spirit and principle of the present invention should be included in the present invention.

Claims (10)

1. An IPv6 address planning method, the method comprising:
acquiring the network prefix length and the subnet mask type of the IPv4 address;
determining an address mapping mode based on the network prefix length and the subnet mask type of the IPv4 address;
and planning an IPv6 address by using the IPv4 address based on the address mapping mode.
2. The method as claimed in claim 1, wherein the determining the address mapping manner based on the network prefix length and the subnet mask type of the IPv4 address comprises:
if the subnet mask type of the IPv4 address is determined to be a natural network segment type and the network prefix length of the IPv4 address is smaller than 32, determining the network prefix length of the IPv6 address based on the network prefix length of the IPv4 address;
and based on the network prefix length of the IPv6 address, embedding the IPv4 address into a host bit of the IPv6 address.
3. The method of claim 2, wherein the determining the network prefix length for the IPv6 address based on the network prefix length for the IPv4 address comprises:
if the network prefix length of the IPv4 address is determined to be 24, determining the network prefix length of the IPv6 address to be 112; or the like, or, alternatively,
if the network prefix length of the IPv4 address is determined to be 16, determining the network prefix length of the IPv6 address to be 96; or the like, or, alternatively,
and if the network prefix length of the IPv4 address is determined to be 8, determining the network prefix length of the IPv6 address to be 80.
4. The method as claimed in claim 1, wherein the determining the address mapping manner based on the network prefix length and the subnet mask type of the IPv4 address comprises:
if the network prefix length of the IPv4 address is determined to be 32, determining the network prefix length of the IPv6 address to be 128;
and embedding the IPv4 address into the last four sections of the IPv6 address.
5. A method as claimed in any one of claims 2 to 3, wherein after converting each IPv4 address of the same network prefix length into a corresponding IPv6 address, the network prefixes of each IPv6 address are the same.
6. The method of claim 1, wherein the determining an address mapping manner based on the network prefix length and the subnet mask type of the IPv4 address comprises:
if the subnet mask type is determined to be the subnet mask with variable length, taking the first 64 bits of the IPv6 address as a network prefix of the IPv6 address;
and embedding the IPv4 address into a host position of the IPv6 address, and configuring different network prefixes for different IPv4 addresses.
7. The method of claim 6, wherein said configuring different network prefixes for different IPv4 addresses comprises:
and sequentially increasing the fourth bit network prefix sequence of the corresponding IPv6 address by 1 based on the arrangement sequence of the IPv4 addresses.
8. An IPv6 address configuring apparatus, the apparatus comprising:
the device comprises an acquisition unit, a judgment unit and a processing unit, wherein the acquisition unit is used for acquiring the network prefix length and the subnet mask type of the IPv4 address;
the determining unit is used for determining an address mapping mode based on the network prefix length and the subnet mask type of the IPv4 address;
and the planning unit is used for planning the IPv6 address by utilizing the IPv4 address based on the address mapping mode.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method according to any of claims 1-7 are implemented when the program is executed by the processor.
CN202210882823.6A 2022-07-26 2022-07-26 IPv6 address planning method, device, medium and equipment Active CN115242749B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210882823.6A CN115242749B (en) 2022-07-26 2022-07-26 IPv6 address planning method, device, medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210882823.6A CN115242749B (en) 2022-07-26 2022-07-26 IPv6 address planning method, device, medium and equipment

Publications (2)

Publication Number Publication Date
CN115242749A true CN115242749A (en) 2022-10-25
CN115242749B CN115242749B (en) 2024-08-16

Family

ID=83674794

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210882823.6A Active CN115242749B (en) 2022-07-26 2022-07-26 IPv6 address planning method, device, medium and equipment

Country Status (1)

Country Link
CN (1) CN115242749B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101431477A (en) * 2008-12-17 2009-05-13 清华大学 P2P operator and campus network router combined IPv4/IPv6 grouping conversion method
US20120011234A1 (en) * 2009-03-26 2012-01-12 Huawei Technologies Co., Ltd. Method for enabling ipv 6 host to access ipv4 host, method for obtaining ipv6 address prefix, and translation apparatus
US20170034125A1 (en) * 2014-02-28 2017-02-02 Zte Corporation Method for Processing NAT64 Prefix, Network Equipment and DHCPv6 Server
CN113660357A (en) * 2021-08-17 2021-11-16 烽火通信科技股份有限公司 Method and device for automatically acquiring IP address by IPv6 dual-stack system
CN114221929A (en) * 2021-11-04 2022-03-22 招银云创信息技术有限公司 Address translation method, apparatus, device, medium, and computer program product
CN114338596A (en) * 2021-12-23 2022-04-12 天翼视讯传媒有限公司 IPv6 and IPv4 conversion method applied to network migration

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101431477A (en) * 2008-12-17 2009-05-13 清华大学 P2P operator and campus network router combined IPv4/IPv6 grouping conversion method
US20120011234A1 (en) * 2009-03-26 2012-01-12 Huawei Technologies Co., Ltd. Method for enabling ipv 6 host to access ipv4 host, method for obtaining ipv6 address prefix, and translation apparatus
US20170034125A1 (en) * 2014-02-28 2017-02-02 Zte Corporation Method for Processing NAT64 Prefix, Network Equipment and DHCPv6 Server
CN113660357A (en) * 2021-08-17 2021-11-16 烽火通信科技股份有限公司 Method and device for automatically acquiring IP address by IPv6 dual-stack system
CN114221929A (en) * 2021-11-04 2022-03-22 招银云创信息技术有限公司 Address translation method, apparatus, device, medium, and computer program product
CN114338596A (en) * 2021-12-23 2022-04-12 天翼视讯传媒有限公司 IPv6 and IPv4 conversion method applied to network migration

Also Published As

Publication number Publication date
CN115242749B (en) 2024-08-16

Similar Documents

Publication Publication Date Title
US8447846B2 (en) Using unique local unicast addresses in a global domain name server by providing a centralized registry
JP5520929B2 (en) Configuring communication between compute nodes
CN103348662B (en) For the method producing address in a computer network
US7349392B2 (en) Assigning IP addresses in an internet data center
US6965929B2 (en) Configuring a network device
US7949754B2 (en) Method and apparatus for prescribing station identifiers in a profit IO network
US7996563B2 (en) Method for designating internet protocol addresses
JP2005505830A (en) Central directory server
US8819282B2 (en) Using unique local unicast addresses in a global domain name server
US11418444B2 (en) IPv6 network node managing method and equipment
CN113094182A (en) Load balancing processing method and device for service and cloud server
RU2019113321A (en) SYSTEMS AND METHODS FOR AUXILIARY NETWORK DETECTION FOR CLUSTER SYSTEMS BASED ON ZERO CONFIGURATION
US6826621B1 (en) Method and system for aggregating interface addresses
CN102035899A (en) Method and device for determining addresses in IPv6 (internet protocol version 6) based LAN (local area network)
CN107517129B (en) Method and device for configuring uplink interface of equipment based on OpenStack
CN113472911B (en) Subnet dividing method and device
CN104702707A (en) Method and device for data processing
CN114244842A (en) Security resource scheduling method and device, electronic equipment and storage medium
CN115242749A (en) IPv6 address planning method, device, medium and equipment
KR101920190B1 (en) A method and apparatus for generating a random ip
CN105357332B (en) A kind of method for network address translation and device
CN110855805B (en) Method and system for configuring forward and reverse records in batch based on synthetic record type
CN114979065A (en) Method and device for improving source NAT address translation effectiveness
CN107360273A (en) A kind of domain name analytic method and device
US20120110207A1 (en) Embedding zone identifiers in ip addresses

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