实验6.2-RIP动态路由的配置

合集下载

实验六:动态路由配置-RIP

实验六:动态路由配置-RIP

实验六:动态路由配置-RIP实验六动态路由配置—RIP实验⽬的1、熟悉模拟器Packet tracer的使⽤环境;2、理解RIP的基本原理;3、掌握RIP协议的配置步骤;4、掌握查看通过动态路由协议RIP学习产⽣的路由;实验环境Packet tracer 5.0背景知识RIP(Routing Information Protocols,)是应⽤较早、使⽤较普遍的IGP内部⽹管协议,使⽤于⼩型同类⽹络,是距离⽮量协议;RIP协议跳数作为衡量路径开销的,RIP协议⾥规定最⼤跳数为15;RIP协议有两个版本:RIPv1和RIPv2,RIPv1属于有类路由协议,不⽀持VLSM,以⼴播形式进⾏路由信息的更新,更新周期为30秒;RIPv2属于⽆类路由协议,⽀持VLSM,以组播形式进⾏路由更细。

实验步骤1、使⽤模拟器Packet tracer构建如下的⽹络拓扑:注意:路由器和路由器之间,路由器和计算机之间应该采⽤哪种电缆2、PC机的IP配置进⼊PC机配置环境,按照图中的要求配置IP地址、⼦⽹掩码和⽹关。

3、路由器基本配置R0:Router>enableRouter#configure terminalRouter(config)#hostname R1 //路由器命名R1(config)#interface f0/0R1(config-if)#ip add 192.168.1.254 255.255.255.0R1(config-if)#no shutR1(config-if)#interface s0/0/0R1(config-if)#ip add 192.168.2.1 255.255.255.0R1(config-if)#clock rate 64000R1(config-if)#no shutR2:Router>enableRouter#configure terminalRouter(config)#hostname R2 //路由器命名R2(config)#interface f0/0R2(config-if)#ip add 192.168.2.254 255.255.255.0 R2(config-if)#no shut R2(config-if)#interface s0/0/0R2(config-if)#ip add 192.168.2.2 255.255.255.0R2(config-if)#no shutR2(config-if)#interface s0/0/1R2(config-if)#ip add 192.168.4.2 255.255.255.0R2(config-if)#clock rate 64000R3(config-if)#no shutR3:Router>enableRouter#configure terminalRouter(config)#hostname R3 //路由器命名R3(config)#interface f0/0R3(config-if)#ip add 192.168.5.254 255.255.255.0 R3(config-if)#no shut R3(config-if)#interface s0/0/0R3(config-if)#ip add 192.168.4.1 255.255.255.0R3(config-if)#no shut4、RIP配置R1:R1(config)#router ripR1(config-router)#network 192.168.1.0R1(config-router)#network 192.168.2.0R2:R2(config)#router ripR2(config-router)#network 192.168.2.0R2(config-router)#network 192.168.3.0R2(config-router)#network 192.168.4.0R3:R3(config)#router ripR3(config-router)#network 192.168.4.0R3(config-router)#network 192.168.5.05、查看路由器在特权模式下查看路由器的路由信息:Router#show ip routeRouter#show ip protocolsRouter#debug ip rip6、查看⽹络连通情况⽤PING命令查看⽹络连通情况。

动态路由配置实验

动态路由配置实验

动态路由配置实验(学时数:4,分两次完成)一、实验目的1、掌握在一个网络系统中配置动态路由RIP二、实验设备及环境Star-R2620路由器四台,计算机四台,Star-1926F+交换机一台 ● 网络拓朴结构●各主机和路由器接口的IP 地址各路由器的接口IP 地址分配如下:各主机的IP地址和缺省网关分配如下:三、知识点说明1、动态路由协议RIP●RIP的概念RIP(Routing Information Protocol,路由信息协议)是一种有类别的、距离向量路由协议。

RIP使用非常简单的度量值一跳数(HOPS),仅考虑到达目的网络要经过的路由器个数,不考虑路径的带宽和其他因素。

跳数的计算是将指定路由器到达远程网络所有路由器的个数进行简单相加而完成的。

每隔30秒广播一次路由表,维护相邻路由器的关系,同时根据收到的路由表计算自己的路由表。

RIP运行简单,适用于小型网络。

