目录
AC为AP分配IP地址,核心交换机为STA分配IP地址,采用本地转发
管理Vlan为10,业务Vlan为40
基础配置
AC基础配置
AC的管理Vlan即为AP分配IP地址,也充当Capwap隧道源地址
Vlan 10:管理Vlan Vlan 20:业务Vlan
创建管理Vlan
Vlan 10
创建地址池为AP分配地址(AC与AP是跨三层的,需要SW1通过DHCP中继使得AC给AP分配IP地址,所以此处的DHCP地址池中的地址网段为SW1上开启DHCP中继的接口的网段----即Vlan 30的网段)
Interface vlan 10
Ip address 192.168.10.1 24
service dhcp
ip dhcp pool AP
network 192.168.30.0 255.255.255.0 192.168.30.100 192.168.30.200
default-router 192.168.30.1
option 138 ip 192.168.10.1 指定AC的地址为1921.68.10.1
放行Vlan
interface GigabitEthernet 0/2
switchport mode trunk
switchport trunk allowed vlan only 10
配置路由
ip route 0.0.0.0 0.0.0.0 192.168.10.2
SW1基础配置
Vlan 10:与AC相连的Vlan
Vlan 20:SW1使用Vlan20为用户分配IP地址
Vlan 30:SW1使用Vlan30做DHCP中继,帮AP向AC获取IP地址
创建Vlan
vlan 10
vlan 20
vlan 30
创建与AC互通地址
interface vlan 10
ip address 192.168.10.2 24
创建DHCP地址池,为STA分配IP地址
interface vlan 20
ip address 192.168.20.1 24
service dhcp
ip dhcp pool STA
network 192.168.20.0 255.255.255.0 192.168.20.100 192.168.20.200
default-router 192.168.20.1
配置DHCP中继,使得AC分配IP地址给AP
interface vlan 30
ip address 192.168.30.1 24
ip helper-address 192.168.10.1
放行Vlan
interface GigabitEthernet 0/1
switchport mode trunk
switchport trunk allowed vlan only 10
interface GigabitEthernet 0/2
switchport mode trunk
switchport trunk allowed vlan only 20,30
SW2基础配置
创建Vlan
Vlan 20
Vlan 30
放行Vlan
interface GigabitEthernet 0/2
switchport mode trunk
switchport trunk allowed vlan only 20,30
interface GigabitEthernet 0/1
switchport mode trunk
switchport trunk native vlan 30
switchport trunk allowed vlan only 20,30
AC的Wlan配置
创建Wlan ID
Wlan ID定义了AP的SSID、转发模式等
wlan-config 1 AP-1
sta-limit 10 #最大无线用户数为10
tunnel local #本地转发
创建AP组(使用默认组)
绑定Wlan ID和业务Vlan
ap-group default
interface-mapping 1 20 radio 6 #绑定WLAN ID 1 和 业务Vlan 20 以及 信道6
interface-mapping 1 20 radio 10
向AP组中添加AP设备
如果知道AP的名称,可以通过AP的名称配置
将AP名字为Ruijie-1的设备添加到AP组中
ap-config Ruijie-1
ap-mac 0011.0022.0033
ap-group default
如果不知道AP的名称,则可以通过AP的MAC地址配置
将MAC地址为0011.0022.0033的AP加入AP组中,并为其重命名
ap-config 0011.0022.0033
ap-group 123
ap-name Ruijie-123
ap-config类似于华为的ap-id
配置CAPWAP隧道
指定管理Vlan
ac-controller
capwap ctrl-ip 192.168.10.1
country CN
配置Wlan安全
wlansec 1
security wpa enable
security wpa ciphers aes enable
security wpa akm psk enable
security wpa akm psk set-key ascii admin@123
查看状态
当AP和STA的地址都由核心交换机SW1分配时
AC不用创建地址池,地址池都在SW1上创建,配置如下
AC配置
Vlan 10:管理Vlan Vlan 20:业务Vlan
创建管理、业务Vlan
Vlan 10
Vlan 20
配置管理IP地址
Interface vlan 10
Ip address 192.168.10.1 24
放行Vlan
interface GigabitEthernet 0/2
switchport mode trunk
switchport trunk allowed vlan only 10
配置路由
ip route 0.0.0.0 0.0.0.0 192.168.10.2
AC关于Wlan的相关配置无变化
SW1配置
创建Vlan
vlan 10
vlan 20
vlan 30
创建与AC互通地址
interface vlan 10
ip address 192.168.10.2 24
创建DHCP地址池,为STA分配IP地址
service dhcp
interface vlan 20
ip address 192.168.20.1 24
ip dhcp pool STA
network 192.168.20.0 255.255.255.0 192.168.20.100 192.168.20.200
default-router 192.168.20.1
interface vlan 30
ip address 192.168.30.1 24
ip dhcp pool AP
network 192.168.30.0 255.255.255.0 192.168.30.100 192.168.30.200
default-router 192.168.30.1
option 138 ip 192.168.10.1 指定隧道源地址为1921.68.10.1
放行Vlan
interface GigabitEthernet 0/1
switchport mode trunk
switchport trunk allowed vlan only 10
interface GigabitEthernet 0/2
switchport mode trunk
switchport trunk allowed vlan only 20,30
SW2的配置无变化