路由基本配置

学习目标

• 根据拓扑图进行网络布线。

• 清除启动配置并将路由器重新加载为默认状态。

• 在路由器上执行基本配置任务。

• 配置并激活以太网接口。

• 测试并检验配置。

• 思考网络实施方案并整理成文档。

任务 1:网络布线

使用适当的电缆类型连接网络设备。使用下列端口连接设备:

将 PC1 连接到 S1 的 FastEthernet 0/2 接口。

将 S1 的 FastEthernet 0/1 接口连接到 R1 的 FastEthernet 0/0 接口。

将串行 DCE 电缆连接到 R1 的 Serial 0/0/0 接口,将串行 DTE 电缆连接到 R2 的 Serial 0/0/0 接口。

将 R2 的 FastEthernet 0/0 连接到 PC2。

任务2:pc主机配置ip和网关

如下图

一、对路由器 R1 进行基本配置

步骤 1:建立与路由器 R1 的 HyperTerminal 会话

步骤 2:进入特权执行模式

Router>enable

Router#

步骤 3:进入全局配置模式

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#

步骤 4:将路由器名称配置为 R1

在提示符下输入命令 hostname R1。

Router(config)#hostname R1

R1(config)#

步骤 5:禁用 DNS 查找

使用 no ip domain-lookup 命令禁用 DNS 查找。

R1(config)#no ip domain-lookup

R1(config)#

步骤 6:配置执行模式口令

使用 enable secret password 命令配置执行模式口令。使用 class 替换 password。 R1(config)#enable secret class

R1(config)#

步骤 7:在路由器上配置控制台口令

使用 cisco 作为口令。配置完成后,退出线路配置模式。

R1(config)#line console 0

R1(config-line)#password cisco

R1(config-line)#login

R1(config-line)#exit

R1(config)#

步骤 8:为虚拟终端线路配置口令

使用 cisco 作为口令。配置完成后,退出线路配置模式。

R1(config)#line vty 0 4

R1(config-line)#password cisco

R1(config-line)#login

R1(config-line)#exit

R1(config)#

步骤 9:为虚拟终端线路配置口令

使用 cisco 作为口令。配置完成后,退出线路配置模式。

R1(config)#line vty 0 4

R1(config-line)#password cisco

R1(config-line)#login

R1(config-line)#exit

R1(config)#

步骤 10:配置 FastEthernet0/0 接口

使用 IP 地址 192.168.1.1/24 配置 FastEthernet0/0 接口。

R1(config)#interface fastethernet 0/0

R1(config-if)#ip address 192.168.1.1 255.255.255.0

R1(config-if)#no shutdown

R1(config-if)#

步骤 11:配置 Serial0/0/0 接口

使用 IP 地址 192.168.2.1/24 配置 Serial0/0/0 接口。将时钟频率设置为 64000。

R1(config-if)#interface serial 0/0/0

R1(config-if)#ip address 192.168.2.1 255.255.255.0

R1(config-if)#clock rate 64000

R1(config-if)#no shutdown

R1(config-if)#

注意:配置并激活 R2 上的串行接口后,此接口才会激活

步骤 12:返回特权执行模式

使用 end 命令返回特权执行模式。

R1(config-if)#end

R1#

步骤 13:保存 R1 配置

使用 copy running-config startup-config 命令保存 R1 配置。

R1#copy running-config startup-config Building configuration... [OK]

R1#

R2配置与R1一样(注意端口和ip的变化)

二、测试

1.使用 show ip route 命令检验路由表中是否包含以下路由。

2、另一个常见的问题是没有正确配置或激活路由器接口。使用show ip interface brief 命令快速检 验每台路由器接口的配置。屏幕上会显示与以下类似的输出:

3.ping

PT完成度测试

相关推荐
anddddoooo2 小时前
域内证书维权
服务器·网络·网络协议·安全·网络安全·https·ssl
Long._.L2 小时前
OpenSSL实验
网络·密码学
Dyan_csdn2 小时前
【Python项目】基于Python的Web漏洞挖掘系统
网络·python·安全·web安全
okok__TXF3 小时前
Rpc导读
网络·网络协议·rpc
&向上4 小时前
RK3588配置成为路由器
网络·智能路由器·rk3588
猫猫的小茶馆4 小时前
【网络编程】UDP协议
linux·服务器·网络·网络协议·ubuntu·udp
十月ooOO4 小时前
小米AX3000T 路由器如何开启 SSH 安装 OpenWRT 系统,不需要降级 v1.0.91 (2025)
网络·ssh·路由器·openwrt
SKYDROID云卓小助手5 小时前
无人设备遥控器之如何分享数传篇
网络·人工智能·算法·计算机视觉·电脑
r_martian6 小时前
RPC:分布式系统的通信桥梁
网络·网络协议·rpc