New Introducing Splynx v.6.0: Run. Build. Scale. Learn more →

MikroTik IPv6 for ISPs: PPPoE, Prefix Delegation and RADIUS (RouterOS v7)

What this MikroTik IPv6 guide covers

Most MikroTik IPv6 guides start at the customer’s router. If you run a broadband business, the harder part sits on your side of the link. Your PPPoE server has to hand every subscriber a prefix, and your RADIUS server has to tell it which one. Blocked and non-paying customers also need to be handled over IPv6, not only over IPv4.

So this guide starts on the operator side: RouterOS v7 on the PPPoE server and Splynx as the RADIUS server (FreeRADIUS ships with Splynx, receives your routers’ requests and checks them against your customer data). It ends with a MikroTik router as the customer’s CPE. All RouterOS commands come from MikroTik’s current documentation at manual.mikrotik.com and use the 2001:db8::/32 documentation range, so replace the prefixes with your own.

If you’re new to IPv6 in Splynx, start with our overview of IPv6 support in Splynx.

How to enable IPv6 on MikroTik (RouterOS v7)

In RouterOS v6 you had to enable a separate IPv6 package. That step is gone in v7: MikroTik merged the individual packages, and “only bundle and a few extra packages remain”.

IPv6 is now switched on or off with one setting. Under /ipv6/settings, the disable-ipv6 property will “Disable or enable IPv6 system-wide”. If IPv6 doesn’t work on a router, check that disable-ipv6 isn’t set to yes.

Plan your IPv6 addresses in Splynx

IPv6 networks in Splynx work much like IPv4 networks. Under Networking → IPv6 networks you add the prefixes you own, see which networks are available and check the usage details of each one.

Adding an IPv6 network in Splynx: network 2001:db8::, prefix /32, title Registry allocation

The Splynx documentation recommends a simple three-level plan for small and mid-sized networks:

  • /32 from your registry. This is the block a regional registry usually assigns to the operator.
  • /48 per site or NAS. Each high site, PPPoE server or DHCP server gets its own /48. A /32 contains 65,536 of them, and one /48 can serve up to about 65,000 subscribers.
  • /64 per customer. Each subscriber’s CPE or home router receives a /64 for its LAN.

In the documentation example, the operator kept one /48 for infrastructure and gave each PPPoE server its own /48. You also need static routes from your BGP routers to each PPPoE server’s /48 so that return traffic reaches the right NAS.

Each customer’s internet service has two IPv6 fields:

  • IPv6 network: the address for the customer’s WAN interface, taken from a network you added under Networking → IPv6 networks.
  • Delegated IPv6 network: the prefix the CPE or home router uses for the customer’s LAN.

To assign IPv6 automatically, go to Config → Networking → IPv6. The page has a block for each of the two fields: Auto assign IPv6 to customers (IPv6 network) and Auto assign delegated IPv6 to customers. In each block, turn on Enable, pick the networks to use and set the Prefix to assign (for the delegated network, /64 matches the plan above). Manual IPv6 assignment sets the default prefix sizes offered when you pick a network for a service by hand. The Update IPv6 on services button applies the settings to existing internet services.

Splynx Config, Networking, IPv6: auto assign for the IPv6 network and the delegated IPv6 network, manual IPv6 assignment, Update IPv6 on services

Set up IPv6 on a MikroTik PPPoE server with prefix delegation

A PPPoE customer gets IPv6 in two parts: the PPP link itself, and a delegated prefix for the customer’s LAN, sent with DHCPv6 prefix delegation (DHCPv6-PD). On a MikroTik PPPoE server you don’t have to configure a separate DHCPv6 server for this. In MikroTik’s words: “When a client connects, PPP will automatically add a dynamic DHCPv6-PD server.”

In MikroTik’s documented setup, the prefixes come from a pool on the router, and RADIUS can name that pool (see the attribute table below).

Delegate prefixes from a pool in the PPP profile

“The dhcpv6-pd-pool parameter under PPP Profiles is used to enable PPP-PD.” This is MikroTik’s example from the IPv6 PD over PPP page:

/ipv6/pool add name=myPool prefix=2001:db8:7501:ff00::/60 prefix-length=62
/ppp/profile/set default dhcpv6-pd-pool=myPool
/interface/pppoe-server/server add service-name=test interface=ether1

The first line creates a pool that hands out /62 prefixes from a /60. The second attaches the pool to the default PPP profile, and the third starts a PPPoE server on ether1. In production, use a pool from the /48 you planned for this NAS and set prefix-length to the size you delegate per customer (/64 in the Splynx plan above).

WinBox, IPv6 Pool: myPool with prefix 2001:db8:7501:ff00::/60 and prefix length 62

WinBox, PPP Profile default: DHCPv6 PD Pool set to myPool

To authenticate PPPoE users against Splynx, the PPPoE server also needs RADIUS enabled. Our guide to MikroTik RADIUS configuration and troubleshooting in Splynx covers that part.

Shape the IPv6 RADIUS attributes in Splynx

If you need to shape the attributes yourself, Splynx RADIUS customization (Config → Networking → Radius) has variables for the service’s IPv6 settings. They include {{ service.ipv6 }}, {{ service.ipv6_pool_id }} and {{ service.ipv6_delegated }} (delegated IPv6 networks), plus {{ service.taking_ipv6 }}, which returns 0, 1 or 2 for None, Permanent IP or Dynamic IP.

RADIUS attributes for MikroTik IPv6

These are the IPv6-related attributes MikroTik lists for RouterOS v7, with MikroTik’s own descriptions:

Attribute MikroTik description What RADIUS sends
Framed-IPv6-Prefix “IPv6 prefix assigned to the client” a prefix
Delegated-IPv6-Prefix “IPv6 Prefix” a prefix
Mikrotik-Delegated-IPv6-Pool “IPv6 pool used for Prefix Delegation” the name of a pool on the router
Delegated-IPv6-Prefix-Pool “IPv6 Prefix pool used for Prefix Delegation” the name of a pool on the router
Mikrotik-Group “…PPP default profile name for PPP users” the name of a PPP profile

Two things to keep in mind:

  • The pool attribute is Mikrotik-Delegated-IPv6-Pool. Older guides, including an earlier version of this post, called it “Delegated-IPv6-Pool”.
  • With the pool attributes, RADIUS only names the pool. The pool itself must exist on the MikroTik router.

Check that a customer received a prefix

After a customer connects, look at the DHCPv6 server bindings on the PPPoE server:

/ipv6/dhcp-server/binding print

A working delegation shows a binding for the customer with the status bound. In RouterOS v6 this list was called “DHCPv6 Active Leases” in WinBox.

WinBox, DHCPv6 Server Bindings: 2001:db8:7501:ff00::/62 delegated to pppoe-a1 from myPool, status bound

On the Splynx side, Networking → IPv6 networks shows the usage details of each network, including the /64 prefixes delegated to customers’ CPEs.

Block non-paying customers over IPv6

For IPv4, Splynx has Reject IP ranges for blocked customers, and you can send blocked customers to a payment page (see blocked customer redirection). Splynx has reject ranges for IPv6 as well.

Reject IPv6 ranges

In Config → Networking → Radius, next to the IPv4 reject ranges, you’ll find five IPv6 ones:

  • Reject IPv6 0: the user is not found;
  • Reject IPv6 1: the user is blocked, not active, or not in the system;
  • Reject IPv6 2: the user has a negative balance or a filter is applied;
  • Reject IPv6 3: the user has the wrong MAC address (if enabled) or another error;
  • Reject IPv6 4: the user entered the wrong password.

Reject IPv6 0 to 4 ranges in the Splynx RADIUS settings, example ranges from 2001:db8::/32

Switching PPP profiles with Mikrotik-Group

On the MikroTik side, PPP profiles give you another way to separate blocked customers. When RADIUS returns the Mikrotik-Group attribute, MikroTik uses it as the “PPP default profile name for PPP users”.

The setup uses two profiles: the default profile for active customers, and a block profile whose dhcpv6-pd-pool points to a separate pool used only for blocked customers. You can then filter or redirect traffic from that pool on your routers.

Set up a MikroTik router as an IPv6 CPE

