Top

  1. 配置 AP 获取 IP 地址
  2. 实现 AP 自动注册
  3. 配置 WLAN 业务参数

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 所示。

CASE - 图1

图 - 1

1.3 步骤

实现此案例需要按照如下步骤进行。

1)配置 SW1

  1. 1. \[SW1\]vlan 100
  2. 2. \[SW1-vlan100\]quit
  3. 4. \[SW1\]port-group group-member gi0/0/1 to gi0/0/4
  4. 5. \[SW1-port-group\]port link-type trunk
  5. 6. \[SW1-port-group\]port trunk allow-pass vlan all
  6. 7. \[SW1-port-group\]port trunk pvid vlan 100
  7. 8. \[SW1-port-group\]quit
  8. 10. \[SW1\]interface gi0/0/12
  9. 11. \[SW1-GigabitEthernet0/0/12\]port link-type trunk
  10. 12. \[SW1-GigabitEthernet0/0/12\]port trunk allow-pass vlan all
  11. 13. \[SW1-GigabitEthernet0/0/12\]quit

2)配置 DHCP 中继(SW2)

  1. 1. \[SW2\]vlan batch 100 210
  2. 3. \[SW2\]interface gi0/0/12
  3. 4. \[SW2-GigabitEthernet0/0/12\]port link-type trunk
  4. 5. \[SW2-GigabitEthernet0/0/12\]port trunk allow-pass vlan all
  5. 6. \[SW2-GigabitEthernet0/0/12\]quit
  6. 8. \[SW2\]interface GigabitEthernet 0/0/11
  7. 9. \[SW2-GigabitEthernet0/0/11\]port link-type access
  8. 10. \[SW2-GigabitEthernet0/0/11\]port default vlan 210
  9. 11. \[SW2-GigabitEthernet0/0/11\]quit
  10. 13. \[SW2\]dhcp enable
  11. 15. \[SW2\]interface Vlanif 100
  12. 16. \[SW2-Vlanif100\]ip address 192.168.100.254 24
  13. 17. \[SW2-Vlanif100\]dhcp select relay
  14. 18. \[SW2-Vlanif100\]dhcp relay server-ip 192.168.210.1
  15. 19. \[SW2-Vlanif100\]quit
  16. 21. \[SW2\]interface Vlanif 210
  17. 22. \[SW2-Vlanif210\]ip address 192.168.210.254 24
  18. 23. \[SW2-Vlanif210\]quit

3)配置 DHCP 服务器

  1. 1. \[DHCP\]dhcp enable
  2. 3. \[DHCP\]ip pool VLAN100
  3. 4. \[DHCP-ip-pool-VLAN100\]network 192.168.100.0 mask 24
  4. 5. \[DHCP-ip-pool-VLAN100\]gateway-list 192.168.100.254
  5. 6. \[DHCP-ip-pool-VLAN100\]quit
  6. 8. \[DHCP\]interface GigabitEthernet 0/0/1
  7. 9. \[DHCP-GigabitEthernet0/0/1\]ip address 192.168.210.1 24
  8. 10. \[DHCP-GigabitEthernet0/0/1\]dhcp select global
  9. 11. \[DHCP-GigabitEthernet0/0/1\]quit
  10. 13. \[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 所示。

CASE - 图2

图 - 2

2.3 步骤

实现此案例需要按照如下步骤进行。

1)配置 DHCP 服务器,为 AP 分配 AC 服务器的 IP 地址

  1. 1. \[DHCP\]ip pool VLAN100
  2. 2. \[DHCP-ip-pool-VLAN100\]option 43 sub-option 3 ascii 192.168.200.1
  3. 3. \[DHCP-ip-pool-VLAN100\]quit

