基础配置
R1
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
interface GigabitEthernet0/0
ip address 192.168.111.2 255.255.255.0
ip route-static 192.168.0.0 16 192.168.111.1
SW1
vlan 100 to 101
vlan 111
interface GigabitEthernet1/0/1
port link-type trunk
port trunk permit vlan 1 100 to 101
interface GigabitEthernet1/0/2
port access vlan 100
interface GigabitEthernet1/0/3
port access vlan 111
interface GigabitEthernet1/0/4
port access vlan 101
ip route-static 0.0.0.0 0 192.168.111.2
interface Vlan-interface100
ip address 192.168.100.254 255.255.255.0
interface Vlan-interface101
ip address 192.168.101.1 255.255.255.0
interface Vlan-interface111
ip address 192.168.111.1 255.255.255.0
dhcp配置
dhcp enable
dhcp server ip-pool vlan100
gateway-list 192.168.100.254
network 192.168.100.0 mask 255.255.255.0
option 43 hex 7008000001c0a86401
dhcp server ip-pool vlan101
gateway-list 192.168.101.1
network 192.168.101.0 mask 255.255.255.0
AC
vlan 100
#
interface Vlan-interface100
ip address 192.168.100.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port access vlan 100
#
ip route-static 0.0.0.0 0 192.168.100.254
AC的web登录配置
local-user admin class manage
password simple h3c12345678
service-type terminal http https
authorization-attribute user-role network-admin
#
ip http enable
ip https enable
#
interface Vlan-interface1
ip address 192.168.56.12 255.255.255.0
2层SW
vlan 100 to 101
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk permit vlan 1 100 to 101
#
interface GigabitEthernet1/0/2
port link-type trunk
port trunk permit vlan 1 100 to 101
port trunk pvid vlan 100
AC的AP配置
wlan service-template kjs
ssid kjs
vlan 101
client forwarding-location ap vlan 101 #配置本地转发,转发vlan 101的流量
service-template enable
#
wlan ap 1 model WA6320-HCL
serial-id H3C_42-C6-7B-E3-05-00
region-code CN #国家码
map-configuration flash:/apcfg.txt #配置map文件
vlan 1
radio 1
radio enable
service-template kjs vlan 101 #设置绑定到射频接口的VLAN编号为VLAN 101
apcfg.txt文件内容:是AC给AP绑定的,自动下发配置,使得AP的接口变成trunk并放行vlan101
system-view
vlan 101
quit
interface GigabitEthernet 0/0/0
port link-type trunk
port trunk permit vlan 101