●RIP的配置方法RIP路由协议原理看起来很复杂,然而配置RIP是相当简单的,主要有以下两个步骤:①启动RIP路由进程。

在全局配置模式下,使用“router rip”命令。

②在路由配置模式下配置路由器的那些接口参与RIP进程。

使用“network主网络号”命令举例如下:RTA(config)#router ripRTA(config-router)#network 192.168.1.0RTA(config-router)#network 192.168.3.0RTA(config-router)#network 192.168.7.0使用“network”命令时,网络号应是路由器的直连接口的主网络号。

RTA直连接网络192. 168.1.0/24的主网络号为192.168.1.0,而另外两个直连网络的主网络号分别为192.168.3.0,192.168.7.0。

四、实验内容1、配置动态路由协议RIP●RTA的配置Red-Giant>enRed-Giant#config tRed-Giant (config)#hostname RTARTA(config)#int f0RTA(config-if)#ip address 192.168.7.1 255.255.255.0RTA(config-if)#no shutdownRTA(config-if)#exitRTA(config)#int s0RTA(config-if)#ip address 192.168.1.1 255.255.255.0RTA(config-if)#encapsulation pppRTA(config-if)#clock rate 2000000RTA(config-if)#no shutdownRTA(config-if)#exitRTA(config)#int s1RTA(config-if)#ip address 192.168.3.2 255.255.255.0RTA(config-if)#encapsulation pppRTA(config-if)#no shutdownRTA(config-if)#exitRTA(config)#router ripRTA(config-router)#network 192.168.1.0RTA(config-router)#network 192.168.3.0RTA(config-router)#network 192.168.7.0RTD(config-router)#exitRTA(config)#exitRTA#writeRTA#show runRTA# show ip routeRTB的配置Red-Giant>enRed-Giant#config tRed-Giant (config)#hostname RTBRTB(config)#int f0RTB(config-if)#ip address 192.168.4.1 255.255.255.0RTB(config-if)#no shutdownRTB(config-if)#exitRTB(config)#int s0RTB(config-if)#ip address 192.168.1.2 255.255.255.0RTB(config-if)#encapsulation pppRTB(config-if)#no shutdownRTB(config-if)#exitRTB(config)#int s1RTB(config-if)#ip address 192.168.2.1 255.255.255.0RTB(config-if)#clock rate 2000000RTB(config-if)#encapsulation pppRTB(config-if)#no shutdownRTB(config-if)#exitRTB(config)#router ripRTB(config-router)#network 192.168.1.0RTB(config-router)#network 192.168.2.0RTB(config-router)#network 192.168.4.0RTD(config-router)#exitRTB(config)#exitRTB#writeRTB#show runRTB# show ip route●RTC的配置Red-Giant>enRed-Giant#config tRed-Giant (config)#hostname RTCRTC(config)#int f0RTC(config-if)#ip address 192.168.6.1 255.255.255.0RTC(config-if)#no shutdownRTC(config-if)#exitRTC(config)#int s0RTC(config-if)#ip address 192.168.2.2 255.255.255.0RTC(config-if)#encapsulation pppRTC(config-if)#no shutdownRTC(config-if)#exitRTC(config)#int s1RTC(config-if)#ip address 192.168.3.1 255.255.255.0RTC(config-if)#clock rate 2000000RTC(config-if)#encapsulation pppRTC(config-if)#no shutdownRTC(config-if)#exitRTC(config)#router ripRTC(config-router)#network 192.168.2.0RTC(config-router)#network 192.168.3.0RTC(config-router)#network 192.168.6.0RTD(config-router)#exitRTC(config)#exitRTC#writeRTC#show runRTC# show ip route●RTD的配置Red-Giant>enRed-Giant#config tRed-Giant (config)#hostname RTDRTD(config)#int f0RTD(config-if)#ip address 192.168.4.2 255.255.255.0RTD(config-if)#no shutdownRTD(config-if)#exitRTD(config)#int f1RTD(config-if)#ip address 192.168.5.1 255.255.255.0RTD(config-if)#no shutdownRTD(config-if)#exitRTD(config)#router ripRTD(config-router)#network 192.168.4.0RTD(config-router)#network 192.168.5.0RTD(config-router)#exitRTD(config)#exitRTD#writeRTD#show runRTD# show ip route五、思考题a)如果本实验网络系统只用静态路由来实现,RTA、RTB、RTC、RTD应分别如何配置?b)配置RIP路由有哪些命令?分别在什么模式下输入这些命令?c)配置OSPF路由有哪些命令?分别在什么模式下输入这些命令?。

实训名称:RIPV2动态路由

实训名称:RIPV2动态路由

实训名称:RIPV2动态路由一、实训原理1、当一个大的网络号里有不连续的子网号的时,应该采用RIPV2动态路由二、实训目的1、了解RIPV22、了解RIPV2的基本配置三、实训步骤:1、配置R1路由器2、配置R2路由器3、配置R3路由器4、给PC机配置IP地址拓扑图具体步骤:配置R1路由器En //进入特权模式Conf //进入全局配置模式Int F0/0 //进入F0/0端口Ip add 192.168.1.65 255.255.255.192 //给F0/0配置IP地址No shut //打开F0/0端口Int F0/1 //进入F0/1端口Ip add 12.1.1.1 255.255.255.252 //给F0/1配置IP地址No shut //打开F0/1端口Exit //退出Router rip //启用RIP动态路由进程version 2 //启用RIPV2no auto-summary //关闭自动汇总功能Net 192.168.1.0 //宣告主网络Net 12.0.0.0 //宣告主网络再配R2的路由器En //进入特权模式Conf //进入全局配置模式Int F0/1 //进入F0/1端口Ip add 12.1.1.2 255.255.255.252 //给F0/1端口配置IP地址No shut //打开F0/1端口Int F0/0 //进入F0/0端口Ip add 12.1.2.1 255.255.255.252 //给F0/0配置IP地址No shut //打开F0/0端口exit //退出Router rip //启用RIP动态路由进程version 2 //启用RIPV2no auto-summary //关闭自动汇总功能Net 12.0.0.0 //宣告主网络再配R3的路由器En //进入特权模式Conf //进入全局配置模式Int F0/0 //进入F0/0端口Ip add 12.1.2.2 255.255.255.252 //给F0/0端口配置IP地址No shut //打开F0/0端口Int F0/1 //进入F0/1端口Ip add 192.168.1.129 255.255.255.192 //给F0/1配置IP地址No shut //打开F0/1端口exit //退出Router rip //启用RIP动态路由进程version 2 //启用RIPV2no auto-summary //关闭自动汇总功能net 192.168.1.0 //宣告主网络Net 12.0.0.0 //宣告主网络给PC机配置IP地址略四、实训结果从PC2 ping PC3可以ping通。

路由器RIP动态路由配置

路由器RIP动态路由配置

路由器RIP动态路由配置本文档涉及附件:- [路由器RIP动态路由配置示例图](附件1)- [路由器RIP配置文件](附件2)本文所涉及的法律名词及注释:- 路由器:一种专用计算机设备,用于在计算机网络之间传输数据包,它根据分析数据包中的目标地质来决定它是将数据包传递给下一个连接点还是丢弃。

- RIP(Routing Information Protocol):一种用于在IP网络中自动传播路由信息的动态路由协议。

- 动态路由:一种网络路由技术,它根据网络中的实时变化自动调整路由表,以便选择最佳路径进行数据传输。

路由器RIP动态路由配置示例:一、配置基本信息1.打开路由器终端连接工具,登录路由器管理界面。

2.进入路由器配置模式:```router> enablerouterconfigure terminal```3.配置路由器主机名:```router(config)hostname 路由器名称```4.配置RIP协议:```router(config)router rip```二、配置接口信息1.进入接口配置模式:```router(config)interface 接口名称```2.配置接口IP地质:```router(config-if)ip address IP地质子网掩码```3.开启接口:```router(config-if)no shutdown```4.重复以上步骤配置所有需要参与RIP动态路由的接口。

三、配置RIP网络1.进入RIP路由配置模式:```router(config)router rip```2.配置网络:```router(config-router)network 网络地质```3.重复以上步骤配置所有需要参与RIP动态路由的网络。

四、调整RIP路由参数1.调整RIP更新间隔:```router(config-router)timers basic 广播间隔启动等待时间```2.调整RIP版本:```router(config-router)version 2```3.调整RIP跳数限制:```router(config-router)maximum-paths 最大跳数```五、保存配置并退出1.保存配置:```router(config)endrouterwrite```2.退出路由器管理界面:```routerexit```附件:附件1:[路由器RIP动态路由配置示例图](附件1.jpg)附件2:[路由器RIP配置文件](附件2.txt)本文所涉及的法律名词及注释:- 路由器:网络设备,用于传输数据。

