基于华为ensp模拟器课程指导书(华为模拟器eNSP学习笔记)

一、eNSP的安装

随着华为网络设备的越来越多的使用,学习华为网络路由知识的人也越来越多,一款可以很好模拟路由交换的软件可以让你更好的完成各种实验,eNSP软件,就是你需要的。

工具:

电脑、eNSP安装包

安装方法:

1.下载ensp软件。该软件为免费软件,可以在华为官网下载-技术支持 -工具 -企业网络 -eNSP-eNSP V100R002C00B39下载;

基于华为ensp模拟器课程指导书(华为模拟器eNSP学习笔记)(1)

2.打开下载好的软件包,双击安装程序,然后选择安装目录,勾选所有安装项(注意,必须勾选,其中wireshark 为抓包工具)

基于华为ensp模拟器课程指导书(华为模拟器eNSP学习笔记)(2)

3.安装win pcap(注意,前面的勾必须勾选)

基于华为ensp模拟器课程指导书(华为模拟器eNSP学习笔记)(3)

4.安装wireshark ,选择完全安装

基于华为ensp模拟器课程指导书(华为模拟器eNSP学习笔记)(4)

5.安装Oracle VM 选择完全安装

基于华为ensp模拟器课程指导书(华为模拟器eNSP学习笔记)(5)

6.安装完成,每次都要先启动Oracle VM,再启动ensp。不然网络无法配置。

二、ensp模拟器实验笔记:vlan不同接口类型的应用

路由器隔离广播域 交换机隔离冲突域 在交换机上怎么样隔离广播域呢?划分vlan!而vlan的接口类型有三种:一:access接口;看到这个单词是否特别熟悉 前面我们使用二层接口配ip时配不了一直报错,我们怎么解决的:port(接口) link(关联)-type(属性) access;(将接口类型设置为access)英文学的不好 反正我是这样理解的,如果有有错误请网友指正啊!第二种种类型是:trunk ;vlan id的取值范围是0到4095 , 可以配置的值是1到4094,0和4095都是保留值,为什么保留呢?不知道,有知道的网友请在下方评论。access我们之前使用过这里不做介绍,如果有不知道的朋友请参考华为模拟器ensp实验学习笔记。

使用 vlan bath 3 4 可以快速创建多个vlan

trunk端口是干什么用的呢?我们知道划分vlan之后每个vlan中的pc设备是可以互相访问的,但是不同的vlan间是无法访问的。trunk可以配置干道链路(trunk link)用作不同vlan 不同交换机之间的数据交互。trunk可以配置属于多个vlan。

dis vlan summ 查看vlan简要信息

第三种:hybrid接口:它实现对vlan的灵活应用 既有access的功能也有trunk接口的功能trunk接口实验

在调试交换机的时候它的信息中心会一直提示你 关闭提示的命令 undo terminal monitor (在用户模式下)

基于华为ensp模拟器课程指导书(华为模拟器eNSP学习笔记)(6)

实验如上图所示将pc1&pc3划分为vlan 1

将pc2&pc4划分为vlan 2

s1配置如下

<Huawei>undo t

<Huawei>undo terminal mo

<Huawei>undo terminal monitor

Info: Current terminal monitor is off.

<Huawei>sy

Enter system view, return user view with Ctrl Z.

[Huawei]sysname s1

[s1]vlan 1

[s1-vlan1]des

[s1-vlan1]description rsd 【打标签 取名让之后管理方便 】

[s1-vlan1]vlan 2

[s1-vlan2]des

[s1-vlan2]description market 【打标签 取名让之后管理方便】

[s1-vlan2]q

[s1]int e0/0/1

[s1-Ethernet0/0/1]port link-type

[s1-Ethernet0/0/1]port link-type access 【配置接口类型】

[s1-Ethernet0/0/1]potr defa

[s1-Ethernet0/0/1]por

[s1-Ethernet0/0/1]port def

[s1-Ethernet0/0/1]port default vlan 1

[s1-Ethernet0/0/1]q

[s1]int e0/0/2

