03-21-2015 12:03 AM - edited 03-07-2019 11:11 PM
Hi all,
I came across this term in my old textbook
"If a router running RIP has a subnet mask of a certain value, it assumes that all interfaces within the classful address space have the same subnet mask. This is called classful routing)"
I understand the concept of network/host , classful network, and subnetting, I also understand the concept of classless network and VLSM. But I have never use a router before.
Q1) In the sentence above, does it means that there is only 1 parameter/place in the router to set the overall subnet masks for all the interfaces in router that is running in RIP mode ?
Q2) How about in router running RIPv2 ? How would it be like ? For each interface, I am able to set its subnet mask of variable length to represent the network that the interface is connected ?
Would appreciate if someone gurus here can show me an example ?
Thanks.
Regards,
Noob
03-21-2015 02:54 AM
RIPv1 will not send the subnet mask of the routes in the RIP advertisements. So the update receiving router assumes the subnet mask of the interface on which the update is received.
R1 <-> (/16 mask) R2
Imagine R2 has got a /16 subnet mask on the interface which connects to R1.
For example, when R1 has got a 10.1.1.0/24 route, R2 will assume that R1 has got 10.1.0.0/16
R1's 172.16.17.0/25 will be assumed as 172.16.0.0/16 by R2. If R2 had subnet mask of /25 then it would have assumed the received route as 172.16.17.0/25 only.
R1's 192.168.1.0/30 will be assumed as 192.168.1.0/16 by R2, with a /16 mask on R2 interface.
All these will happen if R1 is turned off with auto-summarization. If R1 is enabled with auto-summarization, then R1 will auto-summarize at classful boundary.
RIPv2 on the other hand is capable of sending subnet mask of the route along with the update,provide you turn off auto-summary.
CF
03-21-2015 11:37 AM
Hi Cf,
Thanks for reverting.
Do you mean that e.g. if R1 has 4 interfaces to 4 different networks
network1 on eth0/1 = 10.1.1.0/24
network2 on eth0/2 = 172.16.17.0/25
network3 on eth0/3 = 192.168.1.0/30
network 4 on eth0/4 (connected to R2 eth0/4) = 223.121.0.0/16
When R1 send its routing information via RIPv1 to R2 through eth0/4, R2 will assume that all the 3 networks (1,2,3) are having /16 subnet mask ?
Am I right ?
Regards,
Noob
03-21-2015 12:32 PM
If R2 has no interfaces for any of those subnets it assumes a classful mask.
If R2 has any interfaces for those subnets it will assume the subnet mask that is on the interface.
With RIP (not version 2) you cannot turn off auto summarisation because it is classful ie. it automatically summarises between major networks and you can't stop it doing that.
It is all done from the perspective of the router receiving the routes. So -
R1 sends a route advertisement for 172.16.5.0 from R2.
There is no subnet mask sent with RIP. If R2 has an interface with a 172.16.x.x IP and a subnet mask of 255.255.255.0 it will assume the subnet mask of 172.16.5.0 is also 255.255.255.0.
If it doesn't have an interface with a 172.16.x.x IP then it will assume a classful mask ie. 255.255.0.0.
That is why with RIP you cannot use VLSM, all subnets of a major network must use the same subnet mask.
Jon
03-21-2015 01:09 PM
Hi Jon,
Thanks for replying.
You mentioned the following below
"If R2 has any interfaces for those subnets it will assume the subnet mask that is on the interface.
There is no subnet mask sent with RIP. If R2 has an interface with a 172.16.x.x IP and a subnet mask of 255.255.255.0 it will assume the subnet mask of 172.16.5.0 is also 255.255.255.0."
When you mention "If R2 has an interface with 172.16.x.x IP", does
a) the interface need to be connected to the R1 or
b) the interface just need to have the same IP range (172.16.x.x) as the advertise route (172.16.5.0)
Regards,
Noob
03-21-2015 01:11 PM
No it doesn't need to be the connected interface.
It can be any interface on the router.
Jon
03-21-2015 01:28 PM
Hi Jon,
In the example below, how will routerB reacts when it receive the routing advertisement of network a,b,c,d from routerA through the connected interface as shown below
Regards,
Noob
03-21-2015 02:12 PM
On router B -
a) 192.168.3.0 255.255.255.0
b) is not advertised because 172.16.5.0 is using a 255.255.255.252 mask
c) 172.17.0.0 255.255.0.0
d) is not advertised because router B is also in that subnet
Jon
03-21-2015 02:24 PM
Hi Jon,
Thanks for the reply.
Why isn't B advertise by router A ? just because 172.16.5.0 is using a 255.255.255.252 mask ?
Regards,
Noob
03-22-2015 12:07 AM
Hi,
It all depend if you have turned off turned on the auto-summarization.
With auto-summarization ON, this will be the result:
a) 192.168.3.0 255.255.255.0
b) 172.16.8.0 255.255.0.0
c) 172.17.0.0 255.255.0.0
d) is not advertised because router B is also in that subnet
With auto-summarization OFF, this will be the result:
a) 192.168.3.0 255.255.255.252
b) 172.16.5.0 255.255.255.252
c) 172.17.33.0 255.255.255.252
d) is not advertised because router B is also in that subnet
All the route will assume the interface subnet mask of R2's receiving interface which is /30
CF
03-22-2015 12:08 AM
Ignore previous post. I will have to re-test it again! :(
CF
03-22-2015 06:11 AM
CF
Just to clarify.
You cannot turn auto summary on or off with RIP (not version 2).
You can configure it but it has no effect because there are no subnet masks passed with the route update.
Jon
03-24-2015 10:53 AM
Hi Guys,
Due to the workload I am having, I think i will have to re-visit this thread over the weekend.
Please give me sometime to digest, research and think it over.
Thanks!
Regards,
Noob
03-22-2015 01:15 AM
Hi Friends,
I have been doing some testing with RIPv1 and I found something strange!
I have made simple config: R1 is connected to R2 thrugh fa0/0 interface
R1#sh run int fa0/0 | i ip
ip address 172.16.1.1 255.255.255.0
R1#sh run int lo0 | i ip
ip address 172.16.2.1 255.255.255.0
R1#sh run | sec rip
router rip
network 1.0.0.0
network 12.0.0.0
network 172.16.0.0
no auto-summary
R1#
R2#sh run int fa0/0 | i ip
ip address 172.16.1.2 255.255.0.0
R2#sh run | sec rip
router rip
network 12.0.0.0
network 172.16.0.0
no auto-summary
The strange thing is R1's loopback interface is shown as a /32 route in R2's routing table.
R2#sh ip route | b Ga
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.0.0/16 is directly connected, FastEthernet0/0
R 172.16.2.0/32 [120/1] via 172.16.1.1, 00:00:15, FastEthernet0/0
R2#
I am wondering how this is happening.
The Wireshark capture shows that R1 is sending the route 172.16.2.0 to R2 without the subnet mask info. This is expected result. Check the attached screenshot. RIPv1 will NOT do classful summary if that route fall into the major subnet through which the route is advertised. In this case 172.16.2.0 is advertised via 172.16.1.0. Both are in 172.16.0.0 major subnet.
I wonder how R2 assumes that to be a /32 route. is it a GNS3 bug?
CF
03-22-2015 06:09 AM
CF
The Wireshark capture shows that R1 is sending the route 172.16.2.0 to R2 without the subnet mask info.
As you can see from my post above I didn't see the same but I was only using debugging with RIP.
In my test the network simply wasn't advertised because, I think, it is part of the same major network.
I tested with loopbacks but not using your specific IPs.
Jon
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide