droppercauseNetworking and Communications

Oct 28, 2013 (5 years and 4 months ago)




RIP was originally developed by Xerox and was called
Gateway Info (GWInfo)

it then developed into

which you will within the Unix environment. RIP v1 is
described in
. RIP is a Distance Vector protocol
and uses the Bellmann
Ford algorithm for determining the
best route. Other distance vector routing protocols include
IPX RIP, AppleTalk RTMP and IGRP (Inter
Routing Protocol). There are also other routing pr
such as OSPF, IPX NLSP (Netware Link State Protocol
and IS
IS (Intermediate System to Intermediate System)
which are known as

routing protocols i.e. they
are concerned with sharing the status of links in their
updates rather than complet
e routing table information.
OSPF tends to be limited to around 1000 routers whereas
IS can scale much larger. Ciscos EIGRP (Enhanced
IGRP) is often called a 'hybrid' but is more strictly a Diffuse
Up Algorithm (DUAL). BGP (Border Gateway Protocol) is
ot really a routing protocol at all, it is more accurately
described as a Path Vector protocol.

In a RIP v1 environment all subnet masks throughout the
network must be the same therefore limiting addressing
schemes somewhat. This is because RIP v1 is a

routing protocol, it does not have the ability to transmit the
subnet mask within its updates. RIP v1 imposes the
subnet mask on the inbound interface and this is normally
defined by the engineer. Learned routes are entered into
the routing table w
ith their natural mask. As a result there
can be a great waste of internet host addresses. This can
be rectified by using RIP v2 (see later) or OSPF which are
able to implement
Variable Length Subnet Masks
. They can do this because they


subnet mask within their routing updates and these
protocols are known as

routing protocols.

The following diagram shows a restriction on using RIP:

r routing updates being sent from router A about
network, router B resorts to assigning the
natural Class B mask to the network entry in the routing
table. Router B therefore sees a split network since also exists on its own LAN



Although this network will route correctly as it stands in a
RIP environment, the problems arise if the link between A
and B fails, because the network will split.

Consider the following scenario:

In a RIP environment, if router C routes the first packet
and then switches the rest, then for some
the link to will work very well and for others
the link to will fail. This is because the Class B
network is split across two routes even
though locally the masks are class C for the subnets. The
networks 2 and are two separate Class
C networks anyway. In an IGRP environment, because
IGRP load balances across equal cost paths, the users
will have a slower network since TCP will resend the
dropped packets.


When creating subnets, t
he mask determines which
portion of the IP address is used for the subnet address
and which is used for the host address. For example, in
the mask, the first three octets consist of all
1's whilst the last octet contains 0's, the mask is ANDe
d to
the incoming IP address and the host part is separated out
in the AND operation and is considered to be a local
interface address. When sizing a subnet, the formula used


2 = number of available subnets or hosts

'n' is the number of bits

used). For further discussion on IP
addressing, CIDR and VLSM refer to
IP Addressing


RIP v1 Operation

RIP v1 uses UDP port 520 for sending an
d receiving
broadcast messages.

The RIP v1 packet is illustrated below:


field can have one of the following




(no long
er used)


(no longer used)


(used by Sun Microsystems)

Each route is identified in the fields from the
Family Identifier

onwards. There can be up to 25 routes
in one RIP packet.

There are two RIP message types
Request Messages

Response Messages
. A router requests an update
when it first joins a network and all routers respond with
Response Messages containing the routes. Response
Messages are sent anyway every 30 seconds by default.
Triggered updates

occur when there has bee
n a change
and these triggered updates just contain the changes and
help with quicker network convergence.

IP routing protocols submit their best routes for each
destination to the Router Table Manager (RTM). The RTM
then builds the Routing Table and inc
ludes all the locally
configured interfaces (i.e. on the router itself) and any
static routes that might have been configured. In addition
to the Routing Table, identical copies of which sit on each
slot; there is also a Forwarding Table which acts as a
ute cache for the IP datagrams. This Forwarding Table
is used to hold the most recent and commonly used
datagrams so saving the need to go through the complete
Routing Table every time and this can be of a configurable
size, depending on the memory availab
le. IP global and
interface parameters are maintained within the
Management Information Base (MIB) which is mainly used
by external SNMP clients which view and change these

The same IP route information can come from different
interfaces, rou
ting protocols or static routes, and since
only one entry for a particular destination is allowed, the
RTM makes the decision as to which route goes into the
table based on the Route Preference (which can be
configured), or failing that, the Route Weight (
which is not
configurable). RIP is not sensitive to line speed instead it
calculates the best routes by way of 'hops' (or 'metric') or
'ticks' (which is time). If the router receives a change to the
reachability of a route and it is worse than the informat
that it already has in the Routing Table then it will only
update this information if it receives the information from
the original sender.

The maximum number of hops allowed is 15. Once the
hop count reaches 16 then the network becomes
A directly connected network has a hop of 1.
RIP updates (containing up to 25 entries each) are sent
every 30 seconds. Cisco have introduced a time variance
for these updates of between 25.5 and 30 seconds. This is
to stop

where on Ethernet netw
orks RIP can
get sent at the same time causing

so making the network very busy every
30 seconds.

To help eliminate routing loops and unnecessary RIP
updates two techniques are employed.
Split Horizon

be set so that two connecte
d routers do not send each
other routes that have been learned via their connected
interfaces, there is no point since the other router must
know these routes.
Poisoned Reverse

sends the routes
learned but with a hop count of 16 indicating the network
to b
e unreachable via that interface. This helps defeat
larger routing loops.

