【计算机网络综合实验】基于eNSP模拟结合实际操作的计算机网络实验(一)

基于eNSP的相关计算机网络实验 2019-05-13 11:06:34
更新的下一篇内容:基于eNSP结合实际操作的的计算机网络实验(二)
next:实验(三)
终结篇:实验(终章)
?? 这个实验记录随着学习进度的进行不断进行更新,主要为基于华为eNSP环境下进行的熟悉计算机网络的相关实验,这个实验主要为熟悉掌握计算机网络的结构和工作原理,深入理解交换机、路由器、无限网络的工作原理,目前这个实验包括下面几个内容:

  • 单台PC机联通交换机的实验配置
  • 单台交换机上使用VLAN来隔离PC
  • 跨交换机实现不同VLAN的通信与隔离
  • 不同VLAN间实现通信
实操图如下 (#_#)
【计算机网络综合实验】基于eNSP模拟结合实际操作的计算机网络实验(一)
文章图片

【计算机网络综合实验】基于eNSP模拟结合实际操作的计算机网络实验(一)
文章图片

单台PC机联通交换机的实验配置
相关操作如下所示:
  1. 进入系统视图
  2. 交换机接口配置
  3. 添加交换机虚拟ip
  4. 尝试ping
【计算机网络综合实验】基于eNSP模拟结合实际操作的计算机网络实验(一)
文章图片

?? 在eNSP上交换机的设置脚本如下所示:
The device is running!sys Enter system view, return user view with Ctrl+Z. [Huawei]sysname sw1 [sw1] May 14 2019 10:26:17-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 4, the c hange loop count is 0, and the maximum number of records is 4095. [sw1]int e0/0/1 [sw1-Ethernet0/0/1]port link-type access [sw1-Ethernet0/0/1] May 14 2019 10:27:07-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 5, the c hange loop count is 0, and the maximum number of records is 4095. [sw1-Ethernet0/0/1]interface vlanif1 [sw1-Vlanif1]ip address 10.10.10.6 255.255.255.0 [sw1-Vlanif1] May 14 2019 10:28:58-08:00 sw1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Vlanif1 has entered the UP state. [sw1-Vlanif1]display currn May 14 2019 10:29:07-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 6, the c hange loop count is 0, and the maximum number of records is 409 # sysname sw1 # cluster enable ntdp enable ndp enable # drop illegal-mac alarm # diffserv domain default # drop-profile default # aaa authentication-scheme default authorization-scheme default accounting-scheme default domain default domain default_admin local-user admin password simple admin local-user admin service-type http # interface Vlanif1 ip address 10.10.10.6 255.255.255.0[sw1-Vlanif1] User interface con0 is available

【计算机网络综合实验】基于eNSP模拟结合实际操作的计算机网络实验(一)
文章图片

【计算机网络综合实验】基于eNSP模拟结合实际操作的计算机网络实验(一)
文章图片

单台交换机上使用VLAN来隔离PC
相关操作如下所示:
  1. 在单台交换机上使用不同的vlan域来对进行PC隔离
  2. 交换机端口配置
  3. 配置PC的ip地址
  4. 划分vlan区域
【计算机网络综合实验】基于eNSP模拟结合实际操作的计算机网络实验(一)
文章图片

?? 在eNSP上交换机的设置脚本如下所示:
sys Enter system view, return user view with Ctrl+Z. [Huawei]sysname sw1 [sw1]vlan batch 10 20 Info: This operation may take a few seconds. Please wait for a moment...done. [sw1] May 14 2019 10:33:37-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 5, the c hange loop count is 0, and the maximum number of records is 4095. [sw1]int e0/0/1 [sw1-Ethernet0/0/1]port link-type access [sw1-Ethernet0/0/1]port default vlan 10 [sw1-Ethernet0/0/1] May 14 2019 10:34:07-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 7, the c hange loop count is 0, and the maximum number of records is 4095. [sw1-Ethernet0/0/1]int e0/0/2 [sw1-Ethernet0/0/2]port link-type access [sw1-Ethernet0/0/2]port default vlan 20 [sw1-Ethernet0/0/2] May 14 2019 10:34:27-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 9, the c hange loop count is 0, and the maximum number of records is 4095. [sw1-Ethernet0/0/2]int e0/0/3 [sw1-Ethernet0/0/3]port link-type access [sw1-Ethernet0/0/3] May 14 2019 10:34:47-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 10, the change loop count is 0, and the maximum number of records is 4095. [sw1-Ethernet0/0/3]port default vlan 10 [sw1-Ethernet0/0/3] May 14 2019 10:34:53-08:00 sw1 %%01IFNET/4/IF_STATE(l)[0]:Interface Vlanif1 has turned into DOWN state. May 14 2019 10:34:57-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 11, the change loop count is 0, and the maximum number of records is 4095. [sw1-Ethernet0/0/3] User interface con0 is available

【计算机网络综合实验】基于eNSP模拟结合实际操作的计算机网络实验(一)
文章图片

【计算机网络综合实验】基于eNSP模拟结合实际操作的计算机网络实验(一)
文章图片

【计算机网络综合实验】基于eNSP模拟结合实际操作的计算机网络实验(一)
文章图片

实现效果图如下所示:
【计算机网络综合实验】基于eNSP模拟结合实际操作的计算机网络实验(一)
文章图片

跨交换机实现不同VLAN的通信与隔离
相关操作如下所示:
  1. 配置两台交换机的接口VLAN
  2. 配置交换机与PC的端口连接
  3. 配置交换机端口间的连接方式
  4. 配置PC的ip地址
  5. 验证PC机两两之间的连通性
在这里解释一下两台交换机之间进行的trunk,trunk是端口进行汇聚的意思,它允许交换机与交换机、交换机与路由器、主机与交换机或路由器之间通过两个或多个端口并行进行连接,同时传输来提供更高的带宽、更大的吞吐量,大幅度提高整个网络能力。VLAN trunk是指设置了多个VLAN之后,想通过一个端口来传输我们设置的多个VLAN,我们就需要在交换机这里设置这个端口为trunk。trunk技术使得一条物理线路可以传送多个VLAN的数据,更加具体的细节你想了解的话可以去查查资料。
【【计算机网络综合实验】基于eNSP模拟结合实际操作的计算机网络实验(一)】【计算机网络综合实验】基于eNSP模拟结合实际操作的计算机网络实验(一)
文章图片

?? 在eNSP上交换机的设置脚本如下所示:
sys Enter system view, return user view with Ctrl+Z. [Huawei]sysname sw1 [sw1] May 14 2019 10:38:37-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 4, the c hange loop count is 0, and the maximum number of records is 4095. [sw1]int e0/0/1 [sw1-Ethernet0/0/1]port link-type access [sw1-Ethernet0/0/1]port default v May 14 2019 10:39:17-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 5, the c hange loop count is 0, and the maximum number of records is 4095. ^ Error:Incomplete command found at '^' position. [sw1-Ethernet0/0/1]q [sw1] [sw1]vlan batch 10 20 Info: This operation may take a few seconds. Please wait for a moment...done. [sw1]int e0/0/1 [sw1-Ethernet0/0/1] May 14 2019 10:39:37-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 6, the c hange loop count is 0, and the maximum number of records is 4095. [sw1-Ethernet0/0/1]port default vlan 10 [sw1-Ethernet0/0/1] May 14 2019 10:39:47-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 7, the c hange loop count is 0, and the maximum number of records is 4095. [sw1-Ethernet0/0/1]int e0/0/2 [sw1-Ethernet0/0/2]port link-type access [sw1-Ethernet0/0/2]port defa May 14 2019 10:40:07-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 8, the c hange loop count is 0, and the maximum number of records is 4095. [sw1-port-group-defa]port default vlan 20 [sw1-port-group-defa]q [sw1] May 14 2019 10:40:17-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 9, the c hange loop count is 0, and the maximum number of records is 4095. [sw1]int e0/0/2 [sw1-Ethernet0/0/2]port default vlan 20 [sw1-Ethernet0/0/2]int e May 14 2019 10:40:37-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 10, the change loop count is 0, and the maximum number of records is 4095. ^ Error: Unrecognized command found at '^' position. [sw1-Ethernet0/0/2]int e0/0/3 [sw1-Ethernet0/0/3]port link-type trunk [sw1-Ethernet0/0/3]port trunk May 14 2019 10:43:57-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 11, the change loop count is 0, and the maximum number of records is 4095. [sw1-port-group-trunk]port trunk allow-pass May 14 2019 10:44:07-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 12, the change loop count is 0, and the maximum number of records is 4095. ^ Error:Incomplete command found at '^' position. [sw1-port-group-trunk]q [sw1]int e0/0/3 [sw1-Ethernet0/0/3]port trunk allow-pass vlan 10 20 [sw1-Ethernet0/0/3] May 14 2019 10:44:37-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 13, the change loop count is 0, and the maximum number of records is 4095.

另一个交换机的设置也是差不多的,这里就不展示了
【计算机网络综合实验】基于eNSP模拟结合实际操作的计算机网络实验(一)
文章图片

【计算机网络综合实验】基于eNSP模拟结合实际操作的计算机网络实验(一)
文章图片

【计算机网络综合实验】基于eNSP模拟结合实际操作的计算机网络实验(一)
文章图片
不同VLAN间实现通信
相关操作如下所示:
  1. 交换机接口配置
  2. 创建多个VLAN域
  3. 设置PC的ip地址、网关配置
【计算机网络综合实验】基于eNSP模拟结合实际操作的计算机网络实验(一)
文章图片

?? 在eNSP上交换机的设置脚本如下所示:
sys Enter system view, return user view with Ctrl+Z. [Huawei]sysname sw1 [sw1] May 14 2019 10:50:47-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 4, the c hange loop count is 0, and the maximum number of records is 4095. [sw1]vlan batch 10 20 Info: This operation may take a few seconds. Please wait for a moment...done. [sw1] May 14 2019 10:50:57-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 5, the c hange loop count is 0, and the maximum number of records is 4095. [sw1]int e0/0/1 [sw1-Ethernet0/0/1]port link-type access [sw1-Ethernet0/0/1] May 14 2019 10:51:17-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 6, the c hange loop count is 0, and the maximum number of records is 4095. [sw1-Ethernet0/0/1]port default vlan 10 [sw1-Ethernet0/0/1]int May 14 2019 10:51:37-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 7, the c hange loop count is 0, and the maximum number of records is 4095. ^ Error: Unrecognized command found at '^' position. [sw1-Ethernet0/0/1]int e0/0/2 [sw1-Ethernet0/0/2]port link-type access [sw1-Ethernet0/0/2]port May 14 2019 10:51:57-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 8, the c hange loop count is 0, and the maximum number of records is 4095. ^ Error:Incomplete command found at '^' position. [sw1-Ethernet0/0/2]port default vlan 20 [sw1-Ethernet0/0/2] May 14 2019 10:52:06-08:00 sw1 %%01IFNET/4/IF_STATE(l)[0]:Interface Vlanif1 has turned into DOWN state. May 14 2019 10:52:07-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 9, the c hange loop count is 0, and the maximum number of records is 4095. [sw1-Ethernet0/0/2]int vlanif10 [sw1-Vlanif10] May 14 2019 10:52:21-08:00 sw1 %%01IFNET/4/IF_STATE(l)[1]:Interface Vlanif10 has turned into UP state. [sw1-Vlanif10]ip address 192.168.1.254 24 [sw1-Vlanif10] May 14 2019 10:53:16-08:00 sw1 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP on the interface Vlanif10 has entered the UP state. May 14 2019 10:53:17-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 10, the change loop count is 0, and the maximum number of records is 4095. [sw1-Vlanif10]intvlanif20 [sw1-Vlanif20] May 14 2019 10:53:28-08:00 sw1 %%01IFNET/4/IF_STATE(l)[3]:Interface Vlanif20 has turned into UP state. [sw1-Vlanif20]ip address 192.168.2.254 24 [sw1-Vlanif20] May 14 2019 10:53:57-08:00 sw1 %%01IFNET/4/LINK_STATE(l)[4]:The line protocol IP on the interface Vlanif20 has entered the UP state. May 14 2019 10:53:57-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25 .191.3.1 configurations have been changed. The current change number is 11, the change loop count is 0, and the maximum number of records is 4095. [sw1-Vlanif20]q [sw1]display ip interface brief *down: administratively down ^down: standby (l): loopback (s): spoofing The number of interface that is UP in Physical is 3 The number of interface that is DOWN in Physical is 2 The number of interface that is UP in Protocol is 3 The number of interface that is DOWN in Protocol is 2InterfaceIP Address/MaskPhysicalProtocol MEth0/0/1unassigneddowndown NULL0unassignedupup(s) Vlanif1unassigneddowndown Vlanif10192.168.1.254/24upup Vlanif20192.168.2.254/24upup [sw1]

【计算机网络综合实验】基于eNSP模拟结合实际操作的计算机网络实验(一)
文章图片

【计算机网络综合实验】基于eNSP模拟结合实际操作的计算机网络实验(一)
文章图片

【计算机网络综合实验】基于eNSP模拟结合实际操作的计算机网络实验(一)
文章图片

总结: …等试验内容更完了再写

    推荐阅读