Press "Enter" to skip to content

Протокол IPv6

IPv6 unicast адреса работают в точности так же как и в IPv4. Данные адреса определяют один интерфейс или устройство. Существует три типа IPv6 unicast адресов:

What is IPV6? How does IPv6 Works?

Introduction to IPv6 & What is IPV6, Despite IPv4’s usefulness, there are a few downsides to it. IPv6 was developed to address them. Throughout this article, learn more about IPv6 and its uses.

Download PDF
Posted: 30 Jul, 19 Updated: 14 Dec, 21 by Ayden I 8 Min

List of content you will read in this article:

  • 1. What is IPv6?
  • 2. History Behind IPv6
  • 3. Why Only Consider Using IPv6 Now?
  • 4. Issues with IPv6
  • 5. IPv4 and IPv6
  • 6. Why There is No IPv5
  • 7. Conclusion

If you ever heard the word “Internet Protocol,” you probably know the importance of IP in the internet world. So IP or Internet Protocol is a set of rules that works to route and address data packets. These packets can travel across networks and reach the appropriate destination.

There are two major types of IPs, the first one is IPv4, and the second one is IPv6 because they are widely used protocols worldwide. However, IPv6 has almost vanished IPv4 due to its excellent compatibility. So this blog will completely focus on an introduction to IPv6 and everything about this internet protocol.

What is IPv6?

The full form of IPv6 is Internet Protocol version 6, but many people also call it Internet Protocol (IP)’s next generation. This IP is developed for advancement in technology and replacing IPv4, but many internet services still have IPv4 in their system. Every computing machine, smartphone, IoT sensor, automation component, etc., requires a numerical IP address for communicating with other devices.

IPv6 was developed by the Internet Engineering Task Force (IETF) to deal with the long-anticipated problem of IPv4 address exhaustion. Throughout this article, we will familiarize ourselves with the concept of IPv6.

History Behind IPv6

After IPv4’s development in the early 80s, the available IPv4 address pool began to shrink rapidly as the demand for addresses exponentially increased with the Internet. Outlined below are the major points that played a key role in the birth of IPv6:

  1. The Internet has grown exponentially, and the address space allowed by IPv4 is saturating. There is a requirement to have a protocol that can satisfy the needs of future Internet addresses expected to grow unexpectedly.
  2. IPv4 on its own does not provide any security features. Data has to be encrypted with some other security applications before being sent on the Internet.
  3. Data prioritization in IPv4 is not up to date. Though IPv4 has a few bits reserved for Type of Service or Quality of Service, they do not provide much functionality.
  4. IPv4 enabled clients can be configured manually, or they need some address configuration mechanism. It does not have a mechanism to configure a device to have a globally unique IP address.

Taking pre-cognizance of the situation that might arise, IETF, in 1994, initiated the development of an addressing protocol to replace IPv4. The progress of IPv6 can be tracked using the RFC published:

  • 1998 – RFC 2460 – Basic Protocol
  • 2003 – RFC 2553 – Basic Socket API
  • 2003 – RFC 3315 – DHCPv6
  • 2004 – RFC 3775 – Mobile IPv6
  • 2004 – RFC 3697 – Flow Label Specification
  • 2006 – RFC 4291 – Address architecture (revision)
  • 2006 – RFC 4294 – Node requirement

On June 06, 2012, some of the Internet giants chose to put their Servers on IPv6. Presently they are using the Dual-Stack mechanism to implement IPv6 parallel with IPv4.

Why Only Consider Using IPv6 Now?

IPv6 is widely considered due to its compatibility. Getting from IPv6 only system to an IPv4 system will not work as there is no backward compatibility built into it. However, older hardware can be upgraded with new firmware.

The problem is moving to purely IPv6 equipment or dual-stack gear, which can work on both protocols by the ISPs is super expensive back in the day, but now this is being implemented. Some of the main IPv6 features are as follows:

  • Support addresses that are 128 bits long.
  • Integrated with IPsec (Internet Protocol Security), which authenticates and encrypts the data sent.
  • Allows the host to send fragment packets instead of the router.
  • Does not require a DHCP (Domain Host Control Protocol) or manual configurations.
  • Uses the host’s address resource codes from the DNS to map the IPv6 addresses.
  • Stateless Auto-reconfiguration of Hosts allows IPv6 hosts to configure when connected to a routed IPv6 network automatically.
  • More efficient routing
  • Ipv6 supports auto-configuration, which corrects most of the flaws from IPv4 while integrated with the security features.

