X

Understanding IPv6 – why is it important?

Understanding IPv6 - why is it important?

Why IPv6?

Because OneNet will provide a common network infrastructure for marine devices and/or services on IPv6, we wanted to share some of the underlying reasons and opportunities to be gained from this.

All OneNet application protocols, such as PGN Messages, are designed to use a standard IPv6 network protocol stack. This allows OneNet to coexist with other protocols and services that operate parallel on the same network (including other marine standards such as IEC 61162-450).

The standard also specifies mechanisms for connecting OneNet networks, NMEA 2000 networks, and other networks via gateway devices. Like NMEA 2000, all OneNet products will need to be certified by the manufacturer and verified by NMEA.

As OneNet utilises Ethernet as its physical layer, it has a much larger bandwidth than NMEA 2000.  Whilst NMEA 2000 operates at 250Kbits/sec, OneNet can range from 10Mbits/sec to 10Gbits/sec, making it 40 – 40,000 times faster! And due to this greater bandwidth, OneNet can support the high bandwidth requirements of radar, video, and sonar data streams.

Why IPv6 came about

Internet Protocol Version 6 (IPv6) is the latest Internet Protocol Standard, acting as the replacement for IPv4. Developed by the Internet Engineering Task Force (IETF), it was first drafted in 1998, and was accepted as a standard in 2017.  For a while now, there has been an issue with the number of available addresses on IPv4, which we have now reached.

To overcome this issue with IPv4, and hopefully never run into the same problem with IPv6, the addresses were changed from 32-bit to 128-bit. To provide a comparison between the two Protocols, here’s the number of available addresses when both standards were created;

IPv4: 4,300,000,000
IPv6: 340,282,366,920,938,463,463,374,607,431,768,211,456

 

Understanding IPv4 and IPv6 addresses

Due to IPv6 changing to 128-bit addresses, they look very different when compared to IPv4 32-bit. As a 128-bit address would be extremely long, it is displayed as Hexadecimal, rather than the decimal standard we are familiar with on a 32-bit address. To understand this better, we must first grasp the concept of ‘bytes’, ‘bits’ and ‘nibbles’, and how these differ between decimal, binary and hex.

Hex, Decimal and Binary

The common unit for computing and networking is a byte. A byte is comprised of 8 bits. For example, a 32-bit OS is 4 bytes (4*8=32). Bits and bytes can be displayed in many different methods of numerical systems, which include decimal, binary and hex.

  • Decimal is base 10, where a single byte can contain a value of 0-255.
  • Binary is base 2, where each value (0 or 1) is 1 bit.
  • Hexadecimal is base 16, where one hex character is 4 bits (0 – F, or 0-15 decimal), meaning 2 characters are required to represent a byte.

Note: 4 bits (one hex character) is called a ‘nibble’, which is a small or half a byte (seriously).

As Hex uses base 16, it is represented in the following method;

Hex Value Decimal Value Binary Value
00 0 0000 0000
01 1 0000 0001
02 2 0000 0010
03 3 0000 0011
04 4 0000 0100
05 5 0000 0101
06 6 0000 0110
07 7 0000 0111
08 8 0000 1000
09 9 0000 1001
0A 10 0000 1010
0B 11 0000 1011
0C 12 0000 1100
0D 13 0000 1101
0E 14 0000 1110
0F 15 0000 1111

This becomes relevant when we look at an IPv6 address. As hex values use 4 bits per character, and the address is 128 bits, this means the IP address displayed in Hex is only 32 characters long… (you can imagine how long it would be if you used the decimal equivalent!).

Unlike an IPv4 address which uses dotted decimals (192.168.4.1), an IPv6 Hex address uses Colons (‘:’) as the separation method. These values are grouped into blocks containing 4 characters each (16-bit), meaning we have 8 overall groups.

Here is an example of an IPv6 address in full: FE80:CD00:0000:0CDE:1257:0000:211E:729C

It is acceptable to shorten these addresses as they allow for ‘leading zero omission’ and shortening of any 4-character sequence containing only zeros. This would result in the following:

FE80:CD00:0000:0CDE:1257:0000:211E:729C –> FE80:CD00:0:CDE:1257:0:211E:729C

It is also acceptable to shorten consecutive blocks only containing zeros using two ‘::’. This can only be done once per address, and in a scenario where multiple occur, only the furthest left sequence may be shortened.

The IP address is split into 2, where the first (upper) 64 bits are for network and routing. The second (lower) 64 bits are taken from the MAC address. A MAC Address is 48-bit, and then converted to the 64-bit EUI (Extended Unique Identifier) format.

Linking IPv4 and IPv6 together

The adoption of IPv6 will be fairly slow; thus, many systems and networks will be using IPv4 for some time. Unfortunately, they can’t just ‘work’ together, and require some transition mechanisms or gateways. Fortunately, there are ways to achieve this. These are;

  • Dual IP Stacks
  • Tunnelling
  • Dual Stack Proxy servers using NAT-64 (Network Address Translation)
  • IPv4 Mapped IPv6 addresses

There are other methods, some still being developed and some already deprecated, thus this list is not extensive.

Dual stack implementation is currently regarded as the easiest and most fluid way to integrate and eventually migrate to IPv6. Essentially this means the device or network object has both an IPv4 address and an IPv6 address, allowing it to communicate with both IPv4 and IPv6 devices.