RIP(距离矢量协议).docx

上传人:飞****2 文档编号:88929188 上传时间:2023-05-04 格式:DOCX 页数:9 大小:41.43KB
返回 下载 相关 举报
RIP(距离矢量协议).docx_第1页
第1页 / 共9页
RIP(距离矢量协议).docx_第2页
第2页 / 共9页
点击查看更多>>
资源描述

《RIP(距离矢量协议).docx》由会员分享,可在线阅读,更多相关《RIP(距离矢量协议).docx(9页珍藏版)》请在得力文库 - 分享文档赚钱的网站上搜索。

1、RIP协议基本特征 路由信息协议(Routing Information Protocol) 标准的距离矢量协议 以跳数为单位 只适合于小型网络 路由更新是周期性的 两种数据包:请求包、更新包 默认下是30s更新整个路由表,通过UDP520端口更新。(更新时间有15% 左右的偏差,一般在25.530s之间) 版本:default(默认版本)、v1、v2 Rip协议没有邻居表,不知道其邻居位置 (若网络很大,则收敛很慢, 因此,有可能产生环路) 解决环路的措施: 1)水平分割 (针对接口来说的)2)毒性逆转 (跳数=15)3)跳数4)触发更新 (只更新变化部分的内容)5)时间抑制 v1和v2版本

2、的共同点: 都是距离矢量协议;都以跳数为度量值(思科专有协议 (只有cdp可以看到别人的接口信息,其余的都只能看到自己的接口) 被动接口 含义:如果一个接口被配成被动接口,则这个接口只接收路由,不发送路由; 如果要发送,可以使用单播的方式发送; R1(config-router)#passive-interface 接口 默认版本或V1传递子网掩码 (示例2) 在默认版本或V1汇总中,需要注意的问题: * 汇总的本质是在网络边界进行汇总,其内部网络还是可以传递子网掩码的; * rip的汇总是在接口上进行汇总的; RIP路由自动汇总,就是当子网路由穿越有类网络边界时,将自动汇总成有 类网络路由。

3、RIPv1和RIPv2缺省情况下将进行路由自动汇总。 V2可以把自动汇总(auto-summary)关闭,但在V1中不可以。 (示例3) 1)人工汇总可以更加精确的汇总,只存在无类中,有类中不存在; 在要汇总的接口上打“ip summary-address rip IP地址” (此法只适合汇总后的掩码大于主类地址的掩码) 2)#ip route 汇总IP地址 255.255.255.0 null 0 (人工静态路由汇总) (此法适合与汇总后掩码比主类地址小) Rip V2 认证: 若配了明文和md5,则md5会覆盖掉明文认证; 明文认证: R1(config)#key chain R1 Wor

4、d key chain name R1(config-keychain)#key 1 Key identifier R1(config-keychain-key)#key-string ccie 0 Specifies an UNENCRYPTED password will follow 7 Specifies a HIDDEN password will follow LINE The UNENCRYPTED (cleartext) user password * 配好之后,要在接口上调用 如果同一时间有多个key,则只发送最小key下的密码,到对方依次匹配下去。 MD5认证: 同一时间有

5、多个key,则发送key的num和密码,并且只往下面找一跳。 * Rip V1和V2之间默认情况下不能通信,若使其通信则需要在接口上迫使它接收V2;命令: R1(config-if)#ip rip receive version 1 2常用命令: R1#show ip route IP (可以具体查看哪个接口) R1#show cdp neighbors (可以查看相邻路由器的信息) R1#ping 4.4.4.4 source lo0 (代表ping命令从lo0接口ping出去的)或 R1#ping 4.4.4.4 source 1.1.1.1 R1#ping 4.4.4.4 source

6、1.1.1.1 repeat 100 size 100 (重复100个ping包,控制包的大小为100) R1(config-router)#timers basic 60 360 180 480 (定时器) R1(config-router)#version 1或2 (版本) R1(config-router)#maximum-paths ? (负载均衡) Number of paths R1(config-router)#distance ? (管理距离) Administrative distance示例1:R1配置命令:R1#conf tR1(config)#int lo0R1(con

