三峡大学计算机与信息学院
标准实验报告
(实验)课程名称 计算机网络
三峡大学计算机与信息学院
实 验 报 告
学生姓名:郑国安 学号:2010114130 指导教师:马凯
实验地点: 电气信息楼 实验时间:2013.6.13
一、实验室名称:
二、实验项目名称:静态路由的配置
三、实验学时: 2学时
四、实验原理:
路由器属于网络层设备,能够根据IP包头的信息,选择一条最佳路径,将数据包转发出去。实现不同网段的主机之间的互相访问。
路由器是根据路由表进行选路和转发的。而路由表里就是由一条条的路由信息组成。路由表的产生方式一般有3种:
直连路由给路由器接口配置一个IP地址,路由器自动产生本接口IP所在网段的路由信息。
静态路由在拓扑结构简单的网络中,网管员通过手工的方式配置本路由器未知网段的路由信息,从而实现不同网段之间的连接。
五、实验目的:掌握通过静态路由方式实现网络的连通性。
六、实验内容:
假设校园网通过1台路由器连接到校园外的另1台路由器上,现要在路由器上做适当配置,实现校园网内部主机与校园网外部主机的相互通信。通过软件仿真, 实现网络的互连互通,从而实现信息的共享和传递。
七、实验器材(设备、元器件):
R2621XM(两台)、Serial DTE线缆(1条)、copper cross-over线缆(2条)、PC(两台)
八、实验步骤:
打开Cisco Packet Tracer 软件,添加2台Generic路由器和2台Generic主机,用“自动选择连接类型”把设备连接起来,如下实验图,其中PC0、PC1为两台工作站主机,Router1、Router2为两台路由器。
然后按以下步骤完成配置:
步骤1. 在路由器Router1上配置接口的IP地址和串口上的时钟频率。
Router1(config)#
Router1(config-if)# ip address 172.16.1.1 255.255.255.0
Router1(config-if)# no shutdown
Router1(config)# interface serial 1/0
Router1(config-if)# ip address 172.16.2.1 255.255.255.0
Router1(config-if)#clock rate 64000 !配置Router1的时钟频率(DCE)
Router1(config)# no shutdown
验证测试:验证路由器接口的配置。
Router1#show ip interface brief
注意:查看接口的状态。
Router1#show interface serial 1/0
步骤2. 在路由器Router1上配置静态路由。
Router1(config)#ip route 172.16.3.0 255.255.255.0 172.16.2.2
或:
Router1(config)#ip route 172.16.3.0 255.255.255.0 serial 1/0
验证测试:验证Router1上的静态路由配置。
Router1#show ip route
步骤3. 在路由器Router2上配置接口的IP地址和串口上的时钟频率。
Router2(config)# interface fastethernet 0/0
Router2(config-if)# ip address 172.16.3.2 255.255.255.0
Router2(config-if)# no shutdown
!
Router2(config)# interface serial 1/0
Router2(config-if)# ip address 172.16.2.2 255.255.255.0
Router2(config-if)# no shutdown
验证测试:验证路由器接口的配置。
Router2#show ip interface brief
Router2# show interface serial 1/0
步骤4. 在路由器Router2上配置静态路由。
Router2(config)#ip route 172.16.1.0 255.255.255.0 172.16.2.1
或:
Router2(config)#ip route 172.16.1.0 255.255.255.0 serial 1/0
验证测试:验证Router2上的静态路由配置。
Router2#show ip route
步骤5. 测试网络的互连互通性。
C:\>ping 172.16.3.22 !从PC1 ping PC2
C:\>ping 172.16.1.11 !从PC2 ping PC1
【注意事项】
如果两台路由器通过串口直接互连,则必须在其中一端设置时钟频率(DCE)。
【参考配置】
1.路由器Router1的路由表:
2.路由器Router2的路由表
九、实验数据及结果分析:
实验最终拓扑图:
分析:
正确的配置终端设备(电脑)的IP地址和网关,和2个路由器的静态路由表后,可以实现两个PC机之间的通信!
十、实验结论:通过正确的配置后实现了网络的连通性。
十一、总结及心得体会:
在整个实验过程中,主要是设置PC机的IP地址和路由表,通过软件的仿真,掌握通过静态路由方式实现网络的连通性,达到了实验目的。
十二、对本实验过程及方法、手段的改进建议:
由于对软件的操作不是很熟悉,导致了实验时间用的比较长,建议老师先把实验交给我们自己在下面做,到做实验的时候,有哪些地方不明白的再问,学习的效率会高些。
报告评分:
指导教师签字:
第二篇:计算机网络实验报告 静态路由配置
实验报告八
班级: 姓名: 学号:
实验时间: 机房: 组号: 机号:PC_B
一、 实验题目
静态路由配置
二、 实验设备
CISCO路由器,专用电缆,网线,CONSOLE线,PC机
三、 实验内容
n 了解路由的功能
n 在CISCO路由器上配置和验证静态路由
n 配置缺省路由
四、 原理
静态路由是指由网络管理员手工配置的路由信息。当网络的拓扑结构或链路的状态发生变化时,需要手工去修改路由表中相关的静态路由信息。静态路由信息在缺省情况下是私有的,不会传递给其他的路由器。静态路由一般适用于比较简单的网络环境,在这样的环境中,易于清楚地了解网络的拓扑结构,便于设置正确的路由信息。
五、 实际步骤
1.设置PC_B的IP地址,连接路由器,打开超级终端。
2.路由器B的配置
User Access Verification
Password:
5_R2>en
Password:
5_R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
5_R2(config)#int s0/1/0
5_R2(config-if)#no shut
5_R2(config-if)#interface s0/1/0
5_R2(config-if)#ip addr
% Incomplete command.
3.配置routerB的s0/1/0端口的IP地址
5_R2(config-if)#ip address 172.17.200.6 255.255.255.252
5_R2(config-if)#^Z
4.配置路由器routerB的f0/1端口的IP地址
5_R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
5_R2(config)#int f0/1
5_R2(config-if)#ip address 10.5.2.1 255.255.255.0
5_R2(config-if)#^Z
5.配置路由器routerB的f0/0端口的IP地址
5_R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
5_R2(config)#int f0/0
5_R2(config-if)#ip addr 10.5.4.1 255.255.255.0
5_R2(config-if)#no shutdown
5_R2(config-if)#
6.PC_B能与PC2ping 通,不能ping PC1
7.在PC_B上配置缺省路由
5_R2(config)#ip route 10.5.1.0 255.255.255.0 172.17.200.5
5_R2(config)#exit
5_R2#show ip rout
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, 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, U - per-user static route
o - ODR, P - periodic downloaded static route, + - replicated route
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
S 10.5.1.0/24 [1/0] via 172.17.200.5
C 10.5.2.0/24 is directly connected, FastEthernet0/1
L 10.5.2.1/32 is directly connected, FastEthernet0/1
C 10.5.4.0/24 is directly connected, FastEthernet0/0
L 10.5.4.1/32 is directly connected, FastEthernet0/0
172.17.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.17.200.0/24 is directly connected, Serial0/1/0
L 172.17.200.6/32 is directly connected, Serial0/1/0
5_R2#ping 10.5.1.123 (PCA)
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.5.1.123, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/14/16 ms
5_R2#
5_R2(config)#ip route 10.5.3.0 255.255.255.0 172.17.200.5
5_R2(config)#exit
5_R2#show ip rout
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, 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, U - per-user static route
o - ODR, P - periodic downloaded static route, + - replicated route
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
S 10.5.1.0/24 [1/0] via 172.17.200.5
C 10.5.2.0/24 is directly connected, FastEthernet0/1
L 10.5.2.1/32 is directly connected, FastEthernet0/1
S 10.5.3.0/24 [1/0] via 172.17.200.5
C 10.5.4.0/24 is directly connected, FastEthernet0/0
L 10.5.4.1/32 is directly connected, FastEthernet0/0
172.17.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.17.200.0/24 is directly connected, Serial0/1/0
L 172.17.200.6/32 is directly connected, Serial0/1/0
5_R2#
PCB ping PCA
PCB ping PC1
PCB ping PC2
六、 成果与总结
本次实验顺利完成静态路由的分配。在实验时要搞清楚路由端口。