草庐IT

校园网ensp模拟搭建

原来我也不会啊! 2023-04-12 原文

文章目录


前言

学校最近在安装校园网,然后我也就试着用ensp搭建了一下,还请大佬多多指教啊

一、校园网拓扑图

下面是AP进入就绪状态

二、地址规划 

三、配置命令

1.二层配置

代码如下:

1. LSW5

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info ena
Info: Information center is disabled.
[Huawei]vlan batch 2 4 6
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]port l trunk 
[Huawei-GigabitEthernet0/0/1]port trunk allow vlan 1 2 4
[Huawei-GigabitEthernet0/0/1]q
[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]port l acc
[Huawei-Ethernet0/0/1]port def vlan 6
[Huawei-Ethernet0/0/1]q
[Huawei]int g0/0/2
[Huawei-GigabitEthernet0/0/2]port l trunk 
[Huawei-GigabitEthernet0/0/2]port trunk allow vlan 1 2 4 6
[Huawei-GigabitEthernet0/0/2]q
[Huawei]

 LSW2 和 LSW3 的命令行和接口配置过程和LSW1相同,后面的就自己配置啦

 2. LSW8

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info ena
Info: Information center is disabled.
[Huawei]vlan batch 3 5 7
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]port l trunk 
[Huawei-GigabitEthernet0/0/1]port trunk allow vlan 1 3 5
[Huawei-GigabitEthernet0/0/1]q
[Huawei]int g0/0/2
[Huawei-GigabitEthernet0/0/2]port l trunk 
[Huawei-GigabitEthernet0/0/2]port trunk allow vlan 1 3 5 7 
[Huawei-GigabitEthernet0/0/2]q
[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]port l acc
[Huawei-Ethernet0/0/1]port def vlan 7
[Huawei-Ethernet0/0/1]q

 LSW9的命令行和接口配置过程和LSW1相同,后面的就自己配置啦

2、三层配置

 3.LSW2

三层交换机接出去有两条链路,这he里我们做一个Eth-trunk 来实现负载均衡。

src-dst-mac 这条语句的意思是根据源mac和目标mac进行分流

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info ena
Info: Information center is disabled.
[Huawei]vlan batch 8 9 10
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]port l acc
[Huawei-GigabitEthernet0/0/1]port def vlan 8
[Huawei-GigabitEthernet0/0/1]int g0/0/2
[Huawei-GigabitEthernet0/0/2]port l acc
[Huawei-GigabitEthernet0/0/2]port def vlan 9
[Huawei-GigabitEthernet0/0/2]int g0/0/3
[Huawei-GigabitEthernet0/0/3]port l acc
[Huawei-GigabitEthernet0/0/3]port def vlan 10
[Huawei-GigabitEthernet0/0/3]q
[Huawei]int eth-trunk 1
[Huawei-Eth-Trunk1]mode lacp 
[Huawei-Eth-Trunk1]max active 2
[Huawei-Eth-Trunk1]load-balance src-dst-mac //根据源mac和目标mac进行分流
[Huawei-Eth-Trunk1]q
[Huawei]int g0/0/4
[Huawei-GigabitEthernet0/0/4]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-GigabitEthernet0/0/4]int g0/0/5
[Huawei-GigabitEthernet0/0/5]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-GigabitEthernet0/0/5]int eth-trunk 1
[Huawei-Eth-Trunk1]port l trunk 
[Huawei-Eth-Trunk1]port trunk allow vlan 8 9 10
[Huawei-Eth-Trunk1]q
[Huawei]

4. LSW3

