In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to convert IPv4 into IPv6". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to convert IPv4 into IPv6.
What is ipv6?
We are now using a 32-bit ipv4 address, for example, 59.123.123.123. The total is about 4.3 billion, and each person on earth can't get an average of one, let alone each computer, and even less, even less, by subtracting the 192,170 address segments dedicated to the intranet. With the progress of science and technology and the development of the Internet of things, ipv4 obviously can not meet the requirements, which seriously restricts the application and development of the Internet, so ipv6 arises at the historic moment.
So what is ipv6?
IPv6 is the abbreviation of Internet Protocol Version 6, in which Internet Protocol is translated as "Internet Protocol". IPv6 is a next-generation IP protocol that replaces the current version of IP (IPv4) and claims to be able to compile a web site for every grain of sand in the world.
Compared to the 32-bit address used by IPv4, IPv6 uses a 128bit address:
According to the method of calculating the number of addresses, we can calculate the number of addresses that IPv6 can provide:
2 ^ 128-1 (about 340 trillion)
IPV6 address is extremely rich, almost inexhaustible, claiming that every grain of sand on the earth can be assigned its own address, not to mention every mobile phone, computer, even the refrigerator, washing machine can have their own unique ip address, all of a sudden a lot of tall.
Second, the benefits of ipv6
What is the use of ipv6, this is also a lot of friends are asking, in fact, there are still a lot of benefits of ipv6.
1. Have an endless number of ip addresses
The 128bit ipv6 has a large number of ip addresses, providing enough IP addresses for decades to come. The huge address space provides a global unique address for billions of new devices, and even ordinary people can have a public network ip. In the ipv4 period, because the address is limited, only enterprises can apply for a public network. The network we use is a private address, while ipv6, every device can have a public network ip. So what can you do with the public network?
There are many functions, such as our project monitoring, which can be accessed directly with the ip address of the public network, which can well solve the problem of remote control access in monitoring, and centralized control in remote monitoring is not so troublesome.
For enterprises or individuals, you can also set up a server and use a uniquely identified ipv6 address to access the server, and sharing files is extremely simple.
2. Multi-level levels contribute to route aggregation, providing routing efficiency and scalability.
There can be a faster speed, and this, in professional terms, is a slight increase in speed that humans cannot feel, but it is still fast after all.
3. Be able to deal with mobility and security mechanisms more effectively
More secure, in the past, we will often be inexplicable Trojans or viruses, which will be significantly reduced in IPv6.
4, will let the smart home and the Internet of things usher in the best era.
It is hard to imagine what it will be like when mobile phones, computers, cars, televisions, air conditioners, robots, and robots are all assigned to the same IP. The development of the Internet of things will only be limited by imagination.
Third, the expression of ipv6
IPV6 addresses are represented in hexadecimal. The 128bit is divided into eight groups, each with 16 bits, represented by four hexadecimal numbers, separated by ":". The first zero in each group can be omitted, but each group must have a number.
1. Hexadecimal representation of false division
The format is X:X:X:X:X:X:X:X, where each X represents 16 bit, displayed in hexadecimal, such as the following:
Ip 1: ABCD:EF01:2345:6789:ABCD:EF01:2345:6789
Ip II: FEDC:BA98:7654:3210:FEDC:BA98:7654:3210
Ip III: 1080:0:0:0:8:800:200C:417A
2. 0-bit compression representation
In some cases, an IPv6 address may contain a long 0, which can be compressed as "::". However, in order to ensure the uniqueness of address resolution, "::" can only appear once in the address, for example:
1080:0:0:0:8:800:200C:417A = 1080::8:800:200C:417A
FF01:0:0:0:0:0:0:101=FF01::101
FF01:0:0:0:0:0:0:1101 = FF01::1101
014:: 1: 1: 1
014:
3. Embedded IPv4 address representation
In order to achieve IPv4-IPv6 interworking, the IPv4 address is embedded in the IPv6 address, which is often expressed as: X:X:X:X:X:X:d.d.d.d
That is, the first six groups are represented in hexadecimal, the last two groups are represented in decimal, and the final 32bit address is represented in dotted decimal of IPv4, for example: 192.168.0.1 and is a typical example.
4. How to convert ipv4 to ipv6 address?
As mentioned above, for ipv4 addresses to interwork with ipv6 addresses, you need to convert ipv4 to ipv6 addresses.
For example:
If an address of IPv4 is 135.75.43.52 and has a 32-bit address, how can it be converted to ipv6?
1. Non-standard conversion:
You only need to add a total of 96 bits in the first six groups of the ip address, that is,
0000:0000:0000:0000:0000:0000:135.75.43.52
That is: 135.75.43.52 (embedded IPv4 representation)
2. Standard conversion
135.75.43.52 87.4B.2B.34 is calculated in hexadecimal
However, a group of 87.4B.2B.34 string addresses is still 8 bits, so two groups of v4 addresses are needed to synthesize V6 addresses.
Then add the first 96 bits to zero, and it can be converted to
0000:0000:0000:0000:0000:0000:874B:2B34 or:: 874B:2B34.
Add: how to convert decimal to hexadecimal?
Here, it is necessary to add how the next decimal system is converted to hexadecimal, which may be often needed in the ipv6 era.
The method is to divide the decimal number by 16 and reverse the remainder until it is not divisible. Of course, you may be confused when you hear that this method is confused. let's take a look at the calculation process with examples.
For example, the decimal ipv4 address: 135.75.43.52 is converted to hexadecimal.
In order to make it easier for you to understand the principle, the specific calculation process can be seen in the following figure:
Hexadecimal 10, 11, 12, 13, 14, 15 are represented by A, B, C, D, E, F, respectively.
So the decimal 135.75.43.52 ends up with hexadecimal 87.4B.2B.34, which is converted to ipv6:: 874B:2B34. Of course, it can also be converted directly through the tool.
At this point, I believe you have a deeper understanding of "how to convert IPv4 into IPv6". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.