As we have mentioned above, IPv4 used to provide the services previously because it uses a 32-bit addressing scheme for supporting almost 4.3 billion devices. But now, the increased number of smartphones, computers, and laptops requires more addresses. Hence, IPv6 is developed that uses 128-bit addresses for supporting almost 340 trillion devices.

Issues with IPv6

There is no secret that IPv6 is as famous as IPv4. IPv6 implementations are comparatively new for the system. So software that is used to create systems for IPv4 hasn’t tested IPv6 appropriately. Hence, it can create issues, and they have to resolve them as quickly as possible for correct working. There are various groups that are doing complete testing of IPv6, but many IT equipment manufacturers already sold products with IPv6 vulnerabilities.

IPv4 and IPv6

Ipv4 was developed in the late 70s, and it was the first non-experimental version on the internet. The total number of addresses allocated by IPv4 is 232, which is about 4 billion unique addresses. IPv6 theoretically allows 2128 addresses (3.4*1038), but the actual number is smaller as multiple ranges are reserved for special use or completely excluded from use.

IPv6 replaces IPv4 32 bit address with a 128-bit address, resulting in many addresses. IPv6 addresses are represented as eight groups comprising four hexadecimal digits while colons separate groups.

2003:0DB8:0000:12A4:D354:0008:0417:420B

Two decimal digits represent an example for IPv4 addresses in four groups which are separated by full stops.

198.168.34.65

The main reasons behind IPv4 being alone so far are reusing the same IP addresses and NAT. Network address translation (NAT) converts the private IPs to public IPs, which are unique. All the overlapping private IPs are behind unique public IPs.

Internet Protocol version 6 is a new addressing protocol designed to incorporate all the possible requirements of the future internet known to us as Internet version 2. Like its predecessor, IPv4, this protocol works on the Network Layer (Layer-3) of the OSI model. Along with its offering of an enormous amount of logical address space, this protocol has great features which address the shortcomings of IPv4.

IPv4 has proven itself as a robust routable addressing protocol and has served us for decades on its best-effort-delivery mechanism. It was designed in the early ’80s and did not get any major change afterwards. At the time of its birth, internet access was limited only to a few universities for their research and the Department of Defense. IPv4 is 32 bits long and offers around 4,294,967,296 (232) addresses. This address space was considered more than enough at the time.

Why There is No IPv5

Until recently, Internet Protocol has been recognized as IPv4 only. Versions 0 to 3 were used while the protocol was itself under development and experimental process. So, we can assume lots of background activities remain active before putting a protocol into production. Similarly, protocol version 5 was used while experimenting with the stream protocol for the Internet.

It is known to us as Internet Stream Protocol which used Internet Protocol number 5 to encapsulate its datagram. It was never brought into public use. Here is a table of IP versions and how they are used:

Conclusion

So it was the complete information IPv6 and why it is so much popular among IT equipment companies. As we have mentioned earlier, IPv6 offers more compatibility than IPv4, but it has some vulnerabilities. If you like our blog, then you can visit our website, which has a huge list of informative blogs and guides.

In case you are looking for IPV6 VPS Server and want to use IPV6 features, you can use MonoVM VPS servers. Apart from IPv6 services, we also offer multiple services like VPS hosting, Web hosting, dedicated server, and many more.

Протокол IPv6

Протокол IPv6 пришел на замену протоколу IPv4 и хотя в настоящее время IPv4 всё еще везде используется, придет время и протокол IPv6 вытеснит своего предшественника полностью.

Первое, что стоит упомянуть когда рассматривают протокол IPv6 – это измененная структура адреса и количество возможных адресов. Если в IPv4 используется 2^32 адресов, то в новой версии это число достигает невероятных значений 2^128 . Структура адреса выглядит следующим образом: 2001:1536:a0b8:3491:c800:00ef:fe74:0c00 – 8 хекстетов, разделенных символом :

