如何使用外部 AAA 服務器為 802.1x 配置動態 VLAN?

選項
Zyxel小編 Peter
Zyxel小編 Peter 文章數: 173  Zyxel Employee
First Anniversary 10 Comments Friend Collector First Answer
已編輯 五月 2022 無線網路 常見問題

當站點想要與 AP 連接時,您可以使用 AAA 服務器為您的網路提供訪問控制。在這個例子中,假設有兩個站點在不同的組中,它們可以連接到相同的 SSID 訪問 Internet,但由於動態 VLAN 設置而獲得不同子網中的 IP。動態 VLAN 設置有兩種方式。一種是使用radius服務器屬性,另一種是使用帶有radius或AD服務器的NXC控制器外部用戶組。該示例說明如何通過這兩種方式使用外部 AAA 服務器來設置動態 VLAN。


設定接口

1到CONFIGURATION > Network > Interface > VLAN, click vlan0 and Edit it


2通過在Member Configuration 選擇 no將ge1 (P1)設置為不是 vlan0 的成員。在IP 地址分配中設置gateway IP 。單擊確定保存。將ge1(P1)連接到USG的LAN



3  Switch連接NXC ge2(P2),AP都連接到Switch上。

4  在 NXC 中,轉至CONFIGURATION > Network > Interface > VLAN. Click Add to create a new VLAN configuration.


In General Settings, check Enable.In Interface Properties, key in Interface Name: vlan10; VID: 10在 Member Configuration 中,將 ge2 設置為MemberTx Tagging

在IP地址分配,使用固定IP地址和鑰匙IP地址子網遮罩gateway。

在 DHCP Setting 中,選擇DHCP server並輸入IP Pool Start AddressPool Size第一個 DNS 服務器更改為Customer Defined 8.8.8.8。VLAN 10 中的用戶從該 DHCP 服務器獲取 IP。單選“確定


Click Add to create vlan20 in CONFIGURATION > Network > Interface > VLAN.


7    In General Settings, check Enable.In Interface Properties, key in Interface Name: vlan20; VID: 20在 Member Configuration 中,將 ge2 設置為MemberTx Tagging

在IP地址分配,使用固定IP地址和鑰匙IP地址子網遮罩gateway。

在 DHCP Setting 中,選擇DHCP server並輸入IP Pool Start AddressPool Size第一個 DNS 服務器更改為Customer Defined 8.8.8.8。VLAN 20 中的用戶從該 DHCP 服務器獲得 IP。點選“確定


8 到 CONFIGURATION>Network>Interface>Ethernet, select ge1 and Edit it. Change the Interface Type to external and Get Automatically in IP Address Assignment.

9.進入CONFIGURATION > Network >Routing > Policy Route點選Show Advanced Settings後,在Next-Hop 選擇Interface ge1,在Address Translation 選擇Outgoing -interface


AP 設定

將 AP 配置文件配置為使用 802.1x 身份驗證,用戶在連接到 AP 的 SSID 時需要使用其 ID 和密碼登錄。轉至CONFIGURATION > Object > AP Profile > SSID > Security List, select the default AP profile and edit.

In General Settings, enter the Profile Name and change Security Mode to wpa2.

Radius Settings ,更改為Internal表示身份驗證需要 NXC 與外部Radius服務器通訊

In Authentication Settings, change to 802.1x and Auth. Method is default. Click OK.


1到 CONFIGURATION > Object > AP Profile > SSID > SSID List, and select the default AP profile and edit. Key in the Profile Name and SSID, and change Security Profile to default which is created in step1. Click OK to save.


2. CONFIGURATION > Object > AP Profile > SSID > SSID List, and select the default AP profile and edit. Key in the Profile Name and SSID, and change Security Profile to default which is created in step1. Click OK to save.


3.Go to CONFIGURATION > Wireless > AP Management > AP Group, select the default AP profile and edit. Select default in the SSID Profile #1 in both radio1 and radio2. Click OK to apply the settings.


註釋

AAA 服務器設定

Dynamic VLAN by radius server attribute

A. Radius 服務器上的設定

以下是使用 Windows 2008 服務器與 NPS 和 AD 服務器的示例。

將用戶添加到 AD 服務器中的組。


進入Member Of查看該成員Teacher是否已成功添加到群組中。


為組添加新的 NPS 服務器網絡策略,然後點選“下一步”。


4.添加“用戶組”條件。


5選擇 AD 服務器中設置的組。


6  設定訪問權限,然後點選“下一步”。


7 設定身份驗證方法並點選“下一步”。


8  需要添加三個屬性,Tunnel-Medium-Type、Tunnel-Pvt-Group-ID、Tunnel Type。設定屬性配置,然後點選“下一步”。




