1 配置 AP 获取 IP 地址
1.1 需求
1)企业的 “无线网络” 改造,使用 “旁挂式” 组网,确保可扩展性
2)无线控制器(AC)连接在核心交换机上,属于 VLAN 200
3)AP 连接在汇聚层交换机上,AP 的管理 IP 地址属于 VLAN 100
4)企业内网中存在 4 个 VLAN,分别服务于内网员工和外部人员
5)AP 的网关以及所有无线用户的终端的网关,都配置在核心交换机
6)AP 和无线用户终端的 IP 地址都是通过 DHCP 的方式获得
7)最终确保连接到不同 AP 的无线终端之间可以互通
1.2 方案
搭建实验环境,如图 - 1 所示。

图 - 1
1.3 步骤
实现此案例需要按照如下步骤进行。
1)配置 SW1
1. \[SW1\]vlan 1002. \[SW1-vlan100\]quit4. \[SW1\]port-group group-member gi0/0/1 to gi0/0/45. \[SW1-port-group\]port link-type trunk6. \[SW1-port-group\]port trunk allow-pass vlan all7. \[SW1-port-group\]port trunk pvid vlan 1008. \[SW1-port-group\]quit10. \[SW1\]interface gi0/0/1211. \[SW1-GigabitEthernet0/0/12\]port link-type trunk12. \[SW1-GigabitEthernet0/0/12\]port trunk allow-pass vlan all13. \[SW1-GigabitEthernet0/0/12\]quit
2)配置 DHCP 中继(SW2)
1. \[SW2\]vlan batch 100 2103. \[SW2\]interface gi0/0/124. \[SW2-GigabitEthernet0/0/12\]port link-type trunk5. \[SW2-GigabitEthernet0/0/12\]port trunk allow-pass vlan all6. \[SW2-GigabitEthernet0/0/12\]quit8. \[SW2\]interface GigabitEthernet 0/0/119. \[SW2-GigabitEthernet0/0/11\]port link-type access10. \[SW2-GigabitEthernet0/0/11\]port default vlan 21011. \[SW2-GigabitEthernet0/0/11\]quit13. \[SW2\]dhcp enable15. \[SW2\]interface Vlanif 10016. \[SW2-Vlanif100\]ip address 192.168.100.254 2417. \[SW2-Vlanif100\]dhcp select relay18. \[SW2-Vlanif100\]dhcp relay server-ip 192.168.210.119. \[SW2-Vlanif100\]quit21. \[SW2\]interface Vlanif 21022. \[SW2-Vlanif210\]ip address 192.168.210.254 2423. \[SW2-Vlanif210\]quit
3)配置 DHCP 服务器
1. \[DHCP\]dhcp enable3. \[DHCP\]ip pool VLAN1004. \[DHCP-ip-pool-VLAN100\]network 192.168.100.0 mask 245. \[DHCP-ip-pool-VLAN100\]gateway-list 192.168.100.2546. \[DHCP-ip-pool-VLAN100\]quit8. \[DHCP\]interface GigabitEthernet 0/0/19. \[DHCP-GigabitEthernet0/0/1\]ip address 192.168.210.1 2410. \[DHCP-GigabitEthernet0/0/1\]dhcp select global11. \[DHCP-GigabitEthernet0/0/1\]quit13. \[DHCP\]ip route-static 192.168.0.0 16 192.168.210.254
2 实现 AP 自动注册
2.1 需求
1)企业内网的大量 AP 已经通过 DHCP 的方式获得 IP 地址
2)为了实现后期大量 AP 的统一管理,希望通过 AC 实现集中控制
3)在 AC 设备上,为了便于设备管理,按照统一的命名格式
2.2 方案
搭建实验环境,如图 - 2 所示。

