RIP配置实验
- 格式:docx
- 大小:573.71 KB
- 文档页数:11
RIP配置实验静态路由rip距离矢量r1r2负载均衡RIP基本配置:命令:R1(config)#router rip //创建RIP进程,启用RIP协议R1(config-router)#version 2 //启用RIPv2R1(config-router)#network 192.168.1.0 //通告主类直连网段R1(config-router)#no auto-summary //关闭自动汇总R1(config)#router ripR1(config-router)#version 2R1(config-router)#network 192.168.1.0R1(config-router)#network 192.168.2.0R1(config-router)#no auto-summaryR2(config)#router ripR2(config-router)#version 2R2(config-router)#network 192.168.2.0R2(config-router)#network 192.168.3.0R2(config-router)#no auto-summary实验调试R1#show ip protocols //查看IP路由协议配置和统计信息R1#debug ip rip //查看RIP路由协议的动态更新过程R1#clear ip route *RIPv1、RIPv2兼容试验:接口特性优于进程特性,对于本实验,如果在进程中配置了(version 1或version 2),但是在接口上配置了ip rip receive version 1 2,则版本1和版本2的路由更新该接口都可以接收。
send receive默认模式: 1 1、2RIPv1: 1 1RIPv2: 2 2命令:R2(config-if)#ip rip send version 1 2 //设置R2即发送v1又发送v2R2(config-if)#ip rip receive version 1 2 //设置R2即接收v1又接收v2基本配置略。
实验4 RIP路由配置一.实验目的:掌握RIP路由配置。
二.实验要点:1)根据拓扑图进行网络布线。
2)清除启动配置并将路由器重新加载为默认状态。
3)在路由器上执行基本配置任务。
4)解释debug ip routing 的输出。
5)配置并激活串行接口和以太网接口。
6)测试连通性。
7)收集信息并据此找出设备之间无法连通的原因。
8)使用中间地址配置静态路由。
9)使用送出接口配置静态路由。
10)比较使用中间地址的静态路由和使用送出接口的静态路由。
11)配置默认静态路由。
12)配置总结静态路由。
13)记录网络实施方案。
三.实验设备:Cisco 2950交换机3台,Cisco2621xm路由器3台,带有网卡的工作站 PC 三台。
四、实验环境五. 实验步骤(1)IP地址配置R1:配置Router>enableRouter#configure terminalRouter(config)#hostname R1R1(config)#interface FastEthernet0/0R1(config-if)#no shutdownR1(config-if)#ip address 172.30.1.1 255.255.255.0R1(config)#interface Serial0/0R1(config-if)#ip address 172.30.2.1 255.255.255.0R1(config-if)#no shutdownR1(config-if)#clock rate 64000R2:配置Router>enableRouter#configure terminalR(config)#hostname R2R2(config)#interface FastEthernet0/0R2(config-if)#ip address 172.30.3.1 255.255.255.0R2(config-if)#no shutdownR2(config)#interface Serial0/1R2(config-if)#ip address 172.30.2.2 255.255.255.0R2(config-if)#do ping 172.30.2.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 172.30.2.1, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 16/37/78 msR2(config)#interface Serial0/0R2(config-if)#ip address 192.168.4.9 255.255.255.252R2(config-if)#clock rate 64000%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to upR3:配置Router>enableRouter#configure terminalRouter(config)#interface Serial0/1Router(config-if)#ip address 192.168.4.10 255.255.255.252Router(config-if)#no shutdownRouter(config-if)#do ping 192.168.4.9Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.4.9, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 msRouter(config)#interface FastEthernet0/0Router(config-if)#ip address 192.168.5.1 255.255.255.0Router(config-if)#no shutdown(2)RIP路由配置R1路由配置:R1(config)#router ripR1(config-router)#network 172.30.0.0可以使用 passive-interface fastethernet 0/0 命令禁止从该接口发送 RIPv1 更新R1(config-router)#passive-interface fastethernet 0/0R1(config-router)#endR2路由配置:R2(config)#router ripR2(config-router)#network 172.30.0.0R2(config-router)#passive-interface fastethernet 0/0R2(config-router)#endR2#%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 set172.30.0.0/24 is subnetted, 3 subnetsR 172.30.1.0 [120/1] via 172.30.2.1, 00:00:19, Serial0/1C 172.30.2.0 is directly connected, Serial0/1C 172.30.3.0 is directly connected, FastEthernet0/0192.168.4.0/30 is subnetted, 1 subnetsC 192.168.4.8 is directly connected, Serial0/0R2#show ip protocolsRouting Protocol is "rip"Sending updates every 30 seconds, next due in 11 secondsInvalid after 180 seconds, hold down 180, flushed after 240Outgoing update filter list for all interfaces is not setIncoming update filter list for all interfaces is not setRedistributing: ripDefault version control: send version 1, receive any versionInterface Send Recv Triggered RIP Key-chainSerial0/1 1 2 1Automatic network summarization is in effectMaximum path: 4Routing for Networks:172.30.0.0Passive Interface(s):FastEthernet0/0Routing Information Sources:Gateway Distance Last Update172.30.2.1 120 00:00:07Distance: (default is 120)R2(config)#ip route 0.0.0.0 0.0.0.0 serial 0/0R2(config)#router ripR2(config-router)#default-information originateR2(config-router)#endR2#%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 0.0.0.0 to network 0.0.0.0172.30.0.0/24 is subnetted, 3 subnetsR 172.30.1.0 [120/1] via 172.30.2.1, 00:00:06, Serial0/1C 172.30.2.0 is directly connected, Serial0/1C 172.30.3.0 is directly connected, FastEthernet0/0192.168.4.0/30 is subnetted, 1 subnetsC 192.168.4.8 is directly connected, Serial0/0S* 0.0.0.0/0 is directly connected, Serial0/0R3路由配置:R3(config)#ip route 172.30.0.0 255.255.252.0 serial0/1R3(config)#endR3#%SYS-5-CONFIG_I: Configured from console by consoleR3#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 set172.30.0.0/22 is subnetted, 1 subnetsS 172.30.0.0 is directly connected, Serial0/1192.168.4.0/30 is subnetted, 1 subnetsC 192.168.4.8 is directly connected, Serial0/1C 192.168.5.0/24 is directly connected, FastEthernet0/0参考zh.hans_ERouting_SLM_v40.pdf中实验5.6.1。
rip协议原理及配置实验报告篇一:RIP协议原理及配置实验报告通信网络实验——RIP协议原理及配置实验报告班级:学号:姓名:RIP协议原理及配置实验报告一、实验目的1. 掌握动态路由协议的作用及分类2. 掌握距离矢量路由协议的简单工作原理3. 掌握RIP协议的基本特征4. 熟悉RIP的基本工作过程二、实验原理1. 动态路由协议概述路由协议是运行在路由器上的软件进程,与其他路由器上相同路由协议之间交换路由信息,学习非直连网络的路由信息,加入路由表。
并且在网络拓扑结构变化时自动调整,维护正确的路由信息。
动态路由协议通过路由信息的交换生成并维护转发引擎需要的路由表。
网络拓扑结构改变时自动更新路由表,并负责决定数据传输最佳路径。
动态路由协议的优点是可以自动适应网络状态的变化,自动维护路由信息而不用网络管理员的参与。
其缺为由于需要相互交换路由信息,需要占用网络带宽,并且要占用系统资源。
另外安全性也不如使用静态路由。
在有冗余连接的复杂网络环境中,适合采用动态路由协议。
目的网络是否可达取决于网络状态动态路由协议分类按路由算法划分:距离-矢量路由协议:定期广播整个路由信息,易形成路由环路,收敛慢链路状态路由协议(如OSPF):收集网络拓扑信息,运行协议算法计算最佳路由根本解决路由环路问题,收敛快按应用范围划分:域间路由协议和域内路由协议自治域系统是一组处于相同技术管理的网络的集合。
IGPs 在一个自治域系统内运行。
EGPs 连接不同的自治域系统。
2. RIP协议概述RIP(Routing Information Protocol)路由信息协议最早的动态路由协议,基于距离矢量算法实现使用UDP报文来交换路由信息以跳数多少选择最优路由RIPv1协议报文不携带掩码信息RIP的度量值,如下图所示:RIP一个比较大的缺陷是Metric只是简单的用跳数来表示,并不能准确的反映路径的真实状况。
如图所示,有三条路径的跳数是一样的,所以RIP 就认为这三条路径是一样的路径,但实际上三条路径的带宽差异很大。
【实验题目】RIP 协议配置实验 【实验目的】学习RIPv2的配置方法。
【配置命令】▪ 配置RIPv2协议。
R1(config)# router rip R1(config-router)# version 2R1(config-router)# network 192.168.2.0 ! 发布属于有类网络的网络的接口的子网 R1(config-router)# network 192.168.3.0▪ 把交换机接口变为三层接口,然后就可以配置IP 地址。
(config)#interface f0/1 (config-if)#no switchport(config-if)#ip address 192.168.1.5 255.255.255.0▪ 为环回接口配置IP 地址。
环回接口是路由器内部的软接口,除非路由器失效,否则,环回接口一直有效。
(config)#interface loopback 0 !号码范围:0~2147483647 (config-if)#ip address 192.168.1.5 255.255.255.0 ▪取消自动汇总(config-router)#router rip(config-router)#auto-summary !启动自动汇总 (config-router)#no auto-summary !取消自动汇总▪配置水平分割(config)#interface f0/1(config-if)#ip split-horizon ! 配置水平分割(默认) (config-if)#no ip split-horizon ! 取消水平分割▪显示调试信息#debug ip rip !显示rip 调试信息 #no debug ip rip !停止显示rip 调试信息 #no debug all !停止显示所有调试信息【实验任务】1、 按下图配置RIP 路由协议。
实验四配置RIP一、实验目标加深RIP协议原理的理解了解RIP实现运行的机制掌握RIP路由配置熟悉RIP路由维护二、实验描述及组网图通过配置Rip实现各个网段互通,在路由器上与主机相连的接口应用silent-interface 命令。
图 1-1二、实验过程实验任务一:配置RIPv1本实验主要通过在路由器上配置RIPv1协议,达到PC之间能够互访的目的。
通过本次实验,学院应该能够掌握RIP协议的基本配置。
步骤一:建立物理连接按照图1-1进行连接。
确保路由器配置为出示状态,如配置不符合要求,请学员在用户模式下查出设备中的配置文件,然后重启路由器以使系统采用缺省的配置参数进行初始化。
<RouterA>reset saved-configuration<RouterA>reboot步骤二:在PC和路由器上配置IP地址表1-1 IP地址列表按表1-1所示在路由器接口上配置IP地址。
测试PC到网关的可达性,以RouterA为例C:\Documents and Settings\Administrator>ping 192.168.0.1Pinging 192.168.0.1 with 32 bytes of data:Reply from 192.168.0.1: bytes=32 time<1ms TTL=255Reply from 192.168.0.1: bytes=32 time<1ms TTL=255Reply from 192.168.0.1: bytes=32 time<1ms TTL=255Reply from 192.168.0.1: bytes=32 time<1ms TTL=255Ping statistics for 192.168.0.1:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:Minimum = 0ms, Maximum = 0ms, Average = 0ms再测试PC之间的可达性。
实验四:RIP配置⏹实验目的1、在路由器上启动RIP路由进程2、启动参与路由协议的接口,并通告网络3、使用ip default-network命令向网络中注入一条默认路由4、查看和调试RIP路由协议相关信息⏹实验要求本实验要达到如下要求:1、给出具体的实现步骤2、在路由器D通过ip default-network命令,向网络中注入一条默认路由3、给出某个路由器上路由表的内容⏹实验拓扑⏹实验设备(环境、软件)1、路由器4台2、交叉线4条⏹实验设计到的基本概念和理论1、RIP:是一种在网关与主机之间交换路由选择信息的标准。
RIP 是一种内部网关协议。
在国家性网络中如当前的因特网,拥有很多用于整个网络的路由选择协议。
作为形成网络的每一个自治系统(AS),都有属于自己的路由选择技术,不同的AS 系统,路由选择技术也不同2、管理距离:是指一种路由协议的路由可信度。
每一种路由协议按可靠性从高到低,依次分配一个信任等级,这个信任等级就叫管理距离。
实验过程和主要步骤1、路由拓扑图设置如下:2、各个路由器上相应接口的基本配置及路由器上RIP协议的配置Router0(A)Router1(B)Router2(C)Router3(D)用Router0 ping Router33、在路由器D通过ip default-network命令,向网络中注入一条默认路由4、查看Router0的Rip协议心得体会通过本次实验,我学会了在路由器上启动RIP路由进程启动参与路由协议的接口,并通告网络使用ip default-network命令,向网络中注入一条默认路由查看以及调试RIP路由协议相关信息。
实验5 rip路由配置实验一、实验目的1.理解动态路由的工作原理;2.掌握路由器的IP配置,命名配置和串口配置;3.掌握rip路由协议及其配置。
图1-1测试静态、缺省路由拓扑图二、实验步骤1、利用Boson Network Designer 绘制实验拓扑图,绘制好的拓扑图如图1-2所示。
2、绘制过程中注意,按照“够用为度”的原则,选择2610作为路由器型号。
同时,在给两台路由器间布线时要选择点到点类型。
另外,对于DCE端可以任意选择。
不过在实验配置时,对于DCE端路由器的接口(serial 0)要配置时钟信号(本次实验选用Router 1的serial 0接口作为DCE端)。
图1-2 实验网络拓扑图三、配置路由器基本参数在绘制完实验拓扑图后,可以将其保存并装入Boson NetSim中开始实验配置。
通过Boson NetSim中的工具栏按钮“eRouters”选择“Router 1”并按照下面的过程进行路由器基本参数配置:●Router>enable●Router#conf t●Router(config)#host R1●R1(config)#int e0●R1(config-if)#ip address 192.168.1.1 255.255.255.0●R1(config-if)#no shutdown●R1(config-if)#int s0●R1(config-if)#ip address 10.0.0.1 255.0.0.0●R1(config-if)#clock rate 64000●R1(config-if)#no shutdown●R1(config-if)#end●R1# show ip interface brief通过Boson NetSim中的工具栏按钮“eRouters”选择“Router 2”并按照下面的过程进行路由器基本参数配置:●Router>enable●Router#conf t●Router(config)#host R2●R2(config)#int e0●R2(config-if)#ip address 192.168.2.1 255.255.255.0●R2(config-if)#no shutdown●R2(config-if)#int s0●R2(config-if)#ip address 10.0.0.2 255.0.0.0●R2(config-if)#no shutdown●R2(config-if)#end●R2# show ip interface brief四、配置PC机基本参数通过Boson NetSim中的工具栏按钮“eStations ”选择“PC1”并按照下面的步骤配置“Host 1”的相关参数:●键入“回车键”继续。
实验四 RIP配置一、实验目的1、在路由器上启动RIP协议2、启用参与路由协议的接口,并通告网络3、理解路由表的含义4、查看和调试RIP路由协议的相关信息二、实验要求1、学会RIP的启用方法2、学会RIP版本的启用,并掌握通告网络的配置3、学会使用相关调试命令以及查看故障的命令。
三、实验设备四台2811路由器,若干连接线。
四、实验拓扑五、实验步骤1、配置路由器 R1R1(config)#router rip--------------------------- 启动 RIP 进程R1(config-router)#version1---------启用版本1,也可以启用版本2R1(config-router)#network 1.0.0.0--------------------通告网络R1(config-router)#network 192.168.12.02、配置路由器 R2R2(config)#router ripR2(config-router)#version 1R2(config-router)#network 192.168.12.0R2(config-router)#network 192.168.23.03、配置路由器 R3R3(config)#router ripR3(config-router)#version 1R3(config-router)#network 192.168.23.0R3(config-router)#network 192.168.34.04、配置路由器 R4R4(config)#router ripR4(config-router)#version 1R4(config-router)#network 192.168.34.0R4(config-router)#network 4.0.0.05、实验调试R1#show ip route-----------------------------显示路由表信息R1#show ip protocols-----------查看 IP 路由协议配置和统计信息R1#debug ip rip -------------查看 RIP 路由协议的动态更新过程六、实验总结router rip\启动 RIP 进程version1\启用版本1,也可以启用版本2network 1.0.0.0\通告网络show ip route\显示路由表信息show ip protocols\查看 IP 路由协议配置和统计信息debug ip rip \查看 RIP 路由协议的动态更新过程。
RIP 配置的综合实训网络结构拓扑图如下,其中sw1,sw2为Catalyst 2960交换机,sw1所属局域网划分为两个VLAN :vlan 11(名称为dept11),vlan 12(名称为dept12),fa0/1-fa0/10属于vlan 11,fa0/11-fa0/23属于vlan 12; sw2所属局域网划分为两个VLAN :vlan 21(名称为dept21),vlan 22(名称为dept22),fa0/1-fa0/12属于vlan 21,fa0/13-fa0/23属于vlan 22;r2通过fa0/0与交换机sw1的fa0/24相连,r3通过fa0/0与交换机sw2的fa0/24相连,配置交换机和路由器,通过RIPv2路由协议实现所有网络之间的通信。
172.20.100.1/30ip:172.20.11.1/24gateway:172.20.11.254pc11pc12pc22pc21网络拓扑结构图172.20.100.2/30ip:172.20.12.1/24gateway:172.20.12.254ip:172.20.21.1/24gateway:172.20.21.254ip:172.20.22.1/24gateway:172.20.22.254一、交换机Sw1的配置先进行基本配置Switch>enSwitch#configure terminalSwitch(config)#hostname sw1Sw1(config)#no ip domain-lookupSw1(config)#line console 0Sw1(config-line)#logging synchronousSw1(config-line)#exec-timeout 0 0Sw1(config-line)#exit交换机sw1上设置Vlan11、Vlan12,并且设置连接端口fa0/1~fa0/10属于Vlan11,接端口fa0/11~fa0/23属于Vlan12。
RIP配置实验静态路由rip距离矢量r1r2负载均衡RIP基本配置:命令:R1(config)#router rip //创建RIP进程,启用RIP协议R1(config-router)#version 2 //启用RIPv2R1(config-router)#network 192.168.1.0 //通告主类直连网段R1(config-router)#no auto-summary //关闭自动汇总R1(config)#router ripR1(config-router)#version 2R1(config-router)#network 192.168.1.0R1(config-router)#network 192.168.2.0R1(config-router)#no auto-summaryR2(config)#router ripR2(config-router)#version 2R2(config-router)#network 192.168.2.0R2(config-router)#network 192.168.3.0R2(config-router)#no auto-summary实验调试R1#show ip protocols //查看IP路由协议配置和统计信息R1#debug ip rip //查看RIP路由协议的动态更新过程R1#clear ip route *RIPv1、RIPv2兼容试验:接口特性优于进程特性,对于本实验,如果在进程中配置了(version 1或version 2),但是在接口上配置了ip rip receive version 1 2,则版本1和版本2的路由更新该接口都可以接收。
send receive默认模式: 1 1、2RIPv1: 1 1RIPv2: 2 2命令:R2(config-if)#ip rip send version 1 2 //设置R2即发送v1又发送v2R2(config-if)#ip rip receive version 1 2 //设置R2即接收v1又接收v2基本配置略。
R1(config)#router ripR1(config-router)#version 1 //启用RIPv1:发送v1、接收v1R2(config)#int s0/1 //(s0/0口为默认模式:send v1,receivev1、v2)R2(config-if)#ip rip send version 2 //设置发送v2R2(config-if)#ip rip receive version 2 //设置接收v2R3(config)#router ripR3(config-router)#version 2 //启用RIPv2,发送v2、接收v2RIP被动接口和单播试验:(让需要进行单播更新的接口,不在发送广播、组播路由更新信息) 由于路由器R1、R2的loopback接口连接的网络上没有RIP设备,但是R1、R2不知道这一情况,仍会从该接口每30s就发送一次更新,所以将接口设置成被动接口,使它们不发送更新只接收更新,并且把s0/0接口设置为单播更新,以减少不必要的带宽、CPU和内存资源的消耗、增加安全性。
命令:R1(config-router)#passive-interface default //设置默认被动接口模式(所有接口都为被动接口)R1(config-router)#passive-interface s0/0 //设置接口s0/0为被动接口模式R1(config-router)#neighbor 192.168.1.2 //指定邻居接口,实现RIP单播通信被动接口:禁止路由协议向某接口发送路由信息。
基本配置略。
R1(config)#router ripR1(config-router)#passive-interface defaultR1(config-router)#neighbor 192.168.1.2R2(config)#router ripR2(config-router)#passive-interface defaultR2(config-router)#neighbor 192.168.1.1注意:单播通信时,RIP仍按照原来接口设置的v1、v2版本通信,当通信不兼容时仍需要进行版本兼容配置。
修改计时器参数:R1(config)#router ripR1(config-router)#timers basic 30 180 180 240 //分别为:更新周期、无效时间、保持时间、刷新时间默认计时器时间为:更新周期30秒、无效时间180秒、保持时间180秒、刷新时间240秒。
触发更新:命令:R1(config-if)#ip rip triggered //启用触发更新(默认开启)触发更新只能配置在串口下,启用触发更新的链路两边的路由器都要配置触发更新(因为需要协商,否则有问题),启用触发更新后路由更新时是增量更新。
R1(config)#int s0/0R1(config-if)#ip rip triggeredR2(config)#int s0/0R2(config-if)#ip rip triggered说明:启用触发更新后保持时间=0永不超时,即下列配置timers basic 30 180 0 240自动出现。
实验调试R1#debug ip ripR1#show ip rip database //查看RIP数据库手动路由汇总:(需要v2版本)命令:R2(config-if)#ip summary-address rip 1.1.4.0 255.255.252.0 //在路由出口配置汇总基本配置略。
R2(config)#int s0/0R2(config-if)#ip summary-address rip 1.1.4.0 255.255.252.0路由汇总与CIDR汇总的区别:路由汇总还有类的概念,汇总后的掩码长度必须要大于或等于主类网络的掩码长度;CIDR是无类域间路由,网络地址一致就能进行CIDR汇总。
示例:1.)192.168.0.0/24 - 192.168.3.0/24CIDR汇总:192.168.0.0/30路由汇总:192.168.0.0/302.)92.168.0.0/24 - 192.168.3.0/24CIDR汇总:192.168.0.0/22路由汇总:不能汇总!(因为22<24,不能进行路由汇总)注意:RIPv2仅支持路由汇总,不支持CIDR汇总;但它可以传递CIDR汇总(可以使用“network”通告CIDR网络)!默认路由再发布:路由重分布/路由再发布(Router Redistribution):路由重分布是在不同路由协议之间交换路由信息的过程。
路由重分布为在同一个互联网络中高效地支持多种路由协议提供了可能,执行路由重分布的路由器被称为边界路由器,因为它们位于两个或多个自治系统的边界上。
种子度量值(Seed Metric):是定义在路由重分布里的,它是一条从外部重分布进来的路由的初始度量值。
基本配置略。
再发布默认路由一:(本地:直连默认路由C*,静态默认路由S*;其它:通告缺省默认路由R*) R2(config)#ip default-network 192.168.2.0 //指定本地的默认网络,并再发布默认路由R2(config)#ip route 0.0.0.0 0.0.0.0 s0/0 192.168.2.1 //添加静态默认路由“ip defaul t-network”命令说明:①该命令后面的网络一定要是主类网络;②该命令后面的主类网络一定要在路由表中,即可以是直连的或者通过其它路由协议学习到的网络。
1>可以通过ip route 192.168.2.0 255.255.255.0 null 0来添加;2>也可以通过ip route 192.168.2.0 255.255.255.0 s0/0或其它方法来添加。
再发布默认路由二:(本地:静态默认路由S*;其它:通告缺省默认路由R*)R2(config)#ip route 0.0.0.0 0.0.0.0 s0/0 192.168.2.1 //添加静态默认路由R2(config)#router ripR2(config-router)#redistribute static //再发布添加的静态默认路由再发布默认路由三:(本地:静态默认路由S*;其它:通告缺省默认路由R*)R2(config)#router ripR2(config-router)#default-information originate //再发布默认路由R2(config)#ip route 0.0.0.0 0.0.0.0 s0/0 192.168.2.1 //添加静态默认路由RIPv2认证:命令:R1(config)#key chain kc1 //创建钥匙链名字kc1(双方不必一致)R1(config-keychain)#key 1 //创建钥匙链的第一把钥匙(双方必须一致,详见说明)R1(config-keychain-key)#key-string cisco //创建钥匙为cisco(双方必须一致)R1(config-if)#ip rip authentication key-chain kc1 //在接口启用钥匙链kc1R1(config-if)#ip rip authentication mode md5 //md5加密认证基本配置略。
R1(config)#key chain kc1R1(config-keychain)#key 1R1(config-keychain-key)#key-string ciscoR1(config)#int s0/0R1(config-if)#ip rip authentication key-chain kc1R2(config)#key chain kc2R2(config-keychain)#key 1R2(config-keychain-key)#key-string ciscoR2(config)#int s0/0R2(config-if)#ip rip authentication key-chain kc2明文认证:R1(config)#int s0/0R1(config-if)#ip rip authentication mode text密文认证:R1(config)#int s0/0R1(config-if)#ip rip authentication mode md5说明:明文认证原则:1.只发送最小key id;2.不携带key id;3.接收方会与自己所有的密钥进行比较,只要有一个能匹配上就通过认证。