Does a outer send RIP-v1 updates when using several masks?

Answered Question
Jan 9th, 2009

I've just found out that with RIP-v1 everything works fine in a network as long as the same netmask is used on all interfaces of all routers from the network, no matter if that netmask is corresponding or not to Class A or B or C.

My understanding up to now was that only the default netmask corresponding to that IP class could be used, i.e /24 for Class C, /16 for Class B and /8 for Class A.


I used /28 netmask and the network I simulated on PaketTracer run smoothly.

But when I changed the nemask to /29 on only one interface of a router, the corresponding subnet from that interface was not anymore advertised by the router through the RIP updates.


What is the technical explanation behind this behaviour?

Correct Answer by lejoe.thomas about 8 years 1 month ago

Hi Petru,


I'll just explain your original example, FE with /29 not being advertised through serial with /28


serial : 192.168.10.114/28

ethernet : 192.168.10.65/29


Major network for both these interface address are 192.168.10.0, because it's a class C address, so we use the standard /24 mask to derive the major network.



Now when advertising E/29 route over SE/28.


1)The router checks if the route belongs to the major network of the address configured on the interface. The answer is yes.

2)Second it checks if the SE interface mask (/28) matches the subnet mask of route from E (/29). It is not.


If the the answer in the second step is No, it will no advertise that route out SE.


Similarly the ethernet interface will not advertise the address from SE interface.



Now try the same example by changing the Ethernet address to another major network like 10.0.0.1/8. This will use the second rule I mentioned in my previous post and be advertised out SE interface.




- and you mean that if the 2 netmasks are different the router cannot compute the subnet?

I thought that it would compute the subnet 192.168.10.64 and advertise it. Why it can't?


It will not do this, because it will lead to ambiguity.




HTH


Lejoe



  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Jon Marshall Fri, 01/09/2009 - 15:08

Petru


"My understanding up to now was that only the default netmask corresponding to that IP class could be used, i.e /24 for Class C, /16 for Class B and /8 for Class A."


Not strictly true. RIP assumes a consistent mask rather than a classful mask. Because the subnet mask is not passed in the routing update the router can only apply the mask it knows about.


So if you have an interface configured as 172.16.5.0 255.255.255.0 RIP then assumes that any networks it receives with 172.16.x.x are 172.16.x.0 255.255.255.0.


Jon

mikegrous Fri, 01/09/2009 - 15:11

are you stating that...

R1

ip add 10.1.1.0 /28


r2

ip add 10.1.1.0 /28


When the above is true all works fine.

when you change one interface to /29 rip stops working?


If my question is correct then the reason is that rip needs to have the subnets matching in the updates or else it wil disreguard the update. If you do a debug ip rip you will see it receiving the updates but then dropping them. You can configure "no validate-update-source" under router rip and it will ignore the netmask info. I hope that is what you are looking for.

badalam_nt Fri, 01/09/2009 - 15:22

With RIP-v1, netmask is not advertised, so there is no reason for a router receiving a RIP update to disregard the subnet. It will merely assume that it has a netmask as defined on the router's interface on which the RIP update is received.


My question is why the sending router didn't advertise anymore the route after I changed its netmask from /28 to /29.


To be clearer, I set /28 on one Ethernet interface of R1 and the same /28 on one of R1's serial interfaces, itf which is connected to a serial itf of R2, defined as well with /28. And everything worked fine.

But after I changed the netmask on Ethernet itf of R1 to /29, that subnet was not advertised anymore. Is it a bug on my PacketTracer or why the router R1 stopped advertsing it?

mikegrous Fri, 01/09/2009 - 15:40

oh yes V1 sorry. Assumed V2 with rip.

So i tested it out. And i had a link between 2 routers with rip (V1) running. both ip address were /24. Changed one side to /25 and i had no problems. I did not lose any routes, even after several minutes and even after clearing the routeing table.

badalam_nt Fri, 01/09/2009 - 15:52

Did you try to have 2 different subnets on the same router? /x on ethernet of R1 for instance and /y on serial itf of R1 ? And you saw that the router advertised on serial itf towards the R2 that subnet defined on R1 ethernet itf ?

badalam_nt Fri, 01/09/2009 - 16:46

I checked again in PacketTracer and I can confirm you that with RIP-v1 if you use different netmasks on the same router, that router will not advertise on the serial interface towards the other router the subnets that use netmasks different from the one defined on that serial interface.


What is the technical explanation ?

lejoe.thomas Fri, 01/09/2009 - 16:52

RIPv1 is classful routing protocol. For every route it recieves, it checks two things


1) The interface through which it is advertised belongs to the major network of the route

2) It does not have its interface attached to the major network of the route.


In the first case, it will use its own interface mask to determine the subnet of the route. In the second case only the major network itself is included because the router has no way of determining the subnet mask.


Your original question is the first case, the router cannot determine a /29 mask from /28 mask, hence it will not be included in the RIP update.


