Skip to content
Trustaige Docs

Set up MikroTik switches for Trustaige RADIUS

Run RouterOS 7's dot1x server on a MikroTik switch against Trustaige RADIUS, with MAC authentication fallback, dynamic VLANs and accounting.

  • Scale
  • Needs RouterOS 7.15 or later
  • About 30 minutes
  • Rolling out
View as Markdown

RouterOS’s dot1x server asks RADIUS about each port. It prefers 802.1X and, after three retrans-timeout periods without one, falls back to MAC authentication. By default it sends the MAC as the user name alone, with no password, which Trustaige accepts when the user name is the same MAC as Calling-Station-Id.

Read Run a wired office on Trustaige RADIUS first for the hub’s side. Register the switch with the make MikroTik.

Before you start

You needWhy
RouterOS 7.15 or laterFrom 7.15, RouterOS adds Message-Authenticator to every RADIUS request but accounting. Trustaige drops requests without it.
Ports on a bridge with vlan-filtering=yesThe dot1x server places a device in a VLAN only on a VLAN-filtering bridge.
The VLANs Trustaige will name, as static bridge VLANsThe switch adds the port to a VLAN that already exists; it doesn’t create it.

RADIUS and disconnects

/radius add service=dot1x address=<your-radius-server> secret="<your-radius-secret>" \
    authentication-port=1812 accounting-port=1813 comment=trustaige
/radius incoming set accept=yes port=3799
  • Set authentication-port to the hub’s Port, and accounting-port to the port after it. Add a second entry for the secondary server.
  • require-message-auth stays at its default, which Trustaige meets: it signs every reply.
  • /radius incoming listens on UDP 1700 unless told otherwise; the hub sends to 3799 for MikroTik. Allow UDP 3799 in from the addresses the hub lists when you choose Disconnects on UDP 3799, and from nowhere else.
/radius add service=dot1x address=<your-radius-server> secret="<your-radius-secret>" \
    authentication-port=1812 accounting-port=1813 comment=trustaige
/radius incoming set accept=yes port=3799

The VLANs

/interface bridge set bridge vlan-filtering=yes
/interface bridge vlan add bridge=bridge vlan-ids=<your-restricted-vlan> tagged=bridge,sfp-sfpplus1

Add the wired network’s VLAN the same way, tagged on the uplink.

/interface bridge set bridge vlan-filtering=yes
/interface bridge vlan add bridge=bridge vlan-ids=<your-restricted-vlan> tagged=bridge,sfp-sfpplus1

The dot1x server

/interface dot1x server add interface=ether10 auth-types=dot1x,mac-auth \
    mac-auth-mode=mac-as-username retrans-timeout=10s \
    accounting=yes interim-update=5m
  • auth-types=dot1x,mac-auth tries 802.1X first, then the MAC. With retrans-timeout=10s, the fallback comes after 30 seconds; the default, 30 seconds, makes it 90.
  • mac-auth-mode can stay at mac-as-username, or be mac-as-username-and-password, which adds the MAC as a PAP password. Trustaige accepts both. radius-mac-format can stay at its default.
  • Leave guest-vlan-id, reject-vlan-id and server-fail-vlan-id unset, so a device Trustaige refused gets no network.

The dot1x server places the device in the VLAN Trustaige names in Tunnel-Private-Group-ID.

/interface dot1x server add interface=ether10 auth-types=dot1x,mac-auth \
    mac-auth-mode=mac-as-username retrans-timeout=10s \
    accounting=yes interim-update=5m

Check it works

  1. Plug a managed PC into the port, then, on another port, a printer.

  2. On the switch:

    /interface dot1x server active print
    /interface dot1x server state print

    Each device shows its MAC, user name, VLAN and how it authenticated.

  3. In the hub, Recent joins shows each decision, and the activity names the port.

  4. Block the PC in the hub, and check whether its entry leaves active print within seconds.

Troubleshooting

Activity says “The access point does not sign its requests. Turn on Message-Authenticator in its RADIUS settings.”

The switch runs a release before 7.15. Update RouterOS.

The printer is accepted but has no network

The VLAN Trustaige named isn’t a static bridge VLAN, or the bridge doesn’t filter VLANs. Add it under /interface bridge vlan.

The hub shows a Disconnect-Request as not acknowledged

Check /radius incoming (accept=yes, port 3799) and the firewall. If both are right, the dot1x server isn’t acting on the request; see below.

What hasn’t been confirmed yet

  • Whether the dot1x server ends a session on a Disconnect-Request isn’t documented. MikroTik’s RADIUS page describes Disconnect-Requests in general, without naming the services that act on them.
  • Whether the dot1x server acts on Session-Timeout with Termination-Action RADIUS-Request isn’t documented; it re-authenticates at reauth-period when one is set.
  • Trustaige’s lab has exercised MAC authentication as RouterOS sends it, not a real switch’s request.

MikroTik documentation

  • Dot1X: the dot1x server, MAC authentication and dynamic VLANs
  • RADIUS: services, require-message-auth and incoming requests
  • RouterOS 7.15 changelog: Message-Authenticator in every request