跳至主要內容

動態 VLAN 指派如何在多租戶建築中運作

本技術參考指南詳細說明使用 802.1X 和 RADIUS 在多租戶環境中動態 VLAN 指派的架構與實作。它為 IT 經理和網路架構師提供可行的指導,以減少 SSID 開銷、強制 Layer 2 隔離,並確保共享建築中安全、可擴展的連線。

📖 6 分鐘閱讀📝 1,475 字數🔧 2 範例3 練習題📚 8 關鍵定義

收聽此指南

查看播客逐字稿
[片頭音樂 - 專業、輕快的企業科技主題] 主持人:歡迎收聽 Purple 技術簡報。我是主持人,今天我們要探討任何多租戶環境中的關鍵架構決策:動態 VLAN 指派。如果您正在管理混合用途商業大樓、零售複合體或大型酒店場所的網路基礎架構,那麼本集正是為您準備的。我們將詳細說明如何擺脫廣播數十個 SSID 的做法,轉而使用 802.1X 和 RADIUS 在單一、乾淨的無線網路上動態分割流量。 [轉場音效] 主持人:我們先來看看背景。過去,如果您有一棟大樓有三個租戶——比如一樓的咖啡廳、二樓的律師事務所和三樓的科技新創公司——您要麼運行獨立的實體網路(這對佈線和干擾來說簡直是噩夢),要麼為每個租戶廣播唯一的 SSID。 但是廣播多個 SSID 會降低效能。每個 SSID 都以最低基本速率發送信標幀。如果您有十個租戶和十個 SSID,您會消耗大量通話時間,只是在喊「我在這裡!」,而實際數據卻一個位元組都還沒傳輸。 這就是動態 VLAN 指派改變遊戲規則的地方。 與其使用十個 SSID,您只需廣播一個安全的企業級 SSID。我們稱它為「Building_Secure」。當使用者連線時,網路不會只要求預先共用金鑰。它會要求他們的個人身份。 以下是對此流程運作方式的技術深入探討。 第一步:請求者。那是使用者的裝置——筆記型電腦或智慧型手機。它與存取點相關聯,但尚未連上網路。該連接埠實際上會阻擋所有流量,除了 EAPOL——即透過區域網路可擴展認證協定。 第二步:認證者。這是您的存取點或無線控制器。它從裝置取得 EAPOL 流量,並將其封裝成 RADIUS 存取請求封包。它將此封包轉發至認證伺服器。 第三步:認證伺服器。這就是您的 RADIUS 伺服器,可能與 Active Directory、Google Workspace 或 Purple 的身份管理整合。RADIUS 伺服器檢查憑證。如果相符,它不僅說「好的,讓他們進來」,還會傳回一則 RADIUS 存取接受訊息,其中包含特定的供應商中立屬性。 具體來說,它會傳送: Tunnel-Type 等於 VLAN(即值 13) Tunnel-Medium-Type 等於 IEEE-802(值 6) 至關重要的是 Tunnel-Private-Group-ID。這是實際的 VLAN 號碼。對於律師事務所,它可能傳回 VLAN 20。對於科技新創公司,則傳回 VLAN 30。 第四步:存取點收到此存取接受訊息,讀取 VLAN ID,並動態地將使用者流量直接放入該特定的 VLAN。 結果呢?律師事務所員工和科技新創公司員工連線到完全相同的存取點、相同的 SSID,但他們的流量在 Layer 2 上完全隔離。交換器處理它們的方式,就好像它們插在完全不同的實體網路上。 [轉場音效] 主持人:現在,讓我們談談實作建議以及您需要避免的陷阱。 首先,憑證管理。802.1X 高度依賴憑證。如果您使用 EAP-TLS(安全性的黃金標準),每個裝置都需要用戶端憑證。這非常安全,但操作負擔重。對於自帶裝置的環境,PEAP-MSCHAPv2 較為常見,它依賴伺服器端憑證和使用者憑證。但要小心:如果該伺服器憑證過期,您的整棟大樓都會離線。請為您的 RADIUS 憑證設定主動監控。 第二,交換器設定。您的邊緣交換器必須在通往存取點的上行連接埠上標記所有潛在的租戶 VLAN。如果 RADIUS 告訴 AP 將使用者放在 VLAN 40,但 VLAN 40 未在連接到 AP 的交換器連接埠上標記,流量就會掉入黑洞。使用者會成功認證,但無法透過 DHCP 取得 IP 位址。這是我們看到的第一大疑難排解工單。 第三,備援機制。如果 RADIUS 伺服器無法連線怎麼辦?您需要定義的「故障開放」或「故障關閉」策略。在多租戶辦公室中,出於安全考量,您通常會採用故障關閉。但對於訪客網路,您可能會故障開放到一個高度受限、僅限網際網路的 VLAN。 [轉場音效] 主持人:讓我們根據網路架構師的常見問題進行快速問答。 問題 1:我們可以將 MAC 認證旁路 (MAB) 與 802.1X 混合使用嗎? 答案:可以。對於不支援 802.1X 的物聯網裝置,例如智慧電視或印表機,您可以設定 RADIUS 伺服器根據 MAC 位址進行認證,並相應地指派 VLAN。但是,MAC 位址可以被偽造,因此請將這些裝置放在嚴格隔離的 VLAN 中。 問題 2:這是否支援漫遊? 答案:當然。當使用者從一樓的 AP 漫遊到二樓的 AP 時,可以使用 802.11r(快速 BSS 轉換)或 OKC(機會性金鑰快取)等協定快取認證,讓他們無縫地保持在指派的 VLAN 上,而無需完整的重新認證延遲。 問題 3:Purple 如何融入其中? 答案:Purple 可以作為身份提供者和策略引擎,簡化 RADIUS 整合,並在原始連線之上提供分析層,確保您能掌握多租戶空間的使用情況。 [轉場音效] 主持人:總結來說:動態 VLAN 指派可讓您將 RF 環境整合到單一 SSID,大幅減少同頻干擾和管理開銷。它使用 802.1X 和 RADIUS 來認證使用者,並將他們安全地放入專用的 Layer 2 區段。 您的下一步?稽核您目前的 SSID 數量。如果您在單一空域中廣播超過三或四個 SSID,那麼是時候架構動態 VLAN 解決方案了。確保您的交換器已正確設定中繼,並讓您的 RADIUS 伺服器設定為傳回那些至關重要的 Tunnel-Private-Group-ID 屬性。 感謝您收聽本技術簡報。持續建置安全、可擴展的網路。 [片尾音樂淡出]

