How to Configure IPv6 on Mikrotik Router Using Vultr (Two Methods for Setting Up the Gateway)
Configuring IPv6 on a Mikrotik router is typically straightforward, but things can get tricky when it comes to identifying the correct gateway address. In some cases, the commonly used fe80::1
link-local address works; in others, you need to retrieve the gateway manually using Neighbor Discovery (ND). This guide will walk you through both methods for setting up IPv6 on a Mikrotik router using a Vultr-provided IPv6 address.
Step 0: Adjust Router Advertisement Settings
By default, Mikrotik hasaccept-router-advertisements=yes-if-forwading-disabled
sometimes, and because of that, your router may not be able to auto-configure itself. So first, you need to change it to
/ipv6/settings set accept-router-advertisements=yes
If this helps, then we are good here. Otherwise, we need to follow other available steps.
Step 1: Enable the IPv6 Package
Before starting, make sure the IPv6 package is enabled on your Mikrotik router:
Go to System > Packages.
Ensure the IPv6 package is enabled. If not, enable it and reboot the router.
Step 2: Assign the IPv6 Address to the WAN Interface
Vultr usually provides a single IPv6 address. Assign it to the appropriate WAN-facing interface:
Open the terminal and run the following command:
/ipv6 address add address=2001:db8:abcd:1234::1/64 interface=ether1 advertise=no
- Replace
ether1
with the actual WAN interface connected to your Vultr instance. - This assigns the provided IPv6 address to the interface without enabling advertisement for local LAN devices.
Step 3: Add a Default Route (Method 1: Using fe80::1
)
In many cases, Vultr uses the link-local address fe80::1
as the IPv6 gateway. You can test it as the default route:
Add the default route:
/ipv6 route add dst-address=::/0 gateway=fe80::1%ether1
Test the IPv6 connectivity:
/tool ping address=2001:4860:4860::8888 interface=ether1
If the ping succeeds, your IPv6 configuration is working, and you’re done!
Step 4: (Method 2: Finding the Correct Gateway via ND)
If the default fe80::1
doesn’t work (for example, if you see "timeout" in your pings), you’ll need to manually find the correct link-local gateway using Neighbor Discovery (ND).
Enable ND to Discover the Link-Local Gateway
If not already enabled, make sure ND is active on the WAN interface:
/ipv6 nd set [find interface=ether1] disabled=no
Check the discovered IPv6 neighbors:
/ipv6 neighbor print
Look for an entry with the router flag (R
) on the WAN interface (ether1
). It will likely look like this:
Flags: R - router # ADDRESS INTERFACE MAC-ADDRESS STATUS 0 R address=fe80::fc00:5ff:fe21:abcd interface=ether1 mac-address=AA:BB:CC:DD:EE:FF status="reachable"
The link-local address fe80::fc00:5ff:fe21:abcd
is the actual gateway.
Step 5: Update the Default IPv6 Route
Now that you’ve identified the correct gateway update the default route:
Remove any existing default route:
/ipv6 route remove [find where dst-address="::/0"]
Add a new default route using the correct link-local gateway:
/ipv6 route add dst-address=::/0 gateway=fe80::fc00:5ff:fe21:abcd%ether1
Step 6: Test IPv6 Connectivity Again
After setting up the correct default route, test IPv6 connectivity by pinging a public IPv6 address like Google’s DNS:
/tool ping address=2001:4860:4860::8888 interface=ether1
If the ping is successful, your IPv6 connectivity is now properly configured.
Common Pitfalls and Tips
- Link-Local Address Issues: Some routers use
fe80::1
it as the default gateway, while others don’t. Always check the actual link-local gateway using ND iffe80::1
it fails. - Firewall Configuration: Be mindful of default firewall rules that may block IPv6 traffic. Temporarily disable IPv6 firewall filters for testing:
/ipv6 firewall filter disable [find]
- Neighbor Discovery: Always ensure ND is enabled when troubleshooting gateway discovery. If ND is disabled, the router will not learn the correct gateway.
Conclusion
This guide provides two methods for configuring IPv6 on a Mikrotik router with Vultr. If fe80::1
it works as the gateway, the process is simple. However, if it doesn’t, you can manually use Neighbor Discovery to find the correct link-local address for the gateway. Once identified, updating the default route should resolve any IPv6 connectivity issues.
If you’ve faced challenges during this process or discovered other tips, please share them!