您好,欢迎来到华佗健康网。
搜索
您的当前位置:首页路由器连接与静态路由配置

路由器连接与静态路由配置

来源:华佗健康网


湖南理工学院实验报告

学院:计算机学院 班级: 姓名: 学号: 实验项目名称 课程名称 实验日期 同组人员姓名

一、实验目的

(1)掌握路由器之间及其与主机的连接方法。 (2)掌握路由器的基本配置命令; (3)熟练掌握静态路由的配置方法与应用。 二、工程背景

在实际组网工程中,两台路由器Route A和Route B利用Internet网将局域网LAN1和LAN2相连,如下图所示。现需要对路由器进行基本配置,并利用静态路由技术实现全网路由可达。

LAN 1

F0

PC1

RouteA

S0

Internet

S0

RouteB

F0

PC2

LAN 2

实验四:路由器连接与静态路由配置 网络工程实验 2017年5月5日 实验室名称 实验台组号 成绩 计算机网络 6号

三、实验方案

1、方案概述

将路由器Route 1和Route 2利用V.35专用缆线通过各自的串口(广域网口)S0相连接,PC1和PC2利用双绞线分别连接到各自路由器的局域网接口F0上,接口参数如拓扑结构图所示。

2、实验拓扑结构图

192.168.1.1/2

PC1

192.168.1.2/2

F0

Route1

192.168.3.1/2S

S

192.168.3.2/2

192.168.2.1/2F0

Route2

PC2

192.168.2.2/2

1

3、配置命令

步骤1在路由器Router1上配置接口的IP地址和串口上的时钟频率。 Router1(config)#int f0/0

Router1(config-if-FastEthernet 0/0)#no shutdown

Router1(config-if-FastEthernet 0/0)#ip address 192.168.1.1 255.255.255.0 Router1(config-if-FastEthernet 0/0)#exit Router1(config)#int ser Router1(config)#int serial 3/0

Router1(config-if-Serial 3/0)#no shutdown

Router1(config-if-Serial 3/0)#ip address 192.168.3.1 255.255.255.0 Router1(config-if-Serial 3/0)#clock rate 000 Router1(config-if-Serial 3/0)#end

查看接口的状态

Router1#show ip interface brief

Interface IP-Address(Pri) IP-Address(Sec) Statu s Protocol

Serial 3/0 192.168.3.1/24 no address up up

Serial 4/0 no address no address down down

FastEthernet 0/0 192.168.1.1/24 no address up up

FastEthernet 0/1 no address no address down down Router1#

步骤2. 在路由器Router1上配置静态路由。 验证测试:验证Router1上的静态路由配置。

Router1(config)#ip route 192.168.2.0 255.255.255.0 192.168.3.2

2

Router1(config)#end Router1#show ip route

Codes: C - connected, S - static, R - RIP, B - BGP O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2

i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default Gateway of last resort is no set

S 192.168.2.0/24 [1/0] via 192.168.3.2

C 192.168.3.0/24 is directly connected, Serial 3/0 C 192.168.3.1/32 is local host.

步骤3.在路由器Router2上配置接口的IP地址和串口上的时钟频率。 Ruijie>en Ruijie#config t

Enter configuration commands, one per line. End with CNTL/Z. Ruijie(config)#hostname Router2 Router2(config)#int f0/0

Router2(config-if-FastEthernet 0/0)#no shutdown

Router2(config-if-FastEthernet 0/0)#ip address 192.168.2.1 255.255.255.0 Router2(config-if-FastEthernet 0/0)#exit Router2(config)#int s 3/0

Router2(config-if-Serial 3/0)#no shutdown

Router2(config-if-Serial 3/0)#ip address 192.168.3.2 255.255.255.0

3

Router2(config-if-Serial 3/0)#clock rate 000 验证测试:验证路由器接口的配置。 Router2#show ip interface brief

Interface IP-Address(Pri) IP-Address(Sec) Statu s Protocol

Serial 3/0 192.168.3.2/24 no address up up

Serial 4/0 no address no address down down

FastEthernet 0/0 192.168.2.1/24 no address up up

FastEthernet 0/1 no address no address down down

Router2#步骤4. 在路由器Router2上配置静态路由。 验证测试:验证Router2上的静态路由配置。

Router2(config)#ip route 192.168.1.0 255.255.255.0 192.168.3.1 Router2(config)#end Router2#show ip route

Codes: C - connected, S - static, R - RIP, B - BGP O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2

i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default Gateway of last resort is no set

S 192.168.1.0/24 [1/0] via 192.168.3.1

C 192.168.2.0/24 is directly connected, FastEthernet 0/0

4

C 192.168.2.1/32 is local host.

C 192.168.3.0/24 is directly connected, Serial 3/0 C 192.168.3.2/32 is local host.

步骤5. 测试网络的互连互通性。 C:\\>ping 192.168.1.2从PC1 ping PC2 C:\\>ping 192.168.2.2从PC2 ping PC1

四、实验测试

5

五、实验结果

在配置静态路由之前,PC1只能ping通与之相连的S3接口,并不能ping通另一个路由器的S3接口,同理PC2也是一样,但当分别在路由器上配置好静态路由后,PC1和PC2互ping,均能联通。

六、思考问题

考虑为什么在没有给s3接口设置时钟频率的时候无法通信。

6

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- huatuo0.com 版权所有 湘ICP备2023021991号-1

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务