Default Route

A default route, which has a mask of will yield a
destination network of when any IP datagram is
ANDed with the mask. The result of this is that if i
t cannot
find a match within the routing table then it uses the next
hop address defined by the destination address.
Configuring a default route causes a certain amount of
traffic overhead.

RIP and Subnet Masking

RIP updates are sent to RIP conf
igured updates every 30
seconds and this update contains all known networks and
their hop counts, no mask information is included. In this
RIP packet 8 bytes, out of the possible 16, are unused so
50% of the bandwidth is wasted. A router will not advertise

a subnetwork out of an interface that does not belong to
that network, what it does do is advertise the natural
portion of the address e.g.

In the above diagram router

A has two subnetworks, and with a subnet mask of, however router B cannot see these
subnetworks because no mask information is received
with RIPv1, instead it advertises a network of
with a natural mas
k of If the advertised
network belongs to the subnetwork of the interface on
which it was received, then that interface mask is
associated to that advertised network. Equal cost paths to
the same network are handled by the router using the fir
one that it learned.

There are three timers that RIP uses:

Expiration Timer


This 'Invalid timer' is set when a
route is first added to a routing table and whenever
an update arrives for that same route.

Flush Timer


This 'Garbage timer' starts if

Expiration timer reaches 180 seconds. The Garbage
Timer runs for 60 seconds and then deletes the route
if no update occurs.

Holddown Timer


When an update for a route
appears with a higher metric than the current route in
the table, the Holddown Tim
er prevents changes to
the table until it times itself out thereby maintaining
stability in the routing table if routes are 'flapping'.
This stops routes to failed networks being re
introduced by routers that have yet to find out.

If information about a n
etwork is not received within 90
seconds (default value) then the metric is set to 'U' (in the
TI) or '
1' (Site Manager). The network is removed from
the routing table if no information is received after 180

Unnumbered IP links

Unnumbered IP i
nterfaces can be configured for use on
point to point links as a way of conserving network
address space. An address of is used, along with a
mask of, an associate address parameter is used
as the source address for anything transmitted out

of that
interface. This associate address has to be an IP address
of one of that router's interfaces. No pinging or ARPing is
done on or through this unnumbered interface and RIP
decisions are based on the mask of the associated
address. One use of the un
numbered IP interface would
be as a link to another manufacturer's router (such as
Cisco) which also has an unnumbered interface.

IP Multinetting

IP multinetting can be achieved by adding subnets to the
same interface, normally this is necessary because

has been inherited and resubnetting is out of the question
due to all the IP address changes that would have to be
changed. In an ideal world multinetting should be avoided
because the router interface has to work hard routing
between subnets on the

same interface. Using RIP v2 and
OSPF allows variable subnets to be used and, if carefully
planned, should allow the configuration of single subnets
with masks allowing enough hosts per subnet.

RIP Accept Policies

RIP Accept Policies can be configured
to perform any of
the following:

Listen to RIP updates from certain routers

Listen only for specific networks

Alter the advertised metric of a network

Assign a specific mask to be included with a
network in the routing table

Change the preference metr
ic of a route

An example of a use for an Accept Policy would be to
prevent users connected to a router B from accessing
networks off a router A, the Accept Policy would be
configured on router B. The result of this policy would also
prevent users on route
r A from accessing these networks
on router B, this is because, although they could reach the
router, they could not get a response back. RIP Accept
Policies are configured globally on the router and if there
are several policies configured a Rule Preceden
parameter can be set so that if a RIP update comes along
with contents matching more than one policy, the policy
with the highest precedence takes priority.

RIP Announce Policies

RIP Announce Policies can be configured to do any of the

ss on certain routes out of particular interfaces

Automatically create a default route

Pass on routes learned from particular gateways

Pass on routes learned from particular interfaces

An Announce Policy could be used, for instance, exclude
a couple of

subnetworks on router A from the routing
tables of all the other routers within the network, thereby
isolating them from the rest of the network.

When configuring the networks involved in either Accept
or Announce Policies, the match criteria could be '
exact' or
'range'. When range is selected it is worth noting that the
network address, say, becomes the lowest
address in a range of addresses limited by the mask. So in
our example, if the mask is then the upper
limit of the range
of addresses would be
Another item worth noting is the Route Source parameter;
the hexadecimal value entered is the SUM of the codes
used to represent each routing protocol used for
contributing the route.

RIP v2

The latest RFC for RIP v
2 is
RFC 1723

and replaces

The following features are additional to those found within
RIP v1:


A si
mple password of up to 128
characters can be used to verify legal IP datagrams
between RIP v2 configured router interfaces. This
helps in preventing hackers making use of erroneous
updates. The
Address Family Identifier

is set to a
specific value and is re
ad to check authenticity.

Route Tags

Subnet Mask:
Each network entry within the RIP
update has it's subnet mask included so accurate
routing information can be included within the routing
tables and a RIP v2 router advertises all known
subnetworks out an

interface not belonging to that
subnetwork. Different subnet masks can be
configured throughout the whole network without
confusing the routers, address space no longer
needs to be wasted as subnet mask sizes can be
adjusted to accommodate different netwo
rk sizes.

RIP v2 updates are multicast to (class D) so RIP v2 routers share
information independently from other routers.

The RIP v2 packet is illustrated below:

Extensions to RIP are detailed in
RFC 2091

and include
triggered RIP updates which were designed to allow RIP
to run over dial circuits. Only when a route changes would

send a routing update, thereby minimising the number
of calls required to maintain the routing table.