Ensp用windows回环口连接cloud配置
创始人
2024-03-01 22:33:59
0

Ensp模拟通过本机(windows)用python脚本批量配置华为数通设备时,为了避免对内网资源的浪费最好用回环口(loopback)。

一、windows开启loopback虚拟接口

概要:

right click on window start menu icon and select Device manager.
click on Action, and select Add legacy hardware (该菜单项或许不会立即显示,要稍后才会显示)
click Next on welcome screen
choose “Install the hardware that i manually select from a list” and click on Next
scroll down and select Network adapters from offered common hardware types and click on Next
select Microsoft as the manufacturer, and then select Microsoft KM-TEST Loopback adapter card model, click on Next
click on Next
click on Finish

详细步骤及截图

1、windows+r键运行hdwwiz

2、添加新硬件

 下一步

3、搜索并自动安装硬件

 

4、找到网络适配器,下一步

 

5、厂商选择Microsoft,型号选择换回适配器

 6、完成,重启电脑生效。

重启电脑后,打开ensp-cloud就可以看到环回网卡了

二、 用windows回环口连接cloud配置

如下图设置,相当于本机电脑的回环网卡连接到了cloud,进而可以在本机通过cli对ensp中的网络设备进行配置,这种连接配置方式为桥接模式。

需注意:下图中169.254.16.38是本机电脑的回环口ip,并不是cloud的ip,cloud只是桥梁

 

 

 

1、配置Cloud所连设备

sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]int vlanif 399
Error: The VLAN does not exist.
[Huawei]vlan 399
[Huawei-vlan399]q
[Huawei]int vlanif 399
[Huawei-Vlanif399]ip add 169.254.16.10 16
[Huawei-Vlanif399]q
[Huawei]int gi 0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]port default vlan 399
[Huawei-GigabitEthernet0/0/1]q
[Huawei]
[Huawei]stelnet server enable
Info: Succeeded in starting the Stelnet server.
[Huawei]ssh user liulinfeng authentication-type password
Info: Succeeded in adding a new SSH user.
[Huawei]ssh user liulinfeng service-type stelnet
[Huawei]aaa
[Huawei-aaa]local-user liulinfeng password cipher Huawei@123
Info: Add a new user.
[Huawei-aaa]local-user liulinfeng privilege level 15
[Huawei-aaa]local-user liulinfeng service-type ssh
[Huawei-aaa]user-interface vty 0 4
[Huawei-ui-vty0-4]authentication-mode aaa
[Huawei-ui-vty0-4]protocol inbound ssh
[Huawei-ui-vty0-4]q

2、验证本机电脑与ensp中网络设备的连通性

 3、通过cloud用电脑ssh登录ensp网络设备

通过windows的cmd访问报错

Microsoft Windows [版本 10.0.22621.819]
(c) Microsoft Corporation。保留所有权利。C:\Users\liulinfeng>ssh 169.254.16.10
Unable to negotiate with 169.254.16.10 port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1C:\Users\liulinfeng>ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 169.254.16.10
Unable to negotiate with 169.254.16.10 port 22: no matching cipher found. Their offer: aes128-cbc,3des-cbc,des-cbcC:\Users\liulinfeng>ssh -oKexAlgorithms=+diffie-hellman-group1-sha1=+aes128-cbc=+3des-cbc=+dec-cbc 169.254.16.10
command-line line 0: garbage at end of line; "+aes128-cbc".C:\Users\liulinfeng>

ensp虚拟的网络设备参数不全,报错正常。

用ssh工具登录可以成功,如下: 

登录成功。

 

相关内容

热门资讯

AWSECS:访问外部网络时出... 如果您在AWS ECS中部署了应用程序,并且该应用程序需要访问外部网络,但是无法正常访问,可能是因为...
AWSElasticBeans... 在Dockerfile中手动配置nginx反向代理。例如,在Dockerfile中添加以下代码:FR...
银河麒麟V10SP1高级服务器... 银河麒麟高级服务器操作系统简介: 银河麒麟高级服务器操作系统V10是针对企业级关键业务...
北信源内网安全管理卸载 北信源内网安全管理是一款网络安全管理软件,主要用于保护内网安全。在日常使用过程中,卸载该软件是一种常...
AWR报告解读 WORKLOAD REPOSITORY PDB report (PDB snapshots) AW...
AWS管理控制台菜单和权限 要在AWS管理控制台中创建菜单和权限,您可以使用AWS Identity and Access Ma...
​ToDesk 远程工具安装及... 目录 前言 ToDesk 优势 ToDesk 下载安装 ToDesk 功能展示 文件传输 设备链接 ...
群晖外网访问终极解决方法:IP... 写在前面的话 受够了群晖的quickconnet的小水管了,急需一个新的解决方法&#x...
不能访问光猫的的管理页面 光猫是现代家庭宽带网络的重要组成部分,它可以提供高速稳定的网络连接。但是,有时候我们会遇到不能访问光...
Azure构建流程(Power... 这可能是由于配置错误导致的问题。请检查构建流程任务中的“发布构建制品”步骤,确保正确配置了“Arti...