Layer 2 Authentication and Access Control · Topic 2 of 3
MAC RADIUS, Captive Portal, Server Fail Fallback and Guest VLAN
JN0-650 study page on MAC RADIUS, captive portal, server-fail fallback, server-reject VLAN and guest VLAN on Junos switches, and when each one applies.
- 4 min
- MAC RADIUS: the source MAC is the identity; for devices with no 802.1X client; weak security.
- Captive portal: browser login on the switch, checked by RADIUS; for guests.
server-failoptions:deny(default),permit,use-cache,vlan-name.
What it is
Not every device can run an 802.1X client. Printers, cameras and some phones cannot, and guests bring unmanaged laptops. Junos switches offer other ways to handle them, and ways to keep the network usable when authentication fails.
MAC RADIUS authenticates a device by its MAC address. Captive portal authenticates a person through a web page. Server fail fallback decides what happens when RADIUS is unreachable. Guest VLAN gives limited access to devices that cannot or do not authenticate.
How it works
MAC RADIUS
The switch uses the source MAC address of the first frame it sees as the user name, and sends it to the RADIUS server in an Access-Request. The server has one entry per allowed MAC address. If it accepts, the device is authorized and can be placed in a VLAN returned by the server.
set protocols dot1x authenticator interface ge-0/0/6.0 mac-radius
It is simple, but it is weak security: a MAC address is easy to copy. Use it for devices that have no alternative, and keep their VLAN restricted.
mac-radius restrict makes the switch use MAC RADIUS only when the device does not send EAPOL frames, so a device that does run 802.1X is never authenticated by MAC.
Captive portal
With captive portal, the user opens a browser, and the switch intercepts the HTTP request and redirects it to a login page served by the switch. The user enters credentials, the switch checks them with the RADIUS server, and the port or MAC address is then authorized. It suits guests, who have no certificate or client installed.
| Item | Detail |
|---|---|
| Needs | A browser, an IP address for the host (DHCP), and a reachable address on the switch for the login page |
| Credentials | Checked against RADIUS |
| Result | The MAC address is authenticated for that port |
| Typical user | A guest or a contractor |
Server fail fallback
If no RADIUS server answers, the switch must decide what to do. The option server-fail sets this per interface.
| Option | Result |
|---|---|
deny | Block the device; this is the default |
permit | Allow the device with normal access |
use-cache | Allow a device that authenticated earlier, using the cached result |
vlan-name name | Place the device in a named fallback VLAN |
set protocols dot1x authenticator interface ge-0/0/5.0 server-fail vlan-name FALLBACK
server-fail permit keeps people working during an outage, but it opens the port to everyone. Prefer a restricted fallback VLAN.
A related setting, server-reject-vlan, applies when the server answers and rejects the credentials, rather than when it is silent:
set protocols dot1x authenticator interface ge-0/0/5.0 server-reject-vlan REJECT-VLAN
Guest VLAN
A guest VLAN is for devices that do not respond to 802.1X at all, such as a visitor laptop with no supplicant. After the switch has sent its EAP requests with no reply, it places the port in the guest VLAN, which usually has internet access only.
set protocols dot1x authenticator interface ge-0/0/5.0 guest-vlan GUEST
If an 802.1X supplicant appears later and starts sending EAPOL frames, the switch begins authentication and moves the port out of the guest VLAN when it succeeds.
| VLAN type | Used when |
|---|---|
| Guest VLAN | No supplicant responds to EAPOL |
| Server-reject VLAN | A supplicant responded, but RADIUS rejected the credentials |
| Server-fail VLAN | RADIUS did not answer |
Three VLANs, three triggers. Silent server, rejecting server, silent device. If you can name the trigger, you can name the VLAN.
Common mistakes
Treating MAC RADIUS as strong authentication. MAC addresses can be spoofed.
Using the guest VLAN for failed credentials. That is server-reject-vlan.
Leaving server-fail at its default and expecting uptime during an outage. The default denies.
Setting server-fail permit carelessly. Anyone can connect while RADIUS is down.
Giving the guest VLAN access to the internal network. Keep it isolated.
What to remember for the exam
- MAC RADIUS: the source MAC is the identity; for devices with no 802.1X client; weak security.
- Captive portal: browser login on the switch, checked by RADIUS; for guests.
server-failoptions:deny(default),permit,use-cache,vlan-name.server-reject-vlanis for RADIUS rejections;guest-vlanis for devices that do not respond to EAPOL.- The guest VLAN is normally limited; a supplicant that appears later is moved by successful 802.1X.
Check yourself
Which VLAN does a device with no 802.1X client receive after the switch gets no EAPOL reply?
The guest VLAN.
What is the default
server-failbehavior when RADIUS is unreachable?deny, so the device is blocked.How does a captive portal user authenticate?
By entering credentials on a web login page that the switch redirects the browser to, checked against RADIUS.
Topic 2 of 3 in Layer 2 Authentication and Access Control
Test yourself on Layer 2 Authentication and Access Control
The full Juniper JNCIP-ENT JN0-650 question bank has 858 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Juniper. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.