DCWS做dhcp服务器

无线网关都放在路由器上,路由器跟二层之间肯定是要做单臂路由的

接下来就是配置过程

配置AC、路由、二层的IP和Vlan

DCWS-6028

DCWS-6028(P)(config)#vlan 100,110,120,1000
DCWS-6028(P)(config)#interface vlan 1000
DCWS-6028(P)(config-if-vlan1000)#ip address 10.1.1.2 255.255.255.252
DCWS-6028(P)(config)#interface ethernet 1/0/24
DCWS-6028(P)(config-if-ethernet1/0/24)#switchport mode trunk
DCWS-6028(P)(config-if-ethernet1/0/24)#switchport trunk allowed vlan 100,110,120
DCWS-6028(P)(config-if-ethernet1/0/24)#switchport trunk native vlan 1000

DCR-2655

Router_config#interface g0/3
Router_config_g0/3#ip address 10.1.1.1 255.255.255.252
Router_config_g0/3#no shutdown
Router_config#interface g0/4.100
Router_config_g0/4.100#encapsulation dot1Q 100
Router_config_g0/4.100#ip address 192.168.100.254 255.255.255.0
Router_config_g0/4.100#no shutdown
Router_config#interface g0/4.110
Router_config_g0/4.110#encapsulation dot1Q 110
Router_config_g0/4.110#ip address 192.168.110.254 255.255.255.0
Router_config_g0/4.110#no shutdown
Router_config#interface g0/4.120
Router_config_g0/4.120#encapsulation dot1Q 120
Router_config_g0/4.120#ip address 192.168.120.254 255.255.255.0
Router_config_g0/4.120#no shutdown

S4600

S4600-28P-SI(config)#vlan 100,110,120
S4600-28P-SI(config)#interface ethernet 1/0/24
S4600-28P-SI(config-if-ethernet1/0/24)#switchport mode trunk
S4600-28P-SI(config-if-ethernet1/0/24)#switchport trunk allowed vlan 100,110,120
S4600-28P-SI(config)#interface ethernet 1/0/23
S4600-28P-SI(config-if-ethernet1/0/23)#switchport trunk native vlan 100

但是配了ip,vlan后设备间还是不能互通,所以我们需要在路由器和AC上写一条静态路由

静态路由

DCR-2655

Router_config#ip route 0.0.0.0 0.0.0.0 10.1.1.2

DCWS-6028

DCWS-6028(P)(config)#ip route 0.0.0.0 0.0.0.0 10.1.1.1

然后我们在二层的23口上接一个终端(PC)测试一下

整个链路通了之后,就可以给ap来分配地址了

如果在路由ping终端(PC)不通,你看是不是PC开了防火墙

DCWS开启DHCP,路由做DHCP中继

DCWS-6028

DCWS-6028(P)(config)#service dhcp
DCWS-6028(P)(config)#ip dhcp pool ap
DCWS-6028(P)(dhcp-ap-config)#network-address 192.168.100.0 255.255.255.0
DCWS-6028(P)(dhcp-ap-config)#default-router 192.168.100.254
DCWS-6028(P)(config)#ip dhcp pool vlan110
DCWS-6028(P)(dhcp-vlan110-config)#network-address 192.168.110.0 255.255.255.0
DCWS-6028(P)(dhcp-vlan110-config)#default-router 192.168.110.254
DCWS-6028(P)(config)#ip dhcp pool vlan120
DCWS-6028(P)(dhcp-vlan120-config)#network-address 192.168.120.0 255.255.255.0
DCWS-6028(P)(dhcp-vlan120-config)#default-router 192.168.120.254

DCR-2655

Router_config#ip dhcpd enable
Router_config#ip forward-protocol udp bootps
Router_config#interface g0/4.100
Router_config_g0/4.100#ip helper-address 10.1.1.2
Router_config#interface g0/4.110
Router_config_g0/4.110#ip helper-address 10.1.1.2
Router_config#interface g0/4.120
Router_config_g0/4.120#ip helper-address 10.1.1.2

然后在AC上输入show ip dhcp binding

然后用三层发现通过指定 AC 的 ip 地址来发现注册 AP

三层发现、AP上线

DCWS-6028

DCWS-6028(P)(config)#wireless
DCWS-6028(P)(config-wireless)#no auto-ip-assign
DCWS-6028(P)(config-wireless)#static-ip 10.1.1.2
DCWS-6028(P)(config-wireless)#ap authentication none
DCWS-6028(P)(config-wireless)#discovery ip-list 192.168.100.1
DCWS-6028(P)(config-wireless)#enable

配置SSID

DCWS-6028(P)(config-wireless)#network 1
DCWS-6028(P)(config-network)#ssid vlan110
DCWS-6028(P)(config-network)#security mode wpa-personal
DCWS-6028(P)(config-network)#wpa key Net12345678
DCWS-6028(P)(config-network)#vlan 110
DCWS-6028(P)(config-wireless)#network 2
DCWS-6028(P)(config-network)#ssid vlan120
DCWS-6028(P)(config-network)#security mode none
DCWS-6028(P)(config-network)#vlan 120

DCWS-6028(P)(config-wireless)#ap profile 1
DCWS-6028(P)(config-ap-profile)#radio 1
DCWS-6028(P)(config-ap-profile-radio)#vap 1
DCWS-6028(P)(config-ap-profile-vap)#enable

network 1 对应的 vap 0 是默认开启的无需操作

network 2 对应的 vap 1 是默认是关闭的需要开启

VAP ID有0-15,使用 'show wireless ap capability'命令显示每一种硬件类型的有效范围

输入show wireless ap status查看AP是否上线成功

我们在DCWS-6028上show running-config | begin ap database

在无线配置模式(wireless)下输入

DCWS-6028(P)(config-wireless)#ap database 00-03-0f-78-ca-c0
DCWS-6028(P)(config-ap)#profile 1

下发AP包

DCWS-6028(P)#wireless ap profile apply 1

现在你就可以在你的手机或者电脑的无线网卡上搜到无线信号了

最后修改:2023 年 11 月 13 日
如果我的文章对你有用,请看心情帮助小站能存活下去( •̀ ω •́ )✧