您好,欢迎来到江浙沪招生考试网 !

设为首页|加入收藏|联系我们|网站地图|

江浙沪招生考试网

您现在的位置: test4exam >> 计算机考试 >> CISCO认证 >> 正文

路由器的简单配置(ccna实验)

日期:2009/10/6 13:35:03 来源:本站原创 访问量:

一.实验目的:

1)掌握IP的无类路由技术

2)RIP路由协议的配置过程

3)环回口的正确配置

4)Consol口日志的同步启用

5)Consol口日志的级别设定

6)恢复端口的出厂配置

7)取消命令行的配置

8)缺省路由的使用

9)不同路由器的切换

二.实验                 

拓扑图

 

拓扑分析:

两个路由器相连的网络使用了子网掩码为30位的网络号192.168.1.4/30。因此该子网络只拥有4IP,分别为192.168.1.4    192.168.1.5   .192.168.1.6    192.168.1.7,其中1.4为网络号,1.7为广播号,因此只有1.51.6两个IP可用。

注:在实验中,我们用Loopback口代替4PCR1S0/0口设为DCE端连接到R2 S0/1口。

 

路由器R1配置如下:

Router > en                                                   进入特权模式

Router # conf t                                                进入全局配置模式

Router # host R1                                               更改路由器名

R1 (config)# int lo1                                            进入了loopback1

R1 (config-if)# ip add 10.1.1.1 255.255.255.0                        配置端口IP

R1 (config-if)# exit

R1 (config)# int lo2

R1 (config-if)# ip add 2.2.2.2 255.255.255.0

R1 (config-if)# exit

R1 (config)# int lo3

R1 (config-if)# ip add 10.3.3.1 255.255.255.0

R1 (config-if)# ^Z                                              直接退之特权模式

R1 #config t

R1 (config)# int s0/0                                            配置S0/0

R1 (config-if)# ip add 192.168.1.5 255.255.255.252                   配置IP

R1 (config-if)# clock rate 56000                                   配置DCE端时钟

R1 (config-if)# no shut                                          启用端口

R1 (config-if)# exit

R1 (config)# router rip                                          启用RIP路由协议

R1 (config-router)# net 192.168.1.0                                加入直连的网络号

R1 (config-router)# net 10.0.0.0

R1 (config-router)# net 2.0.0.0

R1 (config-router)# ^Z

R1 # show ip router                                            察看路由表

 

路由器R2配置如下

Router> en

Router# config t

Router (config)# host R2

R2 (config-if)# int s0/1

R2 (config-if)# ip add 192.168.1.6 255.255.255.252

R2 (config-if)# no shut

R2 (config-if)# exit

R2 (config)# int lo1

R2 (config-if)# ip add 10.2.2.4 255.255.255.0

R2 (config-if)# exit

R2 (config)# router rip

R2 (config-router)# net 192.168.1.0

R2 (config-router)# net 10.0.0.0

R2 (config-router)# ^Z

R2 # show ip route

 

三.实验结果:

  

 

由图可见,C代表直连的两个网络。R代表由RIP协议从路由器R1上学习来的3IP

R2上能看到A类网络10的路由原因是因为IOS里缺省有一句话ip classless,如果使用no ip classless,在R2上将看不到A类网络10的路由,原因是RIP是有类路由,会在边界也就R2s0/1口做自动汇总,它会认为A类网络10是自己直连的网络,虽然从R1也能学到,但那有一跳,因没有直连路由好而被忽略。

 

四.实验总结:

在实验中,首先应该注意线路的连接,注意串行线DCE端的位置以便在端口配置中设置时钟的位置。在给路由器接口配IP地址时,注意IP的选用,如本实验中192.168.1.4/30的网络。在实验中经常遇到一些问题,经切身实践我将其总结如下。

 

问题1在输命令时,经常被CONSOLE口日志打断。

解决:  CONSOLE口日志的同步启用。使用以下命令:

R2 (config) # line console 0

R2 (config-line) #no  log  0(根据07值的不同,取消的日志消息级别也不同)

 

问题2想清空端口的先前配置。

解决:  恢复端口的出厂配置,使用命令如下:

          R2 (config) # default interface s0/1(s0/1端口恢复成出厂设置)

 

问题3设置静态路由是不知道另一端IP

解决:  使用缺省路由。使用命令:

         R2 (config)# ip route 0.0.0.0  0.0.0.0  s0/1本路由器的流出接口

相关阅读

Copyright ©2013-2015 江浙沪招生考试网 All Rights Reserved.
地址: 苏州市姑苏区阊胥路483号(工投创业园)  电话:0512-85551931 邮编: 214000
邮箱: [email protected] 版权所有:苏州迈峰教育科技有限公司 苏ICP备15050684号-2