Типы адресов IPv6

Всего существует три основных типа IPv6 адресов:

В отличие от IPv4, в IPv6 нет broadcast адресов. Однако, группа multicast адресов “all nodes” делает ту же работу, что и broadcast адреса.

Unicast

IPv6 unicast адреса работают в точности так же как и в IPv4. Данные адреса определяют один интерфейс или устройство. Существует три типа IPv6 unicast адресов:

  • Global адреса – это те же адреса, что и публичные адреса в IPv4. Они глобально маршрутизируются и могут использоваться при коммуникации через сеть Интернет. В настоящее время вся глобальная одноадресная адресация выделяется из префиксного блока 2000::/3 .
  • Unique local unicast адреса – адреса, которые в IPv4 определены как “серые”, т.е. адреса, описанные в RFC 1918. Данные адреса маршрутизируются в пределах внутренней коммуникации организации и не маршрутизируются в сети Интернет. RFC 4193 определяет блок префиксов fc00::/7 для уникальной локальной одноадресной адресации. Данные адреса всегда начинаются с двоичного значения 1111 110 , которое соответствует префиксу fc00::/7 . Восьмой бит – бит L в настоящее время установлен в 1, чтобы указать, что адрес назначен локально. Установка бита L на 0 еще не определена и зарезервирована для использования в будущем. Объединение префикса (первых 7 бит) и бита L создает два потенциальных адресных блока:
    • fc00::/8 : зарезервировано для будущего использования
    • fd00::/8 : локальная одноадресная адресация
    • Link-local адреса – немаршрутизируемые адреса, используются для коммуникации в пределах одного непосредственно подключенного канала. Основное назначение данных адресов – обнаружение соседей и определение дубликата адресов. Адреса выделяются из префиксного блока fe80::/10 . Данные адреса могут назначаться как вручную, так и динамически с использованием механизма SLAAC (stateless address autoconfiguration). При использовании SLAAC часть Interface ID выводится из MAC-адреса модификацией формата EUI-64.

    Anycast

    Anycast адреса представляют скорее сервис нежели чем отдельное устройство, поэтому один адрес может быть назначен разным устройствам, предоставляющим один и тот же сервис. Основное предназначение anycast адресов – обеспечение отказоустойчивости.

    На следующей схеме приведён пример того как может выглядеть это в реальности

    Anycast

    В сети имеется два сервера, которые имеют идентичную адресацию, но физически расположены в разных местах. В зависимости от того где находится клиент, трафик пойдет к ближайшему серверу, опираясь на таблицу маршрутизации.

    В случае если в сети произойдет падение одного из маршрутизаторов, находящихся рядом с серверами, произойдет перестроение пути следования трафика для одного из клиентов и трафик для этого клиента пойдет по новому пути. В этом случае оба клиента будут обращаться к одному и тому же серверу.

    Какого определённого формата для данных типов адресов не существует, поэтому теоретически любой unicast адрес может быть anycast. Для корректной работы anycast адресов может быть желательно отключать механизм определения дубликата адресов (DAD – Duplicate Address Detection). В операционной системе Cisco IOS и Cisco IOS XE механизм DAD отключается для всего префикса, делается это следующей командой:

    Cisco_CSR1000v(config)# interface gigabitEthernet 1 Cisco_CSR1000v(config-if)# ipv6 address 2001:abcd:1111::1/64 anycast

    Для операционной системы Cisco IOS XR механизм DAD отключается для всего интерфейса (включая префиксы link-local) с помощью команды:

    RP/0/0/CPU0:Cisco_XRv(config)# interface gigabitEthernet 0/0/0/0 RP/0/0/CPU0:Cisco_XRv(config-if)# ipv6 nd dad attempts 0

    Multicast

    Multicast адреса определяют не одно устройство, а группу устройств – multicast группу, при этом в данной группе может состоять как множество устройств, так и одно. Multicast адреса не могут выступать в качестве адреса источника в пакете. В IPv6 не существует как такового broadcast адреса, вместо него есть multicast группа “All nodes” , которая по сути имеет то же предназначение, что и broadcast в IPv4.

    В IPv6 multicast адреса имеют различное назначение: передача информации о протоколе маршрутизации, обнаружение соседних устройств, разрешение IPv6-адресов. Более подробно об этом будет описано в статье по протоколу Neighbor Discovery Protocol

    Multicast address structure

    Как видно из рисунка выше, первые 8 бит всегда установлены в 1 , следующие 4 бита отвечают за флаги. Первые три бита из поля Flags установлены в 0 и в настоящее время не используются. Четвёртый бит из поля Flags – флаг transient .

    Флаг T – transient имеет два возможных значения:

    • 0 – постоянный адрес, который широко известен и присваивается IANA
    • 1 – временный адрес, используется для целей тестирования

    Поле Scope используется для того, чтобы маршрутизатор мог определить является ли multicast адрес маршрутизируемым. Все диапазоны таких адресов описаны в RFC 4291. Краткая выдержка представлена в таблице ниже.

    Типы диапазонов IPv6 префикс Описание
    Reserved ff00 Зарезервировано
    Interface-Local ff01 Interface-Local диапазон не позволяет multicast пакетам проходить через интерфейс. Данный диапазон аналогичен адресу unicast loopback, поскольку multicast пакеты содержатся внутри одного устройства.
    Link-Local ff02 Link-Local диапазон содержит multicast трафик для локальной интерфейсной связи.
    Admin-Local ff04 Admin-Local диапазон является маршрутизируемым и считается наименьшей административным диапазоном. Граница диапазона действия не имеет определенных ограничений, но обычно трафик ограничен одним отделом или этажом в здании.
    Site-Local ff05 Site-Local диапазон является также маршрутизируемым и считается большим, чем admin-Local диапазон. Граница обычно ограничивается зданием или регионом.
    Organization-Local ff08 Organization-Local диапазон является также маршрутизируемым и должен располагаться в одной организации.
    Global ff0е Global диапазон не имеет никаких ограничений на достижимость.

    Поле Group ID определяет индивидуальную multicast группу. На данное поле отводится 112 бит, 80 из которых в настоящее время не используются и установлены в 0.

    Наиболее широко известные и используемые адреса представлены в таблице ниже

    Адрес Описание
    ff02::1 All nodes адрес
    ff02::2 All-routers адрес
    ff02::5 Aдрес OSPFv3 all routers
    ff02::6 Aдрес OSPFv3 all DR
    ff02::8 IS-IS
    ff02::9 RIPng
    ff02::a EIGRP
    ff02::d PIM
    ff02::1:2 Адрес всех DHCPv6 relay агентов и серверов
    ff05::1:3 Адрес всех DHCPv6 серверов
    ff02::1:ffxx:xxxx Адрес запрашиваемого узла, используется для обнаруженя соседних узлов для разрешения адресов (последние 24 бита [xx:xxxx] адреса сопоставляются с последними 24 битами unicast адреса IPv6)

    Более полный список можно увидеть, перейдя по ссылке

    Каждое устройство автоматически присоединяется к двум multicast группам: all nodes – ff02::1 и solicited-node – ff02::1:ffxx:xxxx . Группа all nodes используется для связи со всеми интерфейсами на локальном канале, а группа solicited-node требуется для разрешения адресов на уровне канала. Маршрутизаторы также присоединяются к третьей multicast группе all-routers – ff02::2 .

    Для того чтобы посмотреть в какой группе состоит тот или иной интерфейс необходимо выполнить команду show ipv6 interface

    Cisco IOS

    1 2 3 4 5 6 7 8 9 10 11 12
    Cisco_CSR1000v# show ipv6 interface gigabitEthernet 1 GigabitEthernet1 is up, line protocol is up IPv6 is enabled, link-local address is FE80::1 No Virtual link-local address(es): Global unicast address(es): 2001:ABCD::1, subnet is 2001:ABCD::/64 Joined group address(es): FF02::1 FF02::2 FF02::1:FF00:1 MTU is 1500 bytes ---часть информации пропущена--- 

    Cisco IOS XR

    1 2 3 4 5 6 7 8 9
    RP/0/0/CPU0:Cisco_XRv# show ipv6 interface gigabitEthernet 0/0/0/0 Sat Oct 23 16:45:56.754 UTC GigabitEthernet0/0/0/0 is Up, ipv6 protocol is Up, Vrfid is default (0x60000000) IPv6 is enabled, link-local address is fe80::2 Global unicast address(es): 2001:abcd::2, subnet is 2001:abcd::/64 Joined group address(es): ff02::1:ff00:2 ff02::2 ff02::1 MTU is 1514 (1500 is available to IPv6) ---часть информации пропущена--- 

    Специальные IPv6 адреса

    Помимо основных адресов, описанных выше, есть два типа, которые не включены ни в одну из категорий.

    • Неопределенный адрес - указывает на то, что на интерфейсе еще нет никакого адреса, обозначается как 0:0:0:0:0:0:0:0 или просто :: . Данный адрес используется устройством когда оно только инициализированно и не получило еще никакого другого адреса
    • Loopback адрес - используется для того чтобы отправлять пакеты самому себе, обозначается как 0:0:0:0:0:0:0:1 или ::1

    Структура заголовка IPv6

    Формат заголовка протокола IPv6 представлен на рисунке ниже

    Header IPv6

    Version - 4-битное поле, также как и в протоколе IPv4 отвечает за версию протокола. Принимает значение 0110 .

    Version

    Traffic Class - 8-битное поле, идентично полю DiffServ в протоколе IPv4.

    Traffic Service

    Flow Label - 20-битное уникальное для IPv6 поле. Данное поле позволяет помечать определенный поток трафика, при балансировке трафика метка позволяет более точно определять путь, по которому пойдет тот или иной пакет, предотвращая возможное изменение следования порядка пакетов.

    Поток определяется как совокупность адреса и порта источника и назначения. Однако, определить порт источника и назначения для маршрутизатора может быть сложной задачей и возможным падением производительности для него. Расширения заголовка IPv6 позволяют маршрутизатору определить заголовок транспортного уровня.

    Flow Label

    Payload Length - 16-битное поле, определяющее длину содержимого пакета в байтах. Размер заголовка IPv6 всегда фиксирован и составляет 40 байт, поэтому, в отличие от протокола IPv4, вычитать размер заголовка из общего содержимого пакета нет необходимости.

    Payload Length

    Next Header - 8-битное поле, определяющее заголовок протокола, который следует за протоколом IPv6. Данное поле идентично полю Protocol в заголовке IPv4 и используется для тех же самых целей. Однако, в протоколе IPv6 вместо протокола, располагающегося выше протокола IPv6, можеть быть расширение заголовка IPv6.

    Hext Header

    Hop Limit - 8-битное поле, выполняющее те же функции, что и поле Time to Live в протоколе IPv4. Если данное поле примет значение 0 на пути следования пакета, то пакет будет отброшен.

    Hop Limit

    Source и Destination Address - 128-битные поля, определяющие адреса источника и назначения соответственно.

    Source и Destination Address

    В данном дампе можно более подробно рассмотреть все поля протокола IPv6.

    Расширение заголовка IPv6

    Расширение заголовка IPv6 используется в случае когда необходимо добавить дополнительные функции для протокола (фрагментация, аутентификация и др.). В случае применения данных расширений, они добавляются в конец заголовка IPv6.

    Extensions Header

    Каждое расширение заголовка, как и сам заголовок IPv6, имеет поле Next Header, которое определяет какой заголовок будет следовать за текущим. RFC 1883 описывает формат всех основных расширений, используемых в протоколе IPv6, а также порядок следования данных расширений заголовка. Некоторые из расширений описаны в таблице ниже.

    Заголовок Значение Next Header Значение
    Hop-By-Hop Options 0 Содержит информацию, которая должна быть проверена каждый узлов на всём протяжении пути передачи данных
    Fragment 44 В случае фрагментации пакета, содержит информацию, которая необходима приёмной стороне для сборки пакета воедино. Основное отличие от протокола IPv4 - это то, что фрагментация пакета производится только источником сообщения. Следовательно, источник должен использовать сообщение Path MTU Discovery для определения наименьшего MTU на пути следования пакета
    Encapsulating Security Payload - ESP 50 Используется в случае если содержимое пакета шифруется
    Authentication Header 51 Используется в случае когда пакет должен быть аутентифицирован между источником и назначением
    TCP/IP Protocol TCP = 6, UDP = 17, OSPF = 89 и т.д. Стандартные номера протоколов
    No next header 59 Следующий заголовок отсутствует

    P.S. вся информация представленная здесь используется исключительно в образовательных целях. Все совпадения с реальными объектами, адресами, именами и т.д. случайна и не несёт цели получить от этого выгоду или причинить кому-либо вред.

    Categories: networks

    Updated: October 14, 2021

    IPv6 Foundation Part 2: IPv6 Addressing and Subnetting

    IPv4 addresses are 32 bits in length (that’s 0s and 1s) and IPv6 addresses have 128 bits (of 0s and 1s). The news is also, that we use hexadecimal notation and colons : to display the new addresses!

    How an IPv6 address is displayed

    You get used to the new notation quickly, I promise!

    There are a couple of rules to follow:

    1. there are 8 groups with 4 hexadecimal digits each

    2. invididual digits are called nibble

    3. each group represents 16 bits, separated by colon (:)

    This is a real and complete IPv6 address! But it is a bit long, so it can be shortened and still be valid and complete:

    1. leading zeros can be omitted:

    can be shortened to ->

    2001:db8:85a3:0:0:0:70:7334

    2. groups of zeros can be replaced by double colon :: (only once per address, to be unique!):

    can be shortened to ->

    2001:db8:85a3::70:7334

    Types of Communication in IP

    In network communication and independent from the protocol version (v4 or v6) there are different types and scopes that we will review now. If you already know about these types, you can skip ahead if you like or use it as a recap.

    Unicast IP Communication

    Sending a message to a single, unique address (destination)

    Broadcast IP Communication

    Sending a message to multiple destinations simultaneously. Ethernet and IPv4 use broadcast addresses to reach all clients on the local network!

    Multicast IP Communication

    Sending a message to a group (destination) simultaneously, targeting only group members. This is used regularly in IPTV, where you can subscribe to the corresponding multicast group and then received the corresponding TV channel stream over the Internet, instead of receiving all channels all the time.

    Anycast IP Communication

    Sending a message to a single, unique address (destination), that is used by multiple hosts. The nearest host is automatically selected. In most implementations BGP is used and the lowest hop count (lowest distance) to the target address is used. Anycast is regularly used for global DNS deployments, like with Google’s 8.8.8.8 DNS service or Cloudflare’s 1.1.1.1 DNS service

    Communication Types for IPv4 and IPv6

    Broadcast was used with IPv4 but is not used with IPv6 anymore, because the amount of addresses in a single IPv4 network was limited or at least much less, so reaching everybody on the network could be handled. Broadcast in IPv4 was also used to make sure the address, received by DHCP, was unique. The same does not scale at all for the very large IPv6 networks, so the use of broadcast transmission was removed from the new protocol specifications.

    IPv6 Address Scopes

    Different address scopes are used to define which kind of reachability an assigned address has. This helps scale the network and could also be used as a security measure. In best practice I would still highly recommend only using addresses from Global Scope (Universal Scope) and securing your network with a firewall.

    The different address scopes for unicast are:

    The IPv6 Link-Local Scope

    An address from a link-local scope is only valid on the directly attached link (link-local, loopback). It cannot be routed or reached from outside of this scope.

    The IPv6 Unique Local Scope (ULA)

    Addresses from the Unique Local Scope (Unique Local Addresses, also known as ULA) are similar to IPv4 private address ranges from RFC1918, such as 10.0.0.0/8 and so on. They are routable within a private organization and not supposed to be routed publicly on the Internet. Thus, the reachability (scope) of this IPv6 address type is limited to the organization. The same network range can be used by different companies and private entities at the same time, so they are not unique.

    The IPv6 Global Scope (Universal Scope)

    Addresses from the Global Scope, also known as Universal Scope, are public IPv6 addresses with global reachability. This scope has no limitations, is fully unique and registered via the corresponding Regional Internet Registry (RIR) to a provider (Local Internet Registry, LIR) and then assigned to an end user or party.

    The IPv6 Site Local Scope (now deprecated)

    The Site Local Scope has been deprecated, which means it is not used anymore, as per RFC3879 from 2004. It was created to address sites locally, independent from organization, similar to a part of RFC1918 private IPv4 addresses.

    IPv6 Multicast Address Scopes

    IPv6 Multicast address scopes are very similar to the unicast scopes.

    In Multicast, the 4th nibble (4th digit of the address) defines the scope of reachability (ff0S::)

    0x1

    0x2

    0x4

    0x5

    0x8

    0xe

    Subnetting IPv6 and IPv4

    Subnetting can be fun if you have understood the basics. We will do a quick review of IPv4 subnetting here and then move on to the differences with IPv6 subnetting.

    How to Subnet IPv4 Addresses and Networks

    IPv4 defines a network address and a broadcast address. Since the late 1990s, only Classless Inter Domain Routing is used, also known as CIDR, so the notation is always as follows:

    example network: 172.23.5.0/24

    network mask (/24): 255.255.255.0

    network address: 172.23.5.0

    broadcast address: 172.23.5.255

    Subnetting IPv4 Example #1

    IPv4 Subnetting Helping Table

    Digit 8 7 6 5 4 3 2 1
    Value 128 64 32 16 8 4 2 1

    172.23.5.1 (IP address, 32 bits, decimal)

    10101100 . 00010111 . 00000101. 00000001 (binary)

    255.255.255.0 (subnet mask, 24 bits, “/24”, decimal)

    11111111 . 11111111 . 11111111 . 00000000 (binary)

    172.23.5.0 (network address, decimal)

    10101100 . 00010111 . 00000101 . 00000000 (binary)

    172.23.5.255 (broadcast address, decimal)

    10101100 . 00010111 . 00000101 . 11111111 (binary)

    amount of addresses: 00000000 to 11111111 = 256 (.0 – .255)

    172.23.6.0 (next network – network address, decimal)

    10101100 . 00010111 . 00000110 . 00000000 (binary)

    Subnetting IPv4 Example #2

    IPv4 Subnetting Helping Table

    Digit 8 7 6 5 4 3 2 1
    Value 128 64 32 16 8 4 2 1

    10.1.2.52 (IP address, 32 bits, decimal)

    00001010. 00000001. 00000010. 00110100 (binary)

    255.255.255.224 (subnet mask, 27 bits, “/27”, decimal)

    10.1.2.32 (network address, decimal)

    00001010 . 00000001 . 00000010 . 00100000 (binary)

    10.1.2.63 (broadcast address, decimal)

    00001010. 00000001. 00000010. 00111111 (binary)

    number of addresses: 00100000 bis 00111111 = 32 (.32 – .63)

    10.1.2.64 (next network – network address, decimal)

    00001010. 00000001. 00000010. 01000000 (binary)

    IPv4 Subnetting Cheat Sheet for Quick Reference

    The Internet has many IPv4 Subnetting cheat sheets and calculators. My favorite quick reference is the one from Europe’s RIR, RIPE NCC:

    How to Subnet IPv6 Addresses and Networks

    Well, now that you remember how subnetting with IPv4 works, and you know we had 32 bits of address with IPv4 – how does that work with IPv6? Will it be 4 times more complicated? 2^96 times? No!

    everything is easier!

    2001:0db8:0003:0004:0005:0006:0007:000f (long form)

    can be shortened to ->

    2001:db8:3:4:5:6:7:f

    binary: 2001 = 0010 0000 0000 0001

    In IPv6 we have no (reserved) network address

    We also have no broadcast address (remember, there is no broadcast!)

    Our prefix length is always specified in slash notation, e.g. /64

    In IPv6, 1 nibble (1 hex digit) equals 4 bits

    Tweet

    Subnetting IPv6 Example #1

    IPv6 Subnetting Helping Table

    Digit 4 3 2 1
    Value 8 4 2 1

    2001:0db8:0003:0004:0005:0006:0007:000f (long form)

    prefix length (network): /64

    network start: 2001:0db8:0003:0004:0000:0000:0000:0000

    network end: 2001:0db8:0003:0004:ffff:ffff:ffff:ffff

    In total 18,446,744,073,709,551,616 IPv6 client addresses are available in a single /64 network (16^16 or 2^64)

    Tweet

    Subnetting IPv6 Example #2

    IPv6 Subnetting Helping Table

    Digit 4 3 2 1
    Value 8 4 2 1

    Your allocated network by this example is: 2001:0db8:0003::/48

    you want to subnet your /48 network into multiple smaller networks with a target network size of /64

    1st network: 2001:0db8:0003::/64

    2nd network: 2001:0db8:0003:1::/64 (2001:0db8:0003:0001::/64)

    last network: 2001:0db8:0003:ffff::/64

    in total (2^4)^4 = 65.536 /64 networks can be created our of a single /48 IPv6 network!

    Tweet

    IPv6 Subnetting Cheat Sheet for Quick Reference

    There are many IPv6 Subnetting cheat sheets out there, my favorite is the IPv6 Subnetting Card from RIPE NCC. The major network boundaries are these:

    Special IPv6 Addresses you should remember

    There are some special and reserved addresses, which are:

    ::/128 unspecified address

    • all bits=0
    • cannot be used as destination
    • can only be used temporarily and internally, until application knows target
    • equals IPv4 0.0.0.0/32)

    ::/0 default route

    • equals 0.0.0.0/0 in IPv4

    ::1/128 loopback

    • unicast localhost address
    • equals 127.0.0.1/8 in IPv4

    fe80::/10 link local (scope)

    • only unique and valid on the locally connected link

    fc00::/7 unique local (scope), also known as ULA

    • routable within an organization
    • similar to RFC1918 private IP ranges

    fec0::/10 site local (scope) – deprecated

    • not used anymore as per RFC3879
    • routable within an organization
    • successor: Unique Local Addresses (ULA) / Unique Local Scope

    ::ffff:0:0/96 IPv4-mapped IPv6

    • allows transparent IPv4 connections of an IPv6-only application over the IPv6 API (only one socket needed

    2002::/16 6to4 Tunneling

    • additionally an address out of 192.88.99.0/24 is used

    2001::/32 Teredo Tunneling

    2001:db8::/32 Documentation Prefix

    • for documentation purposes, to be used in examples, similar to 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 in IPv4

    Special IPv6 Multicast Addresses

    We have some special and reserved addresses for Multicast use:

    ff0X::1

    ff0X::2

    All routers

    Available in scope 1 (interface-local), 2 (link-local) and 5 (site-local):

    • ff01::2 → All routers in the interface-local

    • ff02::2 → All routers in the link-local

    • ff05::2 → All routers in the site-local

    ff02::5

    ff02::6

    OSPF Designated Routers

    ff02::9

    RIP Routers

    ff02::a

    EIGRP Routers

    ff02::d

    All PIM Routers

    ff02::1a

    All RPL Routers

    ff0X::fb

    Available in all scopes

    ff0X::101

    All Network Time Protocol (NTP) servers

    Available in all scopes

    ff02::1:1

    ff02::1:2

    All-dhcp-agents

    ff02::1:3

    Link-local Multicast Name Resolution

    ff05::1:3

    All-dhcp-servers

    ff02::1:ff00:0/104

    Solicited-node multicast address

    ff02::2:ff00:0/104

    Recommended Resources for additional reading

    Apart from the links throughout this course I recommend the following resources for additional information:

    1. The Internet Society (ISOC) IPv6 Portal
    2. Test your IPv6 connectivity on test-ipv6.com
    3. The official IANA list of assigned IPv6 address space is very interesting
    4. The Google IPv6 deployment statistics
    5. The RIPE NCC IPv6 working group and mailing list

    Book recommendations on IPv6

    I can recommend the following 3 books which I enjoyed reading:

    This concludes IPv6 Foundation Part 2: IPv6 Addressing and Subnetting of the original IPv6 Foundation Master Class.

Comments are closed, but trackbacks and pingbacks are open.