PT 实验(九) 路由器RIP动态路由配置

PT 实验(九) 路由器RIP动态路由配置

PT 实验(九) 路由器RIP动态路由配置一、实验目标●掌握RIP协议的配置方法;●掌握查看通过动态路由协议RIP学习产生的路由;●熟悉广域网线缆的连接方式;二、实验背景假设校园网通过一台三层交换机连到校园网出口路由器上,路由器再和校园外的另一台路由器连接。

现要做适当配置,实现校园网内部主机与校园网外部主机之间的相互通信。

为了简化网管的管理维护工作,学校决定采用RIP V2协议实现互通。

三、技术原理RIP(Routing Information Protocols),路由信息协议,是应用较早、使用较普通的IGP内部网关协议,适用于小型同类网络,是距离矢量协议;RIP协议以跳数衡量路径开销,RIP协议里规定最大跳数为15;RIP协议有两个版本:RIPv1和RIPv2,RIPv1属于有类路由协议,不支持VLSM,以广播形式进行路由信息的更新,更新周期为30秒;RIPv2属于无类路由协议,支持VLSM,以组播形式进行路由更新。

四、实验步骤实验拓扑1、在三层交换机上划分VLAN10和VLAN20,其中VLAN10用于连接校园网主机,VLAN20用于连接R1;2、路由器之间通过V.35电缆通过串口连接,DCE端连接在R1上,配置其时间频率为64000;3、主机和交换机通过直连线连接,主机与路由器通过交叉线连接;4、在S3560上配置RIPv2路由协议;5、在路由器R1、R2上配置RIPv2路由协议;6、将PC1、PC2主机默认网关分别设置为与直连网络设备接口IP地址;7、验证PC1、PC2主机之间可以互相通信;S3560:Switch>Switch>enSwitch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#hostname S3560S3560(config)#vlan 10S3560(config-vlan)#exitS3560(config)#vlan 20S3560(config-vlan)#exitS3560(config)#interface fa0/10S3560(config-if)#switchport access vlan 10S3560(config-if)#exitS3560(config)#interface fa0/20S3560(config-if)#switchport access vlan 20S3560(config-if)#exitS3560(config)#interface vlan 10%LINK-5-CHANGED: Interface Vlan10, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up S3560(config-if)#ip address 192.168.1.1 255.255.255.0S3560(config-if)#exitS3560(config)#interface vlan 20%LINK-5-CHANGED: Interface Vlan20, changed state to upS3560(config-if)#ip address 192.168.3.1 255.255.255.0S3560(config-if)#exitS3560#%SYS-5-CONFIG_I: Configured from console by consoleS3560#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setC 192.168.1.0/24 is directly connected, Vlan10S3560(config)#router rip //配置rip路由协议S3560(config-router)#network 192.168.1.0S3560(config-router)#network 192.168.3.0S3560(config-router)#version 2S3560(config-router)#endS3560#%LINK-5-CHANGED: Interface FastEthernet0/20, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/20, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up //当配置好所有RIPv2后,再查看路由信息S3560#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setC 192.168.1.0/24 is directly connected, Vlan10R 192.168.2.0/24 [120/2] via 192.168.3.2, 00:00:01, Vlan20C 192.168.3.0/24 is directly connected, Vlan20R 192.168.4.0/24 [120/1] via 192.168.3.2, 00:00:01, Vlan20S3560#R1:Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R1R1(config)#interface fa0/0R1(config-if)#ip address 192.168.3.2 255.255.255.0R1(config-if)#no shutdown%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up R1(config-if)#exitR1(config)#interface serial 0/0R1(config-if)#ip address 192.168.4.1 255.255.255.0R1(config-if)#no shutdown%LINK-5-CHANGED: Interface Serial0/0, changed state to downR1(config-if)#clock rate 64000R1(config-if)#exitR1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setR 192.168.1.0/24 [120/1] via 192.168.3.1, 00:00:15, FastEthernet0/0C 192.168.3.0/24 is directly connected, FastEthernet0/0R1(config)#router rip //配置rip路由协议R1(config-router)#network 192.168.3.0R1(config-router)#network 192.168.4.0R1(config-router)#version 2R1(config-router)#end%SYS-5-CONFIG_I: Configured from console by console%LINK-5-CHANGED: Interface Serial0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up //当配置好所有RIPv2后,再查看路由信息R1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setR 192.168.1.0/24 [120/1] via 192.168.3.1, 00:00:19, FastEthernet0/0R 192.168.2.0/24 [120/1] via 192.168.4.2, 00:00:11, Serial0/0C 192.168.3.0/24 is directly connected, FastEthernet0/0C 192.168.4.0/24 is directly connected, Serial0/0R1#R2:Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R2R2(config)#interface fa0/0R2(config-if)#ip address 192.168.2.1 255.255.255.0R2(config-if)#no shutdown%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up R2(config-if)#exitR2(config)#interface Serial 0/0R2(config-if)#ip address 192.168.4.2 255.255.255.0R2(config-if)#no shutdown%LINK-5-CHANGED: Interface Serial0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to upR2(config-if)#exitR2(config)#end%SYS-5-CONFIG_I: Configured from console by consoleR2#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setC 192.168.2.0/24 is directly connected, FastEthernet0/0C 192.168.4.0/24 is directly connected, Serial0/0R2#conf tEnter configuration commands, one per line. End with CNTL/Z.R2(config)#router ripR2(config-router)#network 192.168.2.0R2(config-router)#network 192.168.4.0R2(config-router)#version 2R2(config-router)#end%SYS-5-CONFIG_I: Configured from console by console//当配置好所有RIPv2后,再查看路由信息R2#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setR 192.168.1.0/24 [120/2] via 192.168.4.1, 00:00:00, Serial0/0C 192.168.2.0/24 is directly connected, FastEthernet0/0R 192.168.3.0/24 [120/1] via 192.168.4.1, 00:00:00, Serial0/0C 192.168.4.0/24 is directly connected, Serial0/0R2#五、测试Packet Tracer PC Command Line 1.0PC>ipconfigIP Address......................: 192.168.2.2Subnet Mask.....................: 255.255.255.0Default Gateway.................: 192.168.2.1PC>ping 192.168.1.2Pinging 192.168.1.2 with 32 bytes of data:Request timed out.Request timed out.Reply from 192.168.1.2: bytes=32 time=16ms TTL=125Reply from 192.168.1.2: bytes=32 time=17ms TTL=125Ping statistics for 192.168.1.2:Packets: Sent = 4, Received = 2, Lost = 2 (50% loss), Approximate round trip times in milli-seconds:Minimum = 16ms, Maximum = 17ms, Average = 16ms PC>ping 192.168.1.2Pinging 192.168.1.2 with 32 bytes of data:Reply from 192.168.1.2: bytes=32 time=19ms TTL=125Reply from 192.168.1.2: bytes=32 time=16ms TTL=125Reply from 192.168.1.2: bytes=32 time=13ms TTL=125Reply from 192.168.1.2: bytes=32 time=15ms TTL=125Ping statistics for 192.168.1.2:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:Minimum = 13ms, Maximum = 19ms, Average = 15ms PC>。

