配置無線Portal認證示例
組網需求
如圖1所示,現有網絡中AC連接Portal服務器和RADIUS服務器,并通過接入交換機連接管理AP。
由于無線網絡開放性的特點,若無線網絡不采取适當的安全策略,業務數據就存在安全風險。管理員要求如下:
· 用戶通過AC完成Portal認證。
· 使用RADIUS完成認證和計費。
· 用戶在未通過Portal認證前,隻能訪問Portal服務器。
· 用戶通過Portal認證後,可以正常訪問外部網絡。
圖1 配置無線Portal認證組網圖
配置思路
采用如下的思路在AC上配置。
1. 配置接入交換機、AC有線側和無線側接口,保證各個設備之間網絡互通。
2. 配置Portal認證時使用的RADIUS方案。
3. 創建Portal認證時使用的域,并在域中引用RADIUS方案作為AAA的認證方案。
4. 配置Portal服務器,并在用戶VLANIF下進行綁定。
5. 在AC上配置WLAN相關業務。
6. 業務下發至AP,用戶完成業務驗證。
說明:
本案例隻包括AC和交換機的配置,Portal服務器、RADIUS服務器的配置這裡不做相關說明。
操作步驟
1. 配置接入交換機
# 由交換機給AP管理報文打tag。
說明:
需要将所有二層交換機在AP管理VLAN和業務VLAN内的下行口上配置端口隔離,如果不配置端口隔離,可能會在VLAN内存在不必要的廣播報文,或者導緻不同AP間的WLAN用戶二層互通的問題。
端口隔離功能未開啟時,建議從接入交換機到AC之間的所有網絡設備的接口都配置undo port trunk allow-pass vlan 1,防止引起報文沖突,占用端口資源。
根據實際組網情況在接入交換機上行口配置業務VLAN透傳,和上行網絡設備互通。
<Quidway> system-view
[Quidway] vlan batch 101 800
[Quidway] interface ethernet 0/0/1
[Quidway-Ethernet0/0/1] port link-type trunk
[Quidway-Ethernet0/0/1] port trunk pvid vlan 800
[Quidway-Ethernet0/0/1] port trunk allow-pass vlan 101 800
[Quidway-Ethernet0/0/1] port-isolate enable
[Quidway-Ethernet0/0/1] quit
[Quidway] interface ethernet 0/0/2
[Quidway-Ethernet0/0/2] port link-type trunk
[Quidway-Ethernet0/0/2] port trunk allow-pass vlan 101 800
[Quidway-Ethernet0/0/2] quit
2. 分别配置AC連接接入交換機和連接上層服務器的端口。
3.<Huawei> system-view
4.[Huawei] sysname AC
5.[AC] Vlan batch 101 200 800
6.[AC] interface ethernet 2/0/0
7.[AC-Ethernet2/0/0] port link-type trunk
8.[AC-Ethernet2/0/0] port trunk allow-pass vlan 101 800
9.[AC-Ethernet2/0/0] quit
10. [AC] interface ethernet 2/0/1
11. [AC-Ethernet2/0/1] port link-type access
12. [AC-Ethernet2/0/1] port default vlan 200
13. [AC-Ethernet2/0/1] quit
14. 使能AC的DHCP服務器功能。同時配置Portal服務器的網關地址為VLANIF200。
# 配置AP管理VLAN為800,由VLANIF 800接口地址池為AP分配IP地址。
[AC] dhcp enable
[AC] vlan batch 101 200 800
[AC] interface vlanif 800
[AC-Vlanif800] ip address 192.168.10.1 24
[AC-Vlanif800] dhcp select interface
[AC-Vlanif800] quit
# 配置AP業務VLAN為101,由VLANIF 101接口地址池為STA分配IP地址。
[AC] interface vlanif 101
[AC-Vlanif101] ip address 192.168.20.1 24
[AC-Vlanif101] dhcp select interface
[AC-Vlanif101] quit
# 配置VLAN200,将VLANIF 200三層接口設置為WEB服務器的網關IP地址。
[AC] interface vlanif 200
[AC-Vlanif200] ip address 192.168.40.1 24
[AC-Vlanif200] quit
15. 配置RADIUS模闆。
# 包括配置RADIUS計費和認證服務器的IP地址和端口号,以及AC與RADIUS服務器交互報文時的共享密鑰。
[AC] radius-server template radius_huawei
[AC-radius-radius_huawei] radius-server authentication 192.168.40.2 1812
[AC-radius-radius_huawei] radius-server accounting 192.168.40.2 1813
[AC-radius-radius_huawei] radius-server shared-key cipher huawei
[AC-radius-radius_huawei] quit
16. 配置domain域。
# 為Portal用戶配置認證方案“radius_huawei”,使用RADIUS認證模式。
[AC] aaa
[AC-aaa] authentication-scheme radius_huawei
[AC-aaa-authen-radius_huawei] authentication-mode radius
[AC-aaa-authen-radius_huawei] quit
# 為Portal用戶配置計費方案“radius_huawei”,使用RADIUS計費模式。
[AC-aaa] accounting-scheme radius_huawei
[AC-aaa-accounting-radius_huawei] accounting-mode radius
[AC-aaa-accounting-radius_huawei] quit
# 為Portal用戶配置域“radius_huawei”,在域下應用認證方案“radius_huawei”,計費方案“radius_huawei”和RADIUS模闆“radius_huawei”。
[AC-aaa] domain radius_huawei
[AC-aaa-domain-radius_huawei] authentication-scheme radius_huawei
[AC-aaa-domain-radius_huawei] accounting-scheme radius_huawei
[AC-aaa-domain-radius_huawei] radius-server radius_huawei
[AC-aaa-domain-radius_huawei] quit
[AC-aaa] quit
# 測試用戶是否能夠通過RADIUS模闆的認證。(已在RADIUS服務器上配置了測試用戶test@radius_huawei,用戶密碼123456)
[AC] test-aaa test@radius_huawei 123456 radius-template radius_huawei
Info: Account test succeed.
17. 配置Portal服務器。
# 包括配置Portal服務器的IP地址192.168.40.3,Portal認證服務器用來接收AC發送的通知報文的端口号50100,AC與Portal服務器交互報文時的共享密鑰以及HTTP重定向對應的URL為http://192.168.40.3。
[AC] web-auth-server test
[AC-web-auth-server-test] server-ip 192.168.40.3
[AC-web-auth-server-test] port 50100
[AC-web-auth-server-test] shared-key cipher huawei
[AC-web-auth-server-test] url http://192.168.40.3
[AC-web-auth-server-test] quit
# 在業務VLAN 101下綁定Portal服務器。
[AC] interface vlanif 101
[AC-Vlanif101] web-auth-server test direct
[AC-Vlanif101] quit
18. 配置運營商标識和AC ID。
19. [AC] wlan ac-global carrier id other ac id 1
20. [AC] wlan ac-global country-code cn
21. 配置AC的源IP地址,使AP與AC之間互通。
22. [AC] wlan ac
[AC-wlan-view] wlan ac source interface vlanif 800
23. 配置AP上線。
24. [AC-wlan-view] ap-auth-mode mac-auth
# 查詢AP的設備類型
[AC-wlan-view] display ap-type all
All AP types information:
------------------------------------------------------------------------------
ID Type
------------------------------------------------------------------------------
0 WA601
1 WA631
2 WA651
3 WA602
4 WA632
5 WA652
6 WA603SN
7 WA603DN
8 WA633SN
11 WA603DE
12 WA653DE
14 WA653SN
17 AP6010SN-GN
18 WA615DN-AGN
19 AP6010DN-AGN
20 WA635SN-GN
21 AP6310SN-GN
22 WA655DN-AGN
23 AP6510DN-AGN
25 AP6610DN-AGN
27 AP7110SN-GN
28 AP7110DN-AGN
29 AP5010SN-GN
30 AP5010DN-AGN
31 AP3010DN-AGN
------------------------------------------------------------------------------
Total number: 25
# 根據查詢到的AP設備類型ID(WA603SN type-id為6),離線添加AP
[AC-wlan-view] ap id 0 type-id 6 mac 286e-d42b-0ce5
[AC-wlan-ap-1] quit
# 查看AP的上線狀态
[AC-wlan-view] display ap all
All AP information(Normal-1,UnNormal-0):
------------------------------------------------------------------------------
AP AP AP Profile AP AP
/Region
ID Type MAC ID State Sysname
------------------------------------------------------------------------------
1 WA603SN 286e-d42b-0ce5 0/0 normal ap-1
------------------------------------------------------------------------------
Total number: 1
25. 将AP加入指定域。
26. [AC-wlan-view] ap-region id 5
27. [AC-wlan-ap-region-5] quit
28. [AC-wlan-view] ap id 1
29. [AC-wlan-ap-1] region-id 5
30. [AC-wlan-ap-1] quit
[AC-wlan-view] quit
31. 配置WLAN-ESS虛接口,并使能Portal認證功能。
32. [AC] interface wlan-ess 1
33. [AC-Wlan-Ess1] port hybrid pvid vlan 101
34. [AC-Wlan-Ess1] port hybrid tagged vlan 101
35. [AC-Wlan-Ess1] web-authentication enable
36. [AC-Wlan-Ess1] force-domain name radius_huawei
37. [AC-Wlan-Ess1] permit-domain name radius_huawei
38. [AC-Wlan-Ess1] quit
39. 創建WMM模闆和射頻模闆,并在射頻模闆上綁定WMM模闆。
40. [AC] wlan ac
41. [AC-wlan-view] wmm-profile name huawei
42. [AC-wlan-wmm-prof-huawei] quit
43. [AC-wlan-view] radio-profile name huawei
44. [AC-wlan-radio-prof-huawei] wmm-profile name huawei
45. [AC-wlan-radio-prof-huawei] quit
46. 配置流量模闆、安全模闆(安全策略為SHARE-KEY WEP加密)和服務集,并在服務集上綁定流量模闆、WLAN-ESS接口、安全模闆。
47. [AC-wlan-view] traffic-profile name huawei
48. [AC-wlan-traffic-prof-huawei] quit
49. [AC-wlan-view] security-profile name huawei
50. [AC-wlan-sec-prof-huawei] security-policy wep
51. [AC-wlan-sec-prof-huawei] wep authentication-method share-key
52. [AC-wlan-sec-prof-huawei] wep key wep-40 pass-phrase 0 cipher 12345
53. [AC-wlan-sec-prof-huawei] quit
54. [AC-wlan-view] service-set name huawei
55. [AC-wlan--service-set-huawei] wlan-ess 1
56. [AC-wlan--service-set-huawei] ssid huawei-portal-test
57. [AC-wlan--service-set-huawei] traffic-profile name huawei
58. [AC-wlan--service-set-huawei] security-profile name huawei
59. [AC-wlan--service-set-huawei] service-vlan 101
60. [AC-wlan--service-set-huawei] quit
61. 創建VAP。
62. [AC-wlan-view] ap 1 radio 0
63. [AC-wlan-radio-0/0] radio-profile name huawei
64. Warning: Modify the Radio type may cause some parameters of Radio resume defaul
65. t value, are you sure to continue?[Y/N]: y
66. [AC-wlan-radio-0/0] service-set name huawei
67. [AC-wlan-radio-0/0] quit
68. [AC-wlan-view] commit ap 1
69. Warning: Committing configuration may cause service interruption,continue?[Y/N
] y
70. 驗證配置結果
AP下的無線接入用戶可以搜索到SSID标識為huawei-portal-test的WLAN網絡并正常上線。
配置文件
· 接入交換機的配置文件
· #
· vlan batch 101 800
· #
· interface Ethernet0/0/1
· port link-type trunk
· port trunk pvid vlan 800
· port trunk allow-pass vlan 101 800
· port-isolate enable
· #
· interface Ethernet0/0/2
· port link-type trunk
· port trunk allow-pass vlan 101 800
· #
return
· AC的配置文件
· #
· sysname AC
· #
· vlan batch 101 800
· #
· dhcp enable
· #
· radius-server template radius_huawei
· radius-server authentication 192.168.40.2 1812
· radius-server accounting 192.168.40.2 1813
· radius-server shared-key cipher %@%@K$iX-]ya{OKh0#3<n~w>(suv%@%@
· #
· web-auth-server test
· server-ip 192.168.40.3
· port 50100
· shared-key cipher %@%@,Y]iF/1C"6]W:M DKT]H(t$f%@%@
· url http://192.168.40.3
· #
· aaa
· authentication-scheme radius_huawei
· authentication-mode radius
· accounting-scheme radius_huawei
· accounting-mode radius
· domain radius_huawei
· authentication-scheme radius_huawei
· accounting-scheme radius_huawei
· radius-server radius_huawei
· #
· wlan ac-global carrier id other ac id 1
· #
· interface Vlanif101
· ip address 192.168.20.1 255.255.255.0
· web-auth-server test direct
· dhcp select interface
· #
· interface Vlanif200
· ip address 192.168.40.1 255.255.255.0
· #
· interface Vlanif800
· ip address 192.168.10.1 255.255.255.0
· dhcp select interface
· #
· interface Wlan-Ess0
· port hybrid tagged vlan 101
· web-authentication enable
· force-domain name radius_huawei
· permit-domain name radius_huawei
· #
· interface Ethernet2/0/0
· port link-type trunk
· port trunk allow-pass vlan 101 800
· #
· interface Ethernet2/0/1
· port link-type access
· port default vlan 200
· #
· wlan ac
· wlan ac source interface vlanif800
· ap-region id 5
· ap id 1 type-id 6 mac 286e-d42b-0ce5 sn AB34002078
· region-id 5
· wmm-profile name huawei id 0
· traffic-profile name huawei id 0
· security-profile name huawei id 0
· wep authentication-method share-key
· wep key wep-40 pass-phrase 0 cipher %@%@kBq"3.ePZ tk@TWwHC`((}K}%@%@
· service-set name huawei id 0
· wlan-ess 1
· ssid huawei-portal-test
· traffic-profile id 0
· security-profile id 0
· service-vlan 101
· radio-profile name huawei-ap id 0
· wmm-profile id 0
· ap 1 radio 0
· radio-profile id 0
· service-set id 0 wlan 1
· #
return
歡迎對IT感興趣的小夥伴來交流,我們創建了一個分享交流群,裡面不僅可以了解到最新IT行業資訊,還有更多大神現場分享知識。趕快抓緊上車!
,更多精彩资讯请关注tft每日頭條,我们将持续为您更新最新资讯!