[s1-Ethernet0/0/2]port link-ty

[s1-Ethernet0/0/2]port link-type access

[s1-Ethernet0/0/2]port defa

[s1-Ethernet0/0/2]port default vlan 2

s2和s3和s1的配置方法相同

配置之后我们可以使用dis port vlan来查看vlan接口的类型

基于华为ensp模拟器课程指导书(华为模拟器eNSP学习笔记)(7)

设置好之后我们来试试同一vlan下的pc1和pc3是否能通讯

基于华为ensp模拟器课程指导书(华为模拟器eNSP学习笔记)(8)

很明显不能

现在就是使用trunk接口的时候了 我们在s1上将g0/0/1口设置为trunk

[s1-GigabitEthernet0/0/1]port link-type trunk 【将接口类型变为trunk】

[s1-GigabitEthernet0/0/1]po

May 19 2018 15:32:16-08:00 s1 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 c

hange loop count is 0, and the maximum number of records is 4095.

Error: The interface is already a L2 interface.

[s1-GigabitEthernet0/0/1]port trunk all

[s1-GigabitEthernet0/0/1]port trunk allow-pass vlan 1 2 【让trunk这个接口可以通过vlan1数据也可以通过vlan2】

[s1-GigabitEthernet0/0/1]

同理在s2上进行同样的设置 在s3上将g0/0/1和g0/0/2都设置为trunk 在s3上设置时差别在于写允许通过vlan数据时 port trunk allow-passvlan all(允许所有的vlan数据通过)

做完后我们来测试pc1与其他pc间的通讯

PC>ping 10.1.1.2

Ping 10.1.1.2: 32 data bytes, Press Ctrl_C to break

From 10.1.1.2: bytes=32 seq=1 ttl=128 time=62 ms

From 10.1.1.2: bytes=32 seq=2 ttl=128 time=31 ms

From 10.1.1.2: bytes=32 seq=3 ttl=128 time=32 ms

From 10.1.1.2: bytes=32 seq=4 ttl=128 time=31 ms

From 10.1.1.2: bytes=32 seq=5 ttl=128 time=63 ms

--- 10.1.1.2 ping statistics ---

5 packet(s) transmitted

5 packet(s) received

0.00% packet loss

round-trip min/avg/max = 31/43/63 ms

PC>

在测试的时候若发现pc1 ping不通其他的设备 请检查vlan的接口时否时trunk 查看命令:dis port vlan

若不是请使用undo删除vlan 再进行重新设置

三、ensp单臂路由实验笔记

基于华为ensp模拟器课程指导书(华为模拟器eNSP学习笔记)(9)

实验背景

某公司三个部门人事部 市场部 经理需要跨vlan通讯

首先将pc的ip和子网掩码和网关设置好

然后来设置s1

s1配置

<Huawei>sy

Enter system view, return user view with Ctrl Z.

[Huawei]vlan 1 【创建vlan】

[Huawei-vlan1]des

[Huawei-vlan1]description hr 【vlan标签表明vlan1是属于hr人事】

[Huawei-vlan1]

Jul 7 2018 10:50:28-08:00 Huawei 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, th

e change loop count is 0, and the maximum number of records is 4095.

[Huawei-vlan1]q

[Huawei]undo info

[Huawei]undo info-center en

[Huawei]undo info-center enable 【关闭上述特别长的提示信息】

Info: Information center is disabled.

[Huawei]vlan 2

[Huawei-vlan2]des

[Huawei-vlan2]description market

[Huawei-vlan2]int e0/0/2

[Huawei-Ethernet0/0/2]port link-type access 【配置接口的类型 接口类型的区别有不明白的朋友点击三种类型的应用】

s2配置

[Huawei]vlan 3

[Huawei-vlan3]des

[Huawei-vlan3]description manage

[Huawei-vlan3]int e0/0/2

[Huawei-Ethernet0/0/2]port link-type access

[Huawei-Ethernet0/0/2]port defa

[Huawei-Ethernet0/0/2]port default vlan 3

[Huawei-Ethernet0/0/2]int e0/0/1

