日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

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

發(fā)布時(shí)間:2023/12/31 编程问答 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 rip协议的V1和V2的更新机制 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

實(shí)驗(yàn)拓?fù)?#xff1a;

實(shí)驗(yàn)步驟:

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的話,運(yùn)行的是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 //發(fā)送廣播更新

*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會(huì)每30s左右(debug信息中顯示27s)發(fā)送一次更新

如果此時(shí)在R2上添加一個(gè)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

此時(shí)R1上已經(jīng)有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端口給關(guān)閉了,此時(shí)在180s后將此條路由跳數(shù)設(shè)置為16,如果過了240s后,還沒有收到此條更新的話,這條路由將徹底在路由表中刪除!

此時(shí)將R2的RIP改為V2后,會(huì)發(fā)生什么情況呢?

*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)

此時(shí)要么改R1的版本,要么在R2的接口模式下修改:

interface Serial1/0

ip address 192.168.12.2 255.255.255.0

ip rip send version 1 //發(fā)送是版本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)//組播發(fā)送更新

*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//注意與下面的紅色字體的區(qū)別。

*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

總結(jié)

以上是生活随笔為你收集整理的rip协议的V1和V2的更新机制的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。