路由器的使用(实验报告)

《实验四:路由器的使用》实验报告

             学员:( 薛雷  李志洪)

【实验目的】

1、  掌握路由器与计算机、集线器的连接方法;

2、  掌握路由器的基本管理和配置;

3、  掌握通过串行口进行路由器互连的方法;

4、  掌握路由器中常用路由协议的设置。

【实验设备及环境】

操作系统:WINDOWS XP

1、计算机两台

2、集线器两个

3、五类双绞线:交叉线、平行线若干根

4、锐捷R1762路由器两台,V.35电缆一对

【实验内容与步骤】

1、使用控制台端口线连接计算机的串行口和路由器的控制台端口,在计算机中启动“超级终端”,在超级终端中选择对应的串行口,并将其通信属性设置为9600bps、无校验、1位停止位、无流量控制。

2、使用双绞线按下图所示连接路由器、计算机和集线器。并按图设置两台计算机的IP地址、子网掩码及缺省网关。

       

示意图:路由器与计算机的连接(实验小组组号为7)

设置与DTE相连计算机的IP地址为:10.7.2.2;子网掩码为:255.255.255.0;缺省网关为:10.7.2.1。与DCE相连计算机的IP地址为:10.7.1.1;子网掩码为:255.255.255.0;缺省网关为:10.7.1.1。

在计算机2和计算机3上分别先开五个Ping的窗口:

Ping –t 10.7.1.1

Ping –t 10.7.0.1

Ping –t 10.7.0.2

Ping –t 10.7.2.1

Ping –t 10.7.2.2

以便在后面的配置中观察连通状态。目前两台计算机之间无法Ping通。

分析:路由器尚未连接和设置;两台计算机网段不同,网络地址分别为10.7.1.0和10.7.2.0。

3、使用专用串行线按上图所示连接两个路由器,注意连接线上的DCE与DTE标识。

DCE=Data Communication Equipment=数据通信设备(通信子网中)

DTE=Data Terminal Equipment=数据终端设备(资源子网中)

看V.35物理线缆,线一端是DCE,一端是DTE。DCE端连在哪个路由器上,哪个就是DCE。由于线缆已连接好,也可以在路由器上使用show controllers s x/x看哪端是DCE。

4、按示意图所示,分别设置两个路由器的以太网接口的IP地址,使两台计算机能够访问各自连接的路由器。

使用“超级终端”命令行方式进入全局配置模式,用int  FastEthernet  1/0命令进入接口配置模式,设置IP地址之前要先Shutdown将端口关闭。

分别设置路由器1(DCE)机的IP地址和子网掩码为:10.7.1.1  255.255.255.0,以及路由器2(DTE)机的IP地址和子网掩码为:10.7.2.1  255.255.255.0;IP地址设置完成后要执行:no shutdown 命令激活相应的端口。

如:int  FastEthernet  1/0

    Shutdown

    Ip address 10.7.1.1 255.255.255.0

    No shutdown

两台计算机能Ping通与其各自相连的路由器FastEthernet1/0端口。

分析:路由器的以太网口0已经设置IP地址并于计算机同为一个网段)。

两台计算机仍无法Ping通。

分析:路由器虽已连接,以太网口虽然已经设置完成但尚未配置相应的远程口:串口,两台计算机所属网段不同,网络地址分别为10.7.1.0和10.7.2.0)

5、  设置路由器的串行口,使两个路由器能够相互访问。记录下使用Ping命令测试两个路由器之间连通性的响应时间,然后修改串行口的波特率(用9600和115200bps),再使用Ping命令测试两个路由器之间的连通性,并记录响应时间。

记录:波特率为9600时:round trip min/avg/max=252/245/256ms

      波特率为115200时:  round trip min/avg/max=20/20/21ms

响应时间明显提高。