[Huawei-Ethernet0/0/1]port link-type trunk

[Huawei-Ethernet0/0/1]port trunk all

[Huawei-Ethernet0/0/1]port trunk allow-pass vlan all

[Huawei-Ethernet0/0/1]

<Huawei>sys

Enter system view, return user view with Ctrl Z.

[Huawei]sys s2 【修改交换机名】

[s2]int e 0/0/1

s1配置

<Huawei>sy

Enter system view, return user view with Ctrl Z.

[Huawei]undo info

[Huawei]undo info-center en

[Huawei]undo info-center enable

Info: Information center is disabled.

[Huawei]sys name s1

[name s1]sys s1

[s1]int g0/0/1

[s1-GigabitEthernet0/0/1]q

[s1]vlan 1

[s1-vlan1]vlan 2

[s1-vlan2]vlsn 3

^

Error: Unrecognized command found at '^' position.

[s1-vlan2]vlan 3

[s1-vlan3]int g0/0/11

[s1-GigabitEthernet0/0/11]q

[s1]int g0/0/1

[s1-GigabitEthernet0/0/1]port link-type trunk

[s1-GigabitEthernet0/0/1]port trunk all

[s1-GigabitEthernet0/0/1]port trunk allow-pass vlan all

[s1-GigabitEthernet0/0/1]int g0/0/2

[s1-GigabitEthernet0/0/2]port link-type trunk

[s1-GigabitEthernet0/0/2]port trunk all

[s1-GigabitEthernet0/0/2]port trunk allow-pass vlan

^

Error:Incomplete command found at '^' position.

[s1-GigabitEthernet0/0/2]port trunk allow-pass vlan all

[s1-GigabitEthernet0/0/2] User interface con0 is available

Please Press ENTER.

<s1>sys

Enter system view, return user view with Ctrl Z.

[s1]int g0/0/3

[s1-GigabitEthernet0/0/3]port link-type trunk

[s1-GigabitEthernet0/0/3]port trunk all

[s1-GigabitEthernet0/0/3]port trunk allow-pass vlan all

[s1-GigabitEthernet0/0/3]

[Huawei-Ethernet0/0/2]port default vlan 1 【将接口划分到vlan下】

[Huawei-Ethernet0/0/2]int e0/0/3

[Huawei-Ethernet0/0/3]port link-type access

[Huawei-Ethernet0/0/3]port defa

[Huawei-Ethernet0/0/3]port default vlan 2

[Huawei-Ethernet0/0/3]int e0/0/1

[Huawei-Ethernet0/0/1]port link-type trunk

[Huawei-Ethernet0/0/1]port trunk all

[Huawei-Ethernet0/0/1]port trunk allow-pass vlan all 【可以通过所有vlan的数据】

s2配置

[Huawei]vlan 3

[Huawei-vlan3]des

[Huawei-vlan3]description manage

[Huawei-vlan3]int e0/0/2

[Huawei-Ethernet0/0/2]port link-type access

[Huawei-Ethernet0/0/2]port defa

[Huawei-Ethernet0/0/2]port default vlan 3

[Huawei-Ethernet0/0/2]int e0/0/1

[Huawei-Ethernet0/0/1]port link-type trunk

[Huawei-Ethernet0/0/1]port trunk all

[Huawei-Ethernet0/0/1]port trunk allow-pass vlan all

[Huawei-Ethernet0/0/1]

<Huawei>sys

Enter system view, return user view with Ctrl Z.

[Huawei]sys s2

[s2]int e 0/0/1

[s2-Ethernet0/0/1]dis this

s3配置

[Huawei]undo info

[Huawei]undo info-center en

[Huawei]undo info-center enable

Info: Information center is disabled.

[Huawei]sys name s1

[name s1]sys s1

[s1]int g0/0/1

[s1-GigabitEthernet0/0/1]q

[s1]vlan 1

[s1-vlan1]vlan 2

[s1-vlan2]vlsn 3

^

Error: Unrecognized command found at '^' position.

[s1-vlan2]vlan 3

