IPv6 addressing is different from IPv4 addressing and offers a significantly larger number of available addresses. There are several ways to assign IPv6 addresses, which can be useful in different scenarios. Some of the most common ways to assign IPv6 addresses are as follows:
At the end of the article you will find a small test that will allow you assess the knowledge acquired in this reading
Static IPv6 assignment in MikroTik
To assign an IPv6 address on an interface you must go IPv6→address and disable the option: Advertise
/ipv6 address
add address=2001:db8:be0:cd::2 advertise=no interface=wlan1
Stateless Automatic Configuration (SLAAC – Stateless Address Autoconfiguration) in MikroTik
It is a method of address assignment in which devices generate their own unique IPv6 addresses without the need for a DHCP (Dynamic Host Configuration Protocol) server. This form of addressing delivery should be used when we need to deliver automatic IPv6 addressing to end devices.
Next, let's see how SLAAC works:
1. Router Advertisement
In an IPv6 network that uses SLAAC, routers periodically send Router Advertisement (RA) messages to all connected devices on the local network. These messages are multicast (sent to a special address that reaches all devices on the network) and contain important information for autoconfiguration.
2. Prefix Information
The Router Advertisement message contains information about the network prefix. A prefix is a part of the IPv6 address that is common to all devices on the same local network. For example, a typical prefix might be something like “2001:0db8:1abc:”. The length of the prefix can vary and is usually represented as a subnet length value (for example, /64).
3. Interface Identifier
To complete the unique IPv6 address, devices need to add an interface identifier to the prefix information. The portion of the address that represents the interface identifier can be generated in several ways, the most common being using the MAC address of the device's network interface.
4. IPv6 address formation
Once the device receives the Router Advertisement message with the prefix information and has generated its interface identifier, it combines both elements to form its unique IPv6 address.
5. Duplicate detection
Before assigning the IPv6 address to an interface, the device performs a duplicate detection procedure. If another interface on the same network is already using the same address, the device will select a new interface identifier and repeat the process.
6. Address renewal and deactivation
Devices continue to listen to Router Advertisement messages to stay up to date on network configuration. If a router stops sending these messages, devices may assume that IPv6 addresses have become obsolete or that the network has changed, which may cause address renewal or invalid addresses to be disabled.
Example
The configuration is the same as assigning an IPv6 address statically, only the option must be left enabled: Be warned. That is, Advertise's option is to enable SLAAC.
/ipv6 address add address=2001:db8:1234::1 interface=ether1
Final result in Windows
Important: SLAAC does not deliver DNS dynamically
Delivering dynamic DNS with SLAAC
- Configure DNS on the router IP→DNS
/ip dns set allow-remote-requests=yes servers= 2001:4860:4860::8888
Note: These are Google's DNS in IPv6: 2001:4860:4860::8888, 2001:4860:4860::8844
- Enable “Advertise DNS” in IPv6 → ND
/ipv6 nd set [ find default=yes ] advertise-dns=yes other-configuration=yes
Note: If you use Windows you have to enable “Other Configuration”. Linux and MacOS should already have full IPv6 functionality, so it would not be enabled. In RouterOS v7 it is no longer necessary to enable Other Configuration
Final result in Windows
Brief knowledge quiz
What do you think of this article?
Do you dare to evaluate your learned knowledge?
Recommended books for this article
(Book) Networking with MikroTik RouterOS: A Practical Approach to Understanding and Implementing RouterOS
Study material for the MTCNA Certification Course, updated to RouterOS v7
IPv6 book with MikroTik, RouterOS v7
Study material for the MTCIPv6E Certification Course updated to RouterOS v7
Related Posts
- Ways to Assign IPv6 Addressing (Part 2)
- EUI-64 in IPv6: Generating unique addresses for modern networks
- MikroTik and Wireless Authentication: Understanding 'Allow Shared Key'
- MikroTik IPSec: Choose between Tunnel Mode and Transport Mode for VPN
- ICMPv6: Understanding the Internet Control Message Protocol for IPv6