Escolar Documentos
Profissional Documentos
Cultura Documentos
(RIP)
NETE0514
Presented by
Dr.Apichan Kanjanavapastit
In distance vector routing, the least cost route between any two
nodes is the route with minimum distance
In this protocol each node maintains a vector (table) of minimum
distances to every node
The table at each node also guides the packets to the desired node
by showing the next stop in the route (next-hop routing)
Initialization
At the beginning, each node can know only the
distance between itself and its immediate
neighbors, those directly connected to it
Sharing
The whole idea of distance vector routing is the sharing
of information between neighbors
Although node A does not know about node E, node C
does. So if node C shares its routing table with A, node A
can also know how to reach node E
Note:
Updating
Updating (cont.)
3. The receiving node needs to compare each
row of its old table with the corresponding row
of the modified version of the received table.
a) If the next-node entry is different, the receiving node
chooses the row with the smaller cost. If there is a
tie, the old one is kept
b) If the next-node entry is the same, the receiving
node chooses the new row. For example, if node C
has previously advertised a route to node X with
distance 3. Suppose that now there is no path
between C and X; node C now advertises this route
with a distance of infinity. Node A must not ignore
this value even though its old entry is smaller.
Updating (cont.)
When to Share
Initialroutingtablesinasmall
autonomoussystem
Finalroutingtablesforthepreviousfigure
Three-Node Instability
The metric used by RIP is the number of links that have to be used to
reach the destination which is called hop count
Infinity is defined as 16
The next node column defines the address of the router to which the
packet is to be sent to reach its destination
Request Messages
Example 1
Whatistheperiodicresponsesentbyrouter
R1? Assume R1 knows about the whole
autonomoussystem.
Solution
R1 can advertise three networks 144.2.7.0,
144.2.9.0, and 144.2.12.0. The periodic response
(updatepacket)isshownbelow.
Example 2
Figure 14.11 shows the update message sent from router R1 to
router R2 in Figure 14.8. The message is sent out of interface
130.10.0.2.
Timer in RIP
RIP uses 3 timers. The periodic timer controls
the sending of messages, the expiration timer
governs the validity of a route, and the garbage
collection timer advertises the failure of a route
Periodic Timer
The periodic timer controls the advertising
of regular update messages
The working model uses a random
number between 25 and 30 s
This is to prevent any possible
synchronization and therefore overload on
an internet if routers update
simultaneously
Expiration Timer
The expiration timer governs the validity of a
route
When a router receives update information for a
route, the expiration timer is set to 180 s for that
particular route
Every time a new update for the route is
received, the timer is reset
If the timer is expired, the hop count of the route
is set to 16, which means the destination is
unreachable
Example 3
A routing table has 20 entries. It does not receive information
about five routes for 200 s. How many timers are running at
this time?
Solution
The 21 timers are listed below:
Periodic timer: 1
Expiration timer: 20 5 = 15
Garbage collection timer: 5
RIP Version 2
RIP version 2 was designed to overcome
some of the shortcomings of version 1
The designers of version 2 have not
augmented the length of the message for
each entry
They have only replaced those fields in
version 1 that were filled with 0s for the
TCP/IP protocol with some new fields
Message Format
16
COMMAND (1-5)
24
VERSION (2)
31
AS NUMBER
FFFF
AUTHENTICATION TYPE
AUTHENTICATION HEADER
FAMILY OF NET 1
MUST BE ZERO
ADDRESS OF NET 1
MASK
NEXT HOP
DISTANCE TO NET 1
Route tag. This field carries information such as the autonomous system number. It
can be used to enable RIP to receive information from an interdomain routing
protocol
Subnet mask. This is a 4-byte field that carries the subnet mask. This means that
RIP2 supports classless addressing and CIDR
Next-hop address. If the sending router want to specify another router IP address to
be the next hop router.