ensp组建直连式二层wlan
时间: 2023-12-26 09:25:51 浏览: 109
为了在ensp上组建直连式二层wlan,需要完成以下步骤:
1. 配置vlan和接口IP地址
```shell
# 配置vlan 5
vlan batch 5
vlan 5
#
interface Vlanif5
ip address 192.168.5.1 24
#
# 配置vlan 9
vlan batch 9
vlan 9
#
interface Vlanif9
ip address 192.168.9.1 24
#
# 配置vlan 101
vlan batch 101
vlan 101
#
interface Vlanif101
ip address 192.168.101.1 24
#
# 配置vlan 102
vlan batch 102
vlan 102
#
interface Vlanif102
ip address 192.168.102.1 24
```
2. 配置DHCP
```shell
# 配置vlan 5的DHCP
dhcp enable
interface Vlanif5
dhcp select interface
dhcp server dns-list 8.8.8.8
dhcp server lease-time 12hour
#
# 配置vlan 9的DHCP
interface Vlanif9
dhcp select interface
dhcp server dns-list 8.8.8.8
dhcp server lease-time 12hour
#
# 配置vlan 101的DHCP
interface Vlanif101
dhcp select interface
dhcp server dns-list 8.8.8.8
dhcp server lease-time 12hour
#
# 配置vlan 102的DHCP
interface Vlanif102
dhcp select interface
dhcp server dns-list 8.8.8.8
dhcp server lease-time 12hour
```
3. 配置WLAN
```shell
# 创建WLAN
wlan service-template 1
wlan ssid wlan1
wlan service-template 2
wlan ssid wlan2
#
# 配置WLAN的接口
interface GigabitEthernet 0/0/1
port link-type trunk
port trunk allow-pass vlan 5 9 101 102
#
# 配置WLAN的端口
interface GigabitEthernet 0/0/2
port link-type access
port default vlan 5
#
# 配置WLAN的AP
ap-profile name ap1
radio 1
channel 1
#
# 配置WLAN的用户PC
interface GigabitEthernet 0/0/3
port link-type access
port default vlan 9
```
阅读全文