RIP V1:
使用UDP封装报文,收发均使用520端口。有两种数据报类型:Request(请求)、Response(回应)。使用Hop count(跳)来度量网络。1表示是与发出通告的路由器相直连的网络,16跳表示网络不可达。
RIP Timers and Stability Features
每30s在RIP Enable的接口上Broadcost Response messages。 Response messages or update contains the router's full route table with exception of entries suppressed by the split horizon rule。RIP更新由一个随机变量决定(25-35s之间)。CISCO IOS中使用RIP_JITTER来决定更新时间随机变量(4.5s)。所以CISCO中的RIP更新时间在25-35之间。
The Update Messages use broadcast 255.255.255.255 is the all-hosts .
RIP也使用一些其它的计时器。在CISCO IOS中使用 invalid times.当一条新的路由条目建立后,超时计时器就会被初始化为180S。当有一条路由的更新在180S(6个更新周期)内还没有被收到,那么这条路由的跳数将变成16,即被标记为不可达的路由。
垃圾计时器(The garbage collection)或刷新计时器(Flush timer),它设置的时间长度一般比限时计时器长240-60S(IETF中规定的为120S)。如果该路由被通告为一条度量值不可达的路由,同时从路由选择表中删除该路由。
[The garbage collection or flush timer,is set to 240s -60s longer than the expiration thme.the route will be advertised with the unreachable metric until the garbage collection timer expires,at which time thd route will be removed from thd route table.]
第3个计时器 抑制计时器(Holddown Times)。
RIP使用带有毒性逆转(Poison reverse)的水平分隔(Split horizon)和触发更新(Triggered updates)。不像普通的定期更新,触发更新在只有路由的度量值发生改变时就会产生,而且触发更新不会引起接收路由器重围它们的更新计时器;
RIP Message Format (RIP消息格式)
每条消息包含一个命令标识(Command)、一个版本号(Version Number)和路由条目(最大25条)。每个路由条目包括地址族标识(Address Family Identifier)、路由可达的IP地址和路由的跳楼。
RIP消息的开头部分(头部)占用4个8bit字节,而每个路由条目占20个8bit字节。因此RIP消息的最大为4+(25*20)=504个8bit字节,再加上8个字节的UDP头部,RIP数据报文的大小 (不含IP包的头部)最大可达514个8bit字节。
Each message contains a command and version number and can contain entries for up 25 routes. Each route entry includes and address family identifier, the ip address reachable by the route,and the hop count for the route. if a router must send an update with more than 25entries,multiple RIP Message must be produced.Note that the initial portion of the message is 4 octets,and each route entry is 20 octets, therefore the maximum message size is 4+(25*20) = 504octets . including an eight-byte UDP Header will make thd maximum RIP datagram size(not including the IP Header)512 octets.
Command will always be set to either one,signifying a Request message, or two,signifying q response message. there are other commands, but the are all either obsolete or reserved for private use.
Command --只取值1或2,1表示该消息是请求消息,2表示该消息是响应消息。其它的取值都不被使用或者保留用作私有用途。
version will be set to one for RIP V1.
版本(Version) 这个就不说了。RIPV1就设置为1。
Address family identifier is set to two for ip . The only exception to this is a request for a router's (or host's) full route table,as discussed in the following section
地址族标识(Address family identifier,AFI) –对于IP该项设置为2。只有一个例外情况,该消息是路由器(或主机)整个路由选择表的请求,