header_image.png

Executive Summary

For IT managers and network architects overseeing multi-tenant buildings—such as commercial offices, retail complexes, or expansive hospitality venues—managing network segmentation is a critical challenge. Historically, isolating tenant traffic meant deploying separate physical infrastructure or broadcasting a unique SSID for every tenant. Both approaches are fundamentally flawed. Physical separation is cost-prohibitive and inflexible, while broadcasting multiple SSIDs severely degrades RF performance due to excessive management frame overhead.

Dynamic VLAN Assignment solves this by consolidating the wireless environment into a single, secure SSID. Leveraging IEEE 802.1X authentication and RADIUS, the network dynamically assigns users to their dedicated Virtual Local Area Network (VLAN) based on their identity, not the network they choose. This guide provides a comprehensive technical deep-dive into architecting, deploying, and troubleshooting dynamic VLAN assignment, ensuring secure Layer 2 isolation, compliance with standards like PCI DSS and GDPR, and a robust ROI for venue operators.

Technical Deep-Dive

The Problem with Multiple SSIDs

In a shared building, it is common to see dozens of SSIDs broadcasted (e.g., "TenantA_Corp", "TenantB_Secure", "Building_Guest"). Every SSID broadcasted by an Access Point (AP) must transmit beacon frames at the lowest mandatory data rate (typically 1 Mbps or 6 Mbps). As the number of SSIDs increases, the proportion of airtime consumed by management overhead grows exponentially, leaving less airtime for actual data transmission. This results in high latency, low throughput, and a poor user experience, regardless of the underlying internet connection speed.

The 802.1X and RADIUS Architecture

Dynamic VLAN Assignment shifts the segmentation logic from the RF layer to the authentication layer. It relies on the IEEE 802.1X standard for port-based network access control, integrated with a RADIUS (Remote Authentication Dial-In User Service) server.

The architecture consists of three primary components:

  1. Supplicant: The client device (laptop, smartphone) requesting network access.
  2. Authenticator: The network access device, typically the WiFi Access Point or wireless controller, which blocks traffic until authentication is successful.
  3. Authentication Server: The RADIUS server that validates credentials against an identity store (e.g., Active Directory, LDAP) and dictates network policies.

vlan_architecture_overview.png

The Authentication Flow

