What does a RIPv2 route entry carry that a RIPv1 entry does not, and why did the missing subnet mask make RIPv1 classful?
answer
- fields RIPv1 left as zero
- the receiver has to guess
- own interface mask, else the class
- mask, tag and next hop
- VLSM and CIDR become possible
basics
~20 sRIPv1 route entries carry no subnet mask, so a receiver infers each mask from its own interface or the address class, which makes RIPv1 classful. RIPv2 reuses unused fields for a subnet mask, a route tag and a next hop.
solid answer
~50 sA RIPv1 entry (RFC 1058) holds an address family, an IPv4 address and a hop-count metric; the rest of its 20 octets is `must be zero`. A receiver with an interface in the same network applies that interface's mask, otherwise the natural class mask, so all subnets of one network must share a mask and a border router may advertise only the whole network outside it. RIPv2 (RFC 2453) keeps the 20-octet entry and fills the zero fields with a `Subnet Mask`, a `Route Tag` and a `Next Hop`, so each route travels with its own mask and VLSM and CIDR routes work. It also multicasts to `224.0.0.9` and can authenticate a message. RFC 1058 told version-1 routers to ignore must-be-zero fields in messages of version 2 or higher, so a RIPv1 router can still parse a broadcast RIPv2 update as version-1 data.
go deeper
Remember the headline: RIPv1 sends no subnet mask, RIPv2 sends a mask with every route, plus multicast and authentication. Both use hop count with 16 as unreachable.
Explain how a RIPv1 receiver infers a mask from its own interface or the address class, why that forces one mask per network, and which three fields RIPv2 put into RIPv1's zero octets.
Connect the missing mask to real failures: VLSM routes misread, discontiguous subnets summarised away, and mixed-version segments that keep classful limits. Explain why the upgrade stayed wire-compatible.
Use RIPv2 as the case study of extending a protocol inside reserved fields: compatibility was preserved, but infinity could not be raised. Ask what a protocol must reserve on day one to evolve later.
## Two versions, one entry size The **Routing Information Protocol (RIP)** is a distance-vector interior routing protocol that runs over **UDP port 520** and uses a hop count as its metric, with 16 meaning unreachable. **RIPv1** is specified in **RFC 1058**; **RIPv2** in **RFC 2453** (Internet Standard STD 56, which obsoletes the earlier RIPv2 documents RFC 1388 and RFC 1723). Both versions use the same message header (command, version and two reserved octets) and the same **20-octet route entry (RTE)**, with 1 to 25 entries per message. The difference is what those 20 octets hold. | Octets | RIPv1 entry (RFC 1058) | RIPv2 entry (RFC 2453) | |---|---|---| | 2 | Address Family Identifier | Address Family Identifier | | 2 | must be zero | **Route Tag** | | 4 | IPv4 address | IP Address | | 4 | must be zero | **Subnet Mask** | | 4 | must be zero | **Next Hop** | | 4 | Metric | Metric | RIPv2 added nothing to the size of a route: it put meaning into fields that RIPv1 had reserved. ## How a RIPv1 receiver works out a mask A routing table entry needs a prefix and a mask, but a RIPv1 entry delivers only the address. RFC 1058 (and RFC 2453's description of version 1) tells the receiver how to interpret it: 1. If the receiver has an interface in the same **classful network** (the class A, B or C network the address falls in), it assumes the advertised address uses **that interface's subnet mask**. 2. If it has no interface in that network, it can only assume the **natural class mask**: /8 for class A, /16 for class B, /24 for class C. 3. If the address has non-zero bits beyond the mask the receiver assumed, the entry is read as a **host route**. That inference is what "classful" means for a routing protocol: the mask comes from the receiver's assumptions, not from the sender. ## What classful forced on a network Because the receiver guesses, the network has to be built so the guess is right: - **One mask per network.** RFC 1058 assumes a single subnet mask for every subnet of a network, so variable-length subnet masks (VLSM) are out. - **Subnets stay inside their network.** A router must not send subnet routes to routers that cannot know the mask, so a **border router** (one joining a subnetted network to a different network) advertises only a single entry for the whole network outside it. - **No supernets.** A route shorter than the natural mask, such as a CIDR aggregate, cannot be expressed. - **Discontiguous subnets fail.** Two parts of one network separated by a different network are each summarised to the same network number, and the routers in between cannot tell them apart. ## The three fields RIPv2 added - **Subnet Mask** — the mask applied to the IP address in this entry. A value of zero means no mask was included. With it, each route carries its own prefix length, so RIPv2 can advertise VLSM subnets and CIDR routes. - **Route Tag** — a value that must be preserved and re-advertised with the route. Its intended use is to mark **external** routes (imported from another IGP or from BGP) apart from internal ones, for example by carrying the autonomous system number they came from. - **Next Hop** — the address packets for this destination should be sent to, if not the advertising router. `0.0.0.0` means "via the router that sent this advertisement". The next hop must be directly reachable on the subnet the update was sent over; if it is not, the receiver treats it as `0.0.0.0`. RFC 2453 calls the field advisory: ignoring it gives a possibly longer but still valid path. ## What else changed, and what did not RIPv2 also sends periodic updates to the multicast group **`224.0.0.9`** instead of broadcasting them, and can **authenticate** a message by using the first entry, marked with Address Family Identifier `0xFFFF`, for authentication data (which leaves room for at most 24 routes). The distance-vector machinery is unchanged: the hop-count metric, 16 as infinity, the port and the update and timeout behaviour are the same in both versions. RFC 2453 explains that infinity could not be raised because older RIP implementations would misread a larger metric. The loop-prevention and timer mechanics belong to RIP as a whole, not to either version. ## Why the upgrade was backwards compatible RFC 1058 specified that a version-1 router discards a version-1 message whose must-be-zero fields are non-zero, but **ignores** those fields in messages whose version is greater than 1. A RIPv1 router that follows RFC 1058 can therefore read a broadcast RIPv2 message as if it were version 1: it takes the address and metric and ignores the mask, tag and next hop. It still infers the mask itself, so mixing versions keeps the classful limits for the routers that run version 1.
- What problem does RIPv2's Next Hop field solve?On a shared segment where several routers sit but only one of them speaks RIP to you, that router can advertise routes whose best exit is a neighbour on the same segment. RFC 2453's Appendix A shows it: by setting `Next Hop` to that neighbour, traffic goes there directly instead of taking an extra hop through the RIP speaker. `0.0.0.0` means use the sender, and an unreachable next hop is treated as `0.0.0.0`.
- What is the Route Tag for, and does RIP itself act on it?RIP does not use the tag to choose routes; it only has to preserve it and re-advertise it with the route. RFC 2453 intends it to separate internal RIP routes from external ones imported from another IGP or from BGP, for example by setting it to the source autonomous system number. Any other use is valid if every router in the RIP domain uses it consistently.
- Why did RIPv2 not raise the infinity metric of 16?RFC 2453 rules it out for backwards compatibility: older RIP routers would misread a larger metric, at best ignoring the route as they ignore 16. Shrinking the metric to one octet to reuse the other three was also rejected, because it would break implementations that treat the metric as a 4-octet value. So the 15-hop diameter stayed.
A RIPv1 update is like a phone number written without its area code: whoever reads it assumes their own area code, which is right only when sender and reader live in the same area. RIPv2 writes the area code (the mask) next to every number.
saying these in an interview costs you the question
- RIPv1 cannot advertise subnets at all, only whole networks.
- RIPv2 raised the maximum hop count above 15.
- RIPv2 listens on a different UDP port from RIPv1.
- RIPv2 sends one subnet mask per message rather than per route entry.
- Any RIPv1 router drops RIPv2 messages because their reserved fields are non-zero.
- RIPv2's added fields make it a link-state protocol.