LSW3接出去也是用Eth-trunk链路聚合技术来实现负载均衡,配置路由协议,使全网通讯

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info ena 
Info: Information center is disabled.
[Huawei]vlan batch 2 4 6 11
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]port l trunk 
[Huawei-GigabitEthernet0/0/1]port trunk allow vlan 1 2 4 6
[Huawei-GigabitEthernet0/0/1]int g0/0/2
[Huawei-GigabitEthernet0/0/2]port l trunk 
[Huawei-GigabitEthernet0/0/2]port trunk allow vlan 1 2 4 6
[Huawei-GigabitEthernet0/0/2]int g0/0/3
[Huawei-GigabitEthernet0/0/3]port l trunk 
[Huawei-GigabitEthernet0/0/3]port trunk allow vlan 1 2 4 6
[Huawei-GigabitEthernet0/0/3]q
[Huawei]int eth-trunk 1
[Huawei-Eth-Trunk1]mode lacp 
[Huawei-Eth-Trunk1]max active 2
[Huawei-Eth-Trunk1]load-balance src-dst-mac
[Huawei-Eth-Trunk1]q
[Huawei]int g0/0/4 
[Huawei-GigabitEthernet0/0/4]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-GigabitEthernet0/0/4]q
[Huawei]int g0/0/5 
[Huawei-GigabitEthernet0/0/5]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-GigabitEthernet0/0/5]q
[Huawei]int eth-trunk 1
[Huawei-Eth-Trunk1]port l trunk 
[Huawei-Eth-Trunk1]port trunk allow vlan 1 2 4 11
[Huawei-Eth-Trunk1]q
[Huawei]int vlanif 2
[Huawei-Vlanif2]ip add 192.168.2.254 24
[Huawei-Vlanif2]int vlanif 4
[Huawei-Vlanif4]ip add 192.168.4.254 24
[Huawei-Vlanif4]int vlanif 6
[Huawei-Vlanif6]ip add 192.168.6.254 24
[Huawei-Vlanif6]int vlanif 11
[Huawei-Vlanif11]ip add 192.168.11.254 24
[Huawei-Vlanif11]q
[Huawei]ospf 7
[Huawei-ospf-7]area 1
[Huawei-ospf-7-area-0.0.0.1]net 192.168.2.0 0.0.0.255
[Huawei-ospf-7-area-0.0.0.1]net 192.168.4.0 0.0.0.255
[Huawei-ospf-7-area-0.0.0.1]net 192.168.6.0 0.0.0.255
[Huawei-ospf-7-area-0.0.0.1]net 192.168.11.0 0.0.0.255
[Huawei-ospf-7-area-0.0.0.1]q
[Huawei-ospf-7]dhcp ena
Info: The operation may take a few seconds. Please wait for a moment.done.
[Huawei]int vlanif 2
[Huawei-Vlanif2]dhcp se int //启动dhcp服务器基于接口地址池的IP地址分配方式
[Huawei-Vlanif2]int  vlanif 4
[Huawei-Vlanif4]dhcp se int 
[Huawei-Vlanif4]q
[Huawei]

 5.LSW4

LSW4和LSW3的配置大差不差,差不了多少