图 - 2
2.3 步骤
实现此案例需要按照如下步骤进行。
1)配置 DHCP 服务器,为 AP 分配 AC 服务器的 IP 地址
1. \[DHCP\]ip pool VLAN1002. \[DHCP-ip-pool-VLAN100\]option 43 sub-option 3 ascii 192.168.200.13. \[DHCP-ip-pool-VLAN100\]quit
2)配置网关,实现 AC 和 AP 互通
1. \[SW2\]vlan 1002. \[SW2-vlan100\]quit4. \[SW2\]interface GigabitEthernet 0/0/105. \[SW2-GigabitEthernet0/0/10\]port link-type access6. \[SW2-GigabitEthernet0/0/10\]port default vlan 2007. \[SW2-GigabitEthernet0/0/10\]quit9. \[SW2\]interface Vlanif 20010. \[SW2-Vlanif200\]ip address 192.168.200.254 2411. \[SW2-Vlanif200\]quit13. \[AC6605\]vlan 20014. \[AC6605-vlan200\]quit16. \[AC6605\]interface GigabitEthernet 0/0/1017. \[AC6605-GigabitEthernet0/0/10\]port link-type access18. \[AC6605-GigabitEthernet0/0/10\]port default vlan 20019. \[AC6605-GigabitEthernet0/0/10\]quit21. \[AC6605\]interface Vlanif 20022. \[AC6605-Vlanif200\]ip address 192.168.200.1 2423. \[AC6605-Vlanif200\]quit25. \[AC6605\]ip route-static 0.0.0.0 0 192.168.200.254
3)配置 AC,离线导入 AP,实现 AP 注册
1. \[AC6605\]wlan3. \[AC6605-wlan-view\]ap-group name wailai4. \[AC6605-wlan-ap-group-wailai\]quit6. \[AC6605-wlan-view\]ap-group name neibu7. \[AC6605-wlan-ap-group-neibu\]quit9. \[AC6605-wlan-view\]regulatory-domain-profile name China10. \[AC6605-wlan-regulate-domain-China\]country-code CN11. \[AC6605-wlan-regulate-domain-China\]quit13. \[AC6605-wlan-view\]ap-group name wailai14. \[AC6605-wlan-ap-group-wailai\]regulatory-domain-profile China15. Warning: Modifying the country code will clear channel, power and antenna gain c16. onfigurations of the radio and reset the AP. Continue?\[Y/N\]:y17. \[AC6605-wlan-ap-group-wailai\]quit19. \[AC6605-wlan-view\]ap-group name neibu20. \[AC6605-wlan-ap-group-neibu\]regulatory-domain-profile China21. Warning: Modifying the country code will clear channel, power and antenna gain c22. onfigurations of the radio and reset the AP. Continue?\[Y/N\]:y23. \[AC6605-wlan-ap-group-neibu\]quit25. \[AC6605-wlan-view\]ap auth-mode mac-auth26. \[AC6605-wlan-view\]ap-id 1 ap-mac 00e0-fc9d-158027. \[AC6605-wlan-ap-1\]ap-name wailai-128. \[AC6605-wlan-ap-1\]ap-group wailai29. Warning: This operation may cause AP reset. If the country code changes, it will30. clear channel, power and antenna gain configurations of the radio, Whether to c31. ontinue? \[Y/N\]:y32. \[AC6605-wlan-ap-1\]quit34. \[AC6605-wlan-view\]ap-id 2 ap-mac 00e0-fc60-4c7035. \[AC6605-wlan-ap-2\]ap-name wailai-236. \[AC6605-wlan-ap-2\]ap-group wailai37. Warning: This operation may cause AP reset. If the country code changes, it will38. clear channel, power and antenna gain configurations of the radio, Whether to c39. ontinue? \[Y/N\]:y40. \[AC6605-wlan-ap-2\]quit42. \[AC6605-wlan-view\]ap-id 3 ap-mac 00e0-fc56-632043. \[AC6605-wlan-ap-3\]ap-name neibu-144. \[AC6605-wlan-ap-3\]ap-group neibu45. Warning: This operation may cause AP reset. If the country code changes, it will46. clear channel, power and antenna gain configurations of the radio, Whether to c47. ontinue? \[Y/N\]:y48. \[AC6605-wlan-ap-3\]quit50. \[AC6605-wlan-view\]ap-id 4 ap-mac 00e0-fc4e-2fd051. \[AC6605-wlan-ap-4\]ap-name neibu-252. \[AC6605-wlan-ap-4\]ap-group neibu53. Warning: This operation may cause AP reset. If the country code changes, it will54. clear channel, power and antenna gain configurations of the radio, Whether to c55. ontinue? \[Y/N\]:y56. \[AC6605-wlan-ap-4\]quit58. \[AC6605\]capwap source interface Vlanif 200
3 配置 WLAN 业务参数
3.1 需求
1)基于分配好的 IP 方案,为不同的无线终端,动态分配 IP 地址
2)配置 AC,为不同的 AP 下发不同的配置,确保可以发射无线信号
3)实现不同的 “无线终端” 可以成功连接 AP ,并成功获得 IP 地址
4)实现不同的 “无线终端” 之间的互通
3.2 方案
搭建实验环境,如图 - 3 所示。