HTH


Lejoe


badalam_nt Fri, 01/09/2009 - 17:05

Lejoe:

This works for receiving end, but does not explain at sending part why the subnets are not advertised.

My question is why the sending router does not advertise, i.e send, the subnets that use a different netmask?


With #debug ip rip events

I saw that once I modified the netmask on the fastethernet itf from /28 to /29 (while on its serial itf I still kept the /28 netmask), it appeared that:


that subnet with /29 is not advertised anymore.

If I change the netmask on fastethernet itf back to /28, that subnet is included in the RIP updates.

So what is the reason of this behaviour?

lejoe.thomas Fri, 01/09/2009 - 17:08

Hi Petru,


A classful routing protocol uses the same rule as above to advertise routes via each of its interface. Try to think of router running a classful routing protocol using the above rules to advertise routes through each interface.


I hope this will make sense.


Edit:

In short, if a route belongs to the same major network as the interface through which it is advertised, but the interface mask is different from the subnet mask of the route. It will not be advertised out that interface.



HTH


Lejoe

badalam_nt Fri, 01/09/2009 - 17:24

Lejoe, I still miss the point, so thanks in advance if you could give me an example.

What did you mean by "major network of the route"?

I used on serial itf the IP@: 192.168.10.114/28

and on ethernet itf: 192.168.10.65/29


and the 192.168.10.64 subnet was not included in the RIP updates.


I tried also to reverse the netmasks:

on serial itf the IP@: 192.168.10.114/29

and on ethernet itf: 192.168.10.65/28


and again the 192.168.10.64 was not included in the RIP updates.


Only when I used the same subnet on both itf, either /28 or /29, the subnet 192.168.10.64 was included in the RIP updates.


If I consider the rules mentioned by you:

- I suppose the major network for serial itf is for my case 192.168.10.0/24

- then the router checks the 192.168.10.65/29 against that major network and see that it is part of it. So we're in in case 1).

- then it uses the netmask defined on serial itf (/28) to determine the subnet that it should advertise.

- and you mean that if the 2 netmasks are different the router cannot compute the subnet?

I thought that it would compute the subnet 192.168.10.64 and advertise it. Why it can't?

Correct Answer
lejoe.thomas Fri, 01/09/2009 - 17:32

Hi Petru,


I'll just explain your original example, FE with /29 not being advertised through serial with /28


serial : 192.168.10.114/28

ethernet : 192.168.10.65/29


Major network for both these interface address are 192.168.10.0, because it's a class C address, so we use the standard /24 mask to derive the major network.



Now when advertising E/29 route over SE/28.


1)The router checks if the route belongs to the major network of the address configured on the interface. The answer is yes.

2)Second it checks if the SE interface mask (/28) matches the subnet mask of route from E (/29). It is not.


If the the answer in the second step is No, it will no advertise that route out SE.


Similarly the ethernet interface will not advertise the address from SE interface.



Now try the same example by changing the Ethernet address to another major network like 10.0.0.1/8. This will use the second rule I mentioned in my previous post and be advertised out SE interface.




- and you mean that if the 2 netmasks are different the router cannot compute the subnet?

I thought that it would compute the subnet 192.168.10.64 and advertise it. Why it can't?


It will not do this, because it will lead to ambiguity.




HTH


Lejoe



badalam_nt Fri, 01/09/2009 - 18:24

Thanks to Lejoe I could summarize now this long thread for easier reading (Lejoe please correct me if I'm wrong):

- when a router wants to send RIP-v1 updates on a given interface it computes the major network to which it belongs the IP@ defined on that interface

- then for each of the interfaces of the router which have defined IP address it computes the major network. If that major network was not configured to be advertised through:

#router rip

#network

then the router won't advertise the subnet from that interface.

Else, i.e the network is configured as being allowed to be advertised, it checks this major network against the major network of the interface where the RIP updates are to be sent.

If they are different, the major network of this current interface will be included in the RIP updates that are to be sent.

If they are equal, then one additional check is performed: if the netmask of this interface is different from the netmask of the interface where the RIP updates are to be sent then the subnet will not be advertised.

Else, i.e. the netmask of this interface is the same as the netmask of the interface where the RIP updates are to be sent, the subnet computed based on the IP@ and netmask defined on the interface will be included in the RIP updates.



lejoe.thomas Fri, 01/09/2009 - 18:31

Hi Petru,


You have got it right. The above rule applies generally to all classful routing protocols, even IGRP.


Well now thats one less thing to worry about :)


Lejoe

badalam_nt Fri, 01/09/2009 - 18:40

Thanks. There's a log way to go, but with guys like you around me, it makes me progress quickly.

Yes, but first to finish with RIP-v1 as still not mastered at all its aspects, then I'll take a deep look at IGRP as well and next at RIP-v2, OSPF and EIGRP. AT least these are defined for CCNA.



Actions

This Discussion