==== IPv6 ==== .. sidebar:: Contents .. contents:: :depth: 2 :local: IPv6 is the most recent version of the Internet Protocol (IP). It was first described in RFC#2460, Internet Protocol, Version 6 (IPv6) Specification. IPv6 was proposed when it became clear that IPv4's 32-bit addressing scheme was inadequate to meet the demands of Internet growth. It is based on the Internet Protocol, but with far more address space (from 32 bits to 128 bits). Unnecessary fields have also been eliminated in order to simplify the header and thus reduce processing time. Although the address size is 128 bits, the IPv6 header size is only 40 bytes. All additional fields are organized in the extension headers. IPv6 architecture can coexist with that of IPv4 users, thus easing migration to IPv6 while providing improvements to security, quality of service and globally unique IP addresses. IPv6 offers greater address space and allows networks to scale and provide global reachability. The flexibility of IPv6 addresses reduces the need for private addresses and the use of Network Address Translation (NAT). In addition, IPv6 enables new application protocols that do not require special processing by border routers sitting at the edge of the network. Configuration ============= By default, IPv6 is enabled on OSDx devices and all interfaces function as *router interfaces*. This can be changed using the ``disable-forwarding`` command: .. code-block:: none set interfaces ipv6 disable-forwarding That command forces the interface to behave as a host (it inhibits the routing of packets through this interface). This can be globally changed by using the following command: .. code-block:: none set system ipv6 disable-forwarding All interfaces working in *router* mode automatically announce RAs (Router Advertisements). This can be disabled by using the following configuration command: .. code-block:: none set interfaces ipv6 router-advert disable .. note:: That command can not be configured if ``disable-forwarding`` is enabled for that interface. IPv6 addresses can be generated using three fundamental mechanisms: * Manual. * Stateless. * Stateful. The stateful and stateless configurations provide autoconfiguration address mechanisms. Manual address configuration ---------------------------- Manual configuration offers several possibilities. The most basic one is to assign an absolute address to the interface. This can be achieved by using the following configuration command: .. code-block:: none set interfaces address *Example*: .. code-block:: none set interfaces ethernet eth0 address '2001:db8:100:f101::1/64' Addresses can also be configured by using the Extensible Unique Identifier-64 (EUI-64) method: .. code-block:: none set interfaces ipv6 address eui64 *Example*: .. code-block:: none set interfaces ethernet eth0 ipv6 address eui64 '2001:db8:100:f101::/64' .. warning:: This method automatically generates an IP address using the interface's MAC and it is now not recommended for privacy reasons. Stateless address configuration ------------------------------- Stateless autoconfiguration is based on the SLAAC (Stateless Address Autoconfiguration) procedure, whose fundamental idea is to form an address from a 64-bit prefix (announced in an RA message) and a suffix generated in the host itself. This can be enabled by using the following configuration command: .. code-block:: none set interfaces ipv6 address autoconf .. note:: ``disable-forwarding`` needs to be configured in that interface for this command to work. Stateful address configuration ------------------------------ Stateful autoconfiguration is achieved by means of the DHCPv6 protocol. A DHCPv6 client can be started by using the following configuration command: .. note:: According to RFC#8415, addresses obtained through DHCPv6 have a 128 bits prefix length. Monitoring ========== Most common operational commands have built-in support for IPv6. *Examples:* * :osdx:op:`ping *`. * :osdx:op:`traceroute *`. * :osdx:op:`nslookup *`. * :osdx:op:`telnet *`. * :osdx:op:`ssh *`. Command :osdx:op:`monitor router-advertisement` is specific for IPv6 and can be used for RA debugging purposes. Examples ======== There is a plethora of examples with IPv6 described at the :ref:`examples section `. :ref:`Here `, you can find some basic examples related to *IPv6 address assignation*. :ref:`This entry ` includes examples to configure and debug RA.