04-04-2016 11:14 PM - edited 03-08-2019 05:13 AM
hello,
I'm doing an exercise to configure RIPv2.
According to the instruction I need to advertise the networks that are directly connected to R1. But when I take the IP 172.30.30.1 /24 it gives me the network address 172.30.30.0 / 24 not 172.30.0.0 ! Isn't RIPv2 a classless routing protocol that supports VLSM and CIDR ??? It looks to me that the instruction is configuring the network address in a classful manner ...
can anyone please clarify ?
Many thanks
Adam
04-04-2016 11:57 PM
Try adding:
router rip
no auto-summary
04-05-2016 12:54 AM
Hi Adam,
If you are referring to the network command then in RIP configuration, this command does not support the specification of a mask (subnet or wildcard), and every address will be automatically converted to its classful counterpart.
I suppose that this is because of backward compatibility with RIPv1 configuration. RIPv1 in Cisco routers was always configured to run over entire classful networks. RIPv2 is no longer classful - it is classless, but it uses the same syntax of the network commands to allow the configuration to be used without modification in IOSes that support RIPv1 only (before 11.1). These IOSes would not recognize the mask argument in a network command and would reject the configuration.
It is very important to stress that the network command in any routing protocol (RIP, EIGRP, OSPF) does not specify an exact network/netmask to advertise, but rather, it defines a range of addresses. If any local interface's own IP address falls into the ranges specified by network commands, that interface will be added to the routing protocol with its real network/netmask. An interface 10.1.1.1/30 can be equivalently added to a routing protocol such as EIGRP using any of the following commands (just a brief set of examples, not an exhaustive list):
network 10.1.1.1 0.0.0.0
network 10.1.1.0 0.0.0.3
network 10.1.1.0 0.0.0.255
network 10.0.0.0 0.255.255.255
because each one of them defines a range of addresses that covers 10.1.1.1.
In RIP, the wildcard mask argument is not supported for network, and so 10.1.1.1 would automatically be converted to 10.0.0.0 (meaning 10.0.0.0/8 - the corresponding classful network), and so all interfaces whose IP address is 10.x.x.x would be added to RIP - but keep in mind that they would be advertised as they truly are, not as 10.0.0.0/8.
Best regards,
Peter
04-05-2016 02:33 AM
Hello Peter,
Thank you for your explanation. I was reading on NetACAD "If a subnet address is entered, the IOS automatically converts it to the classful network address. Remember RIPv1 is a classful routing protocol for IPv4. For example, entering the network 192.168.1.32 command would automatically be converted to network 192.168.1.0 in the running configuration file. The IOS does not give an error message, but instead corrects the input and enters the classful network address."
I was assuming the above lines apply to RIP not RIPv2.
I've configured RIPv2 to advertise the sub-network 172.30.10.0 (which is a directly connected network on R1) and in fact when running show ip protocols i can see the classfull presentation of network 172.30.0.0
But wouldn't that mean that right now the router would include the 172.30.0.0 network in it's updates ? So wouldn't it mean that it's behaving like clasfful routing protocol ? wouldn't it also create problems in discontinuous networks ?
Best Regards
Adam
04-05-2016 09:33 AM
Hi Adam,
First of all, how a protocol is configured has no influence on whether the protocol itself is classful or classless. You have to keep this in mind.
A classful routing protocol has the following characteristic traits:
RIPv2, being a classless protocol, does not have most of these traits - it carries netmasks with each advertised network so it does not need to guess them, it does not assume anything about the ownership of networks beyond those directly configured on a router, it does not care about the way an IP space is split into subnets as long as the subnets are unique and non-overlapping (VLSM). It can be configured to perform automatic summarization but this feature can be switched off, and in fact, in recent IOSes, it is off by default.
I was reading on NetACAD "If a subnet address is entered, the IOS automatically converts it to the classful network address. Remember RIPv1 is a classful routing protocol for IPv4. For example, entering the network 192.168.1.32 command would automatically be converted to network 192.168.1.0 in the running configuration file. The IOS does not give an error message, but instead corrects the input and enters the classful network address."
Unfortunately, that statement confuses the style of configuration with the style of operation - but these two are largely independent. It tries to justify an extremely poor and illogical design choice of IOS software engineers who first implemented the RIPv1 and the network command in particular by explaining that RIPv1 is classful, but that has nothing to do with it.
The network command even in RIPv1 could have been implemented from the very beginning to allow using netmasks to allow precise choice about which directly connected networks you want to be added to RIP. As I explained already, and I am stressing it again, the network command does not specify the network address that is going to be advertised in RIP. The network command is used to select interfaces and their directly connected networks to be added to RIP. What RIP (including RIPv1) will advertise is the true network from the particular interface added to RIP (the automatic summarization being an exception here). Whoever decided that the RIP network command is going to convert every network address to its classful counterpart made a poor, confusing and badly designed choice. It could have been done differently, and it should have been done differently - without having any impact on whether RIPv1 is classful and RIPv2 is classless.
I've configured RIPv2 to advertise the sub-network 172.30.10.0 (which is a directly connected network on R1) and in fact when running show ip protocols i can see the classfull presentation of network 172.30.0.0
Yes - the show ip protocols shows you a list of network commands in your RIP configuration. But beware, it does not show you what exact network is being advertised in RIP. Your configuration of network 172.30.0.0 simply means that every interface on your router whose own IP address is of the 172.30.x.x form will be added to RIP and will be advertised exactly as configured on the interface.
But wouldn't that mean that right now the router would include the 172.30.0.0 network in it's updates ?
No. There is no direct relation between the addresses present in network commands, and addresses advertised in RIP. The network commands select interfaces over which RIP operates. RIP will subsequently advertise true networks/netmasks from all interfaces added to it.
The confusion caused by the obscureness of the network command is immense. I am fighting it each year when I teach networking, even in CCNP courses.
As always, feel welcome to ask further!
Best regards,
Peter
04-07-2016 08:12 AM
Hello Peter,
Please excuse for getting so late but I had to find some spear time to read carefully what you wrote + to do some tests.
First I did a test with RIPv1.
the topology:
The configuration looks like this:
R1#sh ip protocols
Routing Protocol is "rip"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 0 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Redistributing: rip
Default version control: send version 1, receive any version
Interface Send Recv Triggered RIP Key-chain
Serial2/2 1 1 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
10.0.0.0
172.30.0.0
Passive Interface(s):
GigabitEthernet1/0
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 120)
R2#sh ip protocols
Routing Protocol is "rip"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 0 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Redistributing: rip
Default version control: send version 1, receive any version
Interface Send Recv Triggered RIP Key-chain
Serial4/0 1 1 2
Serial4/3 1 1 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
10.0.0.0
Passive Interface(s):
GigabitEthernet1/0
Routing Information Sources:
Gateway Distance Last Update
10.1.1.1 120 00:00:02
Distance: (default is 120)
In the packet coming from R2 to R1 I can see that it contains the subnet network of the classful A Network address 10.0.0.0:
I can see the same on the R1 router:
Here’s the routing table of R1:
172.30.0.0/24 is subnetted, 1 subnets
C 172.30.10.0 is directly connected, GigabitEthernet1/0
10.0.0.0/30 is subnetted, 2 subnets
R 10.2.2.0 [120/1] via 10.1.1.2, 00:00:18, Serial2/2
C 10.1.1.0 is directly connected, Serial2/2
Now let’s look at R2.
Packet coming from R1 to R2 contains …….the classful B address 172.30.0.0 ……………………………….
R2’s routing table:
R 172.30.0.0/16 [120/1] via 10.1.1.1, 00:00:25, Serial4/0
C 209.165.201.0/24 is directly connected, GigabitEthernet1/0
10.0.0.0/30 is subnetted, 2 subnets
C 10.2.2.0 is directly connected, Serial4/3
C 10.1.1.0 is directly connected, Serial4/0
So if think that your sentence “Whenever a subnet of a classful network N is going to be advertised out an interface that lies in a different classful network M, the entire classful network N will be advertised instead (this is called automatic summarization).” Is explaining why in one case the subnet got installed in routing table and for the other network the classful address. Correct ? If I’m not wrong, then why does it not send the subnet network information, wouldn’t be it enough for the receiving router to look at the first octet to determine the class and to install the classful network ?
So in the first case where R2 was sending an update to R1 about the 10.2.2.0 network , the network 10.2.2.0 and not 10.0.0.0 was advertised in the packet because the outgoing interface on which the route was advertised was in a subnet of the same classful network address, so 10.0.0.0, am I correct ?
NOW RIPv2
R2#sh ip protocols
Routing Protocol is "rip"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 0 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Redistributing: rip
Default version control: send version 2, receive version 2
Interface Send Recv Triggered RIP Key-chain
Serial4/0 2 2
Serial4/3 2 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
10.0.0.0
Passive Interface(s):
GigabitEthernet1/0
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 120)
R1#sh ip protocols
Routing Protocol is "rip"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 0 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Redistributing: rip
Default version control: send version 2, receive version 2
Interface Send Recv Triggered RIP Key-chain
Serial2/2 2 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
10.0.0.0
172.30.0.0
Passive Interface(s):
GigabitEthernet1/0
Routing Information Sources:
Gateway Distance Last Update
10.1.1.2 120 00:00:05
Distance: (default is 120)
AND the results are IDENTICAL like in case of RIPv1. The packets and routing tables are identical. ONLY after running no auto-summary I can see in the packets that the real subnetworks are being advertised and installed in routing tables:
172.30.0.0/24 is subnetted, 1 subnets
R 172.30.10.0 [120/1] via 10.1.1.1, 00:00:06, Serial4/0
C 209.165.201.0/24 is directly connected, GigabitEthernet1/0
10.0.0.0/30 is subnetted, 2 subnets
C 10.2.2.0 is directly connected, Serial4/3
C 10.1.1.0 is directly connected, Serial4/0
172.30.0.0/24 is subnetted, 1 subnets
C 172.30.10.0 is directly connected, GigabitEthernet1/0
10.0.0.0/30 is subnetted, 2 subnets
R 10.2.2.0 [120/1] via 10.1.1.2, 00:00:01, Serial2/2
C 10.1.1.0 is directly connected, Serial2/2
So the results of configuring RIPv1 and RIPv2 with auto-summary enabled equals same routing table entries. This is what I was referring when saying that I behaves identical.
I hope it makes sense.
Peter, I’m really looking forward to your answer.
***EDIT*** I think your sentence from your last post is the answer "What RIP (including RIPv1) will advertise is the true network from the particular interface added to RIP (the automatic summarization being an exception here)." Correct Peter?
also
When automatic summarization has been disabled, RIPv2 no longer summarizes networks to their classful address at boundary routers. RIPv2 now includes all subnets and their appropriate masks in its routing updates. The show ip protocols now states that automatic network summarization is not in effect.
EDIT:
From CISCO documentation:
RIP and IGRP are classful protocols. Whenever RIP advertises a network across a different major net boundary, RIP summarizes the advertised network at the major net boundary."
The network diagram attached above it also an example of discontiguous networks, so per my understanding:
a) with RIPv1 it will cause problems and to avoid them a different routing protocols should be used or configure static touting to enable connectivity.
b) with RIPv2 it will cause same problems as in point a unless we deactivate auto summarization. With auto summary enabled the network will be summarized at boundary routers. Why the hell it's summarizing it anyway when RIPv2 is configured ? Peter you wrote that it's off in the newest IOS release, I'm testing this with 12.4 . . . .
Best Regards
Adam
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