实验拓扑
实验需求
1、用户划分vlan30,网段为192.168.30.0/24
2、AP和AC划分vlan20,网段为192.168.20.0/24
3、有线网段使用vlan10,网段为192.168.10.0/24
配置思路及验证结果
核心交换机
<SW1>system-view 进入系统视图
[SW1]sysname SW1 修改名称
[SW1]vlan batch 10 20 30 创建vlan
[SW1]interface vlanif10 进入vlan
[SW1-Vlanif10]ip address 192.168.10.1 24 给vlan配置ip
[SW1-Vlanif10]quit 退出视图
[SW1]interface vlanif20
[SW1-Vlanif20]ip address 192.168.20.1 24
[SW1-Vlanif20]quit
[SW1]interface vlanif30
[SW1-Vlanif30]ip address 192.168.30.1 24
[SW1-Vlanif30]quit
[SW1]interface g0/0/1 进入端口
[SW1-GigabitEthernet0/0/1]port link-type access 设置端口类型
[SW1-GigabitEthernet0/0/1]port default vlan 10 允许vlan10通过
[SW1-GigabitEthernet0/0/1]quit
[SW1]interface g0/0/2
[SW1-GigabitEthernet0/0/2]port link-type trunk
[SW1-GigabitEthernet0/0/2]port trunk pvid vlan 20 设置标签为vlan20
[SW1-GigabitEthernet0/0/2]port trunk allow-pass vlan all 不限制vlan
[SW1-GigabitEthernet0/0/2]quit
[SW1]interface g0/0/3
[SW1-GigabitEthernet0/0/3]port link-type trunk
[SW1-GigabitEthernet0/0/3]port trunk pvid vlan 20
[SW1-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[SW1-GigabitEthernet0/0/3]quit
[SW1]interface g0/0/4
[SW1-GigabitEthernet0/0/4]port link-type access
[SW1-GigabitEthernet0/0/4]port default vlan 20
[SW1-GigabitEthernet0/0/4]quit
[SW1]dhcp enable 开启dhcp
[SW1]ip pool vlan20 创建地址池
[SW1-ip-pool-vlan20]network 192.168.20.0 mask 24
[SW1-ip-pool-vlan20]gateway-list 192.168.20.1
[SW1-ip-pool-vlan20]quit
[SW1]interface vlanif20
[SW1-Vlanif20]dhcp select global 进入vlan20启用dhcp
[SW1-Vlanif20]quit
[SW1]ip pool vlan30
[SW1-ip-pool-vlan30]network 192.168.30.0 mask 24
[SW1-ip-pool-vlan30]gateway-list 192.168.30.1
[SW1-ip-pool-vlan30]quit
[SW1]interface vlanif30
[SW1-Vlanif30]dhcp select global
[SW1-Vlanif30]quit
AP1查看配置
<Huawei>display ip interface brief
AC1
<AC6005>system-view
[AC6005]interface vlanif1
[AC6005-Vlanif1]ip address 192.168.20.200 24
[AC6005-Vlanif1]quit
[AC6005]interface g0/0/1
[AC6005-GigabitEthernet0/0/1]port link-type access
[AC6005-GigabitEthernet0/0/1]port default vlan 20
[AC6005-GigabitEthernet0/0/1]quit
随机测试
在AC1配置静态路由
[AC6005]ip route-static 0.0.0.0 192.168.20.1
测试
AC1配置无线
[AC6005]capwap source interface vlan 20 建立隧道
[AC6005]wlan 进入WLAN视图
[AC6005-wlan-view]ap auth-mode no-auth 不进行认证
[AC6005-wlan-view]regulatory-domain-profile name 123 设置国家码
[AC6005-wlan-regulate-domain-123]country-code CN
[AC6005-wlan-regulate-domain-123]quit
[AC6005-wlan-view]ap-group name default 关联到default组
[AC6005-wlan-ap-group-default]regulatory-domain-profile 123
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
[AC6005-wlan-ap-group-default]quit
[AC6005-wlan-view]ssid-profile name n1 创建模板
[AC6005-wlan-ssid-prof-n1]ssid shuan 命名
[AC6005-wlan-ssid-prof-n1]quit
[AC6005-wlan-view]security-profile name n2
[AC6005-wlan-sec-prof-n2]security wap psk pass-phrase 00000000
[AC6005-wlan-sec-prof-n2]quit
[AC6005-wlan-view]vap-profile name n3
[AC6005-wlan-vap-prof-n3]ssid-profile n1
[AC6005-wlan-vap-prof-n3]security-profile n2
[AC6005-wlan-vap-prof-n3]service-vlan vlan-id 30 绑定策略集
[AC6005-wlan-vap-prof-n3]quit
[AC6005-wlan-view]ap-group name default
[AC6005-wlan-ap-group-default]vap-profile n3 wlan 1 radio all 下发给所有射频卡
[AC6005-wlan-ap-group-default]quit
查看配置
<AC6005>display ap all
连接笔记本电脑
密码是设置的00000000
测试联通性
标签:AC6005,wlan,quit,ip,GigabitEthernet0,HCIA,实验,SW1,无线 From: https://blog.csdn.net/weixin_59151049/article/details/142788977