On the customer side, a MikroTik router connects to your PPPoE server with a PPPoE client, then asks for a prefix with a DHCPv6 client running over that PPPoE interface. This is the client side of MikroTik’s IPv6 PD over PPP example:

/interface/pppoe-client add name=client-test interface=ether1 user=a1 password=<password> service-name=test
/ipv6/dhcp-client add interface=client-test request=prefix pool-name=ppp-test pool-prefix-length=64

WinBox on the CPE, DHCPv6 Client: client-test requests a prefix into pool ppp-test, prefix 2001:db8:7501:ff00::/62, status bound

Use the PPPoE username and password the customer has in Splynx. request=prefix tells the DHCPv6 client to ask for a delegated prefix; current RouterOS 7 releases need it, and without it the command stops and asks for the value. The client stores the delegated prefix in the local pool ppp-test. Next, give the LAN an address from that pool and advertise it. The command follows MikroTik’s DHCPv6 client example with the pool name from above; to-clients is the LAN bridge, so use your own:

/ipv6/address/add address=::1/64 from-pool=ppp-test interface=to-clients advertise=yes

This gives the router the ::1 address on the LAN and advertises the prefix, so devices on the LAN can configure their own addresses with SLAAC.

WinBox on the CPE, IPv6 Addresses: 2001:db8:7501:ff00::1/64 from pool ppp-test on to-clients, advertised

A few DHCPv6 client details matter here:

  • Default route. DHCPv6 doesn’t provide a default gateway. The client can add one with the add-default-route option.
  • DNS. With use-peer-dns, the client uses the DNS servers it receives.
  • DNS for LAN devices. To pass DNS servers to LAN clients in router advertisements, set advertise-dns=yes in the IPv6 neighbor discovery settings for the LAN interface.

For other home routers and how they handle delegated prefixes, see IPv6 support on CPEs and home routers.

Further reading

More in Network management

Network management MDU Wi-Fi onboarding: let residents sign up, pay, and connect on their own

MDU Wi-Fi onboarding: let residents sign up, pay, and connect on their own

Give every apartment a QR card and let residents sign up, pay, and get a private Wi-Fi password on a shared SSID, withou...

Network management Introducing mPSK for simple and robust per-device control of WiFi networks

What is mPSK? Multiple PSK for simple per-device control of Wi-Fi networks

mPSK support is part of Splynx, so you can easily segment your WiFi Network with Private Pre-Shared-Keys without requiri...

Network management Taking non-payments to the next level with blocked customer redirection

Improve Non-Payment Handling with Splynx DNS Blocking

Tackle non-payments more proficiently by redirecting blocked customers to a landing page. From there, they can easily ac...

Network management 5 Splynx Tools for ISPs peace of mind & engineers restful sleep

Switch to the safe side and let network engineers sleep well at night

Running a local ISP comes with enough challenges — worrying about network failures and blocking non-paying customers d...

Network management Using TR-069 ACS to Deliver High-Quality Wi-Fi to Residential Customers While Cutting Costs

Using TR-069 ACS to Deliver High-Quality Wi-Fi to Residential Customers While Cutting Costs

TR-069 ACS isn't a magic pill for all troubles, but it can make your life much easier. This article we'll guide you thro...

Network management Bandwidth isn't key to QoE. Latency, bufferbloat & jitter matters

Bufferbloat explained: why bandwidth isn’t the key to QoE for ISPs

Bufferbloat is lag that appears when a link is busy: oversized buffers fill up and every packet waits. More bandwidth wo...

Network management Splynx Network sites

Simplifying Network Management for ISPs with Splynx Network Sites

Splynx Network sites bring ISPs around the world more streamlined client communication and efficient tracking for all yo...

Network management

Simplifying network troubleshooting with Ping and Traceroute features

Explore Splynx 4.2's Ping and Traceroute features, simplifying network troubleshooting and boosting ISP team efficiency.

Network management

Hardware Backup & Change Management in Splynx

Maintaining network stability and reliability is paramount for both ISPs and their valued customers. To address this, Sp...

Network management bandwidth management

Bandwidth management in Splynx

As a local ISP business owner, ensuring efficient bandwidth management is crucial for maintaining customer satisfaction ...

Find out how Splynx helps ISPs grow

Learn more