2)配置网关,实现 AC 和 AP 互通

  1. 1. \[SW2\]vlan 100
  2. 2. \[SW2-vlan100\]quit
  3. 4. \[SW2\]interface GigabitEthernet 0/0/10
  4. 5. \[SW2-GigabitEthernet0/0/10\]port link-type access
  5. 6. \[SW2-GigabitEthernet0/0/10\]port default vlan 200
  6. 7. \[SW2-GigabitEthernet0/0/10\]quit
  7. 9. \[SW2\]interface Vlanif 200
  8. 10. \[SW2-Vlanif200\]ip address 192.168.200.254 24
  9. 11. \[SW2-Vlanif200\]quit
  10. 13. \[AC6605\]vlan 200
  11. 14. \[AC6605-vlan200\]quit
  12. 16. \[AC6605\]interface GigabitEthernet 0/0/10
  13. 17. \[AC6605-GigabitEthernet0/0/10\]port link-type access
  14. 18. \[AC6605-GigabitEthernet0/0/10\]port default vlan 200
  15. 19. \[AC6605-GigabitEthernet0/0/10\]quit
  16. 21. \[AC6605\]interface Vlanif 200
  17. 22. \[AC6605-Vlanif200\]ip address 192.168.200.1 24
  18. 23. \[AC6605-Vlanif200\]quit
  19. 25. \[AC6605\]ip route-static 0.0.0.0 0 192.168.200.254

3)配置 AC,离线导入 AP,实现 AP 注册

  1. 1. \[AC6605\]wlan
  2. 3. \[AC6605-wlan-view\]ap-group name wailai
  3. 4. \[AC6605-wlan-ap-group-wailai\]quit
  4. 6. \[AC6605-wlan-view\]ap-group name neibu
  5. 7. \[AC6605-wlan-ap-group-neibu\]quit
  6. 9. \[AC6605-wlan-view\]regulatory-domain-profile name China
  7. 10. \[AC6605-wlan-regulate-domain-China\]country-code CN
  8. 11. \[AC6605-wlan-regulate-domain-China\]quit
  9. 13. \[AC6605-wlan-view\]ap-group name wailai
  10. 14. \[AC6605-wlan-ap-group-wailai\]regulatory-domain-profile China
  11. 15. Warning: Modifying the country code will clear channel, power and antenna gain c
  12. 16. onfigurations of the radio and reset the AP. Continue?\[Y/N\]:y
  13. 17. \[AC6605-wlan-ap-group-wailai\]quit
  14. 19. \[AC6605-wlan-view\]ap-group name neibu
  15. 20. \[AC6605-wlan-ap-group-neibu\]regulatory-domain-profile China
  16. 21. Warning: Modifying the country code will clear channel, power and antenna gain c
  17. 22. onfigurations of the radio and reset the AP. Continue?\[Y/N\]:y
  18. 23. \[AC6605-wlan-ap-group-neibu\]quit
  19. 25. \[AC6605-wlan-view\]ap auth-mode mac-auth
  20. 26. \[AC6605-wlan-view\]ap-id 1 ap-mac 00e0-fc9d-1580
  21. 27. \[AC6605-wlan-ap-1\]ap-name wailai-1
  22. 28. \[AC6605-wlan-ap-1\]ap-group wailai
  23. 29. Warning: This operation may cause AP reset. If the country code changes, it will
  24. 30. clear channel, power and antenna gain configurations of the radio, Whether to c
  25. 31. ontinue? \[Y/N\]:y
  26. 32. \[AC6605-wlan-ap-1\]quit
  27. 34. \[AC6605-wlan-view\]ap-id 2 ap-mac 00e0-fc60-4c70
  28. 35. \[AC6605-wlan-ap-2\]ap-name wailai-2
  29. 36. \[AC6605-wlan-ap-2\]ap-group wailai
  30. 37. Warning: This operation may cause AP reset. If the country code changes, it will
  31. 38. clear channel, power and antenna gain configurations of the radio, Whether to c
  32. 39. ontinue? \[Y/N\]:y
  33. 40. \[AC6605-wlan-ap-2\]quit
  34. 42. \[AC6605-wlan-view\]ap-id 3 ap-mac 00e0-fc56-6320
  35. 43. \[AC6605-wlan-ap-3\]ap-name neibu-1
  36. 44. \[AC6605-wlan-ap-3\]ap-group neibu
  37. 45. Warning: This operation may cause AP reset. If the country code changes, it will
  38. 46. clear channel, power and antenna gain configurations of the radio, Whether to c
  39. 47. ontinue? \[Y/N\]:y
  40. 48. \[AC6605-wlan-ap-3\]quit
  41. 50. \[AC6605-wlan-view\]ap-id 4 ap-mac 00e0-fc4e-2fd0
  42. 51. \[AC6605-wlan-ap-4\]ap-name neibu-2
  43. 52. \[AC6605-wlan-ap-4\]ap-group neibu
  44. 53. Warning: This operation may cause AP reset. If the country code changes, it will
  45. 54. clear channel, power and antenna gain configurations of the radio, Whether to c
  46. 55. ontinue? \[Y/N\]:y
  47. 56. \[AC6605-wlan-ap-4\]quit
  48. 58. \[AC6605\]capwap source interface Vlanif 200

