# Set up Ruijie switches for Trustaige RADIUS

> Configure a Ruijie switch on RGOS 11 for 802.1X with MAC authentication bypass against Trustaige RADIUS, with dynamic VLANs and accounting.

Source: https://docs.trustaige.com/manage/switch-ruijie

Replace these placeholders with your organization's own values:

- `<your-radius-server>`: Trustaige RADIUS server, for example `203.0.113.10`. The Server, or Primary server, the hub shows when you register your RADIUS server at a site.
- `<your-restricted-vlan>`: Restricted VLAN, for example `30`. The Restricted VLAN for headless devices on the wired network’s settings in the hub.
- `<your-radius-secret>`: RADIUS shared secret, a secret. The hub shows it once, when you register your RADIUS server at a site.

RGOS relays each port's EAP to RADIUS and, for a device that doesn't answer
802.1X, offers MAC authentication bypass. Ruijie's MAB supports PAP only, with
the MAC in lowercase without separators as both user name and password, which
Trustaige accepts.

Read [Run a wired office on Trustaige RADIUS](/manage/wired-8021x) first for
the hub's side. Register the switch with the make **Other**.

## Before you start

| You need | Why |
|---|---|
| A Ruijie switch on RGOS 11 | The commands below are from Ruijie's RGOS 11 configuration guide. Check each with `?` on your model. |
| The VLANs Trustaige will name, on the switch | `vlan <your-restricted-vlan>`, and the wired network's **VLAN** if you set one. |

## RADIUS and AAA

```txt title="RGOS"
aaa new-model
radius-server host <your-radius-server> auth-port 1812 acct-port 1813 key <your-radius-secret>
aaa authentication dot1x default group radius
aaa accounting network default start-stop group radius
dot1x authentication default
dot1x accounting default
dot1x auth-mode eap
dot1x auto-req
```

- Set `auth-port` to the hub's **Port**, and `acct-port` to the port after
  it. Add the secondary server the same way.
- **`dot1x auth-mode eap`**, the default, relays EAP to Trustaige. `chap` or
  `pap` would end EAP on the switch.
- **`dot1x auto-req`** has the switch ask each port for 802.1X; MAB needs it.

## Access ports

```txt title="RGOS"
interface GigabitEthernet 0/10
 switchport access vlan 10
 dot1x port-control auto
 dot1x mac-auth-bypass
 dot1x mac-auth-bypass multi-user
 dot1x dynamic-vlan enable
```

- **`dot1x port-control-mode`** stays at its default, `mac-based`, so each
  device on the port is decided separately, such as a PC behind an IP phone.
- **`dot1x mac-auth-bypass multi-user`** lets more than one device on the port
  join by MAC.
- **`dot1x dynamic-vlan enable`** applies the VLAN Trustaige names
  (`Tunnel-Type` VLAN, `Tunnel-Medium-Type` 802, `Tunnel-Private-Group-ID`).
- The MAB user name format can stay at its default; Trustaige reads any
  format.

802.1X takes priority over MAB. With the switch's short default timers
(`tx-period` 3 seconds, `max-req` 3), MAB follows soon after a device fails to
answer.

## Disconnects

RGOS describes Disconnect-Requests on UDP 3799, the port the hub uses for
**Other**. Allow the addresses the hub lists when you choose **Disconnects on
UDP 3799** beside the switch through any firewall in front of it.

## Check it works

1. Plug a managed PC into the port, then a printer.
2. On the switch:

   ```txt title="RGOS"
   show dot1x summary
   show dot1x auth-address-table interface GigabitEthernet 0/10
   ```

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

## Troubleshooting

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

The switch sent a MAB request without Message-Authenticator. Update RGOS, and
ask Ruijie which release adds it to MAB requests.

**Managed PCs are refused, and the activity says “The device asked for a sign-in method other than a certificate.”**

The switch ends EAP itself. Set `dot1x auth-mode eap`.

**The printer doesn’t reach MAB**

Check `dot1x auto-req` globally and `dot1x mac-auth-bypass` on the port.

## What hasn't been confirmed yet

- Whether RGOS adds Message-Authenticator to MAB requests isn't documented,
  and Ruijie has published no Blast-RADIUS notice that could be found.
- How a Ruijie switch is told which addresses may send Disconnect-Requests,
  and with which key, isn't documented.
- Whether RGOS acts on `Session-Timeout` with `Termination-Action`
  `RADIUS-Request` isn't documented.
- Ruijie publishes its RGOS 11 guide as a template, without a model or release.
  Trustaige's lab hasn't yet recorded a Ruijie switch.

## Ruijie documentation

- [802.1X configuration, RGOS 11 (Chinese)](https://www.ruijie.com.cn/Fu/Article/66653507-0bda-4ec9-b6bc-57c80f3eef1a/%E5%AE%98%E7%BD%91%E5%8F%91%E5%B8%83/HTML/09-%E5%AE%89%E5%85%A8%E9%85%8D%E7%BD%AE%E6%8C%87%E5%8D%97/04-802.1x%E9%85%8D%E7%BD%AE.html)
- [RADIUS configuration, RGOS 11 (Chinese)](https://www.ruijie.com.cn/Fu/Article/66653507-0bda-4ec9-b6bc-57c80f3eef1a/%E5%AE%98%E7%BD%91%E5%8F%91%E5%B8%83/HTML/09-%E5%AE%89%E5%85%A8%E9%85%8D%E7%BD%AE%E6%8C%87%E5%8D%97/02-RADIUS%E9%85%8D%E7%BD%AE.html)