7、fig-if)#ip add 1.1.1.1 255.255.255.0R1(config-if)#int e1/0R1(config-if)#ip add 12.1.1.1 255.255.255.0R1(config-if)#no shutR1(config)#router ripR1(config-router)#net 1.1.1.0R1(config-router)#net 12.1.1.0R1(config-router)#end查看命令:R1#show ip route IP (可以具体查看哪个接口)R1#show cdp neighbors (可以查看相邻路由器的信息)Capa

8、bility Codes: R - Router, T - Trans Bridge, B - Source Route Bridge S - Switch, H - Host, I - IGMP, r - RepeaterDevice ID Local Intrfce Holdtme Capability Platform Port IDR2 Eth 1/0 174 R S 3640 Eth 1/0默认时,ping命令是离目的地最近的接口ping出去的;R1#ping 4.4.4.4Type escape sequence to abort.Sending 5, 100-byte ICMP

9、Echos to 4.4.4.4, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 44/60/64 msR1#ping 4.4.4.4 source lo0 (代表ping命令从lo0接口ping出去的)或 R1#ping 4.4.4.4 source 1.1.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:Packet sent w

10、ith a source address of 1.1.1.1 !Success rate is 100 percent (5/5), round-trip min/avg/max = 44/76/104 msR1#ping 4.4.4.4 source 1.1.1.1 repeat 100 size 100 (重复100个ping包,控制包的大小为100)Type escape sequence to abort.Sending 100, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:Packet sent with a sourc

11、e address of 1.1.1.1 !Success rate is 100 percent (100/100), round-trip min/avg/max = 20/55/116 ms另一种ping命令:R1#pingProtocol ip: 回车Target IP address: 4.4.4.4 (目标地址)Repeat count 5: 100 (重复次数)Datagram size 100: 100 (包大小)Timeout in seconds 2: 回车 (超时时间)Extended commands n: y Source address or interface:

12、1.1.1.1Type of service 0: 回车Set DF bit in IP header? no: 回车Validate reply data? no: 回车Data pattern 0xABCD: 回车Loose, Strict, Record, Timestamp, Verbosenone: 回车Sweep range of sizes n: 回车Type escape sequence to abort.Sending 100, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:Packet sent with a s

13、ource address of 1.1.1.1 !Success rate is 100 percent (100/100), round-trip min/avg/max = 44/59/100 msR1#show ip protocols Routing Protocol is rip Sending updates every 30 seconds, next due in 11 seconds Invalid after 180 seconds, hold down 180, flushed after 240 默认版本发出去的是V1接受的是1、2 Outgoing update f

14、ilter list for all interfaces is not set Incoming update filter list for all interfaces is not set Redistributing: rip Default version control: send version 1, receive any version Interface Send Recv Triggered RIP Key-chainTriggered代表触发更新,默认是关闭的,并且是配置在串口上,两端都要配,ip rip trigger Ethernet1/0 1 1 2 Loopb

15、ack0 1 1 2 Automatic network summarization is in effect Maximum path: 4 Routing for Networks: 1.0.0.0 12.0.0.0 Routing Information Sources: Gateway Distance Last Update 12.1.1.2 120 00:00:27 Distance: (default is 120)R1(config-router)#timers basic 60 360 180 480 (定时器)R1(config-router)#version 1或2 (版

16、本)R1(config-router)#maximum-paths ? (负载均衡) Number of pathsR1(config-router)#distance ? (管理距离) Administrative distanceR2配置命令:R2#conf tR2(config)#int lo0R2(config-if)#ip add 2.2.2.2 255.255.255.0R2(config-if)#int e1/0R2(config-if)#ip add 12.1.1.2 255.255.255.0R2(config-if)#no shutR2(config-if)#int e1/

17、1R2(config-if)#ip add 23.1.1.2 255.255.255.0R2(config-if)#no shutR2(config)#router ripR2(config-router)#net 2.2.2.0R2(config-router)#net 12.1.1.0R2(config-router)#net 23.1.1.0R2(config-router)#endR3配置命令:R3#conf tR3(config)#int lo0R3(config-if)#ip add 3.3.3.3 255.255.255.0R3(config-if)#int e1/1R3(con

18、fig-if)#ip add 23.1.1.3 255.255.255.0R3(config-if)#no shutR3(config-if)#int e1/0R3(config-if)#ip add 34.1.1.3 255.255.255.0R3(config-if)#no shutR3(config)#router ripR3(config-router)#net 3.3.3.0R3(config-router)#net 23.1.1.0R3(config-router)#net 34.1.1.0R3(config-router)#endR4配置命令:R4#conf tR4(config

