Teach you how to use the next generation Internet protocol "IPV6"

Teach you how to use the next generation Internet protocol "IPV6"

IPv6 is called the "next generation Internet Protocol" and was originally developed to solve the address exhaustion crisis faced by IPv4. You may know some of the basics of IPv6, but in order to provide flexibility, efficiency, capacity and optimized functions, developers have been continuously improving it to meet people's growing needs. Compared with IPv6, the capacity of IPv4 is too small, which is why IPv4 will eventually be phased out.

The IPv6 header and address structure have been completely revised; many of the features added after rethinking IPv4 are now part of the standard. IPv6 is ready to meet the needs of the massive Internet. I have promised to make this chapter easy to understand; in fact, you may find it a pleasure to read it - I felt that way when I wrote it!

IPv6 is a complex and elegant combination of new features, like a new Lamborghini and a fascinating futuristic novel. I hope you feel the same way reading this chapter as I did writing it.

[[342266]]

Why do we need IPv6?

Why do we need IPv6? Simply put, because we need to communicate, and the current system can't really keep up with that need - just like Pony Express can't keep up with Airmail. Just look at how much time and effort has been invested in saving bandwidth and IP addresses. Even variable length subnet masks (VLSM) were invented to avoid running out of addresses.

The number of people and devices connected to the Internet is increasing every day, which is not a bad thing, but a good thing. It allows us to find new ways to communicate with more people at any time. In fact, it is a basic human need. But the outlook is not optimistic. As I pointed out at the beginning of this chapter, we currently rely on IPv4 for communication, and IPv4 addresses are about to run out. In theory, IPv4 only provides about 4.3 billion addresses, but not every address is available for us to use. Using Classless Inter-Domain Routing (CIDR) and Network Address Translation (NAT) can indeed delay the exhaustion of IPv4 addresses, but these addresses will also be exhausted in a few years. In China, there are still a large number of individuals and companies that are not connected to the Internet. There are many reports providing various figures, but just think about the current global population of about 6.8 billion, and it is estimated that only about 10% of people are connected to the Internet, and you will believe that I am not exaggerating.

The above statistics reveal a harsh truth, given the capacity of IPv4, it is impossible to have one computer per person, let alone other IP devices equipped on the computer. I have several computers, and it is very likely that others do too. This does not include phones, laptops, game consoles, fax machines, routers, switches, and the multitude of other devices we use every day! I should have made it clear that we must take measures to prevent the addresses from being exhausted and people from being able to communicate with each other, and that measure is to implement IPv6.

Advantages and uses of IPv6

So what is so magical about IPv6? Can it really get us out of this impending mess? Is it really worth upgrading from IPv4 to IPv6? These are all good questions - and you may have some others in mind. Of course, there are a group of people who suffer from the time-tested and well-known "resistance to change syndrome", but don't listen to them. If people had accepted their views many years ago, we would still be using express mail and people would have to wait weeks or even months to receive it. Instead, just know that the answer is an absolute yes. Not only does IPv6 provide a large number of addresses (3.4x10*8, which is definitely enough), but it also has so many other features built in that it is worth the money, time and effort to migrate to IPv6.

Today's networks and the Internet have many requirements that were not foreseen when IPv4 was created; to meet these requirements, we have used some additional features that are difficult to implement and would be much easier if they were part of the standard. IPv6 improves on these features and incorporates them into the standard. One new standard in this area is IPSec, which provides end-to-end security.

Another advantage is mobility. As the name implies, it allows devices to roam between networks without losing connectivity. But the most impressive thing is the increased efficiency. First, the IPv6 packet header contains half as many fields, and all fields are aligned to 64-bit boundaries, which greatly improves processing speed - compared to IPv4, lookups are much faster! Much of the information originally contained in the IPv4 header is deleted, but optional extension headers can be added after the basic header fields to add this information or part of it to the header.

Of course, there are also the massive addresses (3.4x10*) mentioned earlier, but where do these addresses come from? Could they be conjured up by a magician?

