基本环境:ap连接到9号端口,Ethernet1/0/9端口隶属于vlan2 接口Ethernet1/0/1隶属于vlan3,vlan3为业务口
直接上命令:
开启和配置DHCP:
DCWS-6028(config)#service dhcp
DCWS-6028(config)#ip dhcp pool ap
DCWS-6028(config)# network-address 192.168.2.0 255.255.255.0
DCWS-6028(config)# default-router 192.168.2.254
DCWS-6028(config)# option 43 hex 0104C0A802FE
DCWS-6028(config)#ip dhcp pool yewu
DCWS-6028(config)# network-address 192.168.3.0 255.255.255.0
DCWS-6028(config)# default-router 192.168.3.254
DCWS-6028(config)# dns-server 1.1.1.1
设置端口模式:
DCWS-6028(config-if-ethernet1/0/9)#Interface Ethernet1/0/9
DCWS-6028(config-if-ethernet1/0/9)#switchport mode trunk
DCWS-6028(config-if-ethernet1/0/9)# switchport trunk native vlan 2
DCWS-6028(config-if-ethernet1/0/9)#exit
设置端口IP地址段:
DCWS-6028(config)#interface Vlan2
DCWS-6028(config-if-vlan2)#ip address 192.168.2.254 255.255.255.0
DCWS-6028(config-if-vlan2)#interface Vlan3
DCWS-6028(config-if-vlan3)#ip address 192.168.3.254 255.255.255.0
DCWS-6028(config-if-vlan3)#exit
设置无线参数:
DCWS-6028(config)#wireless
DCWS-6028(config-wireless)#enable
//开启无线
DCWS-6028(config-wireless)#static-ip 192.168.2.254
//设置静态IP
DCWS-6028(config-wireless)#ssid-database ssid ncxzjzx02
//设置网络ssid
DCWS-6028(config-wireless)# ap database 00-03-0f-e8-0b-80
//最重要一步,添加设备mac地址(ap的)