同样的用Eth-trunk链路聚合技术来实现负载均衡

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info ena
Info: Information center is disabled.
[Huawei]vlan batch 3 5 7 12
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]port l trunk 
[Huawei-GigabitEthernet0/0/1]port trunk allow vlan 1 3 5 7
[Huawei-GigabitEthernet0/0/1]q
[Huawei]int g0/0/2
[Huawei-GigabitEthernet0/0/2]port l trunk 
[Huawei-GigabitEthernet0/0/2]port trunk allow vlan 1 3 5 7
[Huawei-GigabitEthernet0/0/2]q
[Huawei]int eth-trunk 1
[Huawei-Eth-Trunk1]mode lacp 
[Huawei-Eth-Trunk1]max active 2
[Huawei-Eth-Trunk1]load-balance src-dst-mac
[Huawei-Eth-Trunk1]q
[Huawei]int g0/0/3
[Huawei-GigabitEthernet0/0/3]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-GigabitEthernet0/0/3]int g0/0/4
[Huawei-GigabitEthernet0/0/4]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-GigabitEthernet0/0/4]int  eth-trunk 1
[Huawei-Eth-Trunk1]port l trunk 
[Huawei-Eth-Trunk1]port trunk allow vlan 1 3 5 12
[Huawei-Eth-Trunk1]q
[Huawei]int vlanif 3
[Huawei-Vlanif3]ip add 192.168.3.254 24
[Huawei-Vlanif3]int vlanif 5
[Huawei-Vlanif5]ip add 192.168.5.254 24
[Huawei-Vlanif5]int vlanif 7
[Huawei-Vlanif7]ip add 192.168.7.254 24
[Huawei-Vlanif7]int vlanif 12
[Huawei-Vlanif12]ip add 192.168.12.254 24
[Huawei-Vlanif12]q
[Huawei]ospf 8
[Huawei-ospf-8]area 1
[Huawei-ospf-8-area-0.0.0.1]net 192.168.3.0 0.0.0.255
[Huawei-ospf-8-area-0.0.0.1]net 192.168.5.0 0.0.0.255
[Huawei-ospf-8-area-0.0.0.1]net 192.168.7.0 0.0.0.255
[Huawei-ospf-8-area-0.0.0.1]net 192.168.12.0 0.0.0.255
[Huawei-ospf-8-area-0.0.0.1]q
[Huawei-ospf-8]q
[Huawei]dhcp ena
Info: The operation may take a few seconds. Please wait for a moment.done.
[Huawei]int vlanif 3
[Huawei-Vlanif3]dhcp se int 
[Huawei-Vlanif3]int vlanif 5
[Huawei-Vlanif5]dhcp se int
[Huawei-Vlanif5]q
[Huawei]

 LSW1算是核心的三层设备了,同样也是配置Eth-trunk链路聚合技术来实现负载均衡

 

 LSW1配置命令

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info ena
Info: Information center is disabled.
[Huawei]vlan batch 2 3 4 5 8 9 10 11 12
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]int eth-trunk 1
[Huawei-Eth-Trunk1]mode lacp 
[Huawei-Eth-Trunk1]max active 2
[Huawei-Eth-Trunk1]load-balance src-dst-mac
[Huawei-Eth-Trunk1]q
[Huawei]int eth-trunk 2
[Huawei-Eth-Trunk2]mode lacp 
[Huawei-Eth-Trunk2]max active 2
[Huawei-Eth-Trunk2]load-balance src-dst-mac
[Huawei-Eth-Trunk2]q
[Huawei]int eth-trunk 3
[Huawei-Eth-Trunk3]mode lacp 
[Huawei-Eth-Trunk3]max active 2
[Huawei-Eth-Trunk3]load-balance src-dst-mac
[Huawei-Eth-Trunk3]q
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-GigabitEthernet0/0/1]int g0/0/2
[Huawei-GigabitEthernet0/0/2]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-GigabitEthernet0/0/2]int g0/0/3
[Huawei-GigabitEthernet0/0/3]eth-trunk 2
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-GigabitEthernet0/0/3]int g0/0/4
[Huawei-GigabitEthernet0/0/4]eth-trunk 2
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-GigabitEthernet0/0/4]int g0/0/5
[Huawei-GigabitEthernet0/0/5]eth-trunk 3
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-GigabitEthernet0/0/5]int g0/0/6
[Huawei-GigabitEthernet0/0/6]eth-trunk 3
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei-GigabitEthernet0/0/6]q
[Huawei]int eth-trunk 1
[Huawei-Eth-Trunk1]port l trunk
[Huawei-Eth-Trunk1]port trunk allow vlan 1 2 4 11
[Huawei-Eth-Trunk1]int eth-trunk 2
[Huawei-Eth-Trunk2]port l trunk
[Huawei-Eth-Trunk2]port trunk allow vlan 1 3 5 12
[Huawei-Eth-Trunk2]int eth-trunk 3
[Huawei-Eth-Trunk3]port l trunk
[Huawei-Eth-Trunk3]port trunk allow vlan 8 9 10
[Huawei-Eth-Trunk3]q
[Huawei]int g0/0/7
[Huawei-GigabitEthernet0/0/7]port l trunk 
[Huawei-GigabitEthernet0/0/7]port trunk allow vlan 1 to 5
[Huawei-GigabitEthernet0/0/7]q
[Huawei]int vlanif 1
[Huawei-Vlanif1]ip add 192.168.1.254 24
[Huawei-Vlanif1]q
[Huawei]int vlanif 8
[Huawei-Vlanif8]ip add 192.168.8.254 24
[Huawei-Vlanif8]q
[Huawei]int vlanif 9
[Huawei-Vlanif9]ip add 192.168.9.254 24
[Huawei-Vlanif9]q
[Huawei]int vlanif 10
[Huawei-Vlanif10]ip add 192.168.10.254 24
[Huawei-Vlanif10]q
[Huawei]int vlanif 11
[Huawei-Vlanif11]ip add 192.168.11.254 24
[Huawei-Vlanif11]q
[Huawei]int vlanif 12
[Huawei-Vlanif12]ip add 192.168.12.254 24
[Huawei-Vlanif12]q
[Huawei]ospf 9
[Huawei-ospf-9]area 1
[Huawei-ospf-9-area-0.0.0.1]net 192.168.1.0 0.0.0.255
[Huawei-ospf-9-area-0.0.0.1]net 192.168.8.0 0.0.0.255
[Huawei-ospf-9-area-0.0.0.1]net 192.168.9.0 0.0.0.255
[Huawei-ospf-9-area-0.0.0.1]net 192.168.10.0 0.0.0.255
[Huawei-ospf-9-area-0.0.0.1]net 192.168.11.0 0.0.0.255
[Huawei-ospf-9-area-0.0.0.1]net 192.168.12.0 0.0.0.255
[Huawei-ospf-9-area-0.0.0.1]q
[Huawei-ospf-9]q
[Huawei]dhcp ena
Info: The operation may take a few seconds. Please wait for a moment.done.
[Huawei]int vlanif 1
[Huawei-Vlanif1]dhcp se int 
[Huawei-Vlanif1]q
[Huawei]

 3.AC配置重头戏来啦

[AC6005]undo info ena
Info: Information center is disabled.
[AC6005]
[AC6005]vlan batch 2 3 4 5
Info: This operation may take a few seconds. Please wait for a moment...done.
[AC6005]
[AC6005]int g0/0/1
[AC6005-GigabitEthernet0/0/1]
[AC6005-GigabitEthernet0/0/1]port l trunk 
[AC6005-GigabitEthernet0/0/1]
[AC6005-GigabitEthernet0/0/1]port trunk allow vlan 1 to 5
[AC6005-GigabitEthernet0/0/1]
[AC6005-GigabitEthernet0/0/1]q
[AC6005]
[AC6005]int vlanif 1
[AC6005-Vlanif1]
[AC6005-Vlanif1]ip add 192.168.1.253 24
Error: The address already exists.
[AC6005-Vlanif1]
[AC6005-Vlanif1]q
[AC6005]
[AC6005]wlan  //从系统识视图进入wlan视图
[AC6005-wlan-view]
[AC6005-wlan-view]ap-gr name apg1  //创建AP组
[AC6005-wlan-ap-group-apg1]
[AC6005-wlan-ap-group-apg1]q
[AC6005-wlan-view]
[AC6005-wlan-view]ap-gr name apg2  //创建AP组
[AC6005-wlan-ap-group-apg2]
[AC6005-wlan-ap-group-apg2]q
[AC6005-wlan-view]

配置设备的国家码

[AC6005-wlan-view] regulatory-domain-profile name domain

这条语句创建域管理模板,并进入域管理模板视图,若域管理模板已经存在,则直接进入域管理识图模板。

[AC6005-wlan-view] country-code CN

这条语句配置设备的国家码

[AC6005-wlan-view]regulatory-domain-profile name domain
//创建域管理模板,并进入域管理模板视图,若域管理模板已经存在,则直接进入域管理识图模板。
[AC6005-wlan-regulate-domain-domain]country-code CN  //配置设备的国家码
Info: The current country code is same with the input country code.
[AC6005-wlan-regulate-domain-domain]q
[AC6005-wlan-view]

 然后进入ap组配置引用域管理模板

AC6005-wlan-ap-group-apg2]regulatory-domain-profile domain

这条语句是在指定AP或者AP中引用域管理模板

[AC6005-wlan-view]ap-gr name apg1  //创建名为apg1的ap组
[AC6005-wlan-ap-group-apg1]reg domain  //在指定AP或者AP中引用域管理模板
Warning: Modifying the country code will clear channel, power and antenna gain c
onfigurations of the radio and reset the AP. Continue?[Y/N]:
Error: Please choose 'YES' or 'NO' first before pressing 'Enter'. [Y/N]:y
[AC6005-wlan-ap-group-apg1]ap-gr name apg2  //创建名为apg2的ap组
[AC6005-wlan-ap-group-apg2]reg domain  //在指定AP或者AP中引用域管理模板
Warning: Modifying the country code will clear channel, power and antenna gain c
onfigurations of the radio and reset the AP. Continue?[Y/N]:y
[AC6005-wlan-ap-group-apg2]q
[AC6005-wlan-view]
​

