cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4293
Views
20
Helpful
10
Replies

RIP classful routing - is my understanding correct

SJ K
Level 5
Level 5

Hi all,

Please kindly find the exhibit below (on the portion highlight in pink)

I have turned on the router with rip and the routes are exchanging properly and as intended. (Passive interfaces are at R6 and R8's fa0/1) respectively.

However there are points and certain behavior which i would like to clarify with gurus here.

Points

1) A router will send the original subnet address (10.1.0.0) and not its classful address (10.0.0.0) if the transmitting/receiving interface belong to the same classful network. Also, the receiving interface will apply its own/current subnet mask onto the network address received.

2) A router will send out the classful network address (10.0.0.0) if the transmitting/receiving interface does not belong to the same classful network as its advertised network. Also, the receiving interface will apply the classful mask onto the network address received.

Q1) Are the 2 points above correct ?

 

Behaviours

a) I notice that If i have Router6 fa0/0 interface's IP to 10.2.0.1/24, the interface will no longer send out any route updates.

b) I changed back R6 fa0/0 interface to 10.2.0.1/16 mask, routes advertisements about 10.1.0.0 network are send out as usual but on R7 fa0/0 interface, i changed the ip to 10.2.0.2/24 - these cause R7 to apply the /24 mask on the 10.1.0.0 network

Q2) it is written in my study material -> "all devices in the network must have the same subnet mask"   - is it referring to a) or b) then for the after effect if devices in the network do not have the same subnet mask.

 

Q3) How true is the sentence above "all devices in the network must have the same subnet mask" ; in my diagram above, i have different class networks (A,B) with different mask /16 and /24 respectively.  If the classful network are different across a router, it will be sending classful network to the adjacent routers and the receiving routers will be applying the classful netmask onto the received route. 
Even if I have the same subnet mask, but different classful network, the subnet mask will not be used, classful network mask will be used instead.

-- so why the need for all devices to have the same subnet mask ?

 

Thank you for your time.

Regards,
Noob

 

 

2 Accepted Solutions

Accepted Solutions

Points 1 and 2, remember i discussed this in one of your previous threads, and had an example there? :-) So yes, the routers will only learn classless subnets if it has the participating interface in the same classful boundry.

Regarding Behaviors

a) it does send out the updates, BUT router 7 knows that its directly connected (maybe you might be able to see it in the rip database?), and since router 6 is in a different classful subnet, it will only see the classful network being advertised.

b) I'm not sure about that one, i'd have to lab it up because what you say, doesn't make sense - you explained it fine, but I don't know why you would see that. Are you sure you didnt get mixed up with the 172 /24 network?

Q2 and Q3) networks do not have to have the same netmask, it's just silly to say this (maybe were not reading or understanding this in context?). You've summarized and i've explained the same, and it is the way it works - (should work) !

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

View solution in original post

Noob

 

I will start my explanation with the observation that Classful Routing and protocols like RIP (especially RIPv1) were developed in the very early days of the development of TCP/IP protocol suite and were pretty simple and not so sophisticated. As IP networks grew larger and more complex some of the assumptions and rules developed for Classful Routing became too restrictive and routing evolved to Classless Routing and protocols like OSPF and EIGRP were developed which were much more flexible and more sophisticated. So what you are encountering are some of the aspects of RIP that seem a bit strange to our modern way of thinking about networking.

 

For example - in Classful Routing they assumed that within a particular network (Class A or Class B or Class C) we could make subnets but that all subnets should be the same size. Having subnets made the network more useful and having them all the same size made it easier to manage.

 

Since RIP assumed that all subnets would be the same size the RIP routing update transmits only the network address and not the subnet mask. (Why waste bandwidth sending the mask since the receiving router would already know how big the subnet was?) 

 

Another assumption was that all networks would be contiguous (which means that from any subnet you can get to every other subnet of that network without going outside of that network). Since a network was contiguous any router within that network needed to know all of the subnets of that network so on router interfaces belonging to that network it advertised individual subnets. But on interfaces not in that network it advertised a summary route for the network.

 

