欢迎访问华悦美文网

华为模拟器实验结论

实验报告2019-01-17 20:28书业网

篇一:华为模拟器实验文档

实验一 口令和主机名设置

1.交换机的初始化

当交换机没有进行配置时,接入超级终端会提示是否以对话方式进行配置,初始化内容主要有IP地址、网关、主机名和口令等。配置文件是flash:config.text。

2924交换机进入ROM方式是在上电时按住其mode键,本软件是按Ctrl+Break键,出现:

switch>;按Ctrl+Break键

switch:reset ;或用boot命令

如果有配置文件进入用户模式,否则提交对话:

--- System Configuration Dialog ---

At any point you may enter a question mark '?' for help.

Use ctrl-c to abort configuration dialog at any prompt.

Default settings are in square brackets '[]'.

Continue with configuration dialog? [yes/no]:y

Enter IP address:10.65.1.8

Enter IP netmask:255.255.0.0

Would you like to enter a default gateway address? [yes]:

IP address of default gateway:

Enter host name [Switch]:swa

The enable secret is a one-way cryptographic secret used instead of the enable password when it exists.

Enter enable secret:aaa

Would you like to configure a Telnet password? [yes]:

Enter Telnet password:a

Would you like to enable as a cluster command switch? [no]:

The following configuration command script was created:

......

Press RETURN to get started.

swa>en

password:aaa

swa#copy run start (保存配置信息)

swa#dir flash: (查看闪存中的文件)

再次进入对话方式:

swa#setup

2.路由器的初始化(路由器初始化与交换机类似)

router> ;用户模式,按Ctrl+Break

rommon>reset ;进入ROM监控状态,复位引导

Continue with configuration dialog? [yes/no]:yes

At any point you may enter a question mark '?' for help.

Use ctrl-c to abort configuration dialog at any prompt.

Default settings are in square brackets '[ ]'.

Would you like to enter basic management setup? [yes/no]:yes

Configuring global parameters:

Enter host name [router]:ra回车

The enable secret is a password used to protect access to

privileged EXEC and configuration modes. This password,

after entered, becomes encrypted in the configuration.

Enter enable secret:aaa回车

The enable password is used when you do not specify an

enable secret password,with some older software versions,

and some boot images.

Enter enable password:aa回车

The virtual terminal password is used to protect

access to the router over a network interface.

Enter virtual terminal password :a回车

Enter interface name used to connect to the management

network from the above interface summary:FastEthernet0/0回车

Configuring interface FastEthernet0/0:回车

Use the 100 Base-TX (RJ-45) connector? [yes]:回车

Operate in full-duplex mode? [no]:回车

Configure IP on this interface? [yes]:回车

IP address for this interface [ ]:10.1.1.1回车

Subnet mask for this interface [ ]:255.0.0.0回车

[0] Go to the IOS command prompt without saving this config.

[1] Return back to the setup without saving this config.

[2] Save this configuration to nvram and exit.

Enter your selection [2]:回车

ra>en

password aaa (进入特权模式)

ra#show run(显示配置信息)

ra#w (保存配置信息)

ra#dir flash: (显示配置文件)

(配置文件在2621路由器不能删除,放弁配置文件要用寄存器设置0x2142);

3. 用命令行设置交换机和路由器的口令和主机名

先对交换机进行操作,双击SwitchA,出现:

switch>en ;第一次密码为空

switch#conf t ;进入全局配置模式

switch(config)#hostname swa ;设置交换机名

swa(config)#enable secret aaa ;设置特权加密口令为 aaa

swa(config)#enable password aax ;设置特权非密口令为 aax

swa(config)#line console 0;进入控制台口(Rs232)

swa(config-line)#password aa ;设置console登录口令为aa

swa(config-line)#login;登录要求口令验证

swa(config-line)#line vty 0 4 ;进入虚拟终端virtual tty

swa(config-line)#password a ;设置vty的登录口令为a

swa(config-line)#login ;登录要求口令验证

swa(config-line)#exit ;返回上一层

swa(config)#exit;返回上一层

swa#sh run ;看配置信息

swa#exit ;返回命令

swa>en

password: ;请问输入哪个口 (aaa)

secret是设置加密口令,一般都使用这种口令设置方式,它优先级高,即没设置secret口令时,非加密口令才有效。

4. 备份IOS和配置文件

在实际工作中经常需要备份路由器的IOS和配置文件,以备系统有问题时的恢复。可以这样操作:

router#dir nvram:

router#copy flash:c2621.bin tftp:

router#copy startup-config tftp:

router#

实验二 计算机与交换机IP地址设置

