打印

RIP的v1和v2的一些总结(转自ITAA)

RIP的v1和v2的一些总结(转自ITAA)

[/tr][/tr][/tr]
Etian
ITAA会员



注册时间: 21-4月-2006
所在地: India
在线状态: 离线
发帖数: 278
发表: 09-7月-2006 15:59 | IP 221.197.226.175
RIP版本2会在边界处把子网自动汇总成主类路由,可以用no auto-summary命令可以关闭

topo:

148.1.1.0/24---r1---------------------------r3----loopback 0(3.3.3.3/24)
/ \ ; ; / s1 s0 s0
148.1.1.2/24 192.1.1.1/24 192.1.1.2/24

ps:*代表路由器



r3(RIPv1)和r1(RIPv2)通讯,不管r1(RIPv2)是否自动汇总,r1(RIPv2)发送RIPv2的更新, 忽略或不理睬r3(RIPv1)的更新信息;r3(RIPv1)发送RIPv1的更新,忽略或不理睬r2(RIPv2)的更新信 息
导致分别采用v1和v2的路由器r3和r1在不同网络下ping不通,不可路由
v1 Default version control: send version 2, receive version 2
Interface &am p;am p;am p;nb sp; Send Recv Triggered RIP Key-chain
Serial0 ; ; ; ; 2 2
Serial1 ; ; ; ; 2 2
v2 Default version control: send version 1, receive version 1
Interface &am p;am p;am p;nb sp; Send Recv Triggered RIP Key-chain
Serial0 ; ; ; ; 1 1


---------------------------------------------
r1采用RIPv2

interface Serial0
ip address 192.1.1.1 255.255.255.0
clockrate 64000
!
interface Serial1
ip address 148.1.1.2 255.255.255.0
clockrate 64000
!
router rip
version 2
network 148.1.0.0
network 192.1.1.0
neighbor 192.1.1.2
neighbor 148.1.1.1
----
r1#ping 3.3.3.3
02:17:53: IP: s=192.1.1.1 (local), d=3.3.3.3, len 100, unroutable
02:17:55: IP: s=192.1.1.1 (local), d=3.3.3.3, len 100, unroutable
02:17:57: IP: s=192.1.1.1 (local), d=3.3.3.3, len 100, unroutable
----
r1#show ip rou
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - 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 - ODR
P - periodic downloaded static route
Gateway of last resort is not set
C 192.1.1.0/24 is directly connected, Serial0
148.1.0.0/24 is subnetted, 1 subnets
C 148.1.1.0 is directly connected, Serial1
----
r1#show ip pro
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 13 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is
Incoming update filter list for all interfaces is
Redistributing: rip
Neighbor(s):
192.1.1.2
148.1.1.1
Default version control: send version 2, receive version 2
Interface &am p;am p;am p;nb sp; Send Recv Triggered RIP Key-chain
Serial0 ; ; ; ; 2 2
Serial1 ; ; ; ; 2 2
Automatic network summarization is in effect
Routing for Networks:
148.1.0.0
192.1.1.0
Routing Information Sources:
Gateway Distance Last Update
148.1.1.1 &am p;am p;am p;nb sp; 120 00:43:15
192.1.1.2 &am p;am p;am p;nb sp; 120 00:46:47
Distance: (default is 120)
------------------------------------------------------------ ----------
r3采用RIPv1
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface Serial0
ip address 192.1.1.2 255.255.255.0
!
router rip
version 1
network 3.0.0.0
network 192.1.1.0
neighbor 192.1.1.1
!
----
r3#ping 148.1.1.2
02:17:56: IP: s=3.3.3.3 (local), d=148.1.1.2, len 100, unroutable
02:17:58: IP: s=3.3.3.3 (local), d=148.1.1.2, len 100, unroutable
02:18:00: IP: s=3.3.3.3 (local), d=148.1.1.2, len 100, unroutable
02:18:02: IP: s=3.3.3.3 (local), d=148.1.1.2, len 100, unroutable
02:18:04: IP: s=3.3.3.3 (local), d=148.1.1.2, len 100, unroutable
----
r3#sh ip ro
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - 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 - ODR
P - periodic downloaded static route
Gateway of last resort is not set
3.0.0.0/24 is subnetted, 1 subnets
C 3.3.3.0 is directly connected, Loopback0
C 192.1.1.0/24 is directly connected, Serial0
----
r3#sh ip pro
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 26 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is
Incoming update filter list for all interfaces is
Redistributing: rip
Neighbor(s):
192.1.1.1
Default version control: send version 1, receive version 1
Interface &am p;am p;am p;nb sp; Send Recv Triggered RIP Key-chain
Loopback0 &am p;am p;am p;nb sp; 1 1
Serial0 ; ; ; ; 1 1
Automatic network summarization is in effect
Routing for Networks:
3.0.0.0
192.1.1.0
Routing Information Sources:
Gateway Distance Last Update
192.1.1.1 &am p;am p;am p;nb sp; 120 00:14:04
Distance: (default is 120)
----------------------