When a supplicant attempts to connect to the unified SSID, the following flow occurs:

  1. EAPOL Initialization: The supplicant connects to the AP. The AP blocks all traffic except Extensible Authentication Protocol over LAN (EAPOL) packets.
  2. RADIUS Access-Request: The AP encapsulates the EAP data and forwards it to the RADIUS server as an Access-Request.
  3. Credential Validation: The RADIUS server verifies the user's credentials (via EAP-TLS, PEAP, etc.).
  4. RADIUS Access-Accept: Upon successful validation, the RADIUS server responds with an Access-Accept message. Crucially, this message includes specific IETF standard RADIUS attributes that instruct the AP on which VLAN to assign the user.

The critical RADIUS attributes required for dynamic VLAN assignment are:

  • Tunnel-Type (64): Set to VLAN (Value 13)
  • Tunnel-Medium-Type (65): Set to 802 (Value 6)
  • Tunnel-Private-Group-ID (81): Set to the specific VLAN ID (e.g., "20" for Tenant A, "30" for Tenant B)

radius_auth_flow.png

Once the AP receives these attributes, it drops the user's traffic directly into the specified VLAN. The upstream network switches then handle the traffic as if the user were physically plugged into a dedicated port for that tenant, ensuring complete Layer 2 isolation.

Implementation Guide

Deploying dynamic VLAN assignment requires careful coordination between the wireless infrastructure, edge switches, and the identity provider. Follow this vendor-neutral implementation sequence.

Phase 1: Network Infrastructure Preparation

  1. VLAN Provisioning: Define and create the necessary VLANs on your core routing infrastructure and DHCP servers. Ensure each tenant VLAN has its own distinct subnet and appropriate routing policies (e.g., routing to the internet, but dropping inter-VLAN traffic).
  2. Switch Trunking: This is a critical step. The switch ports connecting to your Access Points must be configured as 802.1Q trunk ports. You must tag all potential tenant VLANs that the AP might need to assign. If the RADIUS server assigns VLAN 40, but VLAN 40 is not tagged on the switch port, the client will authenticate but fail to receive an IP address.
  3. AP Configuration: Configure the APs to broadcast a single 802.1X-enabled SSID (e.g., WPA3-Enterprise). Enable the specific setting on your wireless controller or APs that allows them to accept RADIUS override attributes (often labelled "AAA Override" or "Dynamic VLAN").

Phase 2: RADIUS and Identity Integration

  1. Identity Store Integration: Connect your RADIUS server to the directory service containing user identities and their tenant associations.
  2. Network Policy Creation: Create policies within the RADIUS server that map user groups to VLAN IDs. For example, a policy stating: If User belongs to Group 'Retail_Staff', return Tunnel-Private-Group-ID = 10.
  3. Certificate Management: If using EAP-TLS (recommended for corporate devices), deploy client certificates. If using PEAP-MSCHAPv2 (common for BYOD), ensure a valid, trusted server certificate is installed on the RADIUS server.

Phase 3: Testing and Phased Rollout

  1. Pilot Testing: Test with a small group of devices across different tenants. Verify that upon connection, the device receives an IP address from the correct subnet and cannot ping devices in other tenant VLANs.
  2. IoT and Headless Devices: For devices that do not support 802.1X (printers, smart TVs), implement MAC Authentication Bypass (MAB). The RADIUS server authenticates the device based on its MAC address and assigns the appropriate VLAN. Note: Place these devices in strictly isolated VLANs as MAC addresses can be spoofed.

Best Practices

  • Consolidate SSIDs: Aim for an absolute maximum of three SSIDs: one 802.1X SSID for all tenants, one for legacy IoT devices (using PSK or MAB), and one for Guest WiFi (using a captive portal).
  • Enforce Client Isolation: Within the guest network and untrusted tenant networks, enable Layer 2 client isolation at the AP level to prevent devices from communicating with each other, mitigating lateral movement risks.
  • Leverage Advanced Analytics: Integrate your authentication flow with a robust WiFi Analytics platform to gain visibility into venue utilisation, dwell times, and tenant network performance.
  • Standardise on WPA3: Where client support allows, mandate WPA3-Enterprise for the 802.1X SSID to ensure the highest level of encryption and protection against dictionary attacks.
  • Industry Context: Tailor the deployment to the vertical. In Retail environments, ensure POS systems are on a strictly isolated VLAN to maintain PCI DSS compliance. In Hospitality , ensure guest VLANs are completely separated from back-of-house operations.