9執行相同的步驟為其他用戶創建另一個組。

10將策略上移到 NPS 的網絡策略中的頂部,以確保它是流量到來時第一個命中的策略。


B. NXC 控制器的設定

到CONFIGURATION > Object > AAA Server > RADIUS, click #1 radius, and then click Edit. Set the Server Address, and Authentication Port is 1812

Enter the Key for Radius server and click OK.


 CONFIGURATION > Object > Auth. Method, click #1 default, and then click Edit. Change the Method to group radius. Click OK to save.


主題: Dynamic VLAN by radius attribute

外部用戶組動態 VLAN

當用戶按外部用戶組使用動態VLAN時,支持radius和AD服務器。以下是設定這兩個服務器和 NXC 控制器的兩個示例。

A. Radius/AD 服務器上的設定

將用戶添加到 AD 服務器中的組。


2在 Member Of 中檢查用戶關於其組的屬性。


3.為組添加新的 NPS 服務器網絡策略,然後點選“下一步”。

 

4添加“用戶組”條件。


5.選擇 AD 服務器中設置的組。


6.設定訪問權限,然後點選“下一步”。


7 設定身份驗證方法,然後點選“下一步”。


添加Filter-ID 作為Teacher 需要三個屬性。



9  執行相同的步驟為其他用戶創建另一個組

B. NXC 控制器的設置

b1. 使用 Radius 服務器

進入CONFIGURATION > Object > AAA Server > RADIUS, click #1 radius, and then click Edit. Set the Server Address, and Authentication Port is 1812. Enter the Key for Radius server and click OK.


2到CONFIGURATION > Object > Auth. Method, click #1 default, and then click Edit. Change the Method to group radius. Click OK to save.



3. Configuration > Object > User/Group > User > Add/Edit

當用戶類型為“ext-group-user”時,在“Group Identifier”字段中設置相應的值,然後啟用並設置“User VLAN ID”選項。



B2. 使用 AD 服務器

進入CONFIGURATION > Object > AAA Server > Active Directory, click #1 ad, and then click Edit to configure AD server’s information.

2服務器設置中,輸入服務器地址。這里以172.51.31.112為例。轉到 AD 服務器以檢查基本 DN。這是在 Windows 服務器上檢查 Base DN 的示例,domain name > properties > Attribute Editor> distinguished Name > View.


3在服務器驗證中,輸入綁定 DN密碼。您可以在 AD 服務器中檢查綁定 DN。在 AD 服務器中,右鍵單擊管理員 > 屬性 > 屬性編輯器 > 專有名稱 > 查看。密碼是 AD 服務器中的管理員密碼。


4.Doman Authentication for MSChap ,選中Enable並輸入用戶名用戶密碼領域NetBIOS 名稱。Realm 是 AD 服務器的域名。


5.配置完成後,輸入管理員用戶名,然後點選測試配置驗證


6.到CONFIGURATION > Object > Auth. Method.。選擇默認方法,然後單擊Edit。選擇您創建的 AD 服務器。點選“確定


7. 進入 Configuration > Object > User/Group > User > Add/Edit

當用戶類型為“ext-group-user”時,在“Group Identifier”字段中設置相應的值,然後啟用並設置“User VLAN ID”選項。在radius server中有兩個Filter-ID,每個ext-group-user的'Group Identifier'和radius server的設置是一樣的。

組標識符是該組的在AD服務器的distinguishedName。


8為學生組設置另一個 ext-group-user 作為步驟 4。

測試結果

Dynamic VLAN by radius server attribute

使用手機連接SSID DyVlan。輸入VLAN 10組內的Username和Password,然後點擊Join連接AP。


已登錄的客戶端獲取 VLAN10 中的 IP。


用手機連接SSID DyVlan。輸入VLAN 20組中的用戶名和密碼,然後單擊加入與AP連接。


已登錄的客戶端獲取 VLAN20 中的 IP。


外部用戶組動態 VLAN

1使用手機連接SSID DyVlan。輸入VLAN 10組內的Username和Password,然後點擊Join連接AP。


已登錄的客戶端獲取 VLAN10 中的 IP。


用手機連接SSID DyVlan。輸入VLAN 20組中的用戶名和密碼,然後點選加入與AP連接。


已登錄的客戶端獲取 VLAN20 中的 IP。


什麼可能出錯

1在NXC控制器中設置動態VLAN時,radius服務器需要設置相應的VLAN組進行認證。

由於動態 VLAN 設置在 NXC 控制器中,因此它僅支持CONFIGURATION > Object > AP Profile > SSID > Security List中的 Radius 服務器類型“ Internal ”