若r1和r3都是RIPv2
则可路由
若r3 有环回口,则r3上发rip更新到环回口,但是接收的时候忽略环回口更新,因为源与目的地址相同
发送
04:01:43: RIP: sending v2 update to 224.0.0.9 via Loopback0 (3.3.3.3)
04:01:43: RIP: build update entries
04:01:43: 148.1.0.0/16 via 0.0.0.0, metric 2, tag 0
04:01:43: 192.1.1.0/24 via 0.0.0.0, metric 1, tag 0
应答
04:01:43: RIP: ignored v2 packet from 3.3.3.3 (sourced from one of our addresses)
-----------------------
v1更新是广播地址255.255.255.255
v2更新是组播地址224.0.0.9
单播需要配置neighbor [Neighbor address]
-----------------------
v2下默认自动汇总,则148.1.1.0汇总为B类地址148.1.0.0/16
03:51:46: RIP: sending v2 update to 224.0.0.9 via Serial0 (192.1.1.1)
03:51:46: RIP: build update entries
03:51:46: 148.1.0.0/16 via 0.0.0.0, metric 1, tag 0
03:51:46: RIP: sending v2 update to 192.1.1.2 via Serial0 (192.1.1.1)
03:51:46: RIP: build update entries
03:51:46: 148.1.0.0/16 via 0.0.0.0, metric 1, tag 0
若是关闭自动汇总,则148.1.1.0不进行汇总,仍为子网地址148.1.1.0/24
03:54:09: RIP: sending v2 update to 224.0.0.9 via Serial0 (192.1.1.1)
03:54:09: RIP: build update entries
03:54:09: 148.1.1.0/24 via 0.0.0.0, metric 1, tag 0
03:54:09: RIP: sending v2 update to 192.1.1.2 via Serial0 (192.1.1.1)
03:54:09: RIP: build update entries
03:54:09: 148.1.1.0/24 via 0.0.0.0, metric 1, tag 0
-----------------------
有乱码,“ ; &nbs p;” 直接看作空格就可以!


__________________

心有惊雷,而面若平湖者,可拜上将军!

真的勇士,敢于直面淋漓的鲜血,敢于正视惨淡的人生!!

返回顶端
[/td]
gotolab
Admin Group



注册时间: 05-8月-2004
所在地: United States
在线状态: 在线
发帖数: 577
发表: 09-7月-2006 16:33 | IP 221.197.226.175
148.1.1.0/24---*----------------------*-----loopback 0(3.3.3.3/24)
/ \ / s1 s0 s0
148.1.1.2/24 192.1.1.1/24 192.1.1.2/24

多看RFC,多学字符画图


__________________
***************************
E-mail:gotolab@gmail.com
QQ:200306
欢迎用本站短信息方式留言
***************************
返回顶端
[/td]
gotolab
Admin Group



注册时间: 05-8月-2004
所在地: United States
在线状态: 在线
发帖数: 577
发表: 09-7月-2006 16:35 | IP 221.197.226.175
b b b-----b
\ | |
\ | |
b---b b------b
/ \ / ; KEY....
/ \/ b C ; C = Core (Initial Group Key Dist'n Centre)
/ \ A, B, b = non-core routers
/ \
/ \ ; ======= LAN where host h is located
B b------b
\
\ NOTE: Only one core is shown, but typically
host h A a CBT tree is likely to comprise several.
o |
=====================


__________________
***************************
E-mail:gotolab@gmail.com
QQ:200306
欢迎用本站短信息方式留言
***************************
返回顶端
[/td]
Etian
ITAA会员



注册时间: 21-4月-2006
所在地: India
在线状态: 离线
发帖数: 278
发表: 09-7月-2006 16:44 | IP 221.197.226.175
惭愧,还没有见过RFC文档长什么样呢。。
我会有意识的去看的。。。


__________________

心有惊雷,而面若平湖者,可拜上将军!

真的勇士,敢于直面淋漓的鲜血,敢于正视惨淡的人生!!


QQ:565338145 技术支持:http://www.one-tom.com;成功职业规划:http://www.openadam.com

汤姆一通ITAA学习情报组 IT傻博士

TOP

又看见好文了
上来顶一下

TOP

哈哈,欢迎欢迎。


QQ:565338145 技术支持:http://www.one-tom.com;成功职业规划:http://www.openadam.com

汤姆一通ITAA学习情报组 IT傻博士

TOP

自己动手去看看
说了多少遍了,俺真滴不是马甲!

TOP