RIP动态路由实验-基础实验

RIP动态路由实验-基础实验

RIP动态路由实验-基础实验一、动态路由概述动态路由是路由器能够自动地建立自己的路由表,并且能够根据实际情况的变化适时地进行调整。

;如果没有动态路由,那么目的地址在路由表中没有匹配表项的包将被丢弃。

二、网络拓扑三、实训功能1-网络设备基本配置;2-根据拓扑图规划VLAN,并将接口分配到指定的VLAN中;3-根据拓扑图的规划配置子接口;4-根据拓扑图实现RIP的配置四、配置步骤第一步:配置所以终端设备的IP地址、子网掩码和网关;配置所以网络设备接口的IP地址和子网掩码;1、配置所有PC机的IP地址、子网掩码和网关;2、配置所有网络设备的设备名;(1)SW1的配置Switch>enable //进入特权模式Switch#conf t //进入全局配置模式Switch(config)#host sw1 //改变设备的主机名(2)SW2的配置Switch>enable //进入特权模式Switch#conf t //进入全局配置模式Switch(config)#host sw2 //改变设备的主机名(3)SW3的配置Switch>enable //进入特权模式Switch#conf t //进入全局配置模式Switch(config)#host sw3 //改变设备的主机名(4)R1的配置Router>en //进入特权模式Router#config t //进入全局配置模式Router(config)#host R1 //改变设备的主机名(5)R2的配置Router>en //进入特权模式Router#config t //进入全局配置模式Router(config)#host R2 //改变设备的主机名(6)R3的配置Router>en //进入特权模式Router#config t //进入全局配置模式Router(config)#host R3 //改变设备的主机名3、配置VLAN信息,并将相应的接口分配给指定的VLAN (1)sw1上VLAN的创建及端口的划分sw1(config)#vlan 10 //创建VLAN 10sw1(config-vlan)#name v10 //改变VLAN10的名称为 v10 sw1(config-vlan)#vlan 11 //创建VLAN 11sw1(config-vlan)#name v11 //改变VLAN11的名称为 v11 (2)sw2上VLAN的创建及端口的划分Sw2(config)#vlan 12 //创建VLAN 12Sw2(config-vlan)#name v12 //改变VLAN12的名称为 v12 Sw2(config-vlan)#vlan 13 //创建VLAN 13Sw2(config-vlan)#name v13 //改变VLAN13的名称为 v13(3)sw3上VLAN的创建及端口的划分Sw3(config)#vlan 14 //创建VLAN 14Sw3(config-vlan)#name v14 //改变VLAN14的名称为 v14Sw3(config-vlan)#vlan 15 //创建VLAN 15Sw3(config-vlan)#name v15//改变VLAN15的名称为 v15(4)sw1上接口的分配情况sw1(config-vlan)#int f0/2 //进入接口sw1(config-if)#switchport mode access //设置接口的工作模式为接入模式sw1(config-if)#switchport access vlan 10 //将接口分配给指定的VLANsw1(config-if)#int f0/3 //进入接口sw1(config-if)#switchport mode access //设置接口的工作模式为接入模式sw1(config-if)#switchport access vlan 11 //将接口分配给指定的VLAN(5)sw2上接口的分配情况Sw2(config-vlan)#int f0/2 //进入接口Sw2(config-if)#switchport mode access //设置接口的工作模式为接入模式Sw2(config-if)#switchport access vlan 13 //将接口分配给指定的VLANSw2(config-if)#int f0/3 //进入接口Sw2(config-if)#switchport mode access //设置接口的工作模式为接入模式Sw2(config-if)#switchport access vlan 12 //将接口分配给指定的VLAN(6)sw3上接口的分配情况Sw3(config-vlan)#int f0/2 //进入接口Sw3(config-if)#switchport mode access //设置接口的工作模式为接入模式Sw3(config-if)#switchport access vlan 15 //将接口分配给指定的VLANSw3(config-if)#int f0/3 //进入接口Sw3(config-if)#switchport mode access //设置接口的工作模式为接入模式Sw3(config-if)#switchport access vlan 14 //将接口分配给指定的VLAN4、配置交换机与路由器之间相连接的接口的工作模式为链路模式(1)SW1上的配置sw1(config-if)#int f0/1 //进入接口sw1(config-if)#switchport mode trunk //配置接口的工作模式为链路模式(2)SW2上的配置sw1(config-if)#int f0/1 //进入接口sw1(config-if)#switchport mode trunk //配置接口的工作模式为链路模式(3)SW3上的配置sw1(config-if)#int f0/1 //进入接口sw1(config-if)#switchport mode trunk //配置接口的工作模式为链路模式5、配置路由器的子接口作为虚拟局域网的网关;(1)R1的配置R1(config)#int f1/0.10 //进入子接口R1(config-subif)#encapsulation dot1Q 10 //封装该接口工作VLAN是VLAN 10R1(config-subif)#ip address 192.168.10.254 255.255.255.0 //配置接口的IP地址R1(config-subif)#int f1/0.11 //进入子接口R1(config-subif)#encapsulation dot1Q 11 //封装该接口工作VLAN是VLAN 11R1(config-subif)#ip address 192.168.11.254 255.255.255.0 //配置接口的IP地址R1(config-subif)#int f1/0 //进入主接口R1(config-if)#no shut //打开主接口(2)R2的配置R2(config)#int f0/1.12 //进入子接口R2(config-subif)#encapsulation dot1Q 12 //封装该接口工作VLAN是VLAN 12R2(config-subif)#ip address 192.168.12.254 255.255.255.0 //配置接口的IP地址R2(config-subif)#int f0/1.13 //进入子接口R2(config-subif)#encapsulation dot1Q 13 //封装该接口工作VLAN是VLAN 13R2(config-subif)#ip address 192.168.13.254 255.255.255.0 //配置接口的IP地址R2(config-subif)#int f0/1//进入主接口R2(config-if)#no shut //打开主接口(3)R3的配置R3(config)#int f0/1.14 //进入子接口R3(config-subif)#encapsulation dot1Q 14 //封装该接口工作VLAN是VLAN 14R3(config-subif)#ip address 192.168.14.254 255.255.255.0 //配置接口的IP地址R3(config-subif)#int f0/1.15 //进入子接口R3(config-subif)#encapsulation dot1Q 15 //封装该接口工作VLAN是VLAN 15R3(config-subif)#ip address 192.168.15.254 255.255.255.0 //配置接口的IP地址R3(config-subif)#int f0/1//进入主接口R3(config-if)#no shut //打开主接口6、配置路由器其他接口的IP地址和子网掩码(1)R1的配置R1(config-if)#int f0/0 //进入接口R1(config-if)#ip address 192.168.21.1 255.255.255.252 //配置接口的IP地址R1(config-if)#no shut //打开接口R1(config-if)#int f0/1 //进入接口R1(config-if)#ip address 192.168.31.1 255.255.255.252 //配置接口的IP地址R1(config-if)#no shut //打开接口(2)R2的配置R2(config-if)#int f0/0 //进入接口R2(config-if)#ip address 192.168.21.2 255.255.255.252 //配置接口的IP地址R2(config-if)#no shut //打开接口R2(config-if)#int f1/0//进入主接口R2(config-if)#ip address 192.168.23.1 255.255.255.252 //配置接口的IP地址R2(config-if)#no shutdown //打开接口(2)R3的配置R3(config-if)#int f0/0 //进入接口R3(config-if)#ip address 192.168.31.2 255.255.255.252 //配置接口的IP地址R3(config-if)#no shut //打开接口R3(config-if)#int f1/0 //进入接口R3(config-if)#ip address 192.168.23.2 255.255.255.252 //配置接口的IP地址R3(config-if)#no shut //打开接口7、配置RIP动态路由(1)R1上的路由配置R1(config)#route rip //进入RIP路由协议R1(config-router)#version 2 //配置RIP的版本R1(config-router)#no auto-summary //关闭自动汇总功能R1(config-router)#network 192.168.10.0 //公布直连网段R1(config-router)#network 192.168.11.0 //公布直连网段R1(config-router)#network 192.168.21.0 //公布直连网段R1(config-router)#network 192.168.31.0 //公布直连网段R1(config-router)#do w //保存配置(2)R2上的路由配置R2(config)#route rip //进入RIP路由协议R2(config-router)#version 2 //配置RIP的版本R2(config-router)#no auto-summary //关闭自动汇总功能R2(config-router)#network 192.168.12.0 //公布直连网段R2(config-router)#network 192.168.13.0 //公布直连网段R2(config-router)#network 192.168.21.0 //公布直连网段R2(config-router)#network 192.168.33.0 //公布直连网段R2(config-router)#do w //保存配置(3)R3上的路由配置R3(config)#route rip //进入RIP路由协议R3(config-router)#version 2 //配置RIP的版本R3(config-router)#no auto-summary //关闭自动汇总功能R3(config-router)#network 192.168.14.0 //公布直连网段R3(config-router)#network 192.168.15.0 //公布直连网段R3(config-router)#network 192.168.23.0 //公布直连网段R3(config-router)#network 192.168.31.0 //公布直连网段R3(config-router)#do w //保存配置。