查看AP的MAC地址

如果不知道AP的mac地址有两种方式查看

方法一

右键点设置

注意AP开启的时候是不能复制MAC地址的

方法二 

在AP的CLI窗口输入 dis int vlan1  即可查看vlan1的信息,当然也有AP的mac地址

 

配置AP鉴别模式

[AC6005]capwap source interface Vlanif 1 

 指定CAPWAP隧道的源端接口。该源端接口是某个VLAN对应的IP 接口

[AC6005-wlan-view]ap auth-mode mac-auth

ap auth-mode mac-auth 其实是一种鉴别方式,采用MAC 地址进行鉴别模式

ap auth-mode mac-auth{ mac-auth | no-auth | sn-auth}

sn-auth 表示采用序列号鉴别模式

no-auth 表示不对AP进行鉴别

注意⚠警告⚠信息

Warning: This operation may cause AP reset. If the country code changes, it will
 clear channel, power and antenna gain configurations of the radio, Whether to c
ontinue? [Y/N]:y

//警告:该操作会导致AP重置,如果国家码改变,射频的配置信息会清空,是否继续?这里需继续,输入y,按enter键即可

[AC6005]capwap sou int vlanif 1  
//指定CAPWAP隧道的源端接口。该源端接口是某个VLAN对应的IP 接口
[AC6005]wlan
[AC6005-wlan-view]ap auth-mode mac-auth
//ap auth-mode mac-auth 其实是一种鉴别方式,采用MAC 地址进行鉴别模式
[AC6005-wlan-view]ap-id 1 ap-mac 00e0-fc45-4ac0
[AC6005-wlan-ap-1]ap-name AP1
[AC6005-wlan-ap-1]ap-gr apg1
Warning: This operation may cause AP reset. If the country code changes, it will
 clear channel, power and antenna gain configurations of the radio, Whether to c
ontinue? [Y/N]:y
//警告:该操作会导致AP重置,如果国家码改变,射频的配置信息会清空,是否继续?这里需继续,输入y,按enter键即可
Info: This operation may take a few seconds. Please wait for a moment.. done.
[AC6005-wlan-ap-1]ap-id 2 ap-mac 00e0-fc4e-3c70  //采用MAC 地址进行鉴别模式
[AC6005-wlan-ap-2]ap-name AP2
[AC6005-wlan-ap-2]ap-gr apg1
Warning: This operation may cause AP reset. If the country code changes, it will
 clear channel, power and antenna gain configurations of the radio, Whether to c
ontinue? [Y/N]:y
Info: This operation may take a few seconds. Please wait for a moment.. done.
[AC6005-wlan-ap-2]ap-id 3 ap-mac 00e0-fcff-6180   //采用MAC 地址进行鉴别模式
[AC6005-wlan-ap-3]ap-name AP3
[AC6005-wlan-ap-3]ap-gr apg1
Warning: This operation may cause AP reset. If the country code changes, it will
 clear channel, power and antenna gain configurations of the radio, Whether to c
ontinue? [Y/N]:y
Info: This operation may take a few seconds. Please wait for a moment.. done.
[AC6005-wlan-ap-3]ap-id 4 ap-mac 00e0-fc45-1c40   //采用MAC 地址进行鉴别模式
[AC6005-wlan-ap-4]ap-name AP4
[AC6005-wlan-ap-4]ap-gr apg2
Warning: This operation may cause AP reset. If the country code changes, it will
 clear channel, power and antenna gain configurations of the radio, Whether to c
ontinue? [Y/N]:y
Info: This operation may take a few seconds. Please wait for a moment.. done.
[AC6005-wlan-ap-4]ap-id 5 ap-mac 00e0-fc95-3690   //采用MAC 地址进行鉴别模式
[AC6005-wlan-ap-5]ap-name AP5
[AC6005-wlan-ap-5]ap-gr apg2
Warning: This operation may cause AP reset. If the country code changes, it will
 clear channel, power and antenna gain configurations of the radio, Whether to c
ontinue? [Y/N]:y
Info: This operation may take a few seconds. Please wait for a moment.. done.
[AC6005-wlan-ap-5]q
[AC6005-wlan-view]

 创建安全模板

[AC6005-wlan-view]security-profile name se-1 //创建安全模板命名为se-1
[AC6005-wlan-sec-prof-se-1]security wpa2 psk pass-phrase 12345678 aes
//配置鉴别和wap2加密机制
Warning: The current password is too simple. For the sake of security, you are a
dvised to set a password containing at least two of the following: lowercase let
ters a to z, uppercase letters A to Z, digits, and special characters. Continue?
 [Y/N]:y
//警告:当前密码太简单。为了安全起见,你是建议设置至少包含以下两项的密码:小写let
字母a到z、大写字母a到z、数字和特殊字符是否继续?输入y,按enter键
[AC6005-wlan-view]secur name se-2  //创建安全模板命名为se-2
[AC6005-wlan-sec-prof-se-2]security wpa2 psk pass-phrase 12345678 aes
//配置鉴别和wap2加密机制
Warning: The current password is too simple. For the sake of security, you are a
dvised to set a password containing at least two of the following: lowercase let
ters a to z, uppercase letters A to Z, digits, and special characters. Continue?
 [Y/N]:y

创建SSID模板

[AC6005-wlan-view]ssid-profile name 模板名字  //创建模板

[AC6005-wlan-ssid-prof-ssid4]ssid wifi-1  //命名WiFi名

[AC6005-wlan-view]ssid name ssid1  //创建ssid模板
[AC6005-wlan-ssid-prof-ssid1]ssid wifi-1  //命名模板
Info: This operation may take a few seconds, please wait.done.
[AC6005-wlan-ssid-prof-ssid1]q
[AC6005-wlan-view]ssid name ssid2  //创建ssid模板
[AC6005-wlan-ssid-prof-ssid2]ssid wifi-2  //命名模板
Info: This operation may take a few seconds, please wait.done.
[AC6005-wlan-ssid-prof-ssid2]q
[AC6005-wlan-view]ssid name ssid3  //创建ssid模板
[AC6005-wlan-ssid-prof-ssid3]ssid wifi-3  //命名模板
Info: This operation may take a few seconds, please wait.done.
[AC6005-wlan-ssid-prof-ssid3]q
[AC6005-wlan-view]ssid name ssid4  //创建ssid模板
[AC6005-wlan-ssid-prof-ssid4]ssid wifi-4  //命名模板
Info: This operation may take a few seconds, please wait.done.
[AC6005-wlan-ssid-prof-ssid4]q
[AC6005-wlan-view]

创建VAP模板

[AC6005-wlan-view]vap-pro name vap1  //创建VAP模板,命名为vap1
[AC6005-wlan-vap-prof-vap1]for tunnel  
//指定数据转发的方式,或者指定隧道(tunnel)或者指定直接转发模式(direct-forward)方式
//这里使用隧道转发
[AC6005-wlan-vap-prof-vap1]se vlan-id 2
//指定VAP的业务VLAN,即用于转发数据的VLAN
[AC6005-wlan-vap-prof-vap1]secur se-1
//用于在指定VAP模板下引用安全模板
[AC6005-wlan-vap-prof-vap1]ssid-pro ssid1
//用于在指定VAP模板下引用SSID模板
[AC6005-wlan-vap-prof-vap1]q
[AC6005-wlan-view]vap-pro name vap2
//创建VAP模板,命名为vap2
[AC6005-wlan-vap-prof-vap2]for tunnel 
//指定数据转发的方式,或者指定隧道(tunnel)或者指定直接转发模式(direct-forward)方式
//这里使用隧道转发
[AC6005-wlan-vap-prof-vap2]se vlan-id 4
//指定VAP的业务VLAN,即用于转发数据的VLAN
[AC6005-wlan-vap-prof-vap2]secur se-2
//用于在指定VAP模板下引用安全模板
[AC6005-wlan-vap-prof-vap2]ssid-pro ssid2
//用于在指定VAP模板下引用SSID模板
[AC6005-wlan-vap-prof-vap2]
​

同理可得

[AC6005-wlan-view]vap-pro name vap3
[AC6005-wlan-vap-prof-vap3]for tunnel
[AC6005-wlan-vap-prof-vap3]se vlan-id 3
[AC6005-wlan-vap-prof-vap3]secur se-1
[AC6005-wlan-vap-prof-vap3]ssid-pro ssid3
//退到wlan视图
[AC6005-wlan-view]vap-pro name vap4
[AC6005-wlan-vap-prof-vap4]for tunnel
[AC6005-wlan-vap-prof-vap4]se vlan-id 5
[AC6005-wlan-vap-prof-vap4]secur se-2
[AC6005-wlan-vap-prof-vap4]ssid-pro ssid4
[AC6005-wlan-vap-prof-vap4]q
[AC6005-wlan-view]

为射频引用VAP模板

[AC6005-wlan-view]ap-gr name apg1
[AC6005-wlan-ap-group-apg1]vap-pro vap1 wlan 1 rad 0  //为射频引用VAP模板
//为射频引用VAP模板。wlan前面是VAP模板名称,wlan后面是VAP模板编号,不同业务对应不同的VAP模板编号。radio 后面是射频的编号
[AC6005-wlan-ap-group-apg1]vap-pro vap1 wlan 1 rad 1  //为射频引用VAP模板
[AC6005-wlan-ap-group-apg1]vap-pro vap2 wlan 2 rad 0  //为射频引用VAP模板
[AC6005-wlan-ap-group-apg1]vap-pro vap2 wlan 2 rad 1  //为射频引用VAP模板
[AC6005]wlan
[AC6005-wlan-view]ap-gr name apg2
[AC6005-wlan-ap-group-apg2]vap-pro vap3 wlan 3 rad 0  //为射频引用VAP模板
[AC6005-wlan-ap-group-apg2]vap-pro vap3 wlan 3 rad 1  //为射频引用VAP模板
[AC6005-wlan-ap-group-apg2]vap-pro vap4 wlan 4 rad 0  //为射频引用VAP模板
[AC6005-wlan-ap-group-apg2]vap-pro vap4 wlan 4 rad 1  //为射频引用VAP模板
[AC6005-wlan-ap-group-apg2]q
[AC6005-wlan-view]
//到这里就可以等待AP就绪啦

最后AP就绪


结束啦!看到这里的都比个♥

 

总结

以上就是今天要讲的内容啦,很开心,自己手动配置出校园网,欢迎大佬指点不足啦

