---
title: "Routing Information Protocol (RIP)"
subject: "Computer Networks and Security"
chapter: 4
key: "semester_7/computer_networks_and_security:rip-protocol"
source: https://www.bctengineer.com/q/semester_7/computer_networks_and_security/rip-protocol
site: BCT Engineering
---

# Routing Information Protocol (RIP)

Computer Networks and Security · Chapter 4: Network Layer

- Asked in: 2069 Chaitra, 5 marks; year not given
- Video: [Networking Basics - How RIP Works](https://www.youtube.com/watch?v=tZWlRq-iunI) — Kevin Wallace Training, LLC
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/computer_networks_and_security/rip-protocol
- Whole chapter: https://www.bctengineer.com/md/semester_7/computer_networks_and_security/chapter-4

## Question

Explain the working process of the Routing Information Protocol (RIP) with example.

## Short answer

RIP is a distance vector protocol that uses hop count (max 15). Routers broadcast their full routing tables every 30 s; receivers increment hops and update routes if shorter. For example, a network A-B-C learns routes gradually. Split horizon and triggered updates mitigate looping.

## Answer

**RIP (Routing Information Protocol)** is an intra-domain (interior gateway) routing protocol based on the **distance vector** algorithm (Bellman-Ford). It uses **hop count** as the metric, with a maximum of 15 hops (16 means infinity or unreachable). RFC 1058 defines RIPv1, and RIPv2 adds subnet mask support and multicast. It runs over UDP port 520.

#### Working
1. At start, each router knows only its directly connected networks, with distance 0 or 1.
2. Every **30 seconds** each router sends its whole routing table (as a response message) to its neighbours.
3. A receiving router adds 1 to each received distance and compares:
   - new destination: add it, with the sender as next hop;
   - better (smaller) distance: replace the entry;
   - same next hop: update to the new distance.
4. Timers: **update (30 s)**, **invalid/timeout (180 s)** without update marks route as unreachable, **garbage collection (120 s)** removes it.
5. Problems such as count-to-infinity are reduced by split horizon, route poisoning and triggered updates.

#### Example
Network: A - B - C, networks N1 (on A), N2 (A-B link), N3 (B-C link), N4 (on C).

| Router A (dest, hop, next) | After 1st exchange | After 2nd exchange |
|---|---|---|
| N1, 1, direct | N1, 1, direct | N1, 1, direct |
| N2, 1, direct | N2, 1, direct | N2, 1, direct |
| N3, - | N3, 2, via B | N3, 2, via B |
| N4, - | - | N4, 3, via B |

Router B first learns N4 from C (distance 2), then tells A, which adds 1 and gets 3. After a few update intervals all routers have converged.

**Limitations:** slow convergence, small diameter (15 hops), and hop count ignores link speed.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What is RIP's metric and maximum?
   A. Bandwidth, 255
   B. Hop count, 15 (16 = unreachable)
   C. Delay, 100
   D. Cost, 65535
   Answer: B. RIP uses hop count; 16 is infinity. (Key point: RIP metric)

2. A router receives a neighbour's distance 2 to N4. What does it do?
   A. Stores 2
   B. Adds 1 and compares, storing 3 via that neighbour if new or better
   C. Stores 1
   D. Ignores it
   Answer: B. Received distances get +1. (Key point: Update step)

3. How often does RIP send updates?
   A. Every 5 s
   B. Every 30 s
   C. Every 90 s
   D. Every 180 s
   Answer: B. Update timer 30 s; invalid 180 s; garbage 120 s. (Key point: Timers)

4. In A-B-C, what does A learn for N4 on C?
   A. 2 via B
   B. 3 via B
   C. 1 direct
   D. 4 via C
   Answer: B. B has 2, A adds 1 = 3. (Key point: Example)

## Related in Computer Networks and Security

- [Routing criteria; RIP, OSPF, BGP, IGRP, EIGRP](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Arouting-criteria-protocols) — Computer Networks and Security, chapter 4
- [Routing and need of routing protocol](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Arouting-protocol-necessity) — Computer Networks and Security, chapter 4, asked 2×
- [Routed vs routing protocol](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Arouted-vs-routing-protocol) — Computer Networks and Security, chapter 4

## Related in other subjects

- [OSPF working with routing tables](https://www.bctengineer.com/question.md?key=semester_8%2Finternet_and_intranet%3Aospf-working-routing-tables) — Internet and Intranet, chapter 2
- [Link-state routing as adaptive routing](https://www.bctengineer.com/question.md?key=semester_8%2Ftelecommunications%3Alink-state-adaptive-example) — Telecommunications, chapter 8
- [Link-state and distance vector routing](https://www.bctengineer.com/question.md?key=semester_8%2Ftelecommunications%3Alink-state-distance-vector) — Telecommunications, chapter 8