Troubleshooting & Risk Mitigation

Common Failure Modes

  1. The "Authenticated but No IP" Scenario:

    • Symptom: The client connects, authentication succeeds, but the device self-assigns an APIPA address (169.254.x.x).
    • Root Cause: The RADIUS server assigned a VLAN, but that VLAN is either not created on the DHCP server, or more commonly, the VLAN is not tagged on the trunk port connecting the switch to the AP.
    • Fix: Verify 802.1Q trunk configurations on the edge switch.
  2. RADIUS Timeout / Unreachable:

    • Symptom: Clients are stuck on "Connecting..." or are repeatedly prompted for credentials.
    • Root Cause: The AP cannot reach the RADIUS server, or the RADIUS shared secret is mismatched between the AP and the server.
    • Fix: Verify network connectivity between the AP management IP and the RADIUS server. Double-check the shared secret.
  3. Certificate Expiration:

    • Symptom: Widespread sudden authentication failures for all users on PEAP or EAP-TLS.
    • Root Cause: The RADIUS server certificate has expired, causing clients to reject the connection.
    • Fix: Implement aggressive monitoring and alerting for RADIUS certificates. Renew certificates at least 30 days before expiration.

Risk Mitigation Strategies

  • Fail-Open vs. Fail-Closed: Define a clear policy for when the RADIUS server is unreachable. For tenant corporate networks, fail-closed (deny access) is necessary for security. For guest access, you might configure a fail-open policy that drops users into a highly restricted, internet-only "quarantine" VLAN.
  • Redundancy: Always deploy RADIUS servers in a highly available (HA) pair, preferably geographically distributed if supporting multiple sites.

ROI & Business Impact

Implementing dynamic VLAN assignment delivers significant, measurable business outcomes for venue operators:

  1. Reduced OpEx: Centralised management of a single SSID drastically reduces the IT overhead associated with provisioning, updating, and troubleshooting individual tenant networks.
  2. Optimised RF Spectrum: Eliminating SSID bloat reclaims valuable airtime. For a guide on managing spectrum, see our article on Wi Fi Frequencies: A Guide to Wi-Fi Frequencies in 2026 . This leads to higher throughput and fewer support tickets regarding "slow WiFi."
  3. Enhanced Security and Compliance: Strict Layer 2 isolation ensures that a compromise in one tenant's network does not spread to others. This is critical for meeting regulatory requirements like PCI DSS and GDPR.
  4. Scalability: Onboarding a new tenant requires zero changes to the physical infrastructure or wireless configuration; it is simply a matter of creating a new policy in the RADIUS server.

For more comprehensive strategies on designing networks for shared spaces, review our guide on Designing a Multi-Tenant WiFi Architecture for MDU .

關鍵定義

802.1X

一種用於基於連接埠的網路存取控制的 IEEE 標準,為希望連接到 LAN 或 WLAN 的裝置提供認證機制。

允許網路在授予存取權限之前要求身份的基本協定,從而實現動態策略。

RADIUS (Remote Authentication Dial-In User Service)

一種網路協定,為連接和使用網路服務的使用者提供集中的認證、授權和計費 (AAA) 管理。

驗證憑證並告訴網路應將哪個 VLAN 指派給使用者的決策引擎。

Supplicant

要求存取網路並提供憑證的用戶端裝置(例如筆記型電腦、智慧型手機)或軟體。

必須設定為支援 802.1X 的端點(例如,在 WiFi 設定中選擇 PEAP 或 EAP-TLS)。

Authenticator

促進認證過程的網路裝置(例如 WiFi 存取點或交換器),透過在請求者和認證伺服器之間轉送訊息。

直到 RADIUS 核准後才允許流量的守門員,然後套用指派的 VLAN。

EAP (Extensible Authentication Protocol)

一種常用於無線網路和點對點連線的認證框架,支援多種認證方法(例如 EAP-TLS、PEAP)。

請求者與 RADIUS 伺服器之間用於安全交換憑證的溝通語言。

MAB (MAC Authentication Bypass)

一種透過使用 MAC 位址作為憑證來認證不支援 802.1X 的裝置的技術。

用於在多租戶環境中引進傳統物聯網裝置、印表機或智慧電視。

Tunnel-Private-Group-ID

用於將 VLAN ID 從 RADIUS 伺服器傳輸到認證器的特定 RADIUS 屬性(屬性 81)。

