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