I'm going through ICND1 and have come across something I'm not sure about. I see that class A, B, and C networks can be spotted by the first octet number and also by the subnet mask like the following:
Class A: (1 - 126), Subnet = 255.0.0.0
Class B: (128 - 191), Subnet = 255.255.0.0
Class C: (192 - 223), Subnet = 255.255.255.0
If this is true, why do I see examples of a 172.x.x.x address which should be a class B network but has the class C subnet of 255.255.255.0? Which is more concrete in deciding the class? The first octet or the subnet mask?
Class A, B, C are just base (classful) subnets.
You are correct that 172.x.x.x falls into the B classful network space.
But in real life (especially with the Internet growing), we will break them down further to more practical subnet sizes. However, this will not change the original classification (172 is class B).
Where classful addressing will matter a lot, is when we are using routing-protocols (i.e. rip, eigrp, etc). Auto-Summarization (to classful) can become an issue with routing-protocols.
Probably the most common networks you will see (especially in lab topologies) will have a /24 subnet mask.
But this is what you will need to learn for your CCNA exams, interviews, and just basic networking skills.
For example, what is the subnet mask for only 60 clients.....or 600 clients?
Also, learn what the private IP networks are.....and remember that they can also be divided up.
172.16.0.0 - 172.31.255.255 /12
EDIT: I found this article that gives a little history and reason for the changes.
Subnet mask do NOT determine the class of address. As noted by El Tigre, the class of address is determined by the first octet.
You can take any class of address (A, B or C) and use any subnet mask or prefix length you wish. This is the beauty of CIDR and VLSM.
Here is a nice article from Cisco. Be sure to check out RFCs 1518 & 1519 on CIDR as well.
Hope this helps.