企业用户通过 WLAN 接入网络,以满足移动办公的最基本需求。且在覆盖区域内移动发生漫游时,不影响用户的业务使用,对比两种数据转发方式的区别。 AC 组网方式:旁挂二层组网。 DHCP 部署方式: AC 作为 DHCP 服务器,基于接口为 AP 和 STA2 分配 IP 地址;S1 作为 DHCP 服务器,基于接口为 STA1 分配 IP 地址。 AC 作为 DHCP 服务器,基于全局地址池为 AP 和 STA2 分配 IP 地址;S1 作为 DHCP 服务器,基于全局地址池为 STA1 分配 IP 地址。 AC 作为 DHCP 服务器,S1作为DHCP中继服务器,基于中继为 AP 和 STA2 分配 IP 地址;S1 作为 DHCP 服务器,基于全局地址池为 STA1 分配 IP 地址。
[AC6605]sysname AC [AC]vlan batch 10 100 Info: This operation may take a few seconds. Please wait for a moment...done. [AC]int g0/0/1 [AC-GigabitEthernet0/0/1]port link-type trunk [AC-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 100 [AC-GigabitEthernet0/0/1]q
[AC]dhcp enable Info: The operation may take a few seconds. Please wait for a moment.done. [AC]interface vlanif100 [AC-Vlanif100]ip address 100.0.0.1 24 [AC-Vlanif100]dhcp select interface [AC-Vlanif100]q [AC]interface Vlanif 10 [AC-Vlanif10]ip address 10.0.0.1 24 [AC-Vlanif10]dhcp select interface [AC-Vlanif10]q
在S1上配置 VLANIF20 接口为 STA 2提供 IP 地址。
1 2 3 4 5 6
[Switch]dhcp enable Info: The operation may take a few seconds. Please wait for a moment.done. [Switch]interface vlanif20 [Switch-Vlanif20]ip address 20.0.0.1 24 [Switch-Vlanif20]dhcp select interface [Switch-Vlanif20]q
S1作为AP、STA1、STA2的DHCP服务器
在 S1上配置 VLANIF100 接口为 AP 提供 IP 地址,配置 VLANIF10 接口为 STA 1提供 IP 地址,配置 VLANIF20 接口为 STA 2提供 IP 地址。
1 2 3 4 5 6 7 8 9 10 11 12 13 14
[Switch]dhcp enable Info: The operation may take a few seconds. Please wait for a moment.done. [Switch]interface vlanif100 [Switch-Vlanif100]ip address 100.0.0.1 24 [Switch-Vlanif100]dhcp select interface [Switch-Vlanif100]q [Switch]interface Vlanif 10 [Switch-Vlanif10]ip address 10.0.0.1 24 [Switch-Vlanif10]dhcp select interface [Switch-Vlanif10]q [Switch]interface vlanif20 [Switch-Vlanif20]ip address 20.0.0.1 24 [Switch-Vlanif20]dhcp select interface [Switch-Vlanif20]q
在 AC 上创建IP地址池“AP-POOL”为 AP 提供 IP 地址,创建vlanif100接口引用“AP-POOL”地址池;创建IP地址池“STA1-POOL”为 STA 1提供 IP 地址,创建vlanif10接口引用“STA1-POOL”地址池。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
[AC]dhcp enable Info: The operation may take a few seconds. Please wait for a moment.done. [AC]ip pool AP-POOL [AC-ip-pool-AP-POOL]network 100.0.0.0 mask 24 [AC-ip-pool-AP-POOL]gateway-list 100.0.0.1
[AC]interface vlanif100 [AC-Vlanif100]ip address 100.0.0.1 24 [AC-Vlanif100]dhcp select global [AC-Vlanif100]q
[AC]ip pool STA1-POOL [AC-ip-pool-STA1-POOL]network 10.0.0.0 mask 24 [AC-ip-pool-STA1-POOL]gateway-list 10.0.0.1
[AC]interface vlanif10 [AC-Vlanif10]ip address 10.0.0.1 24 [AC-Vlanif10]dhcp select global [AC-Vlanif10]q
在S1上创建IP地址池“STA2-POOL”为 STA2 提供 IP 地址,创建vlanif200接口引用“STA2-POOL”地址池。
1 2 3 4 5 6 7 8 9 10
[Switch]dhcp enable Info: The operation may take a few seconds. Please wait for a moment.done. [Switch]ip pool STA2-POOL [Switch-ip-pool-STA2-POOL]network 20.0.0.0 mask 24 [Switch-ip-pool-STA2-POOL]gateway-list 20.0.0.1
[Switch]interface vlanif20 [Switch-Vlanif20]ip address 20.0.0.1 24 [Switch-Vlanif20]dhcp select global [Switch-Vlanif20]q
S1作为AP、STA1、STA2的DHCP服务器
在 S1上创建IP地址池“AP-POOL”为 AP 提供 IP 地址,创建vlanif100接口引用“AP-POOL”地址池;创建IP地址池“STA1-POOL”为 STA 1提供 IP 地址,创建vlanif10接口引用“STA1-POOL”地址池;创建IP地址池“STA2-POOL”为 STA2 提供 IP 地址,创建vlanif200接口引用“STA2-POOL”地址池。
[Switch]dhcp enable Info: The operation may take a few seconds. Please wait for a moment.done. [Switch]ip pool AP-POOL [Switch-ip-pool-AP-POOL]network 100.0.0.0 mask 24 [Switch-ip-pool-AP-POOL]gateway-list 100.0.0.1 [Switch]interface vlanif100 [Switch-Vlanif100]ip address 100.0.0.1 24 [Switch-Vlanif100]dhcp select global [Switch-Vlanif100]q
[Switch]ip pool STA1-POOL [Switch-ip-pool-STA1-POOL]network 10.0.0.0 mask 24 [Switch-ip-pool-STA1-POOL]gateway-list 10.0.0.1 [Switch]interface Vlanif 10 [Switch-Vlanif10]ip address 10.0.0.1 24 [Switch-Vlanif10]dhcp select global [Switch-Vlanif10]q
[Switch]ip pool STA2-POOL [Switch-ip-pool-STA2-POOL]network 20.0.0.0 mask 24 [Switch-ip-pool-STA2-POOL]gateway-list 20.0.0.1 [Switch]interface vlanif20 [Switch-Vlanif20]ip address 20.0.0.1 24 [Switch-Vlanif20]dhcp select global [Switch-Vlanif20]q
[AC]dhcp enable Info: The operation may take a few seconds. Please wait for a moment.done. [AC]ip pool AP-POOL [AC-ip-pool-AP-POOL]network 100.0.0.0 mask 24 [AC-ip-pool-AP-POOL]gateway-list 100.0.0.2
[AC]interface vlanif100 [AC-Vlanif100]ip address 100.0.0.1 24 [AC-Vlanif100]dhcp select global [AC-Vlanif100]q
[AC]ip pool STA1-POOL [AC-ip-pool-STA1-POOL]network 10.0.0.0 mask 24 [AC-ip-pool-STA1-POOL]gateway-list 10.0.0.2
[AC]interface vlanif10 [AC-Vlanif10]ip address 10.0.0.1 24 [AC-Vlanif10]dhcp select global [AC-Vlanif10]q
[Switch]dhcp enable Info: The operation may take a few seconds. Please wait for a moment.done. [Switch]interface vlanif100 [Switch-Vlanif100]ip address 100.0.0.2 24 [Switch-Vlanif100]dhcp select relay [Switch-Vlanif100]dhcp relay service-ip 100.0.0.1 [Switch-Vlanif100]q
[AC]wlan [AC-wlan-view]ap-group name ap1 Info: This operation may take a few seconds. Please wait for a moment.done. [AC-wlan-ap-group-ap1]q
[AC]wlan [AC-wlan-view]ap-group name ap2 Info: This operation may take a few seconds. Please wait for a moment.done. [AC-wlan-ap-group-ap2]q
创建域管理模板,在域管理模板下配置 AC 的国家码并在 AP 组下引用域管理模板。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
[AC-wlan-view]regulatory-domain-profile name default [AC-wlan-regulate-domain-default]country-code cn Info: The current country code is same with the input country code. [AC-wlan-regulate-domain-default]q
[AC-wlan-view]ap-group name ap1 [AC-wlan-ap-group-ap1]regulatory-domain-profile default Warning: Modifying the country code will clear channel, power and antenna gain c onfigurations of the radio and reset the AP. Continue?[Y/N]:y [AC-wlan-ap-group-ap1]q
[AC-wlan-view]ap-group name ap2 [AC-wlan-ap-group-ap2]regulatory-domain-profile default Warning: Modifying the country code will clear channel, power and antenna gain c onfigurations of the radio and reset the AP. Continue?[Y/N]:y [AC-wlan-ap-group-ap2]q
[AC-wlan-view]q
配置 AC 的源接口
1
[AC] capwap source interface vlanif 100
在 AC 上离线导入 AP,并将 AP 加入 AP 组“ap1”中
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
[AC]wlan [AC-wlan-view]ap auth-mode mac-auth [AC-wlan-view]ap-id 0 ap-mac 00E0-FCBD-77B0 [AC-wlan-ap-0]ap-name AP1 [AC-wlan-ap-0]ap-group ap1 Warning: This operation may cause AP reset. If the country code changes, it will clear channel, power and antenna gain configurations of the radio, Whether to continue? [Y/N]:y Info: This operation may take a few seconds. Please wait for a moment.. done. [AC-wlan-ap-0]q
[AC]wlan [AC-wlan-view]ap auth-mode mac-auth [AC-wlan-view]ap-id 1 ap-mac 00E0-FCD8-7B40 [AC-wlan-ap-1]ap-name AP2 [AC-wlan-ap-1]ap-group ap2 Warning: This operation may cause AP reset. If the country code changes, it will clear channel, power and antenna gain configurations of the radio, Whether to continue? [Y/N]:y Info: This operation may take a few seconds. Please wait for a moment.. done. [AC-wlan-ap-1]q
将 AP 上电后,当执行命令 display ap all 查看到 AP 的“State”字段为“nor”时,表示 AP正常上线。
1 2
[AC-wlan-view]display ap all Info: This operation may take a few seconds. Please wait for a moment.done.
[AC-wlan-view]ssid-profile name ss1 [AC-wlan-ssid-prof-ss1]ssid 111 Info: This operation may take a few seconds, please wait.done. [AC-wlan-ssid-prof-ss1]q
[AC-wlan-view]ssid-profile name ss2 [AC-wlan-ssid-prof-ss2]ssid 222 Info: This operation may take a few seconds, please wait.done. [AC-wlan-ssid-prof-ss2]q
[AC-wlan-view]vap-profile name vap1 [AC-wlan-vap-prof-vap1]forward-mode tunnel [AC-wlan-vap-prof-vap1]service-vlan vlan-id 10 Info: This operation may take a few seconds, please wait.done. [AC-wlan-vap-prof-vap1]security-profile se Info: This operation may take a few seconds, please wait.done. [AC-wlan-vap-prof-vap1]ssid-profile ss1 Info: This operation may take a few seconds, please wait.done. [AC-wlan-vap-prof-vap1]q
[AC-wlan-view]vap-profile name vap2 [AC-wlan-vap-prof-vap2]forward-mode direct-forward [AC-wlan-vap-prof-vap2]service-vlan vlan-id 20 Info: This operation may take a few seconds, please wait.done. [AC-wlan-vap-prof-vap2]security-profile se Info: This operation may take a few seconds, please wait.done. [AC-wlan-vap-prof-vap2]ssid-profile ss2 Info: This operation may take a few seconds, please wait.done. [AC-wlan-vap-prof-vap2]q
[AC-wlan-view]ap-group name ap1 [AC-wlan-ap-group-ap1]vap-profile vap1 wlan 1 radio 0 [AC-wlan-ap-group-ap1]vap-profile vap1 wlan 1 radio 1 Info: This operation may take a few seconds, please wait...done. [AC-wlan-ap-group-ap1]q
[AC-wlan-view]ap-group name ap2 [AC-wlan-ap-group-ap2]vap-profile vap2 wlan 1 radio all Info: This operation may take a few seconds, please wait...done. [AC-wlan-ap-group-ap2]q
步骤 6 验证配置结果
查看AP的射频信号:display vap ssid 111 查看AP上连接的STA信息:display station ssid 111 测试STA与外网的连通性:ping