IPv6

MikroTik IPv6 Setup with DHCPv6 Prefix Delegation from Your ISP

Enable IPv6 on a MikroTik router with DHCPv6 prefix delegation: get a prefix from the ISP, give /64 addresses to the LAN, and protect clients with an IPv6 firewall.

Commands in this article follow RouterOS v7 documentation but have not yet been marked as lab-tested on this site. Always test changes in a lab or maintenance window and keep a backup.

Problem

Your ISP offers IPv6 and you want LAN devices to get IPv6 addresses automatically through your MikroTik router.

Symptoms

  • The router gets an IPv6 address but LAN devices do not.
  • test-ipv6.com shows no IPv6 on clients.

Likely causes

The router must request a prefix (DHCPv6-PD), put it in a pool, assign a /64 from that pool to the LAN and advertise it. Without an IPv6 firewall, every LAN device is reachable from the internet, because IPv6 has no NAT.

Prerequisites

  • IPv6 enabled by your ISP. On PPPoE, use the PPPoE interface (for example pppoe-out1) as the WAN.
  • On RouterOS v6, the ipv6 package must be enabled (/system package enable ipv6, then reboot).

Solution (WinBox / CLI)

1. Request a prefix from the ISP:

RouterOS CLI
/ipv6 dhcp-client add interface=pppoe-out1 request=prefix pool-name=isp-v6 pool-prefix-length=64 add-default-route=yes

2. Give the LAN a /64 from the pool and advertise it:

RouterOS CLI
/ipv6 address add address=::1/64 from-pool=isp-v6 interface=bridge-lan advertise=yes

Clients configure themselves with SLAAC.

3. IPv6 firewall (similar to the default configuration):

RouterOS CLI
/ipv6 firewall filter
add chain=input action=accept connection-state=established,related,untracked
add chain=input action=drop connection-state=invalid
add chain=input action=accept protocol=icmpv6
add chain=input action=accept protocol=udp dst-port=546 src-address=fe80::/10 comment="DHCPv6 client"
add chain=input action=drop in-interface-list=!LAN
add chain=forward action=accept connection-state=established,related,untracked
add chain=forward action=drop connection-state=invalid
add chain=forward action=accept protocol=icmpv6
add chain=forward action=drop in-interface-list=!LAN

Warning: Do not drop all ICMPv6. IPv6 needs it for neighbor discovery and path MTU.

Verification

RouterOS CLI
/ipv6 dhcp-client print
/ipv6 address print

The client is bound with a prefix, and bridge-lan has a global address. On a LAN PC, test-ipv6.com shows IPv6 working.

Common errors

  • DHCPv6 client on ether1 while the ISP uses PPPoE: use the PPPoE interface.
  • Input firewall blocks UDP 546: the prefix is never received.
  • No forward firewall: LAN devices are exposed to the internet.

Rollback

RouterOS CLI
/ipv6 dhcp-client disable [find pool-name=isp-v6]
Go deeper in class

This topic is covered hands-on in MTCIPv6E — MikroTik Certified IPv6 Engineer.

View MTCIPv6E
WhatsApp