使用“超级终端”命令行方式进入全局配置模式,用interface  serial  1/2命令进入接口配置模式,设置路由器1(DCE)的IP地址和子网掩码为:10.7.0.1;子网掩码为:255.255.255.252;设置路由器2(DTE)机的IP地址为:10.7.0.2;子网掩码为:255.255.255.252。

如:Interface serial 1/1

    Shutdown(配置端口前,应先将其关闭)

    Clock rate 115200(最高速率可以2M,DTE端不用配置)

    IP address 10.7.0.1 255.255.255.252

    No shutdown(配置完成后要激活端口)

在“超级终端”环境中使用Ping命令Ping对方路由器的IP地址,能够测试出两个路由器之间是连通的。

分析:一个网段,即相同的网络地址。

两台计算机能Ping通与其各自相连的路由器的Serial 1/2端口。

分析:路由器有直通路由,一台路由器中的所有端口只要进行正确设置IP地址、子网掩码,连接的计算机设置好IP地址、子网掩码和正确的网关,相互之间即能Ping通)

计算机1无法Ping通路由器2的两个接口和计算机2;计算机2也无法Ping通路由器1的两个接口和计算机1。

分析:不同网段之间连通需建立路由。网络0与网络1、网络2都认识,但网络1和网络2还不认识,所以在路由器1上建立路由,为了让网络2认识网络1,将数据正确发送到网络1;同理,网络1的数据若要正确到达网络2,则必须在路由器2上建立路由。

在DCE端进入Serial接口配置模式,利用clock rate命令设置时钟速率为:115200。用Ping命令测试响应时间,发现响应时间的最小/平均/最大值有很大变化,一旦速率提高,响应时间则明显缩短。(DCE侧设备提供同步时钟并指定通信速率,而DTE设备则接受同步时钟并根据指定波特率通信。这也是DCE和DTE的区别,提供时钟的就是DCE,接受的就是DTE)

6、在两个路由器中设置静态路由,使得两个路由器中连接的计算机能够相互访问。

使用“超级终端”命令行方式进入全局配置模式,用ip route 命令设置路由器1(DCE)的路由表目的网络地址:10.7.2.0和下一个网关地址为:10.7.0.2(即DTE的Serial接口地址);

如:ip route 10.7.2.0 255.255.255.0 10.7.0.2

计算机2能Ping通计算机2和DTE路由器1的Serial接口;而计算机1仍无法Ping通计算机2和DTE路由器2的Serial接口;

分析:路由器1上建立的静态路由表让网络2认识了网络1;而路由器2上未建立路由表,网络1还不认识网络2。

用同样方法设置路由器2(DTE)的路由表目的网络地址:10.7.1.0和下一个网关地址为:10.7.0.1(即DCE的Serial接口地址);计算机1也能Ping通计算机2。

删除两个路由器上的路由表,则计算机1和计算机2不能相互Ping通了。重新在两台路由器上建立全0的缺省路由,则两台计算机又能相互Ping通了。

缺省路由:Ip route 0.0.0.0.0.0.0.0 10.7.0.2

问题和解决方法:在建立路由表时,我们把静态路由表中参数ip-address写成了主机地址,所以没有Ping通。而改成网络地址,即告成功。

7、删除上一步配置的静态路由,然后在两个路由器中设置RIP协议,使得两个路由器中连接的计算机能够相互访问。

删除两个路由器上的静态缺省路由,则计算机1和计算机2又不能相互Ping通了。使用“超级终端”命令行方式进入全局配置模式,使用命令route  rip建立动态路由。计算机1和计算机2仍无法相互Ping通了。(原因初步分析:没有告知路由器所直接连接的网络)

在路由协议配置模式下,使用命令network 分别为路由器1和路由器2设置连接网络10.7.1.0和10.7.2.0。再设置相同的RIP协议版本2,计算机1和计算机2就能相互Ping通了。

分析:动态路由中设置了与路由器连接的网络1和网络2的相应地址,路由器在学习中有了路由表,网络1认识了网络2。

问题和解决方法:在使用动态RIP协议时,我们没有设置与两台路由器都直接相连的网络0,但计算机1和计算机2也能相互Ping通。通过show running命令查看路由器的状态信息发现,路由器把这里相邻的网络地址都划在一个A类网络地址10.0.0.0中,因此在路由器中不设置相邻的网络0的IP地址,网络1和网络2也能Ping通。我们因此与实验老师发生了激烈的讨论,结论是如果将IP地址都设置成192开始的C类地址,则会出现问题。正规的做法是必须在每台路由器上配置所有与其直接相连的所有网络地址。这样相邻的网络中的主机才能够相互Ping通了。由于是两个路由器相连,所以对一个路由器来说,不设置邻居路由器,也能够相互Ping通。但两个路由器上使用的RIP协议版本必须相同。如果不设置版本2,则都默认为版本1。

8、将路由器的配置通过TFTP协议保存到计算机中,并在计算机中打开,查看路由器的配置文件。

使用“超级终端”命令行方式进入特权用户模式下,使用copy running tftp命令保存路由器配置。

【实验心得】

本次实验中我们着重实习了路由器的基本配置和管理,对路由器互连有了进一步的认识。对在实验中涉及到的知识要点进行了着重的学习和理解,在实验的过程中对遇到的问题进行了详细的求解提高了对一些概念的理解,比如:主机地址和网络地址的概念,我们在实验的过程中就理解的比较透彻。通过对实验故障的排除,提高了我们独立地查找问题、解决问题的能力。本次实验是由两组合作完成的,在彼此的讨论中,我们也学会了如何在遇到困难后,共同来解决问题,提高了我的团队协作能力。

 

第二篇:《路由器及其配置》实验报告

《路由器及其配置》实验结果文件

附:实验配置命令清单及显示结果

1.交换机(路由器)A

夏战辉:

ra(config)#hostname RA

RA(config)#int s1/2

RA(config-if)#ip add 172.16.10.1 255.255.255.0

RA(config-if)#clock rate 64000

RA(config-if)#clock rate setting is only valid for DCE ports.

no shutdown

RA(config-if)#no shutdown

RA(config-if)#exit

RA(config)#int f1/0

RA(config-if)#ip add 192.168.10.1 255.255.255.0

RA(config-if)#end

RA#

Configured from console by console

RA#show int s 1/2

serial 1/2 is UP  , line protocol is UP

Hardware is PQ2 SCC HDLC CONTROLLER serial

Interface address is: 172.16.10.1/24

  MTU 1500 bytes, BW 20## Kbit

  Encapsulation protocol is HDLC, loopback not set

  Keepalive interval is 10 sec , set

  Carrier delay is 2 sec

  RXload is 1 ,Txload is 1

  Queueing strategy: WFQ

  5 minutes input rate 17 bits/sec, 0 packets/sec

  5 minutes output rate 17 bits/sec, 0 packets/sec

    450 packets input, 9900 bytes, 0 no buffer

    Received 450 broadcasts, 0 runts, 0 giants

    0 input errors, 0 CRC, 0 frame, 0 overrun, 0 abort

    450 packets output, 9900 bytes, 0 underruns

    0 output errors, 0 collisions, 4 interface resets

    1 carrier transitions

    V35 DTE cable

    DCD=up  DSR=up  DTR=up  RTS=up  CTS=up

RA#show runn

Building configuration...

Current configuration : 619 bytes

!

version 8.4 (building 15)

hostname RA

!

!

!

!

!

!

!

!

!

no service password-encryption

!

!

!

!

!

!

interface serial 1/2

 ip address 172.16.10.1 255.255.255.0

!

 --More-

Show running-config

2. 交换机(路由器)B

Show running-config

张碧波:

ra(config)#hostname RA

RA(config)#int s1/2

RA(config-if)#ip add 172.16.10.1 255.255.255.0

RA(config-if)#clock rate 64000

RA(config-if)#clock rate setting is only valid for DCE ports.

no shutdown

RA(config-if)#no shutdown

RA(config-if)#exit

RA(config)#int f1/0

RA(config-if)#ip add 192.168.10.1 255.255.255.0

RA(config-if)#end

RA#

Configured from console by console

RA#show int s 1/2

serial 1/2 is UP  , line protocol is UP

Hardware is PQ2 SCC HDLC CONTROLLER serial

Interface address is: 172.16.10.1/24

  MTU 1500 bytes, BW 20## Kbit

  Encapsulation protocol is HDLC, loopback not set

  Keepalive interval is 10 sec , set

  Carrier delay is 2 sec

  RXload is 1 ,Txload is 1

  Queueing strategy: WFQ

  5 minutes input rate 17 bits/sec, 0 packets/sec

  5 minutes output rate 17 bits/sec, 0 packets/sec

    450 packets input, 9900 bytes, 0 no buffer

    Received 450 broadcasts, 0 runts, 0 giants

    0 input errors, 0 CRC, 0 frame, 0 overrun, 0 abort

    450 packets output, 9900 bytes, 0 underruns

    0 output errors, 0 collisions, 4 interface resets

    1 carrier transitions

    V35 DTE cable

    DCD=up  DSR=up  DTR=up  RTS=up  CTS=up

RA#show runn

Building configuration...

Current configuration : 619 bytes

!

version 8.4 (building 15)

hostname RA

!

!

!

!

!

!

!

!

!

no service password-encryption

!

!

!

!

!

!

interface serial 1/2

 ip address 172.16.10.1 255.255.255.0

!

 --More-

RA#ping 172.16.10.2

Sending 5, 100-byte ICMP Echoes to 172.16.10.1, timeout is 2 seconds:

  < press Ctrl+C to break >

.....

Success rate is 0 percent (5/5)

许金皓:

ra(config)#hostname RA

RA(config)#int s1/2

RA(config-if)#ip add 172.16.10.1 255.255.255.0

RA(config-if)#clock rate 64000

RA(config-if)#clock rate setting is only valid for DCE ports.

no shutdown

RA(config-if)#no shutdown

RA(config-if)#exit

RA(config)#int f1/0

RA(config-if)#ip add 192.168.10.1 255.255.255.0

RA(config-if)#end

RA#

Configured from console by console

RA#show int s 1/2

serial 1/2 is UP  , line protocol is UP

Hardware is PQ2 SCC HDLC CONTROLLER serial

Interface address is: 172.16.10.1/24

  MTU 1500 bytes, BW 20## Kbit

  Encapsulation protocol is HDLC, loopback not set

  Keepalive interval is 10 sec , set

  Carrier delay is 2 sec

  RXload is 1 ,Txload is 1

  Queueing strategy: WFQ

  5 minutes input rate 17 bits/sec, 0 packets/sec

  5 minutes output rate 17 bits/sec, 0 packets/sec

    450 packets input, 9900 bytes, 0 no buffer

    Received 450 broadcasts, 0 runts, 0 giants

    0 input errors, 0 CRC, 0 frame, 0 overrun, 0 abort

    450 packets output, 9900 bytes, 0 underruns

    0 output errors, 0 collisions, 4 interface resets

    1 carrier transitions

    V35 DTE cable

    DCD=up  DSR=up  DTR=up  RTS=up  CTS=up

RA#show runn

Building configuration...

Current configuration : 619 bytes

!

version 8.4 (building 15)

hostname RA

!

!

!

!

!

!

!

!

!

no service password-encryption

!

!

!

!

!

!

interface serial 1/2

 ip address 172.16.10.1 255.255.255.0

!

 --More-

Show running-config

李松艳:

rb>enable 14

Password:

Password:

rb#con t

Enter configuration commands, one per line.  End with CNTL/Z.

rb(config)#hostname rb

rb(config)#int s1/2

