本地PC安装eNSP Pro完成简单的WLAN实验

前言

上个月底华为更新一版eNSP Pro,新增了AC、AP、STA等设备,也就是说可以在eNSP中进行WLAN相关的实验了。之前写过一篇文章《将eNSP Pro部署在华为云是什么体验》介绍了怎么在华为云上部署eNSP Pro,这次使用本地PC机在虚拟机中安装eNSP Pro,并完成一个简单的WLAN实验来体验体验eNSP Pro中AC、AP设备的配置有何不同。

准备实验环境

准备软件包

eNSP Pro

eNSP Pro 是华为公司数据通信产品线新推出的数通设备模拟器,主要应用在数据通信技能培训,为使用者提供华为数据通信产品设备命令行学习环境。

访问并登录“华为企业产品技术支持网站(https://support.huawei.com/enterprise/zh/index.html)”, 搜索“eNSP Pro”,将“eNSP-Pro_V100R001C10_Software_X8664_VirtualBox_release.tar.gz”下载到本地。

VirtualBox

VirtualBox是一款功能强大的x86和AMD64/Intel64虚拟化产品,适用于企业和家庭。VirtualBox不仅是一款面向企业客户的功能极其丰富的高性能产品,而且是唯一一个根据GNU通用公共许可证(GPL)第3版条款作为开源软件免费提供的虚拟化专业解决方案。

软件获取: https://www.virtualbox.org/

部署 eNSP Pro

  1. 下载VirtualBox安装包,并完成Virtualbox安装。

  1. 将下载的“eNSP-Pro_V100R001C10_Software_X8664_VirtualBox_release.tar.gz”的软件包解压。

  1. 在VirtualBox中注册虚拟硬盘。选择“管理 > 工具 > 虚拟介质管理”,单击“注册”,选择解压后的“eNSP-Pro_V100R001C10_Software_X8664_release.vdi”文件。

  1. 新建虚拟机。选择“控制 > 新建”,填写界面参数,单击“Next”。

  1. 根据个人PC实际情况修改虚拟机内存和CPU个数(建议不超过本机能力的70%),单击“Next”。

  1. 选中“Use an Existing Virtual Hard Disk File”,选择上一步骤注册的虚拟硬盘文件,单击“Next”。

  1. 单击“Finish”完成虚拟机创建。

  1. 调整网络设置。右击创建好的虚拟机,单击“设置”,选择“网络 > 网卡1 > 启用网络连接(E)”,“连接方式(A)”选择“仅主机(Host-Only)网络”,名称选择“VirtualBox Host-Only Ethernet Adapter”,单击“OK”。

  1. 启动虚拟机。双击已创建好的虚拟机或者单击”启动“启动虚拟机。

  1. 等待虚拟机启动完成,打开浏览器(推荐使用Chrome浏览器),在地址栏输入欢迎页屏幕上的网址访问数通模拟器。

  1. 登录eNSP Pro,点击右上角的”登录“,使用经过华为授权的Uniportal账号登录,就可以愉快的开始实验啦。

eNSP Pro仅面向认证级伙伴(ASP、CSP)发布到企业业务网站,暂不对销售合作伙伴、注册经销商、产品客户、普通注册用户开放。

开始实验配置

绘制实验拓扑

  1. 选择“仿真环境 > 沙箱”,单击“创建沙箱”。

  1. 单击”+“号,选择“货架”中需要的设备,添加设备AC、AP、终端STA,按照下图连线。

  1. 启动设备。全选所有设备,单击启动按钮,等待设备启动。

配置设备

AC配置
  1. 双击”AC-1“的图标,打开AC的控制台。输入”回车“以后,在”Enter Password:“后设置一个密码。

  1. 配置AC名称和IP地址。
<HUAWEI>system-view 
Enter system view, return user view with return command.
[HUAWEI]sysname AC-1
[AC-1]int vlan 1
[AC-1-Vlanif1]ip address 192.168.100.254 24
[AC-1-Vlanif1]quit 

  1. 启用DHCP服务,为AP和STA分下发地址。
[AC-1]dhcp enable 
[AC-1-Vlanif1]dhcp select interface 
[AC-1-Vlanif1]quit

  1. 以Vlanif1作为AC的IPv4源接口。

这里需要设置“DTLS PSK”,设置”FIT AP“的用户名和密码,设置全局脱机管理VAP的PSK。我这里密码全部设置为了:huawei@123

密码要求包含8-32个纯文本字符,或128或148个密码文本字符,这些字符必须至少由以下两个字符组合而成:小写字母a到z、大写字母a到z、数字和特殊字符。输入密码的时候,输入内容不可见,直接输入即可。

[AC-1]capwap source inter vlan 1
Set the DTLS PSK(contains 8-32 plain-text characters, or 128 or 148 cipher-text characters that must be a combination of at least two of the following: lowercase letters a to z, uppercase letters A to Z, digits, and special characters):
Confirm PSK:
Info: Deliver DTLS PSK to devices using CAPWAP connections. It may take a few minutes.
Set the user name for FIT APs(The value is a string of 4 to 31 characters, which can contain letters, underscores, and digits, and must start with a letter):huawei
Set the password for FIT APs(plain-text password of 8-128 characters or cipher-text password of 128-268 characters that must be a combination of at least three of the following: lowercase letters a to z, uppercase letters A to Z, digits, and special characters):
Confirm password:
Set the PSK of the global offline management VAP(plain-text password of 8-63 characters or cipher-text password of 128-188 characters that must be a combination of at least two of the following: lowercase letters a to z, uppercase letters A to Z, digits, and special characters):
Confirm PSK:
Warning: Ensure that the management VLAN and service VLAN are different. Otherwise, services may be interrupted.
Warning: Before an added device goes online for the first time, enable DTLS no-auth if it runs a version earlier than V200R021C00 or enable DTLS certificate-mandatory-match if it runs V200R021C00 or later.

  1. 允许CAPWAP的DTLS会话使用不认证方式。
[AC-1]capwap dtls no-auth enable
Warning: This operation allows for device access in non-DTLS encryption mode even when DTLS is enabled and brings security risks. After the device goes online for the first time, disable this function to prevent security risks. Continue? [Y/N]:Y

如果已开启了CAPWAP的控制隧道DTLS加密功能,增加对接V200R021C00之前版本的AP时,为保证版本兼容,避免AP无法上线,可以先开启该功能允许AP以不认证方式进行DTLS会话,使AP上线。AP上线后会获取新的DTLS凭证,重新以安全方式进行DTLS会话和上线。为确保网络安全,在AP重新上线后,应立即关闭该功能,避免未授权AP接入网络。

使用:undo capwap dtls no-auth enable禁止CAPWAP的DTLS会话使用不认证方式。

  1. 配置AP上线。
[AC-1]wlan 
[AC-1-wlan]ap auth-mode no-auth  // 配置AP以无认证方式上线。
Warning: It is insecure to configure none authentication mode.
[AC-1-wlan]rrm-profile n ictstu   //创建RRM模板。
[AC-1-wlan-rrm-prof-ictstu]quit
[AC-1-wlan]radio-2g-profile name ictstu //创建2G射频模板,并进入模板视图。
[AC-1-wlan-radio-2g-prof-ictstu]rrm-profile ictstu 配置射频模板引用RRM模板。
Warning: This action may cause service interruption. Continue? [Y/N]:y
[AC-1-wlan-radio-2g-prof-ictstu]quit

  1. 创建名为“ictstu”的SSID模板和名为”ictstu“的VAP模板,并在VAP模板中引用SSID模板。
[AC-1-wlan]ssid-profile name ictstu
[AC-1-wlan-ssid-prof-ictstu]ssid ictstu
[AC-1-wlan-ssid-prof-ictstu]quit
[AC-1-wlan]vap-profile name ictstu
[AC-1-wlan-vap-prof-ictstu]ssid-profile ictstu
Warning: This action may cause service interruption. Continue? [Y/N]:y

  1. 配置default AP组的射频、工作带宽、工作信道、密码等信息。
[AC-1-wlan]ap-group name default
[AC-1-wlan-ap-group-default]radio 0  //进入名为default的AP组的射频0视图。
[AC-1-wlan-ap-group-default-radio-0]calibrate auto-channel-select disable  //关闭信道自动选择功能。
Info: This operation will recover the redundant radio.
[AC-1-wlan-ap-group-default-radio-0]channel 20mhz 1  //配置default AP组射频0的工作带宽为20MHz,工作信道为1。
Warning: This action may cause service interruption. Continue? [Y/N]:y
Info: The channel value and bandwidth value take effect only when automatic channel selection is disabled, and the value depends on the AP specifications and local laws and regulations.
[AC-1-wlan-ap-group-default-radio-0]vap-profile ictstu wlan 1 //应用vap模板。
Warning: No PSK is configured in the default security profile, which will lead to a failure to create the VAP. Continue? [Y/N]:y
[AC-1-wlan-ap-group-default-radio-0]radio-2g-profile ictstu //应用2G射频模板。
Warning: This action may cause service interruption. Continue? [Y/N]:y
[AC-1-wlan-ap-group-default-radio-0]quit
[AC-1-wlan-ap-group-default]security-profile name default //在default AP组中引用default安全模板。
[AC-1-wlan-sec-prof-default]security open //设置密码认证方式为无密码认证。
Warning: This action may cause service interruption. Continue? [Y/N]:y
Warning: The Open encryption algorithm is insecure. For security-sensitive scenarios, WPA2 is recommended.

STA配置
  1. 双击STA终端,点击到“IPv4地址配置”,将模式修改为“DHCP”,点击“应用”。

  1. 点击到”命令行“,扫描可连接的Wi-Fi信号。
PC> wnmcli device wifi list --rescan yes  //查看当前的Wi-Fi信号状态(强制扫描)

  1. 连接至名为“ictstu”的Wi-Fi信号。
PC> wnmcli device wifi connect ictstu //连接wifi ictstu
PC> wnmcli device wifi list //查看当前的Wi-Fi信号状态,Status为up表示已经连接。

结果验证
  1. STA查看是否正确获取IP地址等信息。
PC> ifconfig

  1. 在AC上执行display station all连接的终端信息。

  1. 在AC上执行display radio all查看AP的射频信息。

  1. 在AP上执行display vap all查看业务型VAP的相关信息。

  1. 在AP上执行display ap all查看AP信息。

总结

  1. eNSP Pro中在AC上暂时无法使用display mac-address命令查看到AP的MAC地址等信息,如果需要使用MAC地址认证的方式上线AP,需要在AP中执行display /driver/global-attribute/system-mac-address命令获取MAC地址。

  1. STA中连接Wi-Fi暂时只能使用命令的方式进行,不支持在图形化界面进行Wi-Fi连接。

  1. 无线设备AP的初始帐号为admin,密码为:Admin@huawei.com。

  2. AP上的命令比较特殊,使用的是MD-CLI,并不是之前常用的CLI方式。

MD-CLI(Model-Driven Command Line Interface)是基于YANG模型生成的既有机机交互又有人机交互能力的命令行工具。相比传统CLI,具有配置逻辑简单、机器解析处理容易和学习成本低等优点。

© 版权声明
文章:本地PC安装eNSP Pro完成简单的WLAN实验
作者:Guangran
链接:https://www.rsecc.cn/1001.html
声明:如无特别说明本文即为原创文章仅代表个人观点,版权归《广然笔记》所有,未经授权、请勿转载。

相关推荐

  1. Linuxps简单实现

    2024-04-14 06:54:05       38 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-04-14 06:54:05       19 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-04-14 06:54:05       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-04-14 06:54:05       19 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-04-14 06:54:05       20 阅读

热门阅读

  1. 微信小程序相关

    2024-04-14 06:54:05       13 阅读
  2. KDTree和Octree的区别

    2024-04-14 06:54:05       19 阅读
  3. nuxt.config.js配置

    2024-04-14 06:54:05       17 阅读
  4. React状态与引用(Refs)- 差异和使用场景

    2024-04-14 06:54:05       14 阅读
  5. js实现webp转png/jpg

    2024-04-14 06:54:05       13 阅读
  6. Spring Boot+Vue的高校食材采供管理系统

    2024-04-14 06:54:05       15 阅读
  7. git合并冲突

    2024-04-14 06:54:05       12 阅读
  8. GStreamer插件开发的环境搭建记录

    2024-04-14 06:54:05       14 阅读
  9. 浏览器提示存在不安全脚本如何解决

    2024-04-14 06:54:05       14 阅读
  10. 【C++】模拟list

    2024-04-14 06:54:05       15 阅读