计算机网络RIP路由器动态配置实验报告

计算机网络RIP路由器动态配置实验报告

-------计算机系
实验报告
(2015 —2016 学年第二学期)
课程名称计算机网络
实验名称实验6 RIP路由器动态配置
专业计算机科学与技术(非师一班)年级14级
成员1学号------------ 成员1姓名_-----------_ 成员2学号----------- 成员2姓名----------- 指导教师---------------------- 实验日期2015-12-9---------------
图2 Router 0的基本配置的基本配置如图3所示:
图6 Router 0显示的路由配置信息图7 Router 1显示的路由配置信息
图8 PC0与PC1的ping通情况
图9 PC0与PC2和PC3之间的ping通情况图10 PC1与PC2和PC3之间的ping通情况
图11 PC2与PC3之间的ping通情况图12 连通后的拓扑图
注:1、报告内的项目或设置,可根据实际情况加以补充和调整
2、教师批改学生实验报告应在学生提交实验报告10日内。

路由器RIP动态路由配置

路由器RIP动态路由配置

路由器RIP动态路由配置路由器RIP动态路由配置:=================================================================1. 简介本文档旨在提供关于在路由器上配置RIP(RoutingInformation Protocol)动态路由的详细指导。

RIP是一种基于距离向量的路由协议,用于在网络中自动交换路由信息。

