Configuring IPv6 on MikroTik Print

  • Mikrotik, Networking
  • 33

Hello there! It’s Emmanuel Corels from Emmanuel Corels Creatives, and today we’re exploring a topic that’s becoming increasingly important as the internet evolves: IPv6 configuration on your MikroTik router. This guide will walk you through enabling IPv6 support, assigning IPv6 addresses, and setting up basic IPv6 services—all in a clear, beginner-friendly way.


Why IPv6?

IPv6 is the next generation of internet addressing designed to replace IPv4. Here’s why you might want to set it up:

  • Larger Address Space: IPv6 offers 128-bit addresses, providing virtually unlimited unique IPs.
  • Improved Routing Efficiency: Simplifies packet processing and routing.
  • Built-in Security: IPsec is a mandatory component of IPv6 (though not always used).
  • Future-Proofing: As more ISPs and services migrate to IPv6, having it enabled ensures better compatibility.

Step 1: Ensure the IPv6 Package Is Installed

MikroTik RouterOS versions before v7 require the separate IPv6 package. For v7, IPv6 features are included but may need to be enabled.

  • Check Installation in WinBox:
    • Go to System → Packages.
    • Look for a package named “ipv6.” If it’s not installed, download it from the MikroTik website and install it following their instructions.
  • CLI Check:
    /system package print
    
    Look for “ipv6” in the package list.

If the package is not installed, you’ll need to reboot the router after installing the package.


Step 2: Enable IPv6

Even if IPv6 is installed, you must enable it:

  1. Open WinBox and navigate to IPv6 → Settings.
  2. Click Enable.
  3. Optionally, set a Router ID for IPv6 if desired (it can be the same as your IPv4 Router ID).

CLI Equivalent:

/ipv6 settings set disabled=no

Step 3: Assign an IPv6 Address to a LAN Interface

Now, assign an IPv6 address to your LAN (for example, on your bridge interface).

  1. Go to IPv6 → Addresses.
  2. Click the “+” button.
  3. Address: Enter an IPv6 address in your chosen prefix.
    • Example: 2001:db8:1:1::1/64
      • Here, 2001:db8:1:1:: is your IPv6 network (use a unique local or global prefix; 2001:db8::/32 is reserved for documentation but works for lab testing).
    • The /64 denotes the subnet size, which is standard for IPv6 LANs.
  4. Interface: Select your LAN interface (e.g., bridge or ether2 if that’s your LAN port).
  5. Click OK.

CLI Equivalent:

/ipv6 address add address=2001:db8:1:1::1/64 interface=bridge

Step 4: Configure IPv6 Router Advertisement (RA)

Router Advertisements help IPv6-enabled clients automatically configure their addresses via SLAAC (Stateless Address Autoconfiguration).

  1. Go to IPv6 → ND (Neighbor Discovery).
  2. Click the “+” to add a new ND interface.
  3. Interface: Select your LAN interface (e.g., bridge).
  4. Advertise: Make sure this is checked.
  5. Other Parameters:
    • Prefix: Should automatically be derived from your IPv6 address (e.g., 2001:db8:1:1::/64).
    • Interval: Defaults are usually fine (e.g., advertise every 20 seconds).
  6. Click OK.

CLI Equivalent:

/ipv6 nd set [ find default=yes ] advertise=yes

Step 5: (Optional) Set Up a DHCPv6 Server

While many devices can self-configure with SLAAC, you might want more control (e.g., DNS assignment) via DHCPv6.

  1. Create an IPv6 Pool (if you want to assign specific addresses):
    /ipv6 pool add name=dhcpv6_pool prefix=2001:db8:1:1::/64
    
  2. Configure a DHCPv6 Server:
    • Go to IPv6 → DHCP Server.
    • Click “+” to add a new DHCPv6 server.
    • Interface: Choose your LAN interface (e.g., bridge).
    • Address Pool: Select your previously created pool (dhcpv6_pool).
    • Other Options: Configure lease times and DNS servers if desired.
    • Click OK.

CLI Example:

/ipv6 dhcp-server add name=dhcpv61 interface=bridge address-pool=dhcpv6_pool

Step 6: Configure Basic IPv6 Firewall (Optional but Recommended)

IPv6 firewall configuration is similar to IPv4 but uses a separate set of rules. At minimum, create a basic input rule to drop unwanted traffic.

  1. Go to IPv6 → Firewall → Filter Rules.
  2. Add a rule:
    • Chain: input
    • Action: drop
    • Comment: “Drop unsolicited IPv6 traffic”
  3. Make sure you allow established and related connections:
    /ipv6 firewall filter add chain=input connection-state=established,related action=accept comment="Allow established IPv6 connections"
    
  4. Allow ICMPv6 (important for proper IPv6 operation, like neighbor discovery):
    /ipv6 firewall filter add chain=input protocol=icmpv6 action=accept comment="Allow ICMPv6"
    

CLI Example:

/ipv6 firewall filter add chain=input connection-state=established,related action=accept
/ipv6 firewall filter add chain=input protocol=icmpv6 action=accept
/ipv6 firewall filter add chain=input action=drop

Step 7: Testing and Verification

  1. Check IPv6 Address:
    • In WinBox, go to IPv6 → Addresses and verify your LAN interface has the correct IPv6 address.
  2. Test RA and SLAAC:
    • Connect an IPv6-capable device (smartphone or laptop) to your LAN.
    • Verify that it auto-configures an address within your prefix (e.g., 2001:db8:1:1::/64).
  3. Ping and Traceroute:
    • From your MikroTik, run:
      /ping6 2001:db8:1:1::2
      
    • From a client, try pinging your router’s IPv6 address.
  4. DNS Resolution:
    • If you configured a DHCPv6 server with DNS options, verify that the client can resolve domain names via IPv6.
  5. Online Testing:

Final Thoughts

Configuring IPv6 on your MikroTik router may seem daunting at first, but breaking it down step by step makes it manageable. You’ve now learned how to:

  • Ensure the IPv6 package is installed and enabled.
  • Assign IPv6 addresses to your LAN.
  • Set up Neighbor Discovery and Router Advertisements.
  • Optionally deploy a DHCPv6 server for more granular control.
  • Implement basic IPv6 firewall rules for security.
  • Test and verify your configuration.

As IPv6 adoption continues to grow, having it properly configured will future-proof your network and improve connectivity. Experiment with these settings in a lab environment and gradually integrate IPv6 into your production network.

If you run into issues or have any questions, feel free to reach out. Happy networking, and enjoy the vast world of IPv6!


Explained with clarity by
Emmanuel Corels – Admin, Emmanuel Corels Creatives


Does this help?

« Back