实验一 华为路由交换技术基本配置

发布时间 2023-04-05 10:58:54作者: 纷飞的蒲公英

实验一 华为路由交换技术基本配置

实验目的:

  • 掌握进入进入路由器、交换机各种模式
  • 配置登陆console口密码
  • 配置系统视图密码
  • 保存、删除配置等基本命令
    image

实验拓扑:

image

实验步骤:

一、路由器的基本配置

1.双击PC1,打开串口,连接路由器AR1

image
image
左侧为刚进入路由器时的默认模式--用户模式(用户视图),用大于号表示
<Huawei>

2.用户模式进入特权模式(系统视图)

点击查看代码
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]
以上是特权模式,用[]表示

3.从特权模式进入接口模式

点击查看代码
[Huawei]interface ethernet0/0/0
[Huawei-Ethernet0/0/0]
//以下为接口模式
[Huawei-Ethernet0/0/0]quit //退出命令
[Huawei]

4.系统视图下设置路由器名称

点击查看代码
[Huawei]sysname R1
[R1]

5.配置console口密码

点击查看代码
[R1]user-interface console 0
[R1-ui-console0]authentication-mode password
//配置console认证的模式是本地密码的方式,还可以选择不认证与AAA认证
Please configure the login password (maximum length 16):admin
//配置密码
[R1-ui-console0]quit
[R1]

6.路由协议模式

点击查看代码
[R1]rip
[R1-rip-1]quit
[R1]ospf
[R1-ospf-1]quit
[R1]isis
[R1-isis-1]quit
[R1]
以上是进入和退出三种路由协议模式

7.设置系统时间和时区

点击查看代码
<R1>clock timezone Beijing add 8
<R1>clock datetime 10:32:00 2023-4-5
<R1>

8.配置telnet密码

点击查看代码
[R1]user-interface vty 0 4
//进入telnet的虚拟接口vty下
[R1-ui-vty0-4]authentication-mode password
Please configure the login password (maximum length 16):admin
[R1-ui-vty0-4]user privilege level 3
//设备登陆进来的权限为控制级
[R1-ui-vty0-4]
用户级别和命令级别对应关系表
用户级别 命令级别 级别名称 说明
0 0 参观级 网络诊断工具命令(ping、tracert)、从本设备出发访问外部设备的命令(Telnet客户端)等。
1 0、1 监控级 用于系统维护,包括display命令
2 0、1、2 配置级 业务配置命令,包括路由、各个网络层次的命令,向用户提供直接网络服务
3~15 0、1、2、3 管理级 用于系统基本运行的命令,对业务提供支撑作用,包括文件系统、FTP、TFTP下载、配置文件切换命令、备板控制命令、用户管理命令、命令级别设置命令、系统内部参数设置命令;用于业务故障诊断的debugging命令等。

9.保存配置文件

点击查看代码
<R1>save
  The current configuration will be written to the device. 
  Are you sure to continue? (y/n)[n]:

10.清空配置文件

点击查看代码
<R1>reset saved-configuration
This will delete the configuration in the flash memory.

The device configuratio
ns will be erased to reconfigure.

Are you sure? (y/n)[n]:

11.显示系统运行配置信息

[R1]display current-configuration

12.配置IP地址,并打开接口

点击查看代码
[R1]interface ethernet0/0/0
[R1-Ethernet0/0/0]ip address 192.168.1.1 255.255.255.0
[R1-Ethernet0/0/0]no shutdown

13.显示接口状态

[R1]display interface ethernet0/0/0
与Cisco相比,所有的show命令都使用display代替

14.测试网络连通性

[R1]ping 192.168.1.1
此命令与Cisco一致

15.跟踪路由命令

tracert命令用来测试数据包从发送主机到目的地所经过的网关,主要用于检查网络连接是否可达,以及辅助分析网络在何处发生了故障。

16.查看路由表

[R1]display ip routing

17.关闭Log信息

[R1]undo info-center enable

二、交换机的基本配置

交换机的配置与路由器的基本相同,除了不能配置路由、IP地址之外。