0% found this document useful (0 votes)
6 views3 pages

RIP

RIP (Routing Information Protocol) is a distance vector routing protocol that operates by having routers advertise their distance vectors every 30 seconds or when routing tables change, with a maximum hop count of 15. The protocol has evolved from RIPv1 to RIPv2, introducing features like subnet masks and authentication. However, RIP is known for slow convergence and issues such as the counting-to-infinity problem, which can delay stabilization of routing tables after topology changes.

Uploaded by

subhrand66
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views3 pages

RIP

RIP (Routing Information Protocol) is a distance vector routing protocol that operates by having routers advertise their distance vectors every 30 seconds or when routing tables change, with a maximum hop count of 15. The protocol has evolved from RIPv1 to RIPv2, introducing features like subnet masks and authentication. However, RIP is known for slow convergence and issues such as the counting-to-infinity problem, which can delay stabilization of routing tables after topology changes.

Uploaded by

subhrand66
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

5/13/2021

RIP - Routing Information Protocol


• A simple intra-domain protocol
• Straightforward implementation of Distance Vector
Routing
RIP • Each router advertises its distance vector every 30
seconds (or whenever its routing table changes) to all
of its neighbors
Distance Vector Routing • RIP always uses 1 as link metric
• Maximum hop count is 15, with “16” equal to “”
• Routes are timeout (set to 16) after 3 minutes if they
are not updated
2

RIP - History RIP - History


• Late 1960s : Distance Vector protocols were used in the • Late 1960s : Distance Vector protocols were used in the
ARPANET ARPANET
• Mid-1970s: XNS (Xerox Network system) routing protocol • Mid-1970s: XNS (Xerox Network system) routing protocol
is the precursor of RIP in IP (and Novell’s IPX is the precursor of RIP in IP (and Novell’s IPX
RIP and Apple’s routing protocol) RIP and Apple’s routing protocol)
• 1982 Release of routed for BSD Unix • 1982 Release of routed for BSD Unix
• 1988 RIPv1 (RFC 1058) • 1988 RIPv1 (RFC 1058)
- classful routing - classful routing
• 1993 RIPv2 (RFC 1388) • 1993 RIPv2 (RFC 1388)
- adds subnet masks with each route entry - adds subnet masks with each route entry
- allows classless routing - allows classless routing
• 1998 Current version of RIPv2 (RFC 2453) • 1998 Current version of RIPv2 (RFC 2453)
3 4

RIPv1 Packet Format RIPv2


IP header UDP header RIP Message 1: RIPv1
• RIPv2 extends RIPv1:
1: request – Subnet masks are carried in the route information
2: response
Command Version Set to 00...0 – Authentication of routing messages
2: for IP
0…0: request full rou-
address family Set to 00.00 – Route information carries next-hop address
one route entry

ting table 32-bit address


– Exploits IP multicasting
(20 bytes)

Unused (Set to 00...0)


Address of destination
Unused (Set to 00...0)

Cost (measured in hops) metric (1-16)


• Extensions of RIPv2 are carried in unused
Up to 24 more routes (each 20 bytes)
fields of RIPv1 messages
One RIP message can 6
have up to 25 route entries
5
32 bits

1
5/13/2021

RIPv1 Packet Format RIPv2 Packet Format


IP header UDP header RIP Message 2: RIPv1 IP header UDP header RIPv2 Message 2: RIPv2

1: request Used to carry information


2: response from other routing
Command Version Set to 00...0 protocols (e.g., Command Version Set to 00.00
2: for IP autonomous system
address family Set to 00.00 address family route tag
0…0: request full rou- number)
ting table

one route entry

one route entry


32-bit address IP address

(20 bytes)

(20 bytes)
Subnet mask for IP
Unused (Set to 00...0) address Subnet Mask
Address of destination
Unused (Set to 00...0) Next-Hop IP address
Identifies a better next-hop
Cost (measured in hops) metric (1-16) metric (1-16)
address on the same
subnet than the advertising
Up to 24 more routes (each 20 bytes) router, if one exists Up to 24 more routes (each 20 bytes)
One RIP message can
have up to 25 route entries (otherwise 0….0)
7 8
32 bits 32 bits

RIP Messages Routing with RIP


• This is the operation of RIP in routed. • Initialization: Send a request packet (command = 1, address family=0..0)
on all interfaces:
Dedicated port for RIP is UDP port 520. • RIPv1 uses broadcast if possible,
• RIPv2 uses multicast address 224.0.0.9, if possible
requesting routing tables from neighboring routers
• Two types of messages: • Request received: Routers that receive above request send their entire
routing table
– Request messages • Response received: Update the routing table
• used to ask neighboring nodes for an update
– Response messages • Typically, there is a routing daemon (routed) that is an application layer
process that provides access to routing tables.
• contains an update
9 10

Routing with Rip Cont. Security


• Regular routing updates: Every 30 seconds, • Issue: Sending bogus routing updates to a
send all or part of the routing tables to every router
neighbor in an response message • RIPv1: No protection
• Triggered Updates: Whenever the metric for a • RIPv2: Simple authentication scheme
route change, send entire routing table.
• If a router does not hear from its neighbor
once every 180 seconds, the neighbor is
deemed unreachable.

2
5/13/2021

RIP Security RIP Problems

• RIP takes a long time to stabilize


IP header UDP header RIPv2 Message
2: plaintext – Even for a small network, it takes several minutes
password until the routing tables have settled after a change
Command Version

0xffff
Set to 00.00

Authentication Type
• RIP has all the problems of distance vector
algorithms, e.g., count-to-Infinity
Authetication
Password (Bytes 0 - 3)
Password (Bytes 4 - 7)
» RIP uses split horizon to avoid count-to-infinity
Password (Bytes 8- 11)

Password (Bytes 12 - 15) • The maximum path in RIP is 15 hops


Up to 24 more routes (each 20 bytes)
13 14

32 bits

An Example of RIP Counting to Infinity Problem (1)


• A problem of RIP is slow convergence to a change in topology
• Routers advertise the cost of
• Consider the example network below with all link costs 1
reaching networks. 1 4 – The distance of B to network 5 is 2, next hop is D
• In this example, C’s update to A – A and C have distances of 3 and next hop is B
would indicate that C can reach A B
Networks 2 and 3 with cost 0, 2 5
Networks 5 and 6 with cost 1 and
Network 4 with cost 2.
C D
3 6

Split Horizon Rule


Counting to Infinity Problem (2)
• Counting to infinity problem is caused by
• Suppose router D fails:
– B determines network 5 no longer reachable via D
misunderstanding between B and A, and between
• Sets distance to 4 based on report from A or C B and C
– At next update, B tells A and C this new distance to network 5 – Each thinks it can reach network 5 via the other
– A and C receive this and increment their network 5 distance to 5 • Split Horizon rule says “do not send information
• 4 from B, plus 1 to reach B
– B receives distance count 5 and assumes network 5 is 6 unit cost away
about a route back in the direction it came from”
– Repeat until reach infinity (16) – Router sending information is nearer to the
– Update interval is 30 seconds, so reaching 16 takes several minutes. If destination than you are
infinity is larger, then convergence would take longer. – Don't teach your grandma how to suck eggs! 
• Erroneous route now eliminated within time out
period (180 seconds)

You might also like