rip v1与ripv2路由协议更新机制

rip协议的V1和V2的更新机制

实验拓扑:

实验步骤

R1:

router rip

network 1.0.0.0

network 192.168.12.0

R2:

router rip

network 2.0.0.0

network 192.168.12.0

如果没有在路由配置模式下,敲命令Version 2的话,运行的是RIP version 1版本。

在R2上debug ip rip

R2(config)#router rip

R2(config-router)# network 2.0.0.0

R2(config-router)# network 192.168.12.0

R2(config-router)#

*Jun 4 09:40:46.279: RIP: add Loopback2 to RIP idb list

*Jun 4 09:40:46.279: RIP: sending request on Loopback2 to 255.255.255.255 //发送广播更新

*Jun 4 09:40:47.099: RIP: add Serial1/0 to RIP idb list

*Jun 4 09:40:47.099: RIP: sending request on Serial1/0 to 255.255.255.255

*Jun 4 09:40:47.143: RIP: received v1 update from 192.168.12.1 on Serial1/0

*Jun 4 09:40:47.147: RIP: Update contains 1 routes

*Jun 4 09:40:48.279: RIP: sending v1 flash update to 255.255.255.255 via Loopback2 (2.2.2.2)

*Jun 4 09:40:48.279: RIP: Update contains 2 routes

*Jun 4 09:40:48.279: RIP: Update queued

*Jun 4 09:40:48.279: RIP: sending v1 flash update to 255.255.255.255 via Serial1/0 (192.168.12.2)

*Jun 4 09:40:48.279: RIP: Update contains 1 routes

*Jun 4 09:40:48.279: RIP: Update queued

*Jun 4 09:40:48.279: RIP: Update sent via Loopback2

*Jun 4 09:40:48.279: RIP: Update sent via Serial1/0

R1:

*Jun 4 09:44:47.695: RIP: sending v1 update to 255.255.255.255 via Serial1/1 (192.168.12.1)

*Jun 4 09:44:47.699: RIP: Update contains 1 routes//只向邻居通告直接的接口地址

*Jun 4 09:44:47.699: RIP: Update queued

*Jun 4 09:44:47.699: RIP: Update sent via Serial1/1

R1#

*Jun 4 09:44:52.631: RIP: sending v1 update to 255.255.255.255 via Loopback0 (1.1.1.1)

*Jun 4 09:44:52.635: RIP: Update contains 2 routes

*Jun 4 09:44:52.635: RIP: Update queued

*Jun 4 09:44:52.635: RIP: Update sent via Loopback0//只向邻居通告直接的接口地址

R1#

*Jun 4 09:45:13.543: RIP: sending v1 update to 255.255.255.255 via Serial1/1 (192.168.12.1)

*Jun 4 09:45:13.547: RIP: Update contains 1 routes

*Jun 4 09:45:13.547: RIP: Update queued

*Jun 4 09:45:13.547: RIP: Update sent via Serial1/1

*Jun 4 09:45:13.595: RIP: received v1 update from 192.168.12.2 on Serial1/1

*Jun 4 09:45:13.599: RIP: Update contains 1 routes

R1#

*Jun 4 09:45:20.487: RIP: sending v1 update to 255.255.255.255 via Loopback0 (1.1.1.1)

*Jun 4 09:45:20.491: RIP: Update contains 2 routes

*Jun 4 09:45:20.491: RIP: Update queued

*Jun 4 09:45:20.491: RIP: Update sent via Loopback0

红色字体表明rip V1会每30s左右(debug信息中显示27s)发送一次更新

如果此时在R2上添加一个loopback 0 地址为22.22.22.22/24的话,从debug ip rip events中看出:

*Jun 4 09:50:12.159: RIP: sending v1 flash update to 255.255.255.255 via Loopback0 (22.22.22.22) - suppressing null update

*Jun 4 09:50:12.163: RIP: Update sent via Loopback2

此时R1上已经有22.0.0.0的路由了

R1#show ip route rip

R 2.0.0.0/8 [120/1] via 192.168.12.2, 00:00:13, Serial1/1

R 22.0.0.0/8 [120/1] via 192.168.12.2, 00:00:13, Serial1/1

如果将R2的loopback 0端口给关闭了,此时在180s后将此条路由跳数设置为16,如果过了240s后,还没有收到此条更新的话,这条路由将彻底在路由表中删除!