So for Q1 your two points are correct.

 

The behaviors that you note are the result of violating assumptions on which RIP depends. When you configure fa0/0 with /24 and configure fa0/1 with /16 the subnets are the same size. So when RIP is building routing updates to send out fa0/1 it does not advertise the subnet from fa0/0 since that subnet size is not correct according to its principles. When both subnets are the same size then the RIP advertisement does include the subnet.

 

And when you change the size of the subnet on R7 it receives an advertisement for 10.1.0.0 (with no subnet mask) and R7 says since it received an advertisement for a subnet of 10.0.0.0 on an interface whose mask is /24 then obviously the subnet mask for 10.1.0.0 must be /24. The clear implication of this is that R6 considers 10.1.25.50 to be a legitimate address in the subnet and R7 would say that the address is in a subnet that does not exist.

 

So for Q2 it really is both a and b.

 

Q3) The sentence is quite true. But you need to understand that when it says all devices within the network it is talking about the particular Class A or Class B or Class C network. So within 10.0.0.0 all devices must have the same subnet mask. But within 172.16.0.0 a different mask is quite ok - and all devices within 172.16.0.0 must have the same mask.

 

I hope that my explanation has satisfied your final question "so why the need for all devices to have the same subnet mask ?". It is because when devices within the same network do not have the same mask then things break.

 

HTH

 

Rick

HTH

Rick

View solution in original post

10 Replies 10

SJ K
Level 5
Level 5

Bumping thread up.

 

Anybody ;)

 

Thanks.

Points 1 and 2, remember i discussed this in one of your previous threads, and had an example there? :-) So yes, the routers will only learn classless subnets if it has the participating interface in the same classful boundry.

Regarding Behaviors

a) it does send out the updates, BUT router 7 knows that its directly connected (maybe you might be able to see it in the rip database?), and since router 6 is in a different classful subnet, it will only see the classful network being advertised.

b) I'm not sure about that one, i'd have to lab it up because what you say, doesn't make sense - you explained it fine, but I don't know why you would see that. Are you sure you didnt get mixed up with the 172 /24 network?

Q2 and Q3) networks do not have to have the same netmask, it's just silly to say this (maybe were not reading or understanding this in context?). You've summarized and i've explained the same, and it is the way it works - (should work) !

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

Hi Bilal,

 

Yeap. I remember the previous threads, but i have gone far after that for my ICDN1 exams and now having pass it, i am coming back to make sure i understand the topics. (don't want to be someone who pass exam without knowing the actual stuff) and thank you for your replies.

 

For behaviour a) Let me clarify again because i guess i am confusing you.

on R6 fa0/1 - 10.1.0.2/16 network

on R6 fa0/0 - 10.2.0.1/24 network (i have purposely set it to /24)

on R7 fa0/0 - 10.2.0.2/16 network

 

Reason for the setting above is because i wanted to find out the meaning of "all devices in the network must have the same subnet mask", so i purposely set 2 different mask on 2 interfaces in the same router that belong to the same classful network. - and it can't worked (advertisement ain't send out of R6 fa0/0)

 

For behaviour b) i set back R6 fa0/0 to 10.2.0.1/16 network  and routes advertisement are send out as usual. but on the adjacent interface of R7 fa0/0, i change to 10.2.0.2/24 -> this is to prove that even though R6 and R7 has the same classful network and the route advertisement of 10.1.0.0 aint summarized,  R7 will still apply its own mask onto the route it received

 

Regards,
Noob

 

Noob

 

I will start my explanation with the observation that Classful Routing and protocols like RIP (especially RIPv1) were developed in the very early days of the development of TCP/IP protocol suite and were pretty simple and not so sophisticated. As IP networks grew larger and more complex some of the assumptions and rules developed for Classful Routing became too restrictive and routing evolved to Classless Routing and protocols like OSPF and EIGRP were developed which were much more flexible and more sophisticated. So what you are encountering are some of the aspects of RIP that seem a bit strange to our modern way of thinking about networking.

 