實際決定使用者被放入哪個網路區段的關鍵資料。

Layer 2 Isolation

一種安全措施,可防止相同網路區段或 VLAN 上的裝置彼此直接通訊。

對於訪客網路和不受信任的租戶網路至關重要,可防止惡意軟體或未經授權存取的橫向移動。

範例

一個大型會議中心同時舉辦三場活動。活動 A 需要安全的企業存取,活動 B 需要對參加者開放存取,活動 C 需要存取特定的內部簡報伺服器。網路架構師應如何使用動態 VLAN 來部署?

架構師為員工和安全參加者設定一個 802.1X SSID,並為一般訪客設定一個單獨的開放式 SSID 搭配 captive portal

對於 802.1X SSID,RADIUS 伺服器設定三項策略:

  1. 如果使用者群組 = 'Event_A_Staff',指派 VLAN 100(網際網路 + 企業 VPN 存取)。
  2. 如果使用者群組 = 'Event_C_Presenters',指派 VLAN 102(網際網路 + 簡報伺服器存取)。

對於活動 B,參加者使用開放的訪客 SSID,這會將他們放入 VLAN 101(僅限網際網路,已啟用用戶端隔離)。

考官評語: 此方法可最小化 SSID 開銷,同時保持嚴格的安全邊界。透過運用與使用者群組相關聯的 RADIUS 策略,網路可動態適應每個活動的特定需求,無需手動重新設定 AP。

一家零售連鎖店經營一棟共享建築,內有一家咖啡廳、一家服飾店和一家藥局。藥局必須符合 HIPAA,服飾店則需要其無線 POS 終端符合 PCI DSS 合規性。如何保證隔離?

IT 團隊部署單一 WPA3-Enterprise SSID。

  1. 藥局員工透過 802.1X 進行認證,RADIUS 將他們指派到 VLAN 50,該 VLAN 具有嚴格的防火牆規則,防止存取任何其他內部子網路。
  2. 服飾店的 POS 終端使用 EAP-TLS(基於憑證)進行認證,並被指派到 VLAN 60。VLAN 60 直接路由到支付處理器閘道,並與所有其他流量隔離。
  3. 咖啡廳為顧客使用單獨的訪客 SSID,終止於 VLAN 70 並啟用用戶端隔離。
考官評語: 此架構成功地將受高度監管的流量(HIPAA、PCI DSS)與一般企業和訪客流量在共享實體基礎架構上進行分段。對 POS 終端使用 EAP-TLS 消除了對密碼的依賴,顯著增強了安全性。

練習題

Q1. 有租戶回報他們可以成功通過 802.1X SSID 認證,但他們的裝置自我指派 IP 位址 (169.254.x.x) 且無法連上網際網路。最可能的設定錯誤是什麼?

提示:想想存取點與核心網路服務之間的路徑。

查看標準答案

最可能的原因是 RADIUS 伺服器指派的 VLAN 未在連接邊緣交換器與存取點的 802.1Q 中繼連接埠上標記。AP 試圖將流量放入正確的 VLAN,但交換器因為未設定在該連接埠上接受它們而丟棄了幀。

Q2. 您正在為共享辦公空間設計多租戶網路。客戶希望為 15 個租戶各廣播唯一的 SSID,以「方便他們找到自己的網路」。您如何建議客戶?

提示:考慮管理幀開銷對 RF 效能的影響。

查看標準答案

強烈建議客戶不要採用這種方法。廣播 15 個 SSID 將消耗大量通話時間用於信標幀,嚴重降低網路效能、增加延遲並降低所有使用者的吞吐量。建議部署單一 802.1X SSID,並透過 RADIUS 使用動態 VLAN 指派在後端安全地隔離租戶。

Q3. 一棟多租戶建築需要為多個不支援 802.1X 請求者的無頭物聯網裝置(例如智慧恆溫器、數位看板)提供網路存取。如何將這些裝置安全地引導至正確的租戶 VLAN?

提示:考慮 RADIUS 支援的其他認證方法。

查看標準答案

實施 MAC 認證旁路 (MAB)。存取點會將裝置的 MAC 位址作為使用者名稱和密碼傳送到 RADIUS 伺服器。RADIUS 伺服器可以設定為識別這些特定的 MAC 位址,並返回適當的 VLAN ID。由於 MAC 位址可以被偽造,這些裝置應放置在嚴格隔離的 VLAN 中,並限制網路存取。