Cisco – RIP routing is broken between two routers

ciscoriprouterrouting

There are 2 routers connected something like this:

Network1 ----- (172.16.1.1/24) Router 1 (172.16.3.1/30) ------ (172.16.3.2/30) Router 2 ------ (172.16.2.1/24) Network 2

I try to add addresses for dynamic routing using the RIP protocol, for Router 1 adding 172.16.1.0 and 172.16.3.0 and for Router 2 172.16.3.0 and 172.16.2.0 but they are assigned by default to 172.16.0.0 in both cases, and it does not work. Any suggestions?

Best Answer

they are assigned by default to 172.16.0.0 in both cases, and it does not work

I modified your ascii art a litte to reduce scrolling... It sounds like you're saying that you can't reach reach N1 from N2...

Broken RIPv1 topology
=====================

N1 ---- (172.16.1.1/24) R1 (172.16.3.1/30) ----- (172.16.3.2/30) R2 ----- (172.16.2.1/24) N2

Classful routing protocol overview

RIPv1 is a classful routing protocol... as such, it doesn't associate netmasks with routes when they are advertised. Classful routing protocols do a couple non-intuitive things...

  1. They only advertise routes out interfaces where the masks match (this is your problem)
  2. They automatically summarize at major network boundaries (see bonus material, below)

Interface netmasks

To make your topology work, your masks will have to match on all RIPv1 interfaces, unless you use a classless routing protocol (such as RIPv2, EIGRP, OSPF, or ISIS). If you need to use RIPv1, then reconfigure your topology such that all interfaces have matching masks, like this...

Functional RIPv1 topology
=========================

N1 ---- (172.16.1.1/24) R1 (172.16.3.1/24) ----- (172.16.3.2/24) R2 ----- (172.16.2.1/24) N2

Bonus material: RIPv1 Auto-summarization Example

Since this also tends to trip people up, I am including an example of RIPv1 auto-summarization dynamics.

When I mention major network boundaries below, I'm talking about the classic definitions for Class A, Class B, and Class C IPv4 networks...

  • Class A (8-bit netmasks): 1.0.0.0/8 - 127.0.0.0/8
  • Class B (16-bit netmasks): 128.0.0.0/16 - 191.255.0.0/16
  • Class C (24-bit netmasks): 192.168.0.0/24 - 223.255.255.0/24

Moving on to the RIPv1 auto-summarization example... I will use matching /24 interface netmasks for simplicity.

Lo0:
192.168.1.0/24
Lo1:
1.1.2.0/24
+----+                  +----+                     +----+
| R1 +------------------+ R2 +---------------------+ R3 |
+----+                  +----+                     +----+
          1.1.1.0/24              172.16.1.0/24

router rip               router rip                 router rip
 version 1                version 1                  version 1
 network 192.168.1.0      network 1.0.0.0            network 172.16.0.0
 network 1.0.0.0          network 172.16.0.0

The routing table on R3 contains:
C     172.16.1.0/24
R     1.0.0.0/8        <--- 1.1.1.0/24 and 1.1.2.0/24 are "hidden" by the 
                            classful summary at R2

R     192.168.1.0/24   <--- 192.168.1.0/24 passes transparently through R2
                            since it's a Class C network itself and is not 
                            summarized at R2

R1 and R2 are connected by subnets of the 1.0.0.0/8 major network, so 1.1.1.0/24 and 1.1.2.0/24 are advertised between R1 and R2; however, the link between R2 and R3 is not in 1.0.0.0/8, therefore R2 performs automatic summarization of subnets of 1.0.0.0/8 and subnets of 172.16.0.0/16.

When subnets of a major network are summarized, they get hidden by the summarized route... This happens at R2 when 1.1.1.0/24 and 1.1.2.0/24 are summarized to 1.0.0.0/8. Cisco routers cannot disable auto-summarization under RIP version 1 (but they can for RIPv2).

Related Topic