2. 确保路由器支持RIP动态路由在开始配置RIP动态路由之前,确保你的路由器支持RIP协议。

查阅路由器厂商提供的文档或联系技术支持来确认支持情况。

3. 确定网络拓扑在配置RIP动态路由之前,需了解网络的拓扑结构,包括不同网络设备的连接方式和IP地址分配情况。

4. 配置RIP动态路由4.1 配置路由器接口IP地址首先,为每个需要参与RIP动态路由的接口配置IP地址。

通过进入路由器的接口配置模式,为每个接口分配一个唯一的IP地址。

4.2 启用RIP协议进入全局配置模式并运行以下命令,以启用RIP协议:```router rip```4.3 添加网络使用以下命令,将需要动态路由的网络添加到RIP配置中:```network <network_address>```其中,<network_address>是需要添加的网络的IP地址。

4.4 配置其他RIP参数根据需要,可以配置其他RIP参数,如路由器ID、路由器版本等。

参考路由器的文档,运行适当的命令进行配置。

5. 验证RIP动态路由配置配置完成后,使用以下命令验证RIP动态路由是否正常工作:```show ip route```通过查看路由表中的信息,确认RIP动态路由已成功添加。

6. 附加功能和注意事项6.1 路由策略如果对特定的网络有特殊要求,可以在RIP配置中使用路由策略进行调整。