For example - in Classful Routing they assumed that within a particular network (Class A or Class B or Class C) we could make subnets but that all subnets should be the same size. Having subnets made the network more useful and having them all the same size made it easier to manage.

 

Since RIP assumed that all subnets would be the same size the RIP routing update transmits only the network address and not the subnet mask. (Why waste bandwidth sending the mask since the receiving router would already know how big the subnet was?) 

 

Another assumption was that all networks would be contiguous (which means that from any subnet you can get to every other subnet of that network without going outside of that network). Since a network was contiguous any router within that network needed to know all of the subnets of that network so on router interfaces belonging to that network it advertised individual subnets. But on interfaces not in that network it advertised a summary route for the network.

 

So for Q1 your two points are correct.

 

The behaviors that you note are the result of violating assumptions on which RIP depends. When you configure fa0/0 with /24 and configure fa0/1 with /16 the subnets are the same size. So when RIP is building routing updates to send out fa0/1 it does not advertise the subnet from fa0/0 since that subnet size is not correct according to its principles. When both subnets are the same size then the RIP advertisement does include the subnet.

 

And when you change the size of the subnet on R7 it receives an advertisement for 10.1.0.0 (with no subnet mask) and R7 says since it received an advertisement for a subnet of 10.0.0.0 on an interface whose mask is /24 then obviously the subnet mask for 10.1.0.0 must be /24. The clear implication of this is that R6 considers 10.1.25.50 to be a legitimate address in the subnet and R7 would say that the address is in a subnet that does not exist.

 

So for Q2 it really is both a and b.

 

Q3) The sentence is quite true. But you need to understand that when it says all devices within the network it is talking about the particular Class A or Class B or Class C network. So within 10.0.0.0 all devices must have the same subnet mask. But within 172.16.0.0 a different mask is quite ok - and all devices within 172.16.0.0 must have the same mask.

 

I hope that my explanation has satisfied your final question "so why the need for all devices to have the same subnet mask ?". It is because when devices within the same network do not have the same mask then things break.

 

HTH

 

Rick

HTH

Rick

Hi Rick,

 

1st of all - Thank you, and. thank you!.  It just amaze me that you can understand and dissect my questions pieces by pieces; not only that, your replies had hit the nail spot-on on actually the concerns i have for the questions i raised.  Really appreciate your help, really..

Back to the topic!

The behaviors that you note are the result of violating assumptions on which RIP depends. When you configure fa0/0 with /24 and configure fa0/1 with /16 the subnets are the same size. So when RIP is building routing updates to send out fa0/1 it does not advertise the subnet from fa0/0 since that subnet size is not correct according to its principles. When both subnets are the same size then the RIP advertisement does include the subnet.

q1) I am confused on the portion in bold.
How are they of the same size ? They do not overlap one another as well

10.1.0.0/16
10.1.0.0 - 10.1.255.255

10.2.0.0/24
10.2.0.0 - 10.2.0.255

 

q1.5) can i also confirm that this behavior is also the same in actual devices (as i am using PT)..

--------------------------------------------------------------------------------------------------

The sentence is quite true. But you need to understand that when it says all devices within the network it is talking about the particular Class A or Class B or Class C network. So within 10.0.0.0 all devices must have the same subnet mask. But within 172.16.0.0 a different mask is quite ok - and all devices within 172.16.0.0 must have the same mask.

q2) How about if the devices belonging in the same classful network are in a non-contiguous network, the above (having the same mask) will not apply already - am i right ? because some of the networks will be summarized.

------------------------------------------------------------------------------------------------------------------

 

q3) Lastly, on contiguous and non-contiguous network ( i have done my homework and see replies from you dating 8 years back ! salute!) but i want to double confirm with you again.

 

a) 1st of all, does contiguous network need to have contiguous addressing

10.2.0.0/16 <----> 10.3.0.0/16 <----> 10.4.0.0/16  [My answer is no]

 

b) does contiguous network need to be in sequence

10.0.0.0/16 <---> 10.5.0.0/16 <----> 10.2.0.0/16  [My answer is no]

 

c) does contiguous network need to have the same subnet mask

10.2.0.0/24 <----> 10.1.0.0/16 <---> 10.3.0.0/28   [My answer is no]

 

A network is contiguous if a subnet in a major network does not need to go through another major network to reach another subnet (of the same major network)

E.G. subnet 1 and 2 (belong to major network X)
subnet 3 (belong to major network Y)

 

If subnet 1 can reach 2 without going through 3, then it is contiguous

 

Regards,
Noob

 

Noob

 

First let me thank you for the kind words. The skills that I apply as a consultant working in a customer network where I strive to listen carefully to understand not just what they are saying but what is the underlying issue, these I try to bring to the forum also. I am glad that you appreciate this.

 

Then let me apologize for a mistake in my post in which a significant word was omitted. When I said  " the subnets are the same size" I really meant to say " the subnets are not the same size". So it is well that you questioned what I said.

 

As for q2 if the network is discontiguous it raises several issues and if the routing protocol is RIP then several things will be broken (and if the masks are different it may just add to the difficulty). Let us consider a small example. Think about a situation  where we have R1, R2, and R3 connected to make a small cloud and assume that on those routers we have subnets 10.1.0.0/16, 10.2.0.0/16, 10.3.0.0/16, 10.4.0.0/16, 10.5.0.0/16, and 10.6.0.0/16. Assume that R2 has a connection to R4 and that there is another small cloud with R4, R5, and R6. In the second small cloud we have subnets 10.10.0.0/16, 10.11.0.0/16, 10.12.0.0/16, 10.13.0.0/16, 10.14.0.0/16, 10.15.0.0/16, and 10.16.0.0/16. And assume that the connection between R2 and R4 is 192.168.1.0. So we have created a discontiguous network where to get from the lower cloud to the upper cloud you must go through 192.168.1.0.

 

Now if we look in the lower cloud we find that each of the 3 routers now knows about 6 subnets of 10.0.0.0 (some of the subnets are connected and some are learned by RIP). Let us focus on R2 in which the routing table will include 6 subnets of 10.0.0.0 and will include 192.168.1.0. RIP is running on both interfaces and what will it advertise out the 192.168.1.0 interface? It will advertise just 10.0.0.0. (note that it does not advertise any subnets of 10 because as it is going out over another network there is no need for the other network to be concerned about individual subnets of 10, it should be sufficient that if 192.168.1.0 wants to get to network 10 it can route through R2. this is the automatic summarization that is part of RIP).

 

Now let us think about the routing table of R4. It will have the 6 subnets of the upper cloud and it will have 192.168.1.0. It receives the RIP advertisement from R2 which advertises 10.0.0.0. R4 understands the summary route since it is learning it over an interface in 192.168.1.0 and assumes that the mask should be /8. And R4 says "I do not need this advertisement about 10.0.0.0/8 because I am connected in network 10 and I already have more detailed information about network 10.

 

So in this example no router in the lower cloud can reach any of the subnets in the upper cloud and no router in the upper cloud can reach any of the subnets in the lower cloud. And the problem has nothing to do with whether the subnet masks are the same or are different.

 

q3) a) Does not need contiguous addressing.

q3) b) Does not need in sequence

q3)c) Does need the same subnet mask within the same major network.

 

HTH

 

Rick 

HTH

Rick

Hi Rick,

 

Thanks for the marvelous example. Yeap in that case, both network behind R2 and R4 cant get to each other even if they are from the same major network because they are directly connected to network 10 as well and will not accept each other 10.0.0.0/8 advertisement. Spot on. Thanks.

 

Just 2 clarifications -> in your 1st reply to the thread, you mentioned ->

 

Another assumption was that all networks would be contiguous (which means that from any subnet you can get to every other subnet of that network without going outside of that network). Since a network was contiguous any router within that network needed to know all of the subnets of that network so on router interfaces belonging to that network it advertised individual subnets. But on interfaces not in that network it advertised a summary route for the network

 

q1) Why does a router need to know all the subnets of the network if it is contiguous;

Consider this scenario below
Router A <-- 10.1.0.0/16 <---> Router B <---> Rest of contiguous 10.x.x.x/16 network)

If i am Router A, i can just pass whatever traffic to 10.x.0.0/16 network out to Router B, I do not need to know all the subnets , isn't it ?  (but of course in actual implementation i know B will advertisement all the 10.x.0.0/16 subnets over)

In fact, how does the router know if a network is really contiguous or not ?

==========================================================

 

c) does contiguous network need to have the same subnet mask
10.2.0.0/24 <----> 10.1.0.0/16 <---> 10.3.0.0/28 

Does need the same subnet mask within the same major network.

 

q2) A contiguous network need to have the same subnet masks for RIP to work, but it is still a contiguous network even if the subnet masks are different right ?  or a contiguous network must have the same subnet mask (RIP aside)

 

Hope you have a wonderful weekend hope to hear from you soon.

 

Best Regards,
Noob

Noob

 

q1) there are two parts to this question. The first part is more obvious and is about why the router needs to know ALL of the subnets. There are several factors each of which point to this requirement. Probably most important consideration is how does a router choose which interface to forward a packet? In your example Router A is easy since it only has one interface to choose from. But it is pretty rare in implementing a routing protocol that a router is running the protocol on only a single interface. The routing protocol needs to be able to handle the situation where a router is running the protocol on multiple interfaces. So the routing protocol must have information on every subnet so that the router can decide whether to use fa0/0 or fa0/1. If a particular subnet is not in the routing table then how does the router know which interface to use? Another thought about your example is whether Router A needs to run RIP? Could Router A just have a static default route configured and not need the routing protocol?

 

The second part q1) is quite interesting and asks how does the router know whether the network is contiguous or not. And the answer is that the router can not know for sure whether the network is contiguous or not. The router can not know for sure if the network is contiguous. The router can only process based on the information that it has and to assume that its information is complete. If the information is not complete (the network is not contiguous) then there was a bad design or there was a flaw in implementation, or a link that should have connected the parts has gone down. In any case when a classful network is not contiguous then the network routing is broken - but the router may not be aware of the problem.

 

I am not sure what to say about q2) The requirement about being contiguous is not related to the requirement about having the same size subnet masks. Both of these are requirements for classful routing protocols. But these requirements are independent of each other.

 

Or to say it in a different way - it is certainly possible to have a contiguous network where the subnet size is not the same. That is what you did in your original post where part of network 10 used /16 while some used /24. And what you found is that this creates problems for the routing protocol. So for the routing protocol to function correctly both requirements (contiguous, and same subnet mask) must be satisfied.

 

HTH

 

Rick 

HTH

Rick

Thanks Rick for your perfect answers.  I rest my case. :p)

 

Regards,
Noob

iMedxSGower
Level 1
Level 1

The term "network" is a little different, as applied by Cisco, than as used by, say, Microsoft.  Every interface on a router connects to a different network, and the router's function is to route the traffic between networks.

In your sample diagram, the connection from Router6 to Router7 is a network.   The connection from Router7 to Router8 is a *separate* network.  And the connection from Router6 to the switch2 (and downstream to the endpoints) is still another network.  Router8 to Switch3 is, you guessed it, *another* network.

The FA0/0 on Router6 and FA0/0 on Router7 would have to use the same subnet and mask, and FA0/1 on Router7 and FA0/0 on Router8 would likewise have to use the same subnet and mask.  NOTE: These do not have to match each other.  The subnet between 6 and 7 might be, say, 172.16.110.0/30, making the endpoints 172.16.110.1 and 172.16.110.2, respectively.  The subnet between 7 and 8 may be 172.16.110.4/30, providing the endpoints of 172.16.110.5, and 172.16.110.6; These are separate *networks*, as defined by Cisco.  While they use the same mask, they are different subnets.  Meanwhile, FA0/1 on Router6 could easily use the 10.1.0.0/16 of your example...because its *another* network.  FA0/1 on Router 8 to Switch 3 could use the specified addressing as well, though in practice, an enterprise would probably re-IP that section to match the other, to ease administration and record-keeping. 

 

Review Cisco Networking for a $25 gift card