# Class A subnetting question (newbie one)

Registered Users Posts: 1 ■□□□□□□□□□
I'm independently studying Cisco with CBT Nuggets. I'm having some issues grasping subnetting when it comes to Class A in one of the reviews.

I'll share a couple of expamples, followed by some questions.

A) 10.25.66.15.4/23

63.24.89.21/18

Why does example A have 15 subnet bits and not 7 subnet bits combining bits of octet 3 and 4? (Because there are only 7 bits in 254, right?)

Why does example B have 10 subnet bits and not 2 subnet bits combining bits of octet 3 and 4? (Because there are only 2 bits in 192 right?)

Last, are these both basically considered Class A because first octet for the network address is lower than 172 (class ?

• Member Posts: 525
You kind of have to learn the classful system (Class A, Class B, Class C), understand it, and then put it on the shelf when you learn classless subnetting (/23, /18, etc). Your first example is technically in the Class A range of addresses but if you're using CIDR, which you are, the class range of the IP address doesn't have any bearing on the actual subnet calculation.
CCIE Security - this one might take a while...
• Member Posts: 183
You kind of have to learn the classful system (Class A, Class B, Class C), understand it, and then put it on the shelf when you learn classless subnetting (/23, /18, etc). Your first example is technically in the Class A range of addresses but if you're using CIDR, which you are, the class range of the IP address doesn't have any bearing on the actual subnet calculation.
Good answer. I will use this moment to reassert my opposition to making people study classful addressing in low-level certification exams. There is definitely relevance for historical perspective, but we haven't been using the classful system for eons. I hate wasting time that could be better spent on other topics.
• Member Posts: 423
First off, you can't have an IP of 10.25.66.15.4/23

Do you mean 10.25.66.154/23?

Maybe I'm misunderstanding your question, but the way I see it is like this...

IP - 10.25.66.154 in Binary...........|0 0 0 0 1 0 1 0|0 0 0 1 1 0 0 1|0 1 0 0 0 0 1 0|1 0 0 1 1 0 1 0
Mask - 255.255.255.254.0 in Binary....|1 1 1 1 1 1 1 1|1 1 1 1 1 1 1 1|1 1 1 1 1 1 1 0|0 0 0 0 0 0 0 0
Logical AND...........................|0 0 0 0 1 0 1 0|0 0 0 1 1 0 0 1|0 1 0 0 0 0 1 0|0 0 0 0 0 0 0 0

From the Logical AND, you get 10.25.66.0: The Network ID

If you count the number of bits in the Mask that are 'set'. 8+8+7=23

With 63.24.89.21/18

IP - 63.24.89.21 in Binary ...........|0 0 1 1 1 1 1 1|0 0 0 1 1 0 0 0|0 1 0 1 1 0 0 1|0 0 0 1 0 1 0 1
Mask - 255.255.255.192.0 in Binary....|1 1 1 1 1 1 1 1|1 1 1 1 1 1 1 1|1 1 0 0 0 0 0 0|0 0 0 0 0 0 0 0
Logical AND...........................|0 0 1 1 1 1 1 1|0 0 0 1 1 0 0 0|0 1 0 0 0 0 0 0|0 0 0 0 0 0 0 0

From the Logical AND, you get 63.24.64.0: The Network ID

If you count the number of bits in the Mask that are 'set'. 8+8+2=18

I'll not confuse this post by going into why the 'Classful' IPs were the way they were, with 'natural' (or 'default') mask bits, but if you want me to, just ask, and I'll be happy to post that also.

Last, are these both basically considered Class A because first octet for the network address is lower than 172 (class ?

Also, here, I believe you you mean 127. Yes, Class A are 1 - 126 (172.16.0.0 – 172.31.255.255 is part of a private address range).

Like I say, maybe I'm misunderstanding your question, but I hope that the above will be of help.
No longer an active member
• Member Posts: 423
ccie14023 wrote: »
Good answer. I will use this moment to reassert my opposition to making people study classful addressing in low-level certification exams. There is definitely relevance for historical perspective, but we haven't been using the classful system for eons. I hate wasting time that could be better spent on other topics.

While I respect your view, I have to disagree it.

To answer a question such as…"How many Subnets does the network address 157.57.91.88/29 provide?"

First, you have to know that this is a 'Class B' IP and therefore uses 16 bits for the Network (standard Mask = /16) and 16 bits for the Nodes, in order to realise that an extra 13 bits have been allocated for the Network; 29-16=13.

2^13 = 8192; the number of Subnetworks that the /29 Mask provides.

How would you work this out if you don't understand 'Classful Addressing'?

Is there an alternative method, one that does not require that you 'know' what a 'Class B' address is and what the implications are?

I'd be interested to know how you would approach and answer the above question.

Thanks.
No longer an active member
• Member Posts: 342
Your example is specific to classful subnetting which doesn't really apply to anything in the real world.

I've never heard of somebody being given an IP and they just have to assume the subnet mask based on class. If a provider gives you a 157.57.91.0/24 address, you don't go back to the provider and say "Wait a minute! You must be mistaken. This is a Class B network so I should be getting 157.57.0.0/16 instead."

Knowing the classes are only good for subnetting exercises done for school or certification studies. But they can also choose to just do away with it. Start every question with "You are allocated an IP of x.x.x.x/x" instead of having students do something that they'll never have to do in the real world.
• Member Posts: 423

I agree, in the real world it's way different. For instance, I'd use a Subnet Calculator rather than pen and paper.

But rj975 is 'studying' and as such will need to understand classful addressing and how to do the math, right?
No longer an active member
• Member Posts: 342
I agree that he should learn it because that is what's currently required by certs/classes. But I think these certs/classes shouldn't put a lot of focus on it. It's as useful as learning about subnet zero and all-ones subnet.

Doing it by pen and paper still applies to the real world.
• Member Posts: 1,722
Sounds like you are being asked to subnet a classful network, which is weird, but whatever. So in this case you'd have 8 network bits, and a variable number of subnet bits and host bits.

In A you have 23 bits for the network + subnet, and 9 (32-23) for the hosts. Because the network is 8 bits (class A), that leaves 15 (23-\8\) for the subnet.

In B it would be 18 - 8 = 10 bits for the subnet.

The good news is that in the real world this is so unlikely to come up, that if it did you'd probably speak to whoever requested it directly to clarify what they mean.
2017 Goals - Something Cisco, Something Linux, Agile PM
• Member Posts: 579 ■■■■□□□□□□
ccie14023 wrote: »
Good answer. I will use this moment to reassert my opposition to making people study classful addressing in low-level certification exams. There is definitely relevance for historical perspective, but we haven't been using the classful system for eons. I hate wasting time that could be better spent on other topics.

As someone who's tried to start studying Cisco a few times but had many false starts this has been one of my biggest stumbling blocks. I cannot apply that knowledge to anything and it lingers as just something to add confusion. In a similar vein I'm sure knowing Token Ring or Frame Relay would be great to supplement the knowledge of a seasoned Engineer. It really does just add a bunch of confusion for us noobs.
• Member Posts: 423
pevangel wrote: »
...

Doing it by pen and paper still applies to the real world.

So, my question still stands: if you don't understand Classful Addressing, and so, by extension, you don't understand what the standard masks /8, /16, /24 mean, how do you work out Subnets on pen and paper?

I can see your point to some degree, but before you can get your head around CIDR notation, surly you need to have an understanding of what a Mask is, what it does and how it works. Also, why the standard masks are the way they are.

I believe that one of the reasons that people have such a hard time with the subject of Subnetting is because they never bothered to learn the basics, i.e the 'zeros' and 'ones' that are at the heart of the matter. Classful Addressing is just one step along that road.
No longer an active member
• Member Posts: 342
Not sure what classful addressing has anything to do with using pen and paper to subnet. You can teach about /8, /16, /24, /18, /10, /31 without neeeding to teach classful addressing.

Do you NEED to understand classful addressing to understand subnet masks? Can you not learn about network bits and host bits without understanding classful addressing.

Why do you call them standard masks? What makes a /23 non-standard? Other than one more network bit and one less host bit, what makes a /24 more special than a /23?
• Member Posts: 423
The term 'standard mask' is not my terminology, but maybe you're more familiar with the terms ‘natural’ or ‘default’ mask? It means the mask that is formed by the nature of the IP Address, and masks the IP Address to one Network (or subnet).

If the most significant bit of the most significant octet of the IP Address is 'set', the default mask is extended by one full octet. This is how a device knows how to assign a Mask based on an IP Address. You can see this at work with CPT; fill in an IP Address on a PC/Config, then press the TAB key on your keyboard. The ‘default’ mask will appear. Ever wondered how this happens? It's based on the most significant bit/s of the most significant octet of the IP Address.

What makes the Masks 'non-standard' or 'more special', is that they're not automatically generated, but manipulated in order to allow the IP protocol to address more or less Networks and/or more or less hosts, by manipulating the Network/Host parts of the IP Address, one bit at a time, by way of the Mask.

The Classful Address issue is only really a terminology issue. It's a way of describing how a Mask of 255.0.0.0 is automatically assigned to an IP Address lower than 128.0.0.0 It could just as easily have been called 'Class One'.

As soon as we get to an IP Address of 128.0.0.0, most significant bit of the most significant octet of the IP Address is 'set' and the automatic (‘natural’ or ‘default’ or 'standard', call it what you will) mask is incremented by one full octet and becomes 255.255.0.0

The same thing happens again when you get to 192; the next most significant bit of the most significant octet of the IP Address is 'set', and the automatic Mask becomes 255.255.255.0

With classful addressing you learn what the address range is for each full octet increment of the natural Mask. That way you only have to remember what the upper and lower limits of each range is, in order to know what the natural Mask is for any given Address in that range.

With that information, it's then relatively easy to extend or retract the mask one bit at a time in order to setup more host on the one Network, or more Networks (Subnets) with less hosts per Network.

I can look at a Class B IP Address with a /18 Mask and know that I have four Networks to play with, because I know that the natural Mask of /16 will address just one Network, but the /18 Mask gives me two more Network Address 'bits': 2^2=4 Networks. I would not know that if I didn't know the IP range of Class B (or /16) Addresses, but just saw an IP of say, 126.16.0.0/18. Without the basic knowledge of the IP Address range, how do I look at that IP Address and 'know' that I've an extra 10 Network 'bits'?

I think that the other thing that confuses, is that people tend to think in terms of 'Networks' and 'Subnetworks'. I don't; to me it's either one, or two, or three, or ten, or however many 'networks'.

Sorry for the lengthy post, but I hope I've made my explanation clear.
No longer an active member