Skip to content

802.1X Port Security & Dynamic VLAN Assignment via RADIUS / Windows NPS

SOP-NET-040 Standard Operating Procedure v1.0.0
Last Updated 2026-10-14
Author Systems Administration Team
πŸ’» Target OS / Systems:
Cisco Catalyst / Nexus / IOS-XEFortinet FortiSwitchWindows Server 2022 / 2025 Network Policy Server (NPS)Active Directory Domain Services (AD DS)

Before you begin

  • Applies to:802.1X switch port authentication and dynamic VLAN assignment with RADIUS and Windows NPS.
  • Where to start:Start with the NPS server and an approved pilot switch port. Keep an independent management path available.
  • What you need:Have the switch and NPS access, pilot client, authorized VLAN mapping, and the organization’s approved authentication settings.
Guide tools
Guide tools
0/0 Steps (0%)

Scope, Threat Model & Defensive Overview

Open, unauthenticated Ethernet ports in conference rooms, lobby jacks, and unmonitored desks represent an immediate physical attack vector. Anyone connecting an unmanaged device can obtain a DHCP lease and probe internal infrastructure.

IEEE 802.1X Network Access Control (NAC) enforces identity-driven port access:

  • Ports remain in an unauthorized state; all frames are blocked except for EAPOL authentication.
  • Corporate Domain Machines: Authenticate via Machine/User Certificate or credentials β†’ Dynamically assigned to VLAN 30 (Users).
  • Corporate IP Phones: Authenticate via MAC Authentication Bypass (MAB) β†’ Assigned to VLAN 40 (VoIP).
  • Unmanaged / Guest Devices: Authentication fails β†’ Automatically dumped into VLAN 50 (Guest) with internet-only egress.
[Workstation Plugged In] ──► [Switchport: Closed]
β”‚
β–Ό (EAPOL / RADIUS Challenge)
[Windows Server 2022/2025 NPS]
β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β–Ό (Access-Accept + VLAN 30) β–Ό (Access-Reject)
[Authorized Corporate PC: VLAN 30] [Guest / Rogue Device: VLAN 50]

Windows Server 2022/2025 NPS Configuration

Run on the Domain Controller or member server running the Network Policy Server (NPS) role (DC-01 / NPS-01).

01

Register Switch as RADIUS Client in NPS

NPS Setup

In nps.msc, register the core or access switch as an authorized RADIUS client and configure a high-entropy shared secret.

1. Open Network Policy Server (nps.msc).
2. Right-click RADIUS Clients -> New:
- Friendly Name: SW-ACCESS-01
- Address (IP or FQDN): 10.10.10.2 (Switch Management IP)
- Shared Secret: RadiusSharedSecret2026!

02

Configure Network Policy for Dynamic VLAN Assignment

RADIUS Policy

Create a network policy targeting corporate computers and return the standard RADIUS RFC attributes that tell the switch to drop the port into VLAN 30.

Policy Name: POL-8021X-Corporate-Computers
Conditions:
- NAS-Port-Type: Ethernet
- Windows Groups: CORP\Domain Computers
Constraints:
- Authentication: Microsoft: Protected EAP (PEAP) or EAP-TLS
Standard RADIUS Return Attributes:
- Tunnel-Type: Virtual LANs (VLAN) (Value: 13)
- Tunnel-Medium-Type: 802 (Includes all 802 media plus Ethernet) (Value: 6)
- Tunnel-Private-Group-ID: 30 (Target VLAN string)

Cisco Catalyst / IOS-XE Switch Configuration

Configure on Cisco Catalyst switches (SW-ACCESS-01):

03

Enable AAA Subsystem & Define RADIUS Group

Cisco AAA

Initialize AAA, register the Windows Server NPS instance, and activate 802.1X globally across the switch.

configure terminal
# 1. Enable AAA subsystem
aaa new-model
# 2. Configure RADIUS Server Group
radius server NPS-SERVER-01
address ipv4 10.10.10.10 auth-port 1812 acct-port 1813
key RadiusSharedSecret2026!
exit
# 3. Define AAA Authentication & Authorization lists
aaa group server radius RADIUS-GROUP-NPS
server name NPS-SERVER-01
exit
aaa authentication dot1x default group RADIUS-GROUP-NPS
aaa authorization network default group RADIUS-GROUP-NPS
aaa accounting dot1x default start-stop group RADIUS-GROUP-NPS
# 4. Globally enable 802.1X
dot1x system-auth-control

04

Configure Access Switchports for 802.1X & MAB

Cisco Ports

Apply multi-domain authentication, enable MAC Authentication Bypass for non-802.1X hardware, and set the fallback Guest VLAN to 50.

interface range GigabitEthernet1/0/1 - 40
description 802.1X-SECURED-ACCESS-PORT
switchport mode access
switchport access vlan 50
# Enable 802.1X and MAC Authentication Bypass
authentication order dot1x mab
authentication priority dot1x mab
authentication port-control auto
dot1x pae authenticator
# Host Mode: Multi-Domain (Permits 1 PC + 1 IP Phone on same jack)
authentication host-mode multi-domain
# Fallback Actions:
authentication event fail action authorize vlan 50
authentication event no-response action authorize vlan 50
# Critical Auth Survivability: If NPS is unreachable, authorize corporate VLAN
authentication event server dead action authorize vlan 30
exit
write memory

Fortinet FortiSwitch Configuration

Configure via FortiGate controller CLI:

05

Configure RADIUS Server in FortiOS

FortiOS RADIUS

Define the Windows NPS RADIUS server profile with MS-CHAPv2 authentication within FortiOS.

config user radius
edit "RADIUS-NPS"
set server "10.10.10.10"
set secret RadiusSharedSecret2026!
set auth-type ms_chap_v2
next
end

06

Create 802.1X Security Policy & Port Binding

FortiSwitch Policy

Define the MAC-based 802.1X security policy with guest failover and bind it to managed access ports.

# 1. Create policy
config switch-controller security-policy 802-1X
edit "8021X-POLICY-CORP"
set security-mode 802.1X-mac-based
set user-group "RADIUS-NPS"
set guest-vlan enable
set guest-vlan-id 50
set auth-fail-vlan enable
set auth-fail-vlan-id 50
next
end
# 2. Apply to access ports
config switch-controller managed-switch
edit "FSW-ACCESS-01"
config ports
edit "port1"
set port-security-policy "8021X-POLICY-CORP"
next
end
next
end

Operational Verification & Emergency Rollback Bypass

07

Validate Active Authentications on Switch & NPS Event Log

Verification

Confirm the switch displays an Authorized status with Dynamic VLAN Policy 30, and verify NPS Event ID 6272 success records.

# On Cisco Catalyst:
show authentication sessions interface GigabitEthernet1/0/1 details
❯ Illustrative Output (Results Vary)
Interface: GigabitEthernet1/0/1
MAC Address: 0050.56a1.b2c3
IPv4 Address: 10.10.30.55
User Name: host/ws-eng-042.corp.internal
Status: Authorized
Domain: DATA
Oper host mode: multi-domain
Authorized By: Authentication Server
Vlan Policy: 30
Method status: DOT1X - Success

08

Emergency Switchport Bypass & Force-Authorization

Rollback

If the RADIUS/NPS server experiences total hardware failure and endpoints cannot authenticate, execute force-authorization across all ports to immediately restore corporate connectivity.

# On Cisco Catalyst:
configure terminal
interface range GigabitEthernet1/0/1 - 40
authentication port-control force-authorized
switchport access vlan 30
exit

Comments