此时将R2的RIP改为V2后,会发生什么情况呢?

*Jun 4 09:57:22.151: RIP: ignored v2 packet from 2.2.2.2 (sourced from one of our addresses)

*Jun 4 09:57:24.467: RIP: ignored v1 packet from 192.168.12.1 (illegal version) //提示版本不兼容

*Jun 4 09:57:47.503: RIP: sending v2 update to 224.0.0.9 via Serial1/0 (192.168.12.2)

*Jun 4 09:57:47.507: RIP: Update contains 1 routes

*Jun 4 09:57:47.507: RIP: Update queued

*Jun 4 09:57:47.507: RIP: Update sent via Serial1/0

*Jun 4 09:57:50.219: RIP: sending v2 update to 224.0.0.9 via Loopback2 (2.2.2.2)

*Jun 4 09:57:50.219: RIP: Update contains 2 routes

*Jun 4 09:57:50.223: RIP: Update queued

*Jun 4 09:57:50.223: RIP: Update sent via Loopback2

*Jun 4 09:57:50.227: RIP: ignored v2 packet from 2.2.2.2 (sourced from one of our addresses)

*Jun 4 09:57:50.563: RIP: ignored v1 packet from 192.168.12.1 (illegal version)

此时要么改R1的版本,要么在R2的接口模式下修改:

interface Serial1/0

ip address 192.168.12.2 255.255.255.0

ip rip send version 1 //发送是版本1

ip rip receive version 1 //接收是版本2

debug信息显示如下:

R2#

*Jun 4 09:59:41.907: RIP: received v1 update from 192.168.12.1 on Serial1/0

*Jun 4 09:59:41.911: RIP: Update contains 1 routes

R2#

*Jun 4 09:59:43.639: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (192.168.12.2)

*Jun 4 09:59:43.639: RIP: Update contains 1 routes

*Jun 4 09:59:43.639: RIP: Update queued

*Jun 4 09:59:43.639: RIP: Update sent via Serial1/0

*Jun 4 09:59:43.663: RIP: sending v2 update to 224.0.0.9 via Loopback2 (2.2.2.2)

*Jun 4 09:59:43.663: RIP: Update contains 2 routes

*Jun 4 09:59:43.667: RIP: Update queued

*Jun 4 09:59:43.667: RIP: Update sent via Loopback2

*Jun 4 09:59:43.671: RIP: ignored v2 packet from 2.2.2.2 (sourced from one of our addresses)

R2#show ip route rip

R 1.0.0.0/8 [120/1] via 192.168.12.1, 00:00:02, Serial1/0

修改R1为版本1后在debug上看到的信息:

R1(config-router)#

*Jun 4 10:03:07.779: RIP-TIMER: sending timer on Loopback0 expired

*Jun 4 10:03:07.779: RIP: sending v2 update to 224.0.0.9 via Loopback0 (1.1.1.1)//组播发送更新

*Jun 4 10:03:07.783: RIP: Update contains 3 routes

*Jun 4 10:03:07.783: RIP: Update queued

*Jun 4 10:03:07.787: RIP: Update sent via Loopback0

*Jun 4 10:03:07.787: RIP: ignored v2 packet from 1.1.1.1 (sourced from one of our addresses)

R1(config-router)#

*Jun 4 10:03:14.519: RIP-TIMER: age timer expired

R1(config-router)#

*Jun 4 10:03:15.691: RIP: received v2 update from 192.168.12.2 on Serial1/1

*Jun 4 10:03:15.695: RIP-DB: network_update with 2.0.0.0/8 succeeds//注意与下面的红色字体的区别。

*Jun 4 10:03:15.695: RIP-DB: adding 2.0.0.0/8 (metric 1) via 192.168.12.2 on Serial1/1 to RIP database

*Jun 4 10:03:15.699: RIP-DB: network_update with 22.0.0.0/8 succeeds

*Jun 4 10:03:15.699: RIP-DB: adding 22.0.0.0/8 (metric 1) via 192.168.12.2 on Serial1/1 to RIP database

*Jun 4 10:03:15.699: RIP: Update contains 2 routes

R1(config-router)#

*Jun 4 10:03:17.191: RIP-TIMER: sending timer on Serial1/1 expired

*Jun 4 10:03:17.191: RIP: sending v2 update to 224.0.0.9 via Serial1/1 (192.168.12.1)