I mean, all those addresses have to come from somewhere! That's because IPv6 provides a very large address space, meaning that the addresses are very long - four times longer than IPv4. IPv6 addresses are 128 bits long, but don't worry, I'll break down the various parts of this address later to give you an idea of ​​what it looks like. The added length allows the address space to contain more levels, providing a more flexible addressing architecture. This also improves routing efficiency and scalability because addresses can be aggregated more efficiently. IPv6 also allows hosts and networks to have multiple addresses, which is especially important for businesses that need to improve availability. In addition, IPv6 also makes more extensive use of multicast communications (a device sending data to many hosts or a selected group of hosts), which will also improve network efficiency because the communication destination is more specific.

IPv4 makes extensive use of broadcasts, which can cause many problems, the worst of which is the terrible broadcast storm, where uncontrolled broadcasts are forwarded everywhere, which can exhaust all bandwidth and bring the entire network to a standstill. Another annoying thing about broadcasts is that they cause every device in the network to be interrupted. After a broadcast is sent, every device must stop what it is doing and respond to the broadcast, regardless of whether the broadcast was sent to it.

Fortunately, IPv6 does not have the concept of broadcasting, it uses multicasting. IPv6 also supports two other types of communication: unicast and anycast, of which unicast is the same as in IPv4, while anycast is new. Anycast can assign the same address to multiple devices, and when a data stream is sent to the address, it will be routed to the nearest host that shares the address.

IPv6 address and its representation

Understanding the structure and use of IPv4 addresses is important, and this is also true for IPv6 addresses. As you know, IPv6 addresses are 128 bits long, which is much longer than IPv4 addresses, so in addition to using IPv6 addresses in new ways, IPv6 addresses are also more complicated to manage. But don't worry, here we will explain the parts of IPv6 addresses, how to write them, and many common uses. IPv6 addresses may seem a little mysterious at first, but you will soon get the hang of it!

See Figure 15-1, which shows an IPv6 address and its components.

As you can see, an IPv6 address is indeed much longer, but other than that, what's the difference? First, notice that it contains 8 groups of numbers (instead of 4), separated by colons instead of periods. Wait, there are letters in the address! Like MAC addresses, IPv6 addresses are expressed in hexadecimal, so you can say that an IPv6 address contains 8 groups of 16 bits separated by colons, expressed in hexadecimal. That's already a mouthful, and you haven't even tried reading it out loud yet!

You will definitely want to set up a network to test IPv6, so here is another point: When using a web browser to connect to an IPv6 device over HTTP, you must enclose the IPv6 address in square brackets. Why? Because the colon is already used by the browser to specify the port number. If you don't enclose the address in square brackets, the browser will not recognize the address.

Here is an example of this: .

http://[2001: 0db8: 3c4d:0012:0000:0000:1234: 56ab]/default .htm1

Obviously, you'd prefer to specify destinations by name (like www.lammle.com) whenever possible, but accept that sometimes you'll have to bite the bullet and type in an address, no doubt a pain. Obviously, DNS is also extremely important when implementing IPv6.

Note: In an IPv6 address, each field contains 4 hexadecimal letters (16 bits) and the fields are separated by colons.

Simplified representation

The good news is that there are a lot of shortcuts when writing these large addresses. One of them is that you can omit parts of the address, but there are some rules that must be followed. First, you can omit leading zeros from various fields. Doing so would make the previous example address look like this:

2001:db8:3c4d:12:0:0:1234:56ab

This is obviously much better—at least you don't have to write all those extra zeros! But what about the fields that contain only zeros? You can also omit them—at least some of them. Using the previous address example, you can omit two adjacent fields that contain only zeros and replace them with two colons, like this:

2001:db8:3c4d:12::1234:56ab

Very good! Using two colons replaces consecutive all-zero fields. When doing this, you must follow the following rule: you can only replace consecutive all-zero fields once. So, if there are 4 all-zero fields in the address, but they are not adjacent to each other, you cannot replace them all; remember that the rule here is to replace consecutive all-zero fields only once. Take the following address:

2001 :0000:0000:0012 : 0000: 0000:1234:56ab

It cannot be simplified to: 2001: :12::1234: 56ab

Instead, the best it can do is simplify it to something like this: 2001: :12:0:0:1234:56ab

Why? Because if it is replaced twice, the device will not be able to determine how many fields each pair of arm numbers represents after seeing the address. After the router sees this wrong address, it will ask: Should I replace each pair of colons with two all-zero fields, or replace the first pair of colons with three all-zero fields and the second pair of colons with one all-zero field? The router cannot answer this question because it does not have the required information.