有关校园网ensp模拟搭建的更多相关文章

  1. ruby - 如何模拟 Net::HTTP::Post? - 2

    是的,我知道最好使用webmock,但我想知道如何在RSpec中模拟此方法:defmethod_to_testurl=URI.parseurireq=Net::HTTP::Post.newurl.pathres=Net::HTTP.start(url.host,url.port)do|http|http.requestreq,foo:1endresend这是RSpec:let(:uri){'http://example.com'}specify'HTTPcall'dohttp=mock:httpNet::HTTP.stub!(:start).and_yieldhttphttp.shou

  2. ruby-on-rails - 在这种情况下我如何模拟一个对象?没有明显的方法可以用模拟替换对象 - 2

    假设我在Store的模型中有这个非常简单的方法:defgeocode_addressloc=Store.geocode(address)self.lat=loc.latself.lng=loc.lngend如果我想编写一些不受地理编码服务影响的测试脚本,这些脚本可能已关闭、有限制或取决于我的互联网连接,我该如何模拟地理编码服务?如果我可以将地理编码对象传递到该方法中,那将很容易,但我不知道在这种情况下该怎么做。谢谢!特里斯坦 最佳答案 使用内置模拟和stub的rspecs,你可以做这样的事情:setupdo@subject=MyCl

  3. ruby - "public/protected/private"方法是如何实现的,我该如何模拟它? - 2

    在ruby中,你可以这样做:classThingpublicdeff1puts"f1"endprivatedeff2puts"f2"endpublicdeff3puts"f3"endprivatedeff4puts"f4"endend现在f1和f3是公共(public)的,f2和f4是私有(private)的。内部发生了什么,允许您调用一个类方法,然后更改方法定义?我怎样才能实现相同的功能(表面上是创建我自己的java之类的注释)例如...classThingfundeff1puts"hey"endnotfundeff2puts"hey"endendfun和notfun将更改以下函数定

  4. ruby - 在 RSpec 中 stub /模拟全局常量 - 2

    我有一个gem,它有一个根据Rails.env的不同行为的方法:defself.envifdefined?(Rails)Rails.envelsif...现在我想编写一个规范来测试这个代码路径。目前我是这样做的:Kernel.const_set(:Rails,nil)Rails.should_receive(:env).and_return('production')...没关系,只是感觉很丑。另一种方法是在spec_helper中声明:moduleRails;end而且效果也很好。但也许有更好的方法?理想情况下,这应该有效:rails=double('Rails')rails.sho

  5. ruby-on-rails - rspec 模拟对象属性赋值 - 2

    我有一个rspec模拟对象,一个值赋给了属性。我正在努力在我的rspec测试中满足这种期望。只是想知道语法是什么?代码:defcreate@new_campaign=AdCampaign.new(params[:new_campaign])@new_campaign.creationDate="#{Time.now.year}/#{Time.now.mon}/#{Time.now.day}"if@new_campaign.saveflash[:status]="Success"elseflash[:status]="Failed"endend测试it"shouldabletocreat

  6. ruby - 如何使用 rspec stub /模拟对命令行的调用? - 2

    我正在尝试测试命令行工具的输出。如何使用rspec来“伪造”命令行调用?执行以下操作不起作用:it"shouldcallthecommandlineandreturn'text'"do@p=Pig.new@p.should_receive(:run).with('my_command_line_tool_call').and_return('resulttext')end如何创建stub? 最佳答案 使用newmessageexpectationsyntax:规范/虚拟规范.rbrequire"dummy"describeDummy

  7. 如何将ensp桥接到真机上面 - 2

    第一步,先创建一个回环端口,不要用自己的网卡,很不稳定,会断的。①先找到“设备管理器”,点击②进入设备管理器点击“操作”,然后再点击“添加过时硬盘”,记得点击“操作”前先随便在空白处点击一下,不然点击“点击操作”会出现第二张图的内容。 ③点击“下一页”④点击“手动”,然后再点击下一页。 ⑤点击“网络适配器”,点击下一页  ⑥点击“Microsoft”,然后点击“环回适配器”。 创建完成后,在下图中会有一个“环回适配器”,  第二步,ensp和真机进行桥接①打开ensp,并且配置一个“云”②先添加一个内网接口,点击添加③选择“绑定信息”中的以太网2,点击“增加”,添加外网。如果找不到你的环回网卡

  8. ruby - 接收 block 作为参数的模拟方法 - 2

    我有一个或多或少这样的场景classAdefinitialize(&block)b=B.new(&block)endend我正在对A类进行单元测试,我想知道B#new是否正在接收传递给A#new的block。我使用Mocha作为模拟框架。这可能吗? 最佳答案 我用Mocha和RSpec都试过了,虽然我可以通过测试,但行为不正确。从我的实验中,我得出结论,验证block是否已通过是不可能的。问题:为什么要传递一个block作为参数?block将用于什么目的?什么时候调用?也许这确实是您应该用类似的东西测试的行为:classBlockP

  9. ruby - 如何模拟 Fixnum 变量的整数溢出? - 2

    我目前正在将一种算法从Java转换为Ruby,但由于Ruby中缺少整数溢出,我遇到了一些障碍。假设我的值为2663860877,它大于最大整数2147483648。在Java中,它环绕,我应该得到-1631106419。我找到了这段代码,但它似乎不起作用:defforce_overflow(i)ifi2147483647i&0xffffffffelseiendend并且'ing变量不会像您期望的那样强制它为负。 最佳答案 假设32位整数具有二进制补码负数,这应该可行:defforce_overflow_signed(i)force_

  10. ruby - 单元测试 ruby​​ 命令行应用程序的代码 - 如何模拟/传递 ARGV - 2

    我有一个命令行应用程序,它使用thor来处理选项的解析。我想使用test-unit和/或minitest针对代码对命令行功能进行单元测试。我似乎无法弄清楚如何确保ARGV数组(通常会保存命令行中的选项)保存我的测试选项,以便它们可以根据代码进行测试。具体应用代码:#myapp/commands/build.rbrequire'thor'moduleMyappmoduleCommands#DefinebuildcommandsforMyAppcommandlineclassBuild:test_unit#Definesourcerootofapplicationdefself.sourc

随机推荐