3 配置 WLAN 业务参数

3.1 需求

1)基于分配好的 IP 方案,为不同的无线终端,动态分配 IP 地址

2)配置 AC,为不同的 AP 下发不同的配置,确保可以发射无线信号

3)实现不同的 “无线终端” 可以成功连接 AP ,并成功获得 IP 地址

4)实现不同的 “无线终端” 之间的互通

3.2 方案

搭建实验环境,如图 - 3 所示。

CASE - 图3

图 - 3

3.3 步骤

实现此案例需要按照如下步骤进行。

1)配置 AC 上的相关业务参数

  1. 1. \[AC6605\]vlan pool wailai
  2. 2. \[AC6605-vlan-pool-wailai\]vlan 101 102
  3. 3. \[AC6605-vlan-pool-wailai\]quit
  4. 5. \[AC6605\]vlan pool neibu
  5. 6. \[AC6605-vlan-pool-neibu\]vlan 103 104
  6. 7. \[AC6605-vlan-pool-neibu\]quit
  7. 9. \[AC6605\]wlan
  8. 10. \[AC6605-wlan-view\]security-profile name wailai
  9. 11. \[AC6605-wlan-sec-prof-wailai\]security wpa2 psk pass-phrase a123456789 aes
  10. 12. \[AC6605-wlan-sec-prof-wailai\]quit
  11. 14. \[AC6605-wlan-view\]security-profile name neibu
  12. 15. \[AC6605-wlan-sec-prof-neibu\]security wpa2 psk pass-phrase b123456789 aes
  13. 16. \[AC6605-wlan-sec-prof-neibu\]quit
  14. 18. \[AC6605-wlan-view\]ssid-profile name wailai
  15. 19. \[AC6605-wlan-ssid-prof-wailai\]ssid wailai
  16. 20. \[AC6605-wlan-ssid-prof-wailai\]quit
  17. 22. \[AC6605-wlan-view\]ssid-profile name neibu
  18. 23. \[AC6605-wlan-ssid-prof-neibu\]ssid neibu
  19. 24. \[AC6605-wlan-ssid-prof-neibu\]quit
  20. 25. \[AC6605-wlan-view\]quit
  21. 27. \[AC6605-wlan-view\]vap-profile name wailai
  22. 28. \[AC6605-wlan-vap-prof-wailai\]security-profile wailai
  23. 29. \[AC6605-wlan-vap-prof-wailai\]ssid-profile wailai
  24. 30. \[AC6605-wlan-vap-prof-wailai\]service-vlan vlan-pool wailai
  25. 31. \[AC6605-wlan-vap-prof-wailai\]quit
  26. 33. \[AC6605-wlan-view\]vap-profile name neibu
  27. 34. \[AC6605-wlan-vap-prof-neibu\]security-profile neibu
  28. 35. \[AC6605-wlan-vap-prof-neibu\]ssid-profile neibu
  29. 36. \[AC6605-wlan-vap-prof-neibu\]service-vlan vlan-pool neibu
  30. 37. \[AC6605-wlan-vap-prof-neibu\]quit
  31. 39. \[AC6605-wlan-view\]ap-group name wailai
  32. 40. \[AC6605-wlan-ap-group-wailai\]vap-profile wailai wlan 1 radio 0
  33. 41. \[AC6605-wlan-ap-group-wailai\]vap-profile wailai wlan 1 radio 1
  34. 42. \[AC6605-wlan-ap-group-wailai\]quit
  35. 44. \[AC6605-wlan-view\]ap-group name neibu
  36. 45. \[AC6605-wlan-ap-group-neibu\]vap-profile neibu wlan 1 radio 0
  37. 46. \[AC6605-wlan-ap-group-neibu\]vap-profile neibu wlan 1 radio 1
  38. 47. \[AC6605-wlan-ap-group-neibu\]quit
  39. 48. \[AC6605-wlan-view\]quit

