本任务旨在实现华为ENSP中模拟网络设备与真实的外网之间的相互访问。

一、安装软件

eNSP V1.2.00.510

VirtualBox-5.1.24-117012-Win

WinPcap_4_1_3

wireshark-win32-1.4.3

百度网盘https://pan.baidu.com/s/1PXm8vg725hbW1kEmYBw1vA  提取码:4rrl

二、添加Loopback环回网卡

1、运行cmd:HDWWIZ,单击确定

2、在添加硬件界面,单击下一步

3、选择 手动安装列表

 

4、单击 显示所有设备

 5、在厂商类别中找到Microsoft,型号选择:Microssoft KM-TEST适配器,单击 下一步

 

6、 下一步 至安装结束

 三、网络拓扑图

 四、开始配置

1、配置云:右键cloud,进入设置,添加环回网卡以太网4--192.168.7.50和UDP映射
 

 2、配置共享本地网卡

在网络适配器设置中,右键本地以网卡,属性中勾上允许其他网络用户通过计算机的Internet连接来连接,选项上选择环回网卡以太网4,点确定。完成将本地网络共享到环回网卡。

 3、配置AR1

配置GE0/0/0 IP地址:192.168.137.123  255.255.255.0

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int gi 0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.137.123 255.255.255.0
Jul 18 2021 19:41:04-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
 IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[Huawei-GigabitEthernet0/0/0]dis this
[V200R003C00]
#
interface GigabitEthernet0/0/0
 ip address 192.168.137.123 255.255.255.0 
#
return

配置默认路由:
 

[Huawei-GigabitEthernet0/0/0]quit
[Huawei]ip route-static 0.0.0.0 0.0.0.0 192.168.137.1
[Huawei]dis ip routing-table 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 8        Routes : 8        

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   Static  60   0          RD   192.168.137.1   GigabitEthernet
0/0/0
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
  192.168.137.0/24  Direct  0    0           D   192.168.137.123 GigabitEthernet
0/0/0
192.168.137.123/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
192.168.137.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

 测试ensp中路由连接外网:

[Huawei]ping 8.8.8.8
  PING 8.8.8.8: 56  data bytes, press CTRL_C to break
    Reply from 8.8.8.8: bytes=56 Sequence=1 ttl=113 time=80 ms
    Reply from 8.8.8.8: bytes=56 Sequence=2 ttl=113 time=30 ms
    Request time out
    Reply from 8.8.8.8: bytes=56 Sequence=4 ttl=113 time=50 ms
    Request time out

  --- 8.8.8.8 ping statistics ---
    5 packet(s) transmitted
    3 packet(s) received
    40.00% packet loss
    round-trip min/avg/max = 30/53/80 ms

[Huawei]ping 211.136.192.6
  PING 211.136.192.6: 56  data bytes, press CTRL_C to break
    Reply from 211.136.192.6: bytes=56 Sequence=1 ttl=49 time=50 ms
    Reply from 211.136.192.6: bytes=56 Sequence=2 ttl=49 time=40 ms
    Reply from 211.136.192.6: bytes=56 Sequence=3 ttl=49 time=40 ms
    Reply from 211.136.192.6: bytes=56 Sequence=4 ttl=49 time=40 ms
    Reply from 211.136.192.6: bytes=56 Sequence=5 ttl=49 time=40 ms

  --- 211.136.192.6 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 40/42/50 ms

 4、配置PC1、PC2

此时ifconfig查看PC1的IP,发现无法获取IP,原因是我们没有配置DHCP,接下来我们配置DHCP。

 5、配置DHCP

AR1的配置

 

PC的配置

 

 验证ensp中PC连通外网:

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