实现eNSP与VMWare虚拟机通信访问

windows下实现eNSP与VMWare虚拟机通信访问

前言

通过华为的eNSP软件模拟对应网络设备,并连接到VMWare可以很好的模拟服务应用管理网络设备。

操作过程

创建linux虚拟机

在这里插入图片描述

需要确保服务器网络已经打开,可以访问局域网,验证方法很简单,能够通过crt连接访问该虚拟机即可,具体可仓考我的另外一篇博客《菜鸟安装linux虚拟机》。
在这里插入图片描述

linux配置指定静态路由
在这里插入图片描述

搭建基础模拟网络

打开eNSP软件,点击新建,托选“云”组件到面板并双击该组件
在这里插入图片描述
添加两个网卡,分别为“udp”和对应VMWare虚拟机对应网卡(一般为VMnet8)。
再托选对应的路由器组件并连线,构成对应的基础网络。
在这里插入图片描述
启动路由器
在这里插入图片描述
双击各个节点分别配置每个端口的ip并配置路由,直到所有节点(设备和服务器)之间均可相关访问为止

The device is running!

<HUAWEI>
<HUAWEI>
<HUAWEI>sys
Enter system view, return user view with return command.
[~HUAWEI]inter	
[~HUAWEI]interface e	
[~HUAWEI]interface Eth	
[~HUAWEI]interface Eth-Trunk	
[~HUAWEI]interface Ethernet 1/0/0
[~HUAWEI-Ethernet1/0/0]ip add	
[~HUAWEI-Ethernet1/0/0]ip address 10.0.1.3 255.255.255.0
[*HUAWEI-Ethernet1/0/0]undo 	
[*HUAWEI-Ethernet1/0/0]undo shu	
[*HUAWEI-Ethernet1/0/0]undo shutdown 
[*HUAWEI-Ethernet1/0/0]commit
[~HUAWEI-Ethernet1/0/0]q
[~HUAWEI]inter	
[~HUAWEI]interface e	
[~HUAWEI]interface Eth	
[~HUAWEI]interface Eth-Trunk	
[~HUAWEI]interface Ethernet 1/0/1
[~HUAWEI-Ethernet1/0/1]ip add	
[~HUAWEI-Ethernet1/0/1]ip address 10.0.3.3 255.255.255.0
[*HUAWEI-Ethernet1/0/1]undo shut	
[*HUAWEI-Ethernet1/0/1]undo shutdown 
[*HUAWEI-Ethernet1/0/1]commit
[~HUAWEI-Ethernet1/0/1]ping 10.0.3.2
  PING 10.0.3.2: 56  data bytes, press CTRL_C to break
    Reply from 10.0.3.2: bytes=56 Sequence=1 ttl=255 time=19 ms
    Reply from 10.0.3.2: bytes=56 Sequence=2 ttl=255 time=7 ms
    Reply from 10.0.3.2: bytes=56 Sequence=3 ttl=255 time=6 ms
    Reply from 10.0.3.2: bytes=56 Sequence=4 ttl=255 time=5 ms
    Reply from 10.0.3.2: bytes=56 Sequence=5 ttl=255 time=4 ms

  --- 10.0.3.2 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 4/8/19 ms
 
[~HUAWEI-Ethernet1/0/1]q

配置路由

[~HUAWEI]ip ro	
[~HUAWEI]ip route-s	
[~HUAWEI]ip route-static 172.22.11.0 24 10.0.1.1
[*HUAWEI]ip route	
[*HUAWEI]ip route-monitor-group	
[*HUAWEI]ip route-static 10.0.2.0 24 10.0.1.1
[*HUAWEI]commit
[~HUAWEI]ping 172.22.11.100
  PING 172.22.11.100: 56  data bytes, press CTRL_C to break
    Reply from 172.22.11.100: bytes=56 Sequence=1 ttl=63 time=7 ms
    Reply from 172.22.11.100: bytes=56 Sequence=2 ttl=63 time=5 ms
    Reply from 172.22.11.100: bytes=56 Sequence=3 ttl=63 time=9 ms
    Reply from 172.22.11.100: bytes=56 Sequence=4 ttl=63 time=8 ms
    Reply from 172.22.11.100: bytes=56 Sequence=5 ttl=63 time=7 ms

  --- 172.22.11.100 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 5/7/9 ms
 
[~HUAWEI]ping 10.0.2.1
  PING 10.0.2.1: 56  data bytes, press CTRL_C to break
    Reply from 10.0.2.1: bytes=56 Sequence=1 ttl=255 time=7 ms
    Reply from 10.0.2.1: bytes=56 Sequence=2 ttl=255 time=6 ms
    Reply from 10.0.2.1: bytes=56 Sequence=3 ttl=255 time=7 ms
    Reply from 10.0.2.1: bytes=56 Sequence=4 ttl=255 time=6 ms
    Reply from 10.0.2.1: bytes=56 Sequence=5 ttl=255 time=7 ms

  --- 10.0.2.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 6/6/7 ms
 
[~HUAWEI]ping 10.0.2.2
  PING 10.0.2.2: 56  data bytes, press CTRL_C to break
    Reply from 10.0.2.2: bytes=56 Sequence=1 ttl=254 time=21 ms
    Reply from 10.0.2.2: bytes=56 Sequence=2 ttl=254 time=11 ms
    Reply from 10.0.2.2: bytes=56 Sequence=3 ttl=254 time=9 ms
    Reply from 10.0.2.2: bytes=56 Sequence=4 ttl=254 time=9 ms
    Reply from 10.0.2.2: bytes=56 Sequence=5 ttl=254 time=10 ms

  --- 10.0.2.2 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 9/12/21 ms

效果展示

网络拓扑图如下:
在这里插入图片描述

linux上ping各个路由器各个对应接口的ip
在这里插入图片描述

### 安装和配置 ENSP 的步骤 #### 关闭Hyper-V功能 为了使VMware能够正常运行并支持ENSP,在Windows 10或Win11操作系统下,需先关闭Hyper-V特性。这可以过在具有管理员权限的PowerShell窗口执行如下命令来完成: ```powershell bcdedit /set hypervisorlaunchtype off ``` 此操作会使得计算机重启后不再加载Hyper-V驱动程序[^3]。 #### 创建新的虚拟机用于安装ENSP 打开VMware Workstation Pro软件,点击“创建新的虚拟机”,按照向导提示设置虚拟机的相关参数,如名称、位置以及分配给该系统的资源量等信息。选择Linux作为客户机操作系统,并指定版本为其他Linux (64-bit)[^2]。 #### 下载并准备ENSP镜像文件 前往华为官网下载最新版的ENSP压缩包,解压获得ISO映像文件。将这个ISO文件挂载至之前建立好的虚拟机光驱中以便后续安装过程调用[^4]。 #### 开始安装ENSP平台 启动已配置完毕等待安装环境的虚拟机实例,从CD/DVD(IDE)启动进入Live CD模式下的图形界面安装流程。遵循屏幕上的指导逐步完成整个部署直至结束。期间需要注意的是要确保网络连接畅无阻以获取必要的依赖库和其他组件。 #### 配置完成后测试验证 当上述所有准备工作都顺利完成之后就可以尝试开启几个路由器或者交换机节点来进行简单的连性检测实验了。如果一切顺利的话应该可以看到各个设备之间相互通信良好没有任何障碍。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值