Address Type

We are familiar with IPv4 unicast addresses, broadcast addresses, and multicast addresses, which specify which device (or at least how many devices) to communicate with. But as mentioned earlier, IPv6 changes this trio, adding anycast; in addition, due to the inefficiency of broadcasting, IPv6 no longer supports it.

The functions of these IPv6 address types and communication methods are described below.

  • Unicast Address Packets destined for a unicast address are transmitted to a single interface. To balance the load, multiple interfaces on multiple devices can use the same address, but this address is called an anycast address. There are many types of unicast addresses, but they are not described in detail here.
  • Global unicast address This is a typical routable public address, the same as the unicast address in IPv4. Global addresses start with 200:/3.
  • Link-local addresses are similar to IPv4 private addresses and are also non-routable. They begin with FE80:/10. Think of them as a convenient tool that allows you to set up temporary LANs for meetings or to create small LANs that are not connected to the Internet but need to share files and services locally.
  • Unique Local Addresses These addresses are also non-Internet routable, but are also essentially globally unique, so it is unlikely that they will be reused. Unique local addresses were designed to replace site local addresses, so they function almost identically to IPv4 private addresses: they support communication within the entire site and can be routed to multiple local networks. Site local addresses were deprecated in September 2004.
  • As in IPv4, packets destined for a multicast address are transmitted to all interfaces represented by the multicast address.

This type of address is sometimes called a one-to-many address. IPv6 multicast addresses are easy to identify; they always start with FF.

Anycast addresses are like multicast addresses. Anycast addresses identify multiple interfaces on multiple devices, but there is one big difference: anycast packets are transmitted to only one interface - the closest interface determined by routing distance. What is special about this type of address is that a single anycast address can be assigned to multiple interfaces. This type of address is called a "one-to-nearest" address.

You may ask, in IPv6, are there any special addresses reserved because IPv4 had such addresses. The answer is a lot, and here are them!

Special Address

Here are some address ranges that you should definitely keep in mind, as we will always need them. They are all special addresses or addresses that are reserved for specific purposes, but unlike IPv4, IPv6 provides a lot more addresses, so there is no harm in keeping some.

  • 0:0:0:0:0:0:0:0 (::) is equivalent to the IPv4 address 0.0.0.0 and is typically used as the source address for hosts when using a stateful DHCP configuration.
  • 0:0:0:0:0:0:0:1 (::1) is equivalent to the IPv4 address 127.0.0.1.
  • 00:0:0:0:0:0:192.168.100.1 In a network that supports both IP4 and IPv6, the IPv6 address converted from the IPv4 address is usually written like this.
  • 2000:/3 global unicast address range.
  • FCO0::/7 is the only local unicast address range.
  • FE80:/10 link-local unicast address range.
  • FF00::/8 multicast address range.
  • 3F:F::/32 is reserved for examples and documentation.
  • 2001:0DB8::/32 is reserved for examples and documentation.
  • 2002::/16 is reserved for use with 6to4 tunneling. 6to4 tunneling is a method of migrating from IPv4 to IPv6 that allows IPv6 packets to be transmitted over an IPv4 network without configuring an explicit tunnel.

<<:  Failure to modernize data center infrastructure increases costs and risk of downtime

>>:  Maintaining the championship! H3C continues to lead the Chinese enterprise WLAN market in the first half of 2020

Recommend

Cloud services are becoming the dominant force in enterprise network traffic

Cloud services are accounting for an increasing p...

Talk about 5G in plain language: ten knowledge points to ensure you understand

When it comes to 5G, everyone can basically talk ...

Intelligent wireless coverage solutions in complex industrial environments

Recently, NTT has provided customers with intelli...

LOCVPS new Japanese SoftBank line VPS, native IP, 20% discount promotion

After the Lunar New Year, LOCVPS launched a new V...

Expert Viewpoint: Is it time to go wireless?

Regardless of any technical requirements, the adv...

In the global 5G industry chain layout, what position does China occupy?

With the United States, China, Italy and other cou...

Who invented Ethernet? Do you know?

On April 7, 1946, the year after the end of World...

Learn how to restore IP address in one article!

[[426350]] Recover IP address Given a string cont...