资源描述
课程名称
计算机网络
实验
成绩
实验名称
动态路由的配置
学号
B09050516
姓名
李士杰
班级
B090505
日期
2012.4.17
实验目的:
1、到实验室观看实物路由器和交换机;
2、了解它们实际配置方法;
3、学会使用终端命令方式配置路由器;
4、熟悉静态路由和动态路由(RIP和OSPF模式)的配置;
实验条件:实验室和机房思科模拟器环境下
实验内容与步骤:
一:观看实物路由器和交换机
在实验室,我们通过实物来对路由器和交换机进行配置,用串口线将路由器(交换机)和电脑连接起来(注意:接电脑的端口用串口,另一端接路由器(交换机)的控制台端口)。打开电脑建立超级终端(所有程序-附件-通讯-超级终端)
,然后打开路由器(交换机)电源,成功连接后会在终端对话框内出现启动程序,输入相关指令就可以进行配置。
二:在思科模拟器上利用终端对路由器(交换机)进行配置。
实验连图如下:
我们首先先确定有多少网段,然后怎么分配!
本次试验我们共有3个网段我们分别配置I如下:(首先将分配好的PC机的IP写入)
PC0:192.168.1.10 255.255.255.0 网关:192.168.1.254
PC1:192.168.2.10 255.255.255.0 网关:192.168.2.254
R0:F0/0 192.168.3.1
R1:F0/0 192.168.3.2
1、 静态路由配置:
a、打开laptop0中的终端对路由器0进行设置,输入如下指令:
Router>en
Router#config t
Router(config)#interface f0/0
Router(config-if)#no shut down
Router(config-if)#ip address 192.168.3.1 255.255.255.0
Router(config-if)#ex
Router(config)#interface f0/1
Router(config-if)#no shut down
Router(config-if)#ip address 192.168.1.254 255.255.255.0
Router(config-if)#ex
Router(config)#ip route 192.168.2.0 255.255.255.0 192.168.3.2
Router(config)#end
Router#show ip route
C 192.168.1.0/24 is directly connected, FastEthernet0/1
S 192.168.2.0/24 [1/0] via 192.168.3.2
C 192.168.3.0/24 is directly connected, FastEthernet0/0
b、将laptop0接入Router1的控制台端口对Router1进行设置:
Router>en
Router#config t
Router(config)#interface f0/0
Router(config-if)#no shut down
Router(config-if)#ip address 192.168.3.2 255.255.255.0
Router(config-if)#ex
Router(config)#interface f0/1
Router(config-if)#no shut down
Router(config-if)#ip address 192.168.2.254 255.255.255.0
Router(config-if)#ex
Router(config)#ip route 192.168.1.0 255.255.255.0 192.168.3.1
Router(config)#end
Router#show ip route
S 192.168.1.0/24 [1/0] via 192.168.3.1
C 192.168.2.0/24 is directly connected, FastEthernet0/1
C 192.168.3.0/24 is directly connected, FastEthernet0/0
2、 动态路由配置:接口配置和静态路由接口配置一样,我们只利用终端进入对其进行修改:
对
Router0:
Router#
Router#configure terminal
Router(config)#router rip
Router(config-router)#network 192.168.1.0
Router(config-router)#network 192.168.3.0
Router(config-router)#end
Router#show ip route
C 192.168.1.0/24 is directly connected, FastEthernet0/1
R 192.168.2.0/24 [120/1] via 192.168.3.2, 00:00:07, FastEthernet0/0
C 192.168.3.0/24 is directly connected, FastEthernet0/0
对
Router0:
Router#
Router#configure terminal
Router(config)#router rip
Router(config-router)#network 192.168.2.0
Router(config-router)#network 192.168.3.0
Router(config-router)#end
Router#show ip route
R 192.168.1.0/24 [120/1] via 192.168.3.1, 00:00:01, FastEthernet0/0
C 192.168.2.0/24 is directly connected, FastEthernet0/1
C 192.168.3.0/24 is directly connected, FastEthernet0/0
3、 用OSPF模式进行配置:
4、 清除静态路由和RIP设置,端口设置不变!
5、 然后在终端对Router0进行如下操作:
6、 Router#
7、 Router#config t
8、 Router(config)#router ospf 1
9、 Router(config-router)#
10、 Router(config-router)#network 182.168.1.0 0.0.0.255 area 0
11、 Router(config-router)#network 182.168.3.0 0.0.0.255 area 0
12、 Router#show ip route
13、 C 192.168.1.0/24 is directly connected, FastEthernet0/1
14、 O 192.168.2.0/24 [110/2] via 192.168.3.2, 00:00:18, FastEthernet0/0
15、 C 192.168.3.0/24 is directly connected, FastEthernet0/0
16、 然后在终端对Router1进行如下操作:
17、 Router#
18、 Router#config t
19、 Router(config)#router ospf 1
20、 Router(config-router)#
21、 Router(config-router)#network 182.168.2.0 0.0.0.255 area 0
22、 Router(config-router)#network 182.168.3.0 0.0.0.255 area 0
23、 Router#show ip route
24、 O 192.168.1.0/24 [110/2] via 192.168.3.1, 00:00:02, FastEthernet0/0
25、 C 192.168.2.0/24 is directly connected, FastEthernet0/1
C 192.168.3.0/24 is directly connected, FastEthernet0/0
实验总结(结论或问题分析):
在老师的帮助和指导下,首先在实验室观看实物路由器和交换机。对交换机和路由器有了真是的接触和了解,并对其配置的方法有了初步的认识。通过老师的指导和自己的动手操作,在本次试验中了解其在不同模式下用运用不同命令的实际配置方法;同时学会使用终端命令方式配置路由器;在其基础上用通过自己的努力进一步熟悉了静态路由和动态路由(RIP和OSPF模式)的配置。
展开阅读全文