[s1-vlan3]int g0/0/11

[s1-GigabitEthernet0/0/11]q

[s1]int g0/0/1

[s1-GigabitEthernet0/0/1]port link-type trunk

[s1-GigabitEthernet0/0/1]port trunk all

[s1-GigabitEthernet0/0/1]port trunk allow-pass vlan all

[s1-GigabitEthernet0/0/1]int g0/0/2

[s1-GigabitEthernet0/0/2]port link-type trunk

[s1-GigabitEthernet0/0/2]port trunk all

[s1-GigabitEthernet0/0/2]port trunk allow-pass vlan

^

Error:Incomplete command found at '^' position.

[s1-GigabitEthernet0/0/2]port trunk allow-pass vlan all

[s1-GigabitEthernet0/0/2] User interface con0 is available

Please Press ENTER.

<s1>sys

Enter system view, return user view with Ctrl Z.

[s1]int g0/0/3

[s1-GigabitEthernet0/0/3]port link-type trunk

[s1-GigabitEthernet0/0/3]port trunk all

[s1-GigabitEthernet0/0/3]port trunk allow-pass vlan all

[s1-GigabitEthernet0/0/3]

<s1>sys s3

^

Error:Too many parameters found at '^' position.

<s1>undo sys s1

^

Error: Unrecognized command found at '^' position.

<s1>sys

Enter system view, return user view with Ctrl Z.

[s1]sys s3

[s3]int g0/0/2

[s3-GigabitEthernet0/0/2]dis this 【查看当前接口信息】

#

interface GigabitEthernet0/0/2

port link-type trunk

port trunk allow-pass vlan 2 to 4094

r1配置

<Huawei>sys

Enter system view, return user view with Ctrl Z.

[Huawei]sys r1

[r1]int g0/0/1.1

[r1-GigabitEthernet0/0/1.1]ip add 10.0.1.254 24

[r1-GigabitEthernet0/0/1.1]undo ip add

[r1-GigabitEthernet0/0/1.1]q

[r1]int g0/0/0.1

[r1-GigabitEthernet0/0/0.1]ip add 10.0.1.254 24 【配置网关】

[r1-GigabitEthernet0/0/0.1]int g0/0/0.2

[r1-GigabitEthernet0/0/0.2]ip add 10.0.2.254 24

[r1-GigabitEthernet0/0/0.2]int g0/0/0.3

[r1-GigabitEthernet0/0/0.3]ip add 10.0.3.254 24

[r1-GigabitEthernet0/0/0.3]dot

[r1-GigabitEthernet0/0/0.3]dot1q term

[r1-GigabitEthernet0/0/0.3]dot1q termination vid

[r1-GigabitEthernet0/0/0.3]dot1q termination vid 1 【接收时剥离tag报文进行转发 向外发送时添加vlan tag】

Jul 7 2018 11:22:54-08:00 r1 %IFNET/4/LINK_STATE(l)[0]:The line protocol IP

on the interface GigabitEthernet0/0/0.3 has entered the UP state.

[r1-GigabitEthernet0/0/0.3]arp bro

[r1-GigabitEthernet0/0/0.3]arp broadcast en

[r1-GigabitEthernet0/0/0.3]arp broadcast enable 【开启arp广播功能】

[r1-GigabitEthernet0/0/0.3]int g0/0/0.1

[r1-GigabitEthernet0/0/0.1]dot

[r1-GigabitEthernet0/0/0.1]dot1q ter

[r1-GigabitEthernet0/0/0.1]dot1q termination vid 1

Error: Failed to configure the interface because the VLAN has been configured on

interface GigabitEthernet0/0/0.3.

[r1-GigabitEthernet0/0/0.1]int g0/0/0.3

[r1-GigabitEthernet0/0/0.3]undo dot

[r1-GigabitEthernet0/0/0.3]undo dot1q ter

[r1-GigabitEthernet0/0/0.3]undo dot1q termination vid

[r1-GigabitEthernet0/0/0.3]undo dot1q termination vid 1

