路由基本配置

学习目标

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

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

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

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

• 测试并检验配置。

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

任务 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完成度测试

相关推荐
gadiaola5 分钟前
【计算机网络】第3章:传输层—TCP 拥塞控制
网络·网络协议·tcp/ip·计算机网络
猎板PCB厚铜专家大族12 分钟前
多层PCB技术解析:从材料选型到制造工艺的深度实践
网络·制造
FakeOccupational2 小时前
【碎碎念】宝可梦 Mesh GO : 基于MESH网络的口袋妖怪 宝可梦GO游戏自组网系统
网络·游戏
fei_sun4 小时前
【计算机网络】三报文握手建立TCP连接
网络·tcp/ip·计算机网络
Johny_Zhao4 小时前
2025年6月Docker镜像加速失效终极解决方案
linux·网络·网络安全·docker·信息安全·kubernetes·云计算·containerd·yum源·系统运维
PypYCCcccCc4 小时前
支付系统架构图
java·网络·金融·系统架构
搬码临时工6 小时前
如何把本地服务器变成公网服务器?内网ip网址转换到外网连接访问
运维·服务器·网络·tcp/ip·智能路由器·远程工作·访问公司内网
zzc9216 小时前
MATLAB仿真生成无线通信网络拓扑推理数据集
开发语言·网络·数据库·人工智能·python·深度学习·matlab
朱包林9 小时前
day27-shell编程(自动化)
linux·运维·服务器·网络·shell脚本
SZ17011023110 小时前
IP协议 标识字段 同一个源IP、目的IP和协议号内唯一
网络·网络协议·tcp/ip