2)配置 DHCP 服务器,为无线终端用户分配 IP 地址

  1. 1. \[DHCP\]ip pool VLAN101
  2. 2. \[DHCP-ip-pool-VLAN101\]network 192.168.101.0 mask 24
  3. 3. \[DHCP-ip-pool-VLAN101\]gateway-list 192.168.101.254
  4. 4. \[DHCP-ip-pool-VLAN101\]dns-list 8.8.8.8
  5. 5. \[DHCP-ip-pool-VLAN101\]quit
  6. 7. \[DHCP\]ip pool VLAN102
  7. 8. \[DHCP-ip-pool-VLAN102\]network 192.168.102.0 mask 24
  8. 9. \[DHCP-ip-pool-VLAN102\]gateway-list 192.168.102.254
  9. 10. \[DHCP-ip-pool-VLAN102\]dns-list 8.8.8.8
  10. 11. \[DHCP-ip-pool-VLAN102\]quit
  11. 13. \[DHCP\]ip pool VLAN103
  12. 14. \[DHCP-ip-pool-VLAN103\]network 192.168.103.0 mask 24
  13. 15. \[DHCP-ip-pool-VLAN103\]gateway-list 192.168.103.254
  14. 16. \[DHCP-ip-pool-VLAN103\]dns-list 8.8.8.8
  15. 17. \[DHCP-ip-pool-VLAN103\]quit
  16. 19. \[DHCP\]ip pool VLAN104
  17. 20. \[DHCP-ip-pool-VLAN104\]network 192.168.104.0 mask 24
  18. 21. \[DHCP-ip-pool-VLAN104\]gateway-list 192.168.104.254
  19. 22. \[DHCP-ip-pool-VLAN104\]dns-list 8.8.8.8
  20. 23. \[DHCP-ip-pool-VLAN104\]quit

3)配置 DHCP 中继(SW2)

  1. 1. \[SW2\]vlan batch 101 102 103 104
  2. 3. \[SW2\]interface Vlanif 101
  3. 4. \[SW2-Vlanif101\]ip address 192.168.101.254 24
  4. 5. \[SW2-Vlanif101\]dhcp select relay
  5. 6. \[SW2-Vlanif101\]dhcp relay server-ip 192.168.210.1
  6. 7. \[SW2-Vlanif101\]quit
  7. 9. \[SW2\]interface Vlanif 102
  8. 10. \[SW2-Vlanif102\]ip address 192.168.102.254 24
  9. 11. \[SW2-Vlanif102\]dhcp select relay
  10. 12. \[SW2-Vlanif102\]dhcp relay server-ip 192.168.210.1
  11. 13. \[SW2-Vlanif102\]quit
  12. 15. \[SW2\]interface Vlanif 103
  13. 16. \[SW2-Vlanif103\]ip address 192.168.103.254 24
  14. 17. \[SW2-Vlanif103\]dhcp select relay
  15. 18. \[SW2-Vlanif103\]dhcp relay server-ip 192.168.210.1
  16. 19. \[SW2-Vlanif103\]quit
  17. 21. \[SW2\]interface Vlanif 104
  18. 22. \[SW2-Vlanif104\]ip address 192.168.104.254 24
  19. 23. \[SW2-Vlanif104\]dhcp select relay
  20. 24. \[SW2-Vlanif104\]dhcp relay server-ip 192.168.210.1
  21. 25. \[SW2-Vlanif104\]quit

4)配置 SW1,确保无线终端可以通过 SW1 与 网关(SW2)互通

  1. 1. \[SW1\]vlan batch 101 102 103 104

https://tts.tmooc.cn/ttsPage/NTD/NTDTN202109/TCNE/DAY06/CASE/01/index.html