Jul 7 2018 11:24:29-08:00 r1 %IFNET/4/LINK_STATE(l)[1]:The line protocol IP

on the interface GigabitEthernet0/0/0.3 has entered the DOWN state.

[r1-GigabitEthernet0/0/0.3]dot

[r1-GigabitEthernet0/0/0.3]dot1q ter

[r1-GigabitEthernet0/0/0.3]dot1q termination vid 3

Jul 7 2018 11:24:45-08:00 r1 %IFNET/4/LINK_STATE(l)[2]:The line protocol IP

on the interface GigabitEthernet0/0/0.3 has entered the UP state.

[r1-GigabitEthernet0/0/0.3]arp bro

[r1-GigabitEthernet0/0/0.3]arp broadcast en

[r1-GigabitEthernet0/0/0.3]arp broadcast enable

[r1-GigabitEthernet0/0/0.3]int g0/0/0.1

[r1-GigabitEthernet0/0/0.1]dot

[r1-GigabitEthernet0/0/0.1]dot1q ter

[r1-GigabitEthernet0/0/0.1]dot1q termination vid 1

Jul 7 2018 11:25:20-08:00 r1 %IFNET/4/LINK_STATE(l)[3]:The line protocol IP

on the interface GigabitEthernet0/0/0.1 has entered the UP state.

[r1-GigabitEthernet0/0/0.1]arp

[r1-GigabitEthernet0/0/0.1]arp bro

[r1-GigabitEthernet0/0/0.1]arp broadcast en

[r1-GigabitEthernet0/0/0.1]arp broadcast enable

[r1-GigabitEthernet0/0/0.1]int g0/0/0.2

[r1-GigabitEthernet0/0/0.2]dot

[r1-GigabitEthernet0/0/0.2]dot1q ter

[r1-GigabitEthernet0/0/0.2]dot1q termination vid 2

Jul 7 2018 11:26:08-08:00 r1 %IFNET/4/LINK_STATE(l)[4]:The line protocol IP

on the interface GigabitEthernet0/0/0.2 has entered the UP state.

[r1-GigabitEthernet0/0/0.2]arp bro

[r1-GigabitEthernet0/0/0.2]arp broadcast en

[r1-GigabitEthernet0/0/0.2]arp broadcast enable

[r1-GigabitEthernet0/0/0.2]q

[r1]dis

[r1]display ip int bri

[r1]display ip int brief

*down: administratively down

^down: standby

(l): loopback

(s): spoofing

The number of interface that is UP in Physical is 5

The number of interface that is DOWN in Physical is 2

The number of interface that is UP in Protocol is 4

The number of interface that is DOWN in Protocol is 3

Interface IP Address/Mask Physical Protocol

GigabitEthernet0/0/0 unassigned up down

GigabitEthernet0/0/0.1 10.0.1.254/24 up up

GigabitEthernet0/0/0.2 10.0.2.254/24 up up

GigabitEthernet0/0/0.3 10.0.3.254/24 up up

GigabitEthernet0/0/1 unassigned down down

GigabitEthernet0/0/1.1 unassigned down down

NULL0 unassigned up up(s)

现在来测试

基于华为ensp模拟器课程指导书(华为模拟器eNSP学习笔记)(10)

不通!!然后又ping了网关 还是不通!

然后我就查看了vlan1的接口配置。发现:

[s1-Ethernet0/0/1]dis this

#

interface Ethernet0/0/1

port link-type trunk

port trunk allow-pass vlan 2 to 4094

#

它配置为trunk类型之后 通过的数据是从vlan2开始的 不是从vlan1

所以重新创建了vlan4

然后再各个设备上重新设置之后

重新测试数据时候能够正常通讯

基于华为ensp模拟器课程指导书(华为模拟器eNSP学习笔记)(11)

ok完成

,

免责声明:本文仅代表文章作者的个人观点,与本站无关。其原创性、真实性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容文字的真实性、完整性和原创性本站不作任何保证或承诺,请读者仅作参考,并自行核实相关内容。文章投诉邮箱:anhduc.ph@yahoo.com

    分享
    投诉
    首页