12

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?

19

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).

  • If I change both masks to /24 from /30 it means that 172.16.0.0 should be the RIP address on both routers? – m3th0dman Jun 2 '13 at 20:09
  • 1
    You should use network 172.16.0.0 under router rip and this configuration will work – Mike Pennington Jun 2 '13 at 20:17
  • It works; thank you! – m3th0dman Jun 2 '13 at 20:40
  • 1
    Wish I could upvote this more than once. This is a fantastically written answer. Nice work. Is there something (besides having a lot of time and/or counting a lot of spaces) one can use to make those ASCII diagrams? – John Jensen Jun 5 '13 at 7:10
  • Thank you John, I like the jave editor (although I have to confess I just did it the hard way) – Mike Pennington Jun 5 '13 at 7:12
10

This is not a case of auto summary. Auto summary only works across major network boundaries. So you would need to have 172.16.x.x and 172.17.x.x or such to have a network summarized.

What you are seeing is that RIP only supports classful networks under the routing process. So even if you enter 172.16.3.0 it will convert it to 172.16.0.0.

You can use classless routing with RIP version 2. It will look classful under the routing process config but it will advertise the routes properly.

Please use sh ip protocols to check what version you are running.

If it's not working then I suspect you are running version 1.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.