rb(config-if)#ip add 172.16.10.2255.255.255.0

                                  ^

% Invalid input detected at '^' marker.

rb(config-if)#ip add 172.16.10.2 255.255.255.0

rb(config-if)#no shutdown

rb(config-if)#exit

rb(config)#int f1/0

rb(config-if)#ip add 192.168.20.1 255.255.0

                                           ^

% Invalid input detected at '^' marker.

rb(config-if)#ip add 192.168.20.1 255.255.255.0

rb(config-if)#end

rb#

Configured from console by console

rb#

rb#

rb#

rb#

rb#

rb#

rb#

rb#

朱晓:

rb>enable 14

Password:

Password:

rb#con t

Enter configuration commands, one per line.  End with CNTL/Z.

rb(config)#hostname rb

rb(config)#int s1/2

rb(config-if)#ip add 172.16.10.2255.255.255.0

                                  ^

% Invalid input detected at '^' marker.

rb(config-if)#ip add 172.16.10.2 255.255.255.0

rb(config-if)#no shutdown

rb(config-if)#exit

rb(config)#int f1/0

rb(config-if)#ip add 192.168.20.1 255.255.0

                                           ^

% Invalid input detected at '^' marker.

rb(config-if)#ip add 192.168.20.1 255.255.255.0

rb(config-if)#end

rb#

Configured from console by console

rb#

rb#

rb#

rb#

rb#

rb#

rb#

rb#

孙萌萌:

rb>enable 14

Password:

Password:

rb#con t

Enter configuration commands, one per line.  End with CNTL/Z.

rb(config)#hostname rb

rb(config)#int s1/2

rb(config-if)#ip add 172.16.10.2255.255.255.0

                                  ^

% Invalid input detected at '^' marker.

rb(config-if)#ip add 172.16.10.2 255.255.255.0

rb(config-if)#no shutdown

rb(config-if)#exit

rb(config)#int f1/0

rb(config-if)#ip add 192.168.20.1 255.255.0

                                           ^

% Invalid input detected at '^' marker.

rb(config-if)#ip add 192.168.20.1 255.255.255.0

rb(config-if)#end

rb#

Configured from console by console

rb#

rb#

rb#

rb#

rb#

rb#

rb#

rb#

刘晓萍:

rb>enable 14

Password:

Password:

rb#con t

Enter configuration commands, one per line.  End with CNTL/Z.

rb(config)#hostname rb

rb(config)#int s1/2

rb(config-if)#ip add 172.16.10.2255.255.255.0

                                  ^

% Invalid input detected at '^' marker.

rb(config-if)#ip add 172.16.10.2 255.255.255.0

rb(config-if)#no shutdown

rb(config-if)#exit

rb(config)#int f1/0

rb(config-if)#ip add 192.168.20.1 255.255.0

                                           ^

% Invalid input detected at '^' marker.

rb(config-if)#ip add 192.168.20.1 255.255.255.0

rb(config-if)#end

rb#

Configured from console by console

rb#

rb#

rb#

rb#

rb#

rb#

rb#

rb#

王玉勤:

rb>enable 14

Password:

Password:

rb#con t

Enter configuration commands, one per line.  End with CNTL/Z.

rb(config)#hostname rb

rb(config)#int s1/2

rb(config-if)#ip add 172.16.10.2255.255.255.0

                                  ^

% Invalid input detected at '^' marker.

rb(config-if)#ip add 172.16.10.2 255.255.255.0

rb(config-if)#no shutdown

rb(config-if)#exit

rb(config)#int f1/0

rb(config-if)#ip add 192.168.20.1 255.255.0

                                           ^

% Invalid input detected at '^' marker.

rb(config-if)#ip add 192.168.20.1 255.255.255.0

rb(config-if)#end

rb#

Configured from console by console

rb#

rb#

rb#

rb#

rb#

rb#

rb#

rb#

                                                                 

相关推荐