*Jun 4 10:03:17.195: RIP: Update contains 1 routes

*Jun 4 10:03:17.195: RIP: Update queued

*Jun 4 10:03:17.199: RIP: Update sent via Serial1/1

在R1,R2上打了no auto-summary后 在R1上看到的debug ip rip database信息:

R1(config-router)#

*Jun 4 10:04:42.087: RIP: received v2 update from 192.168.12.2 on Serial1/1

*Jun 4 10:04:42.091: RIP-DB: network_update with 2.2.2.0/24 succeeds

*Jun 4 10:04:42.091: RIP-DB: adding 2.2.2.0/24 (metric 1) via 192.168.12.2 on Serial1/1 to RIP database

*Jun 4 10:04:42.095: RIP-DB: add 2.2.2.0/24 (metric 1) via 192.168.12.2 on Serial1/1

*Jun 4 10:04:42.095: RIP-DB: Adding new rndb entry 2.2.2.0/24

*Jun 4 10:04:42.099: RIP-DB: network_update with 22.22.22.0/24 succeeds

*Jun 4 10:04:42.099: RIP-DB: adding 22.22.22.0/24 (metric 1) via 192.168.12.2 on Serial1/1 to RIP database

*Jun 4 10:04:42.103: RIP-DB: add 22.22.22.0/24 (metric 1) via 192.168.12.2 on Serial1/1

(0)

相关推荐

  • 旗鱼浏览器安卓版v1.11正式版更新 微信微博QQ一键登

    每次的更新都根据大家的反馈进行整理,进行开发优先级的计划排序,这周的版本做了不少的改进工作!首先,第三方登录加入,微信.微博.QQ账户一键登录,方便快捷!另外,金币体系也就要和大家见面了,金币商城也将 ...

  • Win10 UWP版《微信》v1.1正式版更新主要修复Bug、优化与下载地址:群聊中可以@ 人

    在8月份,腾讯微信团队为Win10 PC商店用户正式带来首个UWP版微信客户端v1.0下载,今天这款应用已经推送最新的微信 for Windows10版本v1.1更新,主要带来Bug修复和优化,现在更 ...

  • 如何进行路由器RIP动态路由配置

    假设校园网通过一台三层交换机连到校园网出口路由器上,路由器再和校园外的另一台路由器连接.现要做适当配置,实现校园网内部主机与校园网外部主机之间的相互通信.为了简化网管的管理维护工作,学校决定采用RIP ...

  • MacBook触摸板如何升级更新最新版的

    新买了MAC之后,许多用户都给自己的MAC更新最新版的软件和固件,其中触摸板是非常重要的一个更新,那么应该如何更新MACBOOK触摸板呢?现在就让小编跟大家介绍一下吧。 自动安装更新 您可以下载并安装 ...

  • Win8系统更加人性化系统更新

    Win8系统: 很多人可能会忽略Windows系统的安全补丁和升级程序,其实这是非常不安全的行为,尽管这些补丁可能会增加你的磁盘空间,甚至会影响到你正在进 行的工作,但为了保证系统和数据的安全,我们还 ...

  • 谷歌拼音为什么自动更新

    随着更新版本谷歌拼音的发布,我们会自动为当前用户更新到最新的版本。我们这样做是为了向用户提供最新的 Google 技术和最稳定的谷歌拼音版本。对于许多其他 Google 产品(例如:Google 工具 ...

  • Win10 Edge浏览器为什么不能通过应用商店更新?

    现在Insider会员用户收到了Win10预览版11102更新,此次Edge浏览器也进行部分更新,那么为什么Edge浏览器就不能像其他Modern版应用那样通过应用商店进行更新呢?微软Insider项 ...

  • Win10创意者更新不强制重启 给用户三种选择

    在Win10创意者更新中,微软在更新重启这件事上会更加人性化,强制重启成为历史.当然这并不是说可以装完更新不重启,只是微软改变了行事风格,少了些霸气,多了些诚意. 进入Win8/Win8.1之后,Wi ...

  • Win10周年更新教育版中文官方ISO镜像下载地址(32位/64位)

    Windows 10周年更新版已经发布,并开始向全球推送.Windows 10 TH2用户现在就可以检查Windows Update,或者利用微软官方MCT工具下载更新.既简体中文.英文的32/64位 ...