具体的配置方法可以在路由器文档中找到。

6.2 定期检查和维护定期检查RIP动态路由的运行状态,并根据需要进行调整和维护。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

图6-26 RIP动态路由配置网络拓扑图
步骤2配置PC机的IP地址、子网掩码和默认网关地址
分别按图6-27、6-28、6-29配置PC机的IP地址、子网掩码和默认网关地址。

图6-27 PC1的IP配置图6-28 PC2的IP配置
图6-29 PC3的IP配置
步骤3 配置路由器的接口
分别对3台路由器的快速以太网口和串口配置IP地址,并激活。

1. 配置Router1的快速以太网接口和串口,见图6-30。

图6-30 Router1的接口配置配置Router2的快速以太网接口和串口,见图6-31。

图6-31 Router2的接口配置
配置Router3的快速以太网接口和串口,见图6-32。

图6-32 Router3的接口配置
4查询路由信息
在每台路由器的用户模式或特权模式下输入show ip route可以显示每台路由器的路由信息,
图6-33 Router1的路由信息
只有两条和Router1直接相连的直连路由信息,到其他网络没有路由。

C 10.0.0.0/8 is directly connected, Serial2/0 表示网络10.0.0.0/8通过串口Serial2/0与本路由器
步骤5检验网络的连通性
在主机PC1的命令行分别输入ping PC2和PC3的IP地址的命令,如图6-34所示。

超时,表明PC1与PC2、PC3尚未连通。

图6-34 用ping命令检测PC1至PC2和PC3的连通性
图6-35 配置完RIP协议后的Router1的路由表信息
从图中可看出增加了三条以R为标志的路由记录,表明是通过RIP协议动态获得的至其他三个网络的路由。

图6-36 查询Router1的路由协议信息另外两台路由器的路由信息读者可自行验证。

步骤8 验证网络的连通性
读者可自行在PC2和PC3的命令行验证到其他计算机的连通性。

图6-37 用ping命令检测PC1至PC2和PC3的连通性
五、实验结果及分析
实验结果截图均替换了实验步骤中的图片,此路由器是采用RIP作为动态路由协议的,每30秒更新一次路由信息,180秒为超时时间,如果超过180秒未收到任何路由更新信息,则。

相关文档
最新文档