In EIGRP, if you don’t use the
no auto-summary command, the router will assume a classful network address regardless of the wildcard mask you enter.
Once you enter the
no auto-summary command, EIGRP will begin sending the wildcard mask information as well.
As for RIP, version 1 will send classful routing information. In order to send classless routing information, RIP must be configured to use Version 2 AND must include the
no auto-summary command.
Now the difference between EIGRP and RIP is that when you configure the network command for RIP, you don’t input a wildcard mask. It won’t let you. Take a look at this output:
Enter configuration commands, one per line. End with CNTL/Z.
Router(config-router)#network 172.16.0.0 ?
The only option it gives you after the network address is
So in RIP, if you configure version 2 and
no auto-summary, the router will use the subnet mask configured on the interface associated with the network. So for the example you used, if you have two interfaces with IP addresses 172.16.1.1/24 and 172.16.2.1/24 respectively and you configure those networks using RIP, it will use the subnet masks (/24) configured on the interfaces themselves.
I hope this has been helpful!