Setting up DHCPv6

From MikroTik Wiki
Jump to navigation Jump to search

Applies to RouterOS: v5.8+

This page will describe which steps you should take to easily enable DHCPv6 on your Mikrotik.

First, we need to select a prefix from which we want to delegate prefixes. In this example, I will use 2a03:7900:6::/48. From this prefix, we will delegate /56s to our clients.

We do not need to configure this address-space on any of the interfaces, we can work with link-local addresses.

First, configure the DHCPv6-pool

[admin@dhcpv6test] /ipv6 pool> add name=dhcpv6-1 prefix-length=56 prefix=2a03:7900:6::/48

Now configure the DHCP-server to use this pool

[admin@dhcpv6test] /ipv6 dhcp-server> add name=server1 interface=ether2 address-pool=dhcpv6-1

Please note that DHCPv6 does not send gateways and routes. You need to configure router advertisements to make it work. By setting 'autonomous=no' on a RA-prefix, the advertisement will not contain a prefix from which the receiving router will select an address. It will only use the RA to set a default route.

[admin@dhcpv6test] /ipv6 nd prefix> add prefix=::/64 interface=ether2 on-link=yes autonomous=no

Now, finish the RA-settings

[admin@dhcpv6test] /ipv6 nd> add interface=ether2 managed-address-configuration=yes other-configuration=yes advertise-dns=yes

That should be it.