ELEC3506

RoutingLecture 6 PDF16 min

RIP

How RIP applies distance vector routing in practice — its metric, its hop limit, the difference between RIPv1 and RIPv2, and the lecture's own worked RIPv2 example.

By the end of this page you should be able to

  • State RIP's routing metric and its maximum hop count
  • Explain how RIP's hop limit doubles as a loop-prevention mechanism
  • Distinguish RIPv1 from RIPv2 across all six features the lecture compares
  • Trace a RIPv2 routing table through a new route, a combined update, and a tie between two paths

The idea

RIP is distance vector routing with the details filled in: a specific metric, a specific limit on how far a route can propagate, and a specific update schedule. Everything from the previous two topics — the Bellman-Ford recomputation, split horizon — is what actually runs underneath it.

How it works

RIP, in general

RIP sends routing-update messages at regular intervals, and also whenever the network topology changes. Each update is sent to every neighbour except the one that caused the update in the first place — this is split horizon again, now applied concretely.

When a router receives an update that changes an entry, it updates its own routing table using the distance vector algorithm, and then immediately begins sending its own updates to inform the rest of the network — this happens independently of, and in addition to, the router’s regular scheduled updates.

RIP routers keep only the best route to a destination. If two routes tie, both are kept.

How it works

Metric and stability

RIP uses a single metric: hop count. It does not consider bandwidth, delay or any other factor.

Maximum hops. The maximum number of hops in a RIP path is 15; infinity is defined at 16. If a hop count becomes 16 after being increased by one, that destination is considered unreachable.

Loop prevention. RIP prevents incorrect routing information from propagating using two mechanisms: defining infinity at a low, fixed value (16 hops), and the split horizon strategy.

FeatureRIPv1RIPv2
Routing modeClassful routingClassless routing
AuthenticationNonePlain text and MD5 authentication supported
Update deliveryBroadcastMulticast, address 224.0.0.9 — only routers listening for it receive it
Routing tag (filtering / policy)NoYes
Subnet mask in updateNot carried; classful onlyCarried; supports CIDR
Update frequencyEvery 30 secondsEvery 30 seconds
Six points of comparison, one of which (update frequency) is deliberately the same for both versions — do not assume every row differs.

Worked example

The lecture's RIPv2 example

Router B’s table starts empty. Trace how it fills in as updates arrive.

  1. Router A sends B an update: A can forward packets to 162.11.5.0 and 162.11.9.0, one hop each. B updates its table: for either destination, the next hop is 162.11.8.1 (A’s address) and the outgoing interface is S0, because that is the interface the update arrived on.

  2. Router C sends A an update: C can forward packets to 162.11.10.0, one hop. A combines this with its own table.

  3. A relays the combined table to B. Before sending, A must increase the hop count of any entry it received from another router by 1 — so 162.11.10.0, which arrived at A as 1 hop, is advertised by A as 2 hops. B’s table now also shows 162.11.10.0 via 162.11.8.1, interface S0.

  4. A new physical link is established: Router C (S1) — Router B (S1). B now has two paths to 162.11.10.0:

    • via S0 → Router A → Router C — 2 hops
    • via S1 → Router C directly — 1 hop
  5. RIP’s update rule keeps only the minimum-hop-count path. 1 hop beats 2, so B’s outgoing interface for 162.11.10.0 changes from S0 to S1, with next hop 162.11.6.2.

AnswerFinal state: B routes to 162.11.10.0 via interface S1 (direct to C, 1 hop), and via S0/Router A to 162.11.5.0 and 162.11.9.0

Aside

The lecture goes on to compare B’s full routing table before and after its S1 link to Router C goes down and then comes back up — showing the route falling back to “via Router A” while S1 is down, then switching back to “via Router C (direct connection)” once it recovers. The detailed table values for those two states did not survive extraction cleanly. The mechanism to take away is the direction of the fallback: with S1 down, B reverts to the higher-hop path through A rather than losing the route outright, and switches back to the shorter direct path automatically once S1 recovers, because RIP keeps re-evaluating on every update.

Where marks get lost

Ties are kept, not broken arbitrarily

It is tempting to assume a routing protocol always picks exactly one best path. RIP does not — when two paths genuinely tie on hop count, both are retained. Do not state on an exam that RIP always converges to a single path per destination; it converges to the single best metric, which more than one path can share.

How it works

The Packet Tracer exercise

This lecture is accompanied by a Cisco Packet Tracer file, RIP_lab_Ed_lecture.pkt, supplied alongside the Ed lesson on RIP. The lecture’s own instruction is to complete the Ed lesson first and then use the file to configure and verify RIP routing hands-on.

Check yourself

  • RIP’s metric is hop count only; maximum is 15, with 16 meaning infinity.
  • Loop prevention: defining infinity at 16, plus split horizon.
  • RIPv1 is classful, broadcast, no authentication. RIPv2 is classless, multicast (224.0.0.9), supports authentication and carries the subnet mask. Both update every 30 seconds.
  • A relaying router must increase the hop count of a route by 1 before passing it on.
  • Ties on hop count are kept, not arbitrarily broken.

In the exam

  • Give the exact numbers: metric = hop count, max hops = 15, infinity = 16. These are the specific values RIP questions probe for.
  • Know all six RIPv1/RIPv2 differences, including the one that does not differ (update frequency) — a question can test whether you over-generalise “v2 is better everywhere.”
  • The “+1 before relaying” step is a common trace-through question. Get the direction right: the hop count increases as a route moves away from its origin, not as it approaches it.
  • State both loop-prevention mechanisms together when asked how RIP avoids incorrect information propagating — defining infinity and split horizon are both required in a full answer.

Check yourself

  1. A destination's hop count in a RIP router's table increases to 16 after the usual "add one hop" step. What does this mean?
  2. Which feature is present in RIPv2 but absent in RIPv1?
  3. In the lecture's RIPv2 example, Router A first tells Router B it can reach 162.11.5.0 and 162.11.9.0 in one hop. What next-hop and interface does B record?
  4. Router C tells Router A it can reach 162.11.10.0 in one hop. Before A forwards this on to B, what must A do to the hop count?
  5. A new link is established directly between Router C and Router B. Router B now has a 1-hop path to 162.11.10.0 via that link, and a 2-hop path via Router A. Which does RIP keep?