路由器基本知识及配置(路由器的基本配置方法)

路由器基本知识及配置(路由器的基本配置方法)

实验目的:掌握进入路由器各种模式,配置登陆 console 口密码,系统视图密码,保存配置,配置IP地址,删除配置等等基本配置命令,这里不一一列举,请看下面的介绍。

路由器基本知识及配置(路由器的基本配置方法)

注:用CTRL+Z:可以直接回到用户视图界面。

一、华为模拟器实操录像:

视频加载中...

二、、主要实验内容:

1:以下为刚进入路由器时的默认模式--用户模式(用户视图),用大于号表示。

<Huawei>

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

<Huawei>system-view

Enter system view, return user view with Ctrl+Z.

[Huawei]

//以上是特权模式。用[]表示

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

[Huawei] interface Ethernet 0/0/0

[Huawei-Ethernet0/0/0]

//以上为接口模式。

[Huawei-Ethernet0/0/0]quit //退出命令

[Huawei]

//退出的时候打 quit

4:系统视图下设置一个名字:

[Huawei]sysname R1

[R1]

//可以发现路由器的名字已经变成了 AR1

5 :配置 console 口密码

[R1]user-interface console 0 //进入 console 口配置模式

[R1-ui-console0]authentication-mode password 123456

//以上设置 console 认证的模式是本地密码的方式,还可以选择不认证与 AAA 认证

[R1-ui-console0]set authentication password cipher 123456

//以上是设备 console 口登陆密码为 123456,以后再登陆 console 将需要密码

[R1-ui-console0]quit

[R1]

6:设置 telnet 密码

[R2]user-interface vty 0 4 //进入 telnet 的虚拟接口 vty 下

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

[R2-ui-vty0-4]set authentication password simple 123456

[R2-ui-vty0-4]user privilege level 3 //设备登陆进来的权限为控制级

7:保存配置文件

<R1>save

The current configuration will be written to the device.

Are you sure to continue?[Y/N]y

8:清空配置文件

<R1>reset saved-configuration

Warning: The action will delete the saved configuration in the device.

The configuration will be erased to reconfigure. Continue? [Y/N]:y

9:显示系统运行配置信息

[R1]display current-configuration

#

sysname R1

#

------省略以下部分------=

10:配置 IP 地址,并打开接口

[R1] interface GigabitEthernet0/0/0

[R1-Ethernet0/0/0]ip address 192.168.10.1 255.255.255.0

[R2] interface GigabitEthernet0/0/0

[R2-GigabitEthernet0/0/0]ip address 192.168.10.2 24

11:显示接口状态:

[R1]display interface GigabitEthernet 0/0/0

GigabitEthernet0/0/0 current state : UP

Line protocol current state : UP

Last line protocol up time : 2020-11-11 17:02:17 UTC-08:00

Description:HUAWEI, AR Series, GigabitEthernet0/0/0 Interface

Route Port,The Maximum Transmit Unit is 1500

Internet Address is 192.168.10.1/24

IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fcfe-352a

Last physical up time : 2020-11-11 17:01:49 UTC-08:00

Last physical down time : 2020-11-11 16:48:17 UTC-08:00

Current system time: 2020-11-11 17:05:54-08:00

Port Mode: COMMON COPPER

Speed : 1000, Loopback: NONE

Duplex: FULL, Negotiation: ENABLE

Mdi : AUTO

Last 300 seconds input rate 0 bits/sec, 0 packets/sec

Last 300 seconds output rate 0 bits/sec, 0 packets/sec

Input peak rate 48 bits/sec,Record time: 2020-11-11 17:04:09

Output peak rate 48 bits/sec,Record time: 2020-11-11 17:02:29

Input: 1 packets, 64 bytes

Unicast: 0, Multicast: 0

Broadcast: 1, Jumbo: 0

Discard: 0, Total Error: 0

CRC: 0, Giants: 0

Jabbers: 0, Throttles: 0

Runts: 0, Symbols: 0

Ignoreds: 0, Frames: 0

Output: 1 packets, 60 bytes

Unicast: 0, Multicast: 0

Broadcast: 1, Jumbo: 0

Discard: 0, Total Error: 0

Collisions: 0, ExcessiveCollisions: 0

Late Collisions: 0, Deferreds: 0

Input bandwidth utilization threshold : 100.00%

Output bandwidth utilization threshold: 100.00%

Input bandwidth utilization : 0%

Output bandwidth utilization : 0%

12:测试网络连通性

[R1]ping 192.168.10.2

PING 192.168.10.2: 56 data bytes, press CTRL_C to break

Reply from 192.168.10.2: bytes=56 Sequence=1 ttl=255 time=80 ms

Reply from 192.168.10.2: bytes=56 Sequence=2 ttl=255 time=20 ms

Reply from 192.168.10.2: bytes=56 Sequence=3 ttl=255 time=20 ms

Reply from 192.168.10.2: bytes=56 Sequence=4 ttl=255 time=20 ms

Reply from 192.168.10.2: bytes=56 Sequence=5 ttl=255 time=20 ms

--- 192.168.10.2 ping statistics ---

5 packet(s) transmitted

5 packet(s) received

0.00% packet loss

round-trip min/avg/max = 20/32/80 ms

13:跟踪沿跳路径:

【描述】

tracert 命令用来测试数据包从发送主机到目的地所经过的网关,主要用于检查网络连接是否可达,以及辅助分析网络在何处发生了故障。tracert 命令的执行过程:首先发送一个 TTL 为 1 的数据包,因此第一跳发送回一个ICMP 错误消息以指明此数据包不能被发送(因为 TTL 超时),之后此数据包被重新发送,TTL 为 2,同样第二跳返回 TTL 超时,这个过程不断进行,直到到达目的地。执行这些过程的目的是记录每一个 ICMP TTL 超时消息的源地址,以提供一个 IP 数据包到达目的地所经历的路径。当用 ping 命令测试发现网络出现故障后,可以用tracert 测试网络何处有故障。tracert 命令的输出信息包括到达目的地所有网关的 IP 地址,如果某网关超时,则输出“***”。

[R1]tracert 192.168.10.2

traceroute to 192.168.10.2(192.168.10.2), max hops: 30 ,packet length: 40,press CTRL_C to break

1 192.168.10.2 20 ms 20 ms 20 ms

14:查看路由表

[R1]display ip routing-table

Route Flags: R - relay, D - download to fib

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

Routing Tables: Public

Destinations : 7 Routes : 7

Destination/Mask Proto Pre Cost Flags NextHop Interface

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.10.0/24 Direct 0 0 D 192.168.10.1 GigabitEthernet

0/0/0

192.168.10.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet

0/0/0

192.168.10.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

15:关闭弹 LOG 信息:

[R1]undo info-center enable

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发表评论

登录后才能评论