MAC bypass and device classes
By the end you can
- Turn on MAB for a switch and add endpoints to the allowlist, one by one and in bulk
- Explain what a device class sends to the switch or access point
- Name the seeded classes and set VLANs before use
- Use DHCP observations to suggest a class without letting Authcha change anything alone
The problem MAB solves
IP phones, printers, cameras, ONTs and badge readers have no supplicant. They cannot answer an 802.1X conversation. MAC authentication bypass (MAB) is the workaround: the switch takes the device's MAC address and sends it to Authcha as the username. Authcha looks it up in the MAC Allowlist and answers.
Turn it on, per switch
MAB is off by default on every network device. That is deliberate: a misconfigured device cannot admit endpoints by accident. Open Devices and use the MAB switch on each access switch that should admit endpoints. Guided Setup → Onboard IoT devices and printers walks you through it.
The allowlist
Go to Endpoints → MAC Allowlist → Add.
| Field | Meaning |
|---|---|
| MAC address | Any common format (aa:bb:cc:dd:ee:ff, aa-bb-cc-dd-ee-ff, aabb.ccdd.eeff, aabbccddeeff). All are stored in one normal form |
| Device class | The policy the endpoint receives |
| Description | For example "Lobby phone" |
| Enabled | Clear it to block the device without deleting it |
| Bandwidth, quota | Optional overrides of the class defaults for this device |
For many devices, import a CSV. Only mac_address and device_class are required.
mac_address,device_class,description,enabled,bandwidth_kbps_in,bandwidth_kbps_out
aa:bb:cc:dd:ee:01,iot,Printer 2nd floor,true,,
aa:bb:cc:dd:ee:02,iot,Lobby camera,true,2048,512The import is checked row by row before anything is written. If one row fails, nothing is imported. You can export the allowlist in the same format. Changes take effect within seconds, because Authcha clears its short MAB cache whenever you change a device or class.
When the gateway sends a password too
Some gateways send a password with the MAC (on pfSense it is the MAC authentication secret). Set MAB password mode on the device: None ignores it (the default), Same as MAC requires the password to equal the MAC in any notation, and Fixed shared secret requires a secret you enter, stored hashed. The pfSense MAC auth preset turns MAB on with Same as MAC.
Device classes
A device class is the policy an endpoint gets when it is accepted. Manage them under Device Classes → Device Classes.
| Setting | Sent to the switch or access point as |
|---|---|
| VLAN ID (1 to 4094) | Tunnel-Type, Tunnel-Medium-Type and Tunnel-Private-Group-Id |
| QoS profile | Filter-Id |
| Max session seconds | Session-Timeout |
| Bandwidth up and down (kbps) | Vendor rate-limit attributes, where defined under Vendor Attributes |
| Monthly quota | A data cap (see the quotas module) |
Every endpoint also receives Class = <device class name>. Think of a class as a labelled bundle of network rights, and the allowlist as the list of who gets which bundle.
The seeded classes
| Class | Intended use |
|---|---|
default | Fallback |
guest | Voucher-admitted guests |
byod | Employee-owned devices |
iot | Phones, printers, cameras and other MAB devices |
kiosk | Shared public terminals |
quarantine | Where non-compliant devices are placed by posture. No VLAN is set out of the box |
Vendor attributes
With Advanced view on, Device Classes → Vendor Attributes lets a class send extra vendor-specific attributes, such as Aruba user roles, MikroTik rate limits or Cisco subscriber QoS policies. An attribute goes only to devices of the matching type. Values can use ${kbps_in} and ${kbps_out}. Only one attribute per class and vendor can be marked as the rate limit. Presets ship for MikroTik, Aruba, Cambium, Ruckus, Cisco WLC, Cisco IOS and IOS-XE, Arista, Fortinet, Huawei, HPE and F5. Review them against your equipment.
Classification suggestions
You do not have to guess which class a new device belongs in. With Advanced view, Endpoints → Classification Rules holds simple ordered rules that suggest a class from the device's DHCP fingerprint: vendor class, hostname or parameter-request list. The first matching rule wins. Suggestions appear on DHCP → Observations for devices not yet on the allowlist, and accepting one opens the normal Add dialog already filled in.
Authcha never changes a device's class on its own. A person always confirms. The shipped example rules are disabled until you enable them.
LabHands-on
On the demo as demo-viewer (password Authcha-View-2026), unless noted.
- Open Endpoints and look at the allowlist. Find entries in the
apandontclasses next to the PCs and IP phones. - Open Device Classes and compare two classes. Which have a VLAN, a bandwidth limit or a quota?
- Open Devices and find a switch with MAB on, and one without.
- Open Live Auth and find a MAB decision. It shows the matched endpoint and class.
- On your install, turn on MAB for one test switch only.
- Add one test endpoint to the allowlist in a class with a VLAN you control. Plug it in and watch it land in that VLAN.
- Import a two-row CSV where one row has a class that does not exist. Confirm nothing was imported.
Check yourselfQuiz
Cheat sheetKeep this
- MAB: the MAC is the username. Off by default. Turn it on per switch under Devices.
- Allowlist: Endpoints → MAC Allowlist. CSV import is all-or-nothing. Changes apply in seconds.
- A device class = VLAN, QoS, session timeout, bandwidth, quota, vendor attributes.
- Seeded:
default,guest,byod,iot,kiosk,quarantine. Set the VLANs first. - Suggestions come from DHCP fingerprints. They are never applied automatically.
- Read more: Network access, Device onboarding.