In this article, we will discuss the challenging issue of devices failing to obtain IPv6 addresses when they are connected to a network with a MikroTik router that has statically routed IPv6 configurations. Specifically, we will cover the following topics:
- Understanding IPv6 and its addressing scheme
- Configuring DHCP-DRA-RD for IPv6 in MikroTik routers
- Static routing in MikroTik routers
- Why some devices fail to obtain IPv6 addresses in statically routed networks
- Possible solutions for this issue
Understanding IPv6 and its addressing scheme
Internet Protocol version 6 (IPv6) is the latest version of the Internet Protocol (IP) that is used in most modern networks. IPv6 was designed to succeed Internet Protocol version 4 (IPv4) and overcome its limitations, particularly the shortage of available addresses. IPv6 uses 128-bit addresses, which provides a much larger address space than IPv4. Each IPv6 address consists of eight 16-bit blocks, separated by colons (:). For example, a typical IPv6 address might look like this:
2001:0db8:85a3:0000:0000:8a2e:0370:7334
Configuring DHCP-DRA-RD for IPv6 in MikroTik routers
Dynamic Host Configuration Protocol (DHCP) is a network management protocol that enables devices to obtain IP addresses automatically. In MikroTik routers, the DHCP Relay (DHCP-Relay or DHCP-DR) function forwards DHCP packets between clients and servers. The DHCP Request (DHCP-REQ) is forwarded to the DHCP server(s), and the DHCP Offer (DHCP-OFFER), DHCP Acknowledgement (DHCP-ACK) or DHCP Decline (DHCP-DECLINE) packets are forwarded to the client. Additionally, the DHCP Relay Agent Information Option (DAI) is used to include information in relayed packets related to the address of the DHCP relay agent and the circuit identifier.
In MikroTik routers, the DHCP Relay is often used in conjunction with the DHCPv6 server and DHCPv6 Relay (DHCP-DRA) functions. The DHCPv6 server function provides DHCP service for IPv6 clients on a local network, while the DHCPv6 Relay function forwards DHCP packets between clients and servers on different networks.
Moreover, the Router Advertisement (RA) function in MikroTik routers sends ICMPv6 Router Advertisement messages to inform IPv6 hosts about the prefixes they should use for address configuration and the Default Gateway or Routers they should use to reach other subnets. In addition, the Router Discovery (RD) function updates the Hosts' Neighbor Cache or the Neighbor Unreachability Detection (NUD) states when necessary.
Static routing in MikroTik routers
MikroTik routers allow administrators to configure static routes manually, which means that the administrator specifies the destination network and the next hop IP address. This can be useful when there is no need for dynamic routing protocols, or when there are particular networks or subnets where a static route is required.
When configuring static routing in a MikroTik router, the administrator has to ensure that the routing information is correct and consistent to avoid creating routing loops or black holes. However, in some cases, static routing may create issues with DHCP-DRA-RD functions for IPv6, caused by incorrect or incomplete routing information.
Devices that do not support DHCP-DRA-RD functions or have specific requirements for the DHCP-DRA-RD messages that are not fully compliant with the standards may fail to obtain IPv6 addresses in a MikroTik router with static routing configurations. Specifically, devices such as some TVs and Chromecasts may have issues obtaining IPv6 addresses in such networks.
In these cases, the devices may receive incorrect or incomplete DHCP-DRA-RD messages due to the static routing configurations, causing the devices to fail to obtain valid IPv6 addresses. Moreover, since these devices rely on these IPv6 addresses for communication and streaming, they may not be able to function correctly or consistently in the network.
Possible solutions for this issue
One possible solution for this IPv6 addressing issue in MikroTik routers is to use the DHCPv6 Server function instead of the DHCP-DRA-RD functions. By configuring the MikroTik router to act as a DHCPv6 Server, and assigning the devices static IPv6 addresses, the DHCP-DRA-RD messages that may cause issues for some devices can be avoided.
Another possible solution is to use the Router Advertisement (RA) function in the MikroTik router to advertise the prefix to the devices, and then configure the devices to use Stateless Address Autoconfiguration (SLAAC) to generate their own IPv6 addresses. In this way, the need for the DHCP-DRA-RD messages is eliminated, and the devices can generate their own IPv6 addresses based on the prefix from the router.
A third possible solution is to configure the MikroTik router to add Router Advertisement (RA) options that provide the necessary information for the devices, such as the DNS servers for the network. By adding these options, the devices may be able to obtain complete and correct information for IPv6 address configuration, even with the DHCP-DRA-RD messages.
-
Devices like TVs and Chromecasts may have issues obtaining IPv6 addresses in networks with MikroTik routers that have static routing configurations, due to incorrect or incomplete DHCP-DRA-RD messages.
-
One possible solution is to use the DHCPv6 Server function in the MikroTik router instead of the DHCP-DRA-RD functions.
-
A second possible solution is to use Stateless Address Autoconfiguration (SLAAC) and the Router Advertisement (RA) function in the MikroTik router to enable the devices to generate their own IPv6 addresses.
-
A third possible solution is to add Router Advertisement (RA) options in the MikroTik router to provide necessary information for the devices, such as the DNS servers.
References
-
MikroTik DHCP Server:
-
MikroTik DHCP Relay:
-
MikroTik Router Advertisement:
-
MikroTik IPv6 Static Routing:
-
DHCP for IPv6:
-
ICMPv6 Router Discovery:
-
IPv6 Stateless Address Autoconfiguration (SLAAC):