路由基本配置

学习目标

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

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

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

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

• 测试并检验配置。

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

任务 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 小时前
USB Type-C PD取电(诱骗,诱电,SINK),筋膜枪专用取电芯片
网络·人工智能·芯片·电子元器件
AI大模型应用之禅11 小时前
全球股市估值与可持续农业垂直种植技术的关系
网络·ai
掘根11 小时前
【仿Muduo库项目】HTTP模块2——HttpRequest子模块,HttpResponse子模块
网络·网络协议·http
MOON404☾13 小时前
006.Backdoor后门编写
网络·安全·网络安全·系统安全
ha204289419413 小时前
Linux操作系统学习记录之---TcpSocket
linux·网络·c++·学习
李白你好15 小时前
Burp Suite插件 | 高级HTTP头操作工具
网络·网络协议·http
石像鬼₧魂石15 小时前
22端口(OpenSSH 4.7p1)渗透测试完整复习流程(含实战排错)
大数据·网络·学习·安全·ubuntu
xwj_86557433215 小时前
HTTP协议、接口测试流程、接口测试流程&文档&用例
网络·网络协议·http
RisunJan17 小时前
Linux命令-iptables-restore命令(从文件批量恢复 iptables 防火墙规则)
linux·运维·网络
..过云雨17 小时前
网络计算器实现 - 自定义套接字+序列化+守护进程
网络·网络协议·tcp/ip