图 - 3
3.3 步骤
实现此案例需要按照如下步骤进行。
1)配置 AC 上的相关业务参数
1. \[AC6605\]vlan pool wailai2. \[AC6605-vlan-pool-wailai\]vlan 101 1023. \[AC6605-vlan-pool-wailai\]quit5. \[AC6605\]vlan pool neibu6. \[AC6605-vlan-pool-neibu\]vlan 103 1047. \[AC6605-vlan-pool-neibu\]quit9. \[AC6605\]wlan10. \[AC6605-wlan-view\]security-profile name wailai11. \[AC6605-wlan-sec-prof-wailai\]security wpa2 psk pass-phrase a123456789 aes12. \[AC6605-wlan-sec-prof-wailai\]quit14. \[AC6605-wlan-view\]security-profile name neibu15. \[AC6605-wlan-sec-prof-neibu\]security wpa2 psk pass-phrase b123456789 aes16. \[AC6605-wlan-sec-prof-neibu\]quit18. \[AC6605-wlan-view\]ssid-profile name wailai19. \[AC6605-wlan-ssid-prof-wailai\]ssid wailai20. \[AC6605-wlan-ssid-prof-wailai\]quit22. \[AC6605-wlan-view\]ssid-profile name neibu23. \[AC6605-wlan-ssid-prof-neibu\]ssid neibu24. \[AC6605-wlan-ssid-prof-neibu\]quit25. \[AC6605-wlan-view\]quit27. \[AC6605-wlan-view\]vap-profile name wailai28. \[AC6605-wlan-vap-prof-wailai\]security-profile wailai29. \[AC6605-wlan-vap-prof-wailai\]ssid-profile wailai30. \[AC6605-wlan-vap-prof-wailai\]service-vlan vlan-pool wailai31. \[AC6605-wlan-vap-prof-wailai\]quit33. \[AC6605-wlan-view\]vap-profile name neibu34. \[AC6605-wlan-vap-prof-neibu\]security-profile neibu35. \[AC6605-wlan-vap-prof-neibu\]ssid-profile neibu36. \[AC6605-wlan-vap-prof-neibu\]service-vlan vlan-pool neibu37. \[AC6605-wlan-vap-prof-neibu\]quit39. \[AC6605-wlan-view\]ap-group name wailai40. \[AC6605-wlan-ap-group-wailai\]vap-profile wailai wlan 1 radio 041. \[AC6605-wlan-ap-group-wailai\]vap-profile wailai wlan 1 radio 142. \[AC6605-wlan-ap-group-wailai\]quit44. \[AC6605-wlan-view\]ap-group name neibu45. \[AC6605-wlan-ap-group-neibu\]vap-profile neibu wlan 1 radio 046. \[AC6605-wlan-ap-group-neibu\]vap-profile neibu wlan 1 radio 147. \[AC6605-wlan-ap-group-neibu\]quit48. \[AC6605-wlan-view\]quit
2)配置 DHCP 服务器,为无线终端用户分配 IP 地址
1. \[DHCP\]ip pool VLAN1012. \[DHCP-ip-pool-VLAN101\]network 192.168.101.0 mask 243. \[DHCP-ip-pool-VLAN101\]gateway-list 192.168.101.2544. \[DHCP-ip-pool-VLAN101\]dns-list 8.8.8.85. \[DHCP-ip-pool-VLAN101\]quit7. \[DHCP\]ip pool VLAN1028. \[DHCP-ip-pool-VLAN102\]network 192.168.102.0 mask 249. \[DHCP-ip-pool-VLAN102\]gateway-list 192.168.102.25410. \[DHCP-ip-pool-VLAN102\]dns-list 8.8.8.811. \[DHCP-ip-pool-VLAN102\]quit13. \[DHCP\]ip pool VLAN10314. \[DHCP-ip-pool-VLAN103\]network 192.168.103.0 mask 2415. \[DHCP-ip-pool-VLAN103\]gateway-list 192.168.103.25416. \[DHCP-ip-pool-VLAN103\]dns-list 8.8.8.817. \[DHCP-ip-pool-VLAN103\]quit19. \[DHCP\]ip pool VLAN10420. \[DHCP-ip-pool-VLAN104\]network 192.168.104.0 mask 2421. \[DHCP-ip-pool-VLAN104\]gateway-list 192.168.104.25422. \[DHCP-ip-pool-VLAN104\]dns-list 8.8.8.823. \[DHCP-ip-pool-VLAN104\]quit
3)配置 DHCP 中继(SW2)
1. \[SW2\]vlan batch 101 102 103 1043. \[SW2\]interface Vlanif 1014. \[SW2-Vlanif101\]ip address 192.168.101.254 245. \[SW2-Vlanif101\]dhcp select relay6. \[SW2-Vlanif101\]dhcp relay server-ip 192.168.210.17. \[SW2-Vlanif101\]quit9. \[SW2\]interface Vlanif 10210. \[SW2-Vlanif102\]ip address 192.168.102.254 2411. \[SW2-Vlanif102\]dhcp select relay12. \[SW2-Vlanif102\]dhcp relay server-ip 192.168.210.113. \[SW2-Vlanif102\]quit15. \[SW2\]interface Vlanif 10316. \[SW2-Vlanif103\]ip address 192.168.103.254 2417. \[SW2-Vlanif103\]dhcp select relay18. \[SW2-Vlanif103\]dhcp relay server-ip 192.168.210.119. \[SW2-Vlanif103\]quit21. \[SW2\]interface Vlanif 10422. \[SW2-Vlanif104\]ip address 192.168.104.254 2423. \[SW2-Vlanif104\]dhcp select relay24. \[SW2-Vlanif104\]dhcp relay server-ip 192.168.210.125. \[SW2-Vlanif104\]quit
4)配置 SW1,确保无线终端可以通过 SW1 与 网关(SW2)互通
1. \[SW1\]vlan batch 101 102 103 104
https://tts.tmooc.cn/ttsPage/NTD/NTDTN202109/TCNE/DAY06/CASE/01/index.html
