路由基本配置

学习目标

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

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

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

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

• 测试并检验配置。

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

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

相关推荐
tang7778914 小时前
代理IP的匿名性测试:如何验证你的真实IP是否已泄露?
网络·网络协议·tcp/ip
DKunYu14 小时前
5.网络原理之TCP_IP
网络·tcp/ip·php
呉師傅14 小时前
国产化操作系统---银河麒麟安装步骤(简单介绍)
运维·网络·windows·单片机·电脑
半个西瓜.14 小时前
车联网安全:调试接口安全测试.
网络·安全·web安全·网络安全·车载系统
YannSea14 小时前
快速签发SSL证书:acme.sh全指南
网络·网络协议·ssl
im_AMBER15 小时前
HTTP 02 会话 | 消息 | MIME类型
网络·笔记·网络协议·学习·http
Code Warrior15 小时前
【Linux】应用层协议HTTP
linux·网络·网络协议·http
熙客15 小时前
网络访问流程:HTTPS + TCP + IP
网络
white-persist15 小时前
差异功能定位解析:C语言与C++(区别在哪里?)
java·c语言·开发语言·网络·c++·安全·信息可视化
AIwenIPgeolocation16 小时前
IP定位精度疑问:有些IP为什么难以达到街道级准确度?
服务器·网络·tcp/ip