19、)#int lo0R4(config-if)#ip add 4.4.4.4 255.255.255.0R4(config-if)#int e1/0R4(config-if)#ip add 34.1.1.4 255.255.255.0R4(config-if)#no shutR4(config)#router ripR4(config-router)#net 4.4.4.0R4(config-router)#net 34.1.1.0R4(config-router)#end实例2:(默认版本下传递子网掩码)此时是不会ping通的,若想ping通,则需要在边界接口处再设置一个地址R1配置命令:R1

20、#conf tR1(config)#int f0/0R1(config-if)#ip add 172.16.1.1 255.255.0.0R1(config-if)#no shutR1(config)#router ripR1(config-router)#net 172.16.1.0R2配置命令:R2#conf tR2(config)#int f0/0R2(config-if)#ip add 172.16.1.2 255.255.0.0R2(config-if)#no shutR2(config-if)#int f0/1R2(config-if)#ip add 192.168.1.2 255

21、.255.255.0R2(config-if)#no shutR2(config)#router ripR2(config-router)#net 172.16.1.0R2(config-router)#net 192.168.1.0R2(config-if)#int f0/1 R2(config-if)#ip add 172.16.23.2 255.255.255.0 secondaryR2(config)#router rip在接口上配置第二个地址,形成连续网段即可R2(config-router)#net 172.16.23.0R3配置命令:R3#conf tR3(config)#int

22、 f0/1R3(config-if)#ip add 192.168.1.3 255.255.255.0R3(config-if)#no shutR3(config-if)#int f0/0R3(config-if)#ip add 172.16.2.3 255.255.0.0R3(config-if)#no shutR3(config)#router ripR3(config-router)#net 192.168.1.0R3(config-router)#net 172.16.2.0R3(config-if)#int f0/1 R3(config-if)#ip add 172.16.23.3

23、255.255.255.0 secondaryR3(config)#router ripR3(config-router)#net 172.16.23.0R4配置命令:R4#conf tR4(config)#int f0/0R4(config-if)#ip add 172.16.2.4 255.255.0.0R4(config-if)#no shutR4(config)#router ripR4(config-router)#net 172.16.2.0示例3:(汇总)R1配置命令:R1#conf tR1(config)#int lo0R1(config-if)#ip add 1.1.1.1

24、255.255.255.0R1(config-if)#int f0/0R1(config-if)#ip add 12.1.1.1 255.255.255.0R1(config-if)#no shutR1(config)#router ripR1(config-router)#net 1.1.1.0R1(config-router)#net 12.1.1.0R2配置命令:R2#conf tR2(config)#int lo0R2(config-if)#ip add 2.2.2.2 255.255.255.0R2(config-if)#no shutR2(config-if)#int f0/0R2

25、(config-if)#ip add 12.1.1.2 255.255.255.0R2(config-if)#no shutR2(config)#router ripR2(config-router)#net 2.2.2.0R2(config-router)#net 12.1.1.0R2(config-router)#net 23.1.1.0R3配置命令:R3#conf tR3(config)#int lo0R3(config-if)#ip add 3.3.3.3 255.255.255.0R3(config-if)#int f0/1R3(config-if)#ip add 23.1.1.3

26、255.255.255.0R3(config-if)#no shutR3(config-if)#int lo10R3(config-if)#ip add 30.1.0.1 255.255.255.0R3(config-if)#int lo11 R3(config-if)#ip add 30.1.1.1 255.255.255.0R3(config-if)#int lo12R3(config-if)#ip add 30.1.2.1 255.255.255.0R3(config-if)#int lo13R3(config-if)#ip add 30.1.3.1 255.255.255.0R3(config-if)#int lo14R3(config-if)#ip add 30.1.4.1 255.255.255.0R3(config)#router ripR3(config-router)#net 0.0.0.0

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育专区 > 教案示例

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知得利文库网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号-8 |  经营许可证:黑B2-20190332号 |   黑公网安备:91230400333293403D

© 2020-2023 www.deliwenku.com 得利文库. All Rights Reserved 黑龙江转换宝科技有限公司 

黑龙江省互联网违法和不良信息举报
举报电话:0468-3380021 邮箱:hgswwxb@163.com