1. 双击HostA, 输入用户名和口令。

PCA login:root

Password:linux

[root#PCA root]# ifconfig eth0 10.65.1.1 netmask 255.255.0.0 设置 IP

[root#PCA root]# ifconfig 查看 IP

[root#PCA root]# ifconfig eth0 10.65.1.1 netmask 255.255.0.0 down关闭网卡

[root#PCA root]# route add default gw 10.65.1.9 设置网关

[root#PCA root]# route 查看网关

[root#PCA root]# route del default gw 10.65.1.9 删除网关

2. 双击HostB, 输入用户名和入口令,键入"?"可以求得帮助。

PCB login:root

Password:linux

[root#PCB root]# ifconfig eth0 10.65.1.2 netmask 255.255.0.0设置 IP

[root#PCB root]# ifconfig

[root#PCB root]# route add default gw 10.65.1.9设置网关

[root#PCB root]# route

这里只是说明设置网关的方法,关于它的意义在后面实现才能体现。

[root@PCA root]# ping 10.65.1.1 (通) [root@PCB root]# ping 10.65.1.1 (通)

[root@PCA root]# ping 10.65.1.2 (通) [root@PCB root]# ping 10.65.1.2 (通)

可见交换机不用做任何设置,就可以让两个计算机连通。交换机默认状态是所有端口全在vlan1,可以替代HUB使用,交换机的端口独享带宽。

3.双击SwitchA

switch>en 进入特权模式

switch#conf t 进入全局配置模式:

switch(config)#int vlan 1进入默认vlan状态:

switch(config-if)#ip address 10.65.1.3 255.255.0.0 设置ip地址和掩码:

switch(config)#ip default-gateway 10.65.1.9 设置switch的网关:

switch#sh run 查看当配置:

测试联通情况:

switch#ping 10.65.1.1 (通) ;ping HostA

switch#ping 10.65.1.2 (通) ;ping HostB

switch#ping 10.65.1.3 (通) ;ping自己

switch#ping 10.65.1.4 (不通) ;没有这个IP,所以不通。

设置交换机的IP地址,一般是做远程序管理用,即用telnet 远程登录到交换机。 至于交换机的网关,则是为了提供从交换机连接到其它设备的路由。

4.双击PCA

[root@PCA root]# ping 10.65.1.3 (通) ;从电脑ping 交换机

[root@PCA root]# telnet 10.65.1.3 ;从电脑登录到交换机

enter password:***;输入虚拟终端密码

switch>;登录成功

实验三 配置端口聚合

要求聚合的端口工作在全双工,速度一致,在同一槽口且连续。

对于SwitchA:

[SwitchA]interface ethernet0/1

[SwitchA-Ethernet0/1]duplex full

[SwitchA-Ethernet0/1]speed 100

[SwitchA-Ethernet0/1]port link-type trunk

[SwitchA-Ethernet0/1]port trunk permit vlan all

[SwitchA-Ethernet0/1]int e0/2

[SwitchA-Ethernet0/2]duplex full

[SwitchA-Ethernet0/2]speed 100

[SwitchA-Ethernet0/2]port link-type trunk

[SwitchA-Ethernet0/2]port trunk permit vlan all

对于SwitchB:

[SwitchB]interface ethernet0/1

[SwitchB-Ethernet0/1]duplex full

[SwitchB-Ethernet0/1]speed 100

[SwitchB-Ethernet0/1]port link-type trunk

[SwitchB-Ethernet0/1]port trunk permit vlan all

[SwitchB-Ethernet0/1]int e0/2

[SwitchB-Ethernet0/2]duplex full

[SwitchB-Ethernet0/2]speed 100

[SwitchB-Ethernet0/2]port link-type trunk

[SwitchB-Ethernet0/2]port trunk permit vlan all

聚合操作:

[SwitchA]link-aggregation ethernet0/1 to ethernet0/2 both

[SwitchB]link-aggregation ethernet0/1 to ethernet0/2 both

[SwitchA]display link-aggregation ethernet0/1

[SwitchA]undo link-aggregation all

篇二:基于华为模拟器的动态路由技术实验设计与实现

龙源期刊网 .cn

基于华为模拟器的动态路由技术实验设计与实现

作者:史子新 王权

来源:《科技创新与应用》2014年第03期

摘 要:借助华为模拟器完成动态路由技术的实验设计,以路由的作用和分类为线索,设计了模拟器环境下动态路由技术实现的网络拓扑结构,配置了两种动态路由,最终对实验结果进行了验证。

关键词:模拟器;路由技术;实验设计;实现

路由技术是高职院校计算机网络专业学生网络管理相关课程必须掌握的实验内容,利用真实设备实现存在资金投入大、网络环境组建繁琐、每位同学很难独立完成整个实训过程等弊端,利用模拟器实训路由技术可以避免上述问题,达到很好的实验教学效果。

1 实验原理

1.1 路由的作用

路由一般是指路由器将一个端口接收到的数据包转发到另外一个端口,信息经过一个网络传递到另外一个网络的过程。路由要完成两个主要工作是选经和转发。路由发生在0SI网络参考模型中的第三层即网络层。

1.2 路由的分类

1.2.1 静态路由

静态路由是指网络管理员手工配置的路由信息,适合于网络规模小且不经常变动的环境,具有简单、高效、可靠的优点,当网络结构发生变化时,网络网络员需要手工去修改路由表中相关的静态路由信息。

1.2.2 动态路由

动态路由是通过相互连接的路由器之间交换彼此信息,然后按照一定的算法优化自动生成路由表的。这些路由信息在一定时间里不断更新,以适应不断变化的网络,获得最优的路径。大型和复杂的网络环境通常不宜采用静态路由,路由表生成时需要使用动态路由协议,常见的路由协议有距离矢量路由选择协议-RIP和链路状态路由协议-OSPF。

2 实验环境简介

篇三:华为模拟器配置实例

实验一 计算机和交换机基本设置

添加一个交换机,一个计算机,双击交换机,进入终端配置:

<Quidway>system

password:

[Quidway]sysname S3026;交换机命名

[S3026]super password 111;设置特权密码

[S3026]user-interface vty 0 4

[S3026-ui-vty0-4]authentication-mode password

[S3026-ui-vty0-4]set authentication-mode password simple 222

[S3026-ui-vty0-4]user privilege level 3

[S3026-ui-vty0-4]quit

[S3026]quit

<S3026>sys

password:111

[S3026]display currect-config

[S3026]dis curr

[S3026]vlan 2

[S3026-vlan2]port ethernet0/2

[S3026-vlan2]port e0/4 to et0/6

[S3026-vlan2]quit

[S3026]dis vlan

[S3026]int e0/3

[S3026-Ethernet1]port access vlan 2

[S3026-Ethernet1]quit

[S3026]dis vlan

[S3026]dis curr

[S3026]interface vlan 1

[S3026-Vlan-interface1]ip address 10.65.1.8 255.255.0.0

[S3026-Vlan-interface1]quit

[S3026]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2

[S3026]ip default-gateway 10.65.1.2

[S3026]dis curr

[S3026]save

双击小电脑:

login:root

password:linux

[root@PCA root]#ifconfig eth0 10.65.1.1 netmask 255.255.0.0

[root@PCA root]#ifconfig

[root@PCA root]#route add default gw 10.65.1.2

[root@PCA root]#route

[root@PCA root]#ping 10.65.1.8

[root@PCA root]#telnet 10.65.1.8

实验二 配置端口聚合

要求聚合的端口工作在全双工,速度一致,在同一槽口且连续。

参数:ingress:源MAC, both:源和目的MAC

对于SwitchA:

[Quidway]sysname SwitchA

[SwitchA]interface ethernet0/1

[SwitchA-Ethernet0/1]duplex full

[SwitchA-Ethernet0/1]speed 100

[SwitchA-Ethernet0/1]port link-type trunk

[SwitchA-Ethernet0/1]port trunk permit vlan all

[SwitchA-Ethernet0/1]int e0/2

[SwitchA-Ethernet0/2]duplex full

[SwitchA-Ethernet0/2]speed 100

[SwitchA-Ethernet0/2]port link-type trunk

[SwitchA-Ethernet0/2]port trunk permit vlan all

对于SwitchB:

[Quidway]sysname SwitchB

[SwitchB]interface ethernet0/1

[SwitchB-Ethernet0/1]duplex full

[SwitchB-Ethernet0/1]speed 100

[SwitchB-Ethernet0/1]port link-type trunk

[SwitchB-Ethernet0/1]port trunk permit vlan all

[SwitchB-Ethernet0/1]int e0/2

[SwitchB-Ethernet0/2]duplex full

[SwitchB-Ethernet0/2]speed 100

[SwitchB-Ethernet0/2]port link-type trunk

[SwitchB-Ethernet0/2]port trunk permit vlan all

聚合操作:

[SwitchA]link-aggregation ethernet0/1 to ethernet0/2 both

[SwitchB]link-aggregation ethernet0/1 to ethernet0/2 both

[SwitchA]display link-aggregation ethernet0/1

[SwitchA]undo link-aggregation all

实验三 基本VLAN设置

[SwitchA]vlan 2

[SwitchA-vlan2]port e0/2

[Swit

chA-vlan2]port e0/3 to e0/4

[SwitchA-vlan2]vlan 3

[SwitchA-vlan3]port e0/5 to e0/6

[SwitchA]dis vlan all

[SwitchA]dis current

[SwitchB]vlan 2

[SwitchB-vlan2]port e0/3 to e0/4

[SwitchB-vlan2]vlan 3

[SwitchB-vlan3]port e0/5 to e0/6

[SwitchB-vlan3]quit

[SwitchB]dis vlan all

[SwitchB]dis current

设置计算机的IP为:

PCA:10.65.1.1 PCB:10.66.1.1 PCC:10.65.1.3 PCD:10.66.1.3

[root@PCA root]#ping 10.65.1.1 通(本机IP)

[root@PCA root]#ping 10.65.1.3 不通 (中间连接线是vlan 1)

[root@PCA root]#ping 10.66.1.1 不通 (不同网络,不同vlan)

[root@PCA root]#ping 10.66.1.3 不通 (不同网络,不同vlan)

[root@PCB root]#ping 10.66.1.3 不通 (中间连接线是vlan 1)

将PCA改接到SwitchA E0/2 (vlan 1)

[root@PCA root]#ping 10.65.1.3 不通 (同网络,不同vlan)

将PCC改接到SwitchB E0/2 (vlan 1)

[root@PCA root]#ping 10.65.1.3 通 (同网络,同在vlan 1)

再改回来,并设置trunk:

[S3026A]interface ethernet0/8

[S3026A-Ethernet0/8]port link-type trunk

[S3026A-Ethernet0/8]port trunk permit vlan all

[S3026B]interface ethernet0/1

[S3026B-Ethernet0/1]port link-type trunk

[S3026B-Ethernet0/1]port trunk permit vlan all

[S3026B-Ethernet0/1]quit

[S3026B]dis curr

[root@PCA root]#ping 10.65.1.3 通

[root@PCA root]#ping 10.66.1.3 不通

[root@PCB root]#ping 10.66.1.3 通

即:PCA和PCC同在vlan 2 是通的,PCB和PCD同在vlan 3是通的。

PCA和PCB是不通的。同理PCC和PCD也是不通的。

------------------------------------------------------------

再加入一个交换机switchC,将它串入switchA和switchB之间,连接方式:

switchA:E0/8-->switchC:E0/3; switchC:E0/6-->switchB:E0/1

(1) 新加入的SwitchC 默认状态时,测试连通性。

从PCA->PCC,从PCB->PCD 测试:

[root@PCA root]# ping 10.65.1.3 (不通)

[root@PCB root]# ping 10.66.1.3 (不通)

由于新加入的交换机没有设置trunk,端口默认vlan 1,交换机的trunk

要成对出现,因为当dot1q不能和另一端交换信息时,会自动down掉。

(2) 将交换机之间的连线都设置成trunk时,再测试连通性。

[S3026C]interface ethernet0/3

[S3026C-Ethernet0/1]port link-type trunk

[S3026C-Ethernet0/1]port trunk permit vlan all

[S3026C]interface ethernet0/6

[S3026C-Ethernet0/8]port link-type trunk

[S3026C-Ethernet0/8]port trunk permit vlan all

现在有两条正确的trunk,再看一下联通情况:

[root@PCA root]# ping 10.65.1.3 (通)

[root@PCB root]# ping 10.66.1.3 (通)

(3) 设置vtp

VTP是vlan 传输协议,在VTP Server上配置的vlan 在条件允许条件下,可以 从VTP Client 端看到VTP Server上的vlan,并将自己端口加入到vlan中。

[S3026C]vtp domain abc

[S3026C]vtp mode server

[S3026C]vtp password ok

[S3026B]vtp domain abc

[S3026B]vtp mode client

[S3026B]vtp password ok

[S3026A]#disp vlan

[S3026B]#disp vlan

[S3026C]#disp vlan

当口令和域名一致时,client端可以学习到server端的vlan,在VTP Server端还 可以有很多策略,这里只是说明最基本的问题。

VTP在企业、机关、学校的应用是很多的,在主交换机上设置好vlan以后,下级的 交换机不用再设置vlan,可以将client的某些端口添加到VTP Server中定义的vlan中 去,加强了管理。

实验四 配置primary VLAN和secondary VLAN

Copyright @ 2012-2025华悦美文网 All Rights Reserved. 版权所有