The Routing
Information Protocol (RIP) is one of the oldest distance-vector routing
protocols, which employs the hop count as a routing metric. RIP prevents
routing loops by implementing a limit on the number of hops allowed in a path
from the source to a destination. The maximum number of hops allowed for RIP is
15. This hop limit, however, also limits the size of networks that RIP can
support.
RIP uses the
User Datagram Protocol (UDP) as its transport protocol, and is assigned the
reserved port number 520.
A hop count
of 16 is considered an infinite distance, in other words the route is
considered unreachable.
RIP uses
some methods to prevent routing loops and count to infinity problem
SPLIT HORIZON:
A router
never sends information about a route back in same direction which is original
information came, routers keep track of where the information about a route
came from. Means when router A sends update to router B about any failure
network, router B does not send any update for same network to router A in same
direction.
ROUTE POISONING:
Router
consider route advertised with an infinitive metric to have failed ( metric=16)
instead of marking it down. For example, when network goes down, router starts route poisoning by advertising the
metric (hop count) of this network as 16, which indicates an unreachable
network.
POISON REVERSE:
The poison
reverse rule overwrites split horizon rule. For example, if router B receives a
route poisoning of network B from router C
then router B will send an update back to router C (which breaks the
split horizon rule) with the same poisoned hop count of 16. This ensures all
the routers in the domain receive the poisoned route update.
Notice that
every router performs poison reverse when learning about a downed network. In
the above example, router A also performs poison reverse when learning about
the downed network from B.
HOLD DOWN TIMERS:
After
hearing a route poisoning, router starts a hold-down timer for that route. If
it gets an update with a better metric than the originally recorded metric
within the hold-down timer period, the hold-down timer is removed and data can
be sent to that network. Also within the hold-down timer, if an update is
received from a different router than the one who performed route poisoning
with an equal or poorer metric, that update is ignored. During the hold-down
timer, the “downed” route appears as “possibly down” in the routing table.
For example,
in the above example, when B receives a route poisoning update from C, it marks
network 4 as “possibly down” in its routing table and starts the hold-down
timer for network 4. In this period if it receives an update from C informing
that the network 4 is recovered then B will accept that information, remove the
hold-down timer and allow data to go to that network. But if B receives an
update from A informing that it can reach network by 1 (or more) hop, that
update will be ignored and the hold-down timer keeps counting.
Note: The
default hold-down timer value = 180 second.
TRIGGERED UPDATE :
When any
route failed in network ,do not wait for the next periodic update instead send
an immediate update listing the poison route.
RIP Operation:
RIP defines
two types of messages.
Request
Message
Response
Message
When a RIP
router comes up, it sends a broadcast Request Message on all of its RIP enabled
interfaces. All the neighboring routers which receive the Request message
respond back with the Response Message containing their Routing table. The
Response Message is also gratuitously sent when the Update timer expires. On
receiving the Routing table, the router processes each entry of the routing
table as per the following rules:
If there are no route entry matching
the one received then the route entry is added to the routing table
automatically, along with the information about the router from which it
received the routing table
If there are matching entry but the hop
count metric is lower than the one already in its routing table, then the
routing table is updated with the new route.
If there are matching entry but the hop
count metric is higher than the one already in its routing table, then the
routing entry is updated with hop count of 16 (infinite hop). The packets are
still forwarded to the old route. A Holddown timer is started and all the
updates for that from other routers are ignored. If after the Holddown timer
expires and still the router is advertising with the same higher hop count then
the value is updated into its routing table. Only after the timer expires, the
updates from other routers are accepted for that route.
Configuring RIP
Router(config)#router
rip
Enter router
RIP configuration mode
Router(config-router)#network
Identify
networks that will participate in the router protocol. Notice that you identify
networks, and not interfaces.
NOTE: You
need to advertise only the classful network number, not a subnet:
R2(config)#router rip
R2(config-router)#version 2
R2(config)#router rip
R2(config-router)#version 2
Router(config-router)#network
172.16.0.0
not
Router(config-router)#network
172.16.10.0
Router(config-router)#no auto-summary
Router(config-router)#no auto-summary
If you
advertise a subnet, you will not receive an error message, because the router
will automatically convert the subnet to the classful network address.
By default, auto-summary is enabled in rip. If this is not disabled there will be differences in the number of routes that appear in show ip route. However, it will not affect the routing process.
By default, auto-summary is enabled in rip. If this is not disabled there will be differences in the number of routes that appear in show ip route. However, it will not affect the routing process.
RIP Timers:
Update Timer
This timer
controls the interval between two gratuitous Response Message. By default the
value is 30 seconds. The response message is broadcast to all its RIP enabled
interface.
Invalid Timer
This timer
specifies how long a routing entry can be in the routing table without being
updated. This is also called as expiration Timer. By default, the value is 180
seconds. After the timer expires the hop count of the routing entry will be set
to 16, marking the destination as unreachable.
Flush Timer
This timer
controls the time between the route is invalidated or marked as unreachable and
removal of entry from the routing table. By default the value is 240 seconds.
This is 60 seconds longer than Invalid timer. So for 60 seconds the router will
be advertising about this unreachable route to all its neighbours. This timer
has to be longer than Invalid Timer.
Holddown Timer
This timer
is started per route entry, when the hop count is changing from lower value to
higher value. This allows the route to get stabilized. During this time no
update can be done to that routing entry.The default value of this timer is 180
seconds.
No comments:
Post a Comment