IPv6 Explained for Beginners

ipv6-iconIPV6 has been developed to replace IPV4 which is running out of addresses.

Although it has been around almost 10 years it is still not widely deployed and supported.

However adoption rates are increasing rapidly and IPv6 traffic crossed the 10% threshold in February 2016 (wiki) .

For small business/home and home office networks it is likely to be many years before IPV6 becomes an issue.

All modern computers and mobile phones support both IPv4 and IPv6, and if you look at your device IP addresses you will probably see both.

In this tutorial I want to take a quick look at IPv6 addresses, and how they relate to IPv4 addresses.

Therefore it will help if you are already familiar with IPv4 -See IPv4 Addressing and classes for Beginners

IPv6 addresses

An Ipv6 address uses 128 bits as opposed to 32 bits in IPv4.

IPv6 addresses are written using hexadecimal, as opposed to dotted decimal in IPv4. See Binary numbers explained

Because an hexadecimal number uses 4 bits this means that an IPv6 address consists of 32 hexadecimal numbers.

These numbers are grouped in 4’s giving 8 groups or blocks. The groups are written with a : (colon) as a separator.

group1:group2: ……etc…. :group8

Here is an IPv6 address example:

IPv6-Address-Example

Note: Because of the length of IPv6 addresses various shortening techniques are employed.

The main technique being to omit repetitive 0’s as shown in the example above.

Network And Node Addresses

In IPv4 an address is split into two components a network component and a node component.

This was done initially using Address classes and later using subnet masking.

In IPv6 we do the same. The first step is to split the address into two parts.

The address is split into 2 64 bit segments the top 64 bits is the network part and the lower 64 bits the node part:

ipv6-address-network-node

The upper 64 bits are used for routing.

The lower 64 bits identify the address of the interface or node, and is derived from the actual physical or MAC address using IEEE’s Extended Unique Identifier (EUI-64) format. See this Wiki description for exact details.

If we look at the upper 64 bits in more detail we can see that it is split into 2 blocks of 48 and 16 bits respectively the lower 16 bits are used for subnets on an internal networks, and are controlled by a network administrator.

The upper 48 bits are used for the global network addresses and are for routing over the internet.

ipv6-address-structure

Address Types and Scope

IPv6 addresses have three types:

  • Global Unicast Address –Scope Internet- routed on Internet
  • Unique Local — Scope Internal Network or VPN internally routable, but Not routed on Internet
  • Link Local – Scope network link- Not Routed internally or externally.

 

ipv6-address-types

Global and Public Addresses

Global addresses are routable on the internet and start with 2001:

These addresses are known as global Unicast addresses and are the equivalent of the public addresses of IPv4 networks.

The Internet authorities allocate address blocks to ISPs who in turn allocate them to their customers. See Global Address assignments

Internal Addresses- Link Local and Unique Local

In IPv4 internal addresses use the reserved number ranges 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 and 169.254.0.0/16.

These addresses are not routed on the Internet and are reserved for internal networks.

IPv6 also has two Internal address types.

  • Link Local
  • Unique Local

Link Local

These are meant to be used inside an internal network, and again they are not routed on the Internet.

It is equivalent to the IPv4 address 169.254.0.0/16 which is allocated on an IPv4 network when no DHCP server is found.

Link local addresses start with fe80

They are restricted to a link and are not routed on the Internal network or the Internet.

Link Local addresses are self assigned i.e. they do not require a DHCP server.

A link local address is required on every IP6 interface even if no routing is present.

Unique Local

Unique Local are meant to be used inside an internal network.

They are routed on the Internal network but not routed on the Internet.

They are equivalent to the IPv4 addresses are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16

The address space is divided into two /8 spaces: fc00::/8 for globally assigned addressing, and fd00::/8 for locally assigned addressing.

For manually assignment by an organisation use the fd00 prefix.

Using IPv6 Addresses in URLs

On IPv4 networks you can access a network rsource e.g. a web page using the format

http://192.168.1.21/webpage

However IPv6 addresses contain a colon as separator and so must be enclosed in square brackets.

http://[IPv6 address]/webpage.

IPv6 Loop Back

The IPv6 loopback address is ::1. You can ping it as follows:

ping ::1

Ping-Loopback-IPv6

Video

Here is a good video that cover the above

Related Articles and Resources:

Please rate? And use Comments to let me know more

40 comments

  1. Thank you all for the fine and informative to was IP V6, but I’m a beginner from a med laboratory technician, and I need to learn about this and I don’t have a computer, but I only have mobile phone android version,so how to go about it and how to create website address..

    1. You can learn about it on the web but with access to computers it isn’t really possible to see it in practise.
      rgds
      steve

  2. IPv6 will never replace IPv4 for the same reason that SNA and X.25 never took hold; it’s too difficult for many people to understand.. They made a huge mistake with ipV6; instead of adding a country and region byte to the header (which would have added enough addresses and also simplified routing and geo-location), the bearded geeks created a whole new entity.

    1. I must admit I agree with you. Not about the solution as I’ve not really thought about it. Only that in my experience protocols upgrade and try to stay backwards compatible or not too drastic a change. Adding extra bits should not really have been a problem as it was done with MAC addresses.
      Rgds
      Steve

    2. Actually, that’s not entirely correct. SNA was all over the world however, it was privately developed by IBM for ue with their computing systems. Eventually SNA gateway to DLSW (SDLC/SNA over IP) as IP became more proliferate. X.25 was an international network transport standard (ITU) over which IP could be sent. While SNA was predominantly proprietary, X.25 was internationally accepted and could be considered a precursor to IP world-wide with international monitoring/maintenance of X.121 addressing to enable intercommunication. Both protocols were instrumental to help with the later widespread acceptance of IP and the Internet.

      1. That is historically wrong. X.25 was the “standard” replacement for SNA, which was effectively dead in the late 80s. Siemens was peddling their X.25 switches in Europe and the US and the telcos were building a nationwide network; problem was that they had just been broken up and they were bickering over how to bill for traffic; that passed through multiple telcos. Meanwhile PSI slapped up a backbone and offered to the public what universities and the government had already been using on a nationwide basis with no per packet nonsense that the telcos wanted.

        X.25 and SNA had nothing to do with “IP acceptance”. TCP/IP was accepted was because it was there, it worked and it was cheaper than what the telcos offered. Private industry effectively shot down X.25 (and ISDN) by solving a problem with something that is arguably better. X.25 switches had finite capacity issues that routers didn’t, so growth was much cheaper.

        What I was referring to was before the internet, when X.25 switches were available but not yet widely deployed, companies would chose to put up SNA network even though they thought X.25 was better and knew that SNA had no future, because they couldn’t find enough engineers who knew X.25 to support a network

  3. Isn’t it less confusing to say the 64 bits at the left or the 64 bits at the right rather than upper 64 bits or lower 64 bits? That was kind of confusing for me to grasp. Great work overall though. I understood everything once i got the upper 64 bits and lower 64 bits concept.

    1. Actually, when saying upper and lower you are adding an extra piece of information, in that upper means higher order bits and lower means lower order bits. Left and right does not tell you this.

  4. finally, a good site to check out whenever I have basic questions

    btw I was wondering, since ipv6 is so vast that we could barely exhaust it, is there even a need to use ports?

    or would ports be negligible/redundant in this case?

    sorry I’m really not too deep into networking and don’t even know what /8/16/64 means; I just want to try and host a server but my isp doesn’t let me because all the ports are blocked

    1. The protocol is designed to use ports the alternative would be that a network card had lots of addresses and how would you have the equivalent of well know ports e.g port 80 for a web server?
      Rgds
      Steve

    2. Ports help to tell a server that is receiving packets, which application to forward the packet contents to. For example, ssh uses well-known port 22 in the destination port. This tells the receiving computer that traffic with port 22 is going to the sshd application on the server. There could be multiple ssh sessions to the same computer but they all have the same destination port value of 22. The way the computer distinguishes multiple sessions going to the same port 22, is to also look at the source IP address and source port number for each packet. This way you can have multiple ssh sessions to the same server. You can also have multiple sessions using other ports (concurrently with multiple ssh sessions) be looking at all of this info concurrently.

      /8 is called a prefix length
      255.255.255.0 is called a mask

      /8 = 255.0.0.0
      /16 = 255.255.0.0
      /24 = 255.255.255.0
      etc…

      In IPv4 the number of bytes comprising the address is 4 shown as b1.b2.b3.b4. The mask is similar in that it also has 4 bytes, eg. 255.255.255.0 which happens to be same as /24. The 24 means that the first bits (higher order bits to the left) are all ones if you were to look at the mask as a binary representation:
      /24 = 255.255.255.0 = 1111 1111.1111 1111.1111 1111.0000 0000
      Prefix = Mask = Binary Representation of Mask

      /8 = 255.0.0.0 = 1111 1111.0000 0000.0000 0000.0000 0000

      You try /16

      Start with IPv4 then move on to IPv6.

  5. I used to have IPv6 connectivity, but now when I “View status of this connection” under “Change adapter options”, I only get “No network access”. I have tried resetting winsock catalog; resetting IPv6 log (netsh commands), to no avail. I’ve got a wrong setting somewhere under Wireless Properties” or the register. My ISP does provide IPv6. Help please! Will check other posts, since you may have answered this already. Win10 on Lenova Yoga920. Troubleshot and updated drivers, etc.

    1. If you go to the adapter settings
      Control Panel\Network and Internet\Network Connections
      right click on the adapter and click on properties scroll down the list of check boxes until you find Internet protocol version 4 and make sure it is enabled.
      rgds
      Steve

  6. What I consider an extremely elementary question about ipv6 that isn’t, as far as I can find, answered ANYWHERE, is how many common or garden variety numerical number of host addresses are in a /64 or /56. There are countless supposedly beginner tutorials on ipv6 but every single one goes on at length about bits and whatever and completely ignores the infinitely more relevant issue of the number of hosts. One of the very first things one finds in an ipv4 subnet is the common or garden variety numerical number of host addresses in a /28 or whatever. Why is is so difficult to use exactly the same logic with ipv6 ?

    1. Don’t know but I can only assume that as there are lots of host addresses available it doesn’t seem a concern.
      I Hope to revisit this tutorial at some point this year and update it and will give it some thought then.
      Rgds
      Steve

    2. its a 128-bit address. 64 of which is always the network identifier; 64 of which is always the host identifier. All networks (because they are by definition all /64) have (2^64)-1 host addresses, or more than 18 quintillion.

      If you’re stuck in a subnetting/supernetting mindset, the math you need for P=Prefix -> Number of hosts is (2^(128-P))-1

    3. There are 2^128 or 340 trillion, trillion, trillion IPv6 addresses, which is more than 100 times the number of atoms on the surface of the Earth. This will be more than sufficient to support trillions of Internet devices for the forseeable future. So in answer to your question, we don’t need to subnet like we did for IPv4. We subnetted and used NAT as a workaround because we didn’t have enough addresses before. Using /64 should always be fine. We will destroy the earth or kill ourselves before we run out.

  7. Dude
    Your video has helped me so much. Because of it I now have a life saving conversion table, which I did’nt know was out there.
    Thank you for making it so much clearer

  8. why did you delete my comment asking for clarity??
    I am looking to see how you get the prefix fe80::/10 for link-local addresses beginning with fe80 to febf

    How do you get fe80 to febf ???

    nevermind…figured it out on my own….

  9. “Global addresses are routable on the internet and start with 2001:”

    Plenty of global addresses outside of 2001::/16 and have been since at least 2005. Follow the link you yourself supply to the list of allocations.

    “If we look at the upper 64 bits in more detail we can see that it is split into 2 blocks of 48 and 16 bits respectively the lower 16 bits are used for subnets on an internal networks, and are controlled by a network administrator.”

    This makes it sound as if /48 allocations are universal. They are merely common. The split between the size of the allocation and what is subnetted inside an AS is pretty arbitrary, though a nibble boundary is nice.

  10. I think the ip6 URL example is wrong.
    You have http:[IPv6 address]/webpage
    I *think* it should be http://[IPv6 address]/webpage. And if you need a port it goes as :port after the closing ] (ie http://[IPv6 address]:port/webpage)

  11. Finally, someone could explain in a short, 5 minutes read the whole IPv6 addressing schema without writing a university essay.
    Thank you. So far the best and most valuable page on the Internet about the subject.

Leave a Reply

Your email address will not be published. Required fields are marked *