路由基本配置

学习目标

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

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

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

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

• 测试并检验配置。

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

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

相关推荐
君鼎3 分钟前
muduo库TcpServer模块详解
linux·网络·c++
开***能4 分钟前
包装设备跨系统兼容:Profinet转Modbus TCP的热收缩包装机改造方案
服务器·网络·tcp/ip
卡戎-caryon18 分钟前
【MySQL】02.数据库基础
linux·网络·数据库·mysql·存储引擎
技术宝哥1 小时前
从另一个视角理解TCP握手、挥手与可靠传输
网络·网络协议·tcp/ip
李白你好1 小时前
H3C网络设备(交换机、路由器、防火墙)常用命令整理
运维·网络·智能路由器
終不似少年遊*1 小时前
【从基础到模型网络】深度学习-语义分割-基础
网络·人工智能·深度学习·语义分割·卷积·上采样
卡戎-caryon2 小时前
【Linux网络与网络编程】12.NAT技术&&内网穿透&&代理服务
linux·运维·服务器·网络·网络协议·https
我的老子姓彭2 小时前
LWIP的Socket接口
运维·服务器·网络
随缘。。。。2 小时前
服务端HttpServletRequest、HttpServletResponse、HttpSession
网络·网络协议·http
Johny_Zhao3 小时前
AI+自动化测试系统方案:网络设备与网络应用智能测试
linux·网络·人工智能·python·网络安全·docker·ai·信息安全·云计算·ansible·shell·cisco·huawei·系统运维·itsm·华三·deepseek