Subnet Mask Questions

MallowGirl12

Member
Jul 18, 2012
49
0
0
Hi Guys I'm new here and the reason for joining is needing help on Subnet masks questions. The first question is:

The network IP Address allocated to a network administrator is 172.31.0.0/20.Which part is the host and which is subnet mask? How have you been able to identify these parts, and how many subnet masks and hosts per subnet can this network support? Thank You.

:sneaky:
 
Last edited:

mammador

Platinum Member
Dec 9, 2010
2,120
1
76
/20 per IPv4 CIDR means that of the 32 bit address, 20 bits comprise the network and 12 bits comprise the host. This in general would be a fairly large subnet, a lot more than a /24 (253 nodes).

I cannot count well in binary, but the subnet mask would be somewhere in the 3rd octet. Something like 255.255.247.0
 

ScottMac

Moderator<br>Networking<br>Elite member
Mar 19, 2001
5,471
2
0
Hi Guys I'm new here and the reason for joining is needing help on Subnet masks questions. The first question is:

The network IP Address allocated to a network administrator is 172.31.0.0/20.Which part is the host and which part is the host and which is subnet mask? How have you been able to identify these parts, and how many subnet masks and hosts per subnet can this network support? Thank You.

:sneaky:

Homework?

In the good old days (Class A, B, C, D, and E addresses), a172.16.0.0 address would have a natural "class" mask of /16 (Class B).

On the Cisco tests, a /20 mask on a Class B address would give you a "subnet" mask of four bits, added to the natural mask of sixteen bits (20 network bits total). The remaining 12 bits are "host" bits, which are available for further subnetting.

How you subnet the remaining 12 bits depends on what host count and network/subnetwork count you have to satisfy.

Using CIDR / classless notation you can hack and slash the remaining host bits any way you want, as long as they don't overlap.
 

imagoon

Diamond Member
Feb 19, 2003
5,199
0
0
/20 per IPv4 CIDR means that of the 32 bit address, 20 bits comprise the network and 12 bits comprise the host. This in general would be a fairly large subnet, a lot more than a /24 (253 nodes).

I cannot count well in binary, but the subnet mask would be somewhere in the 3rd octet. Something like 255.255.247.0

Protip: Except for "255" subnet masks are never an odd number. /20 is 255.255.240.0

Of course the original question (which sounds like homework) is ambiguous. Classed / Classless will give you 2 different results.
 

imagoon

Diamond Member
Feb 19, 2003
5,199
0
0
Unless they're inverse masks.

Then the rule is inversed!

Well not exactly. The only even inversed subnet mask is 0.0.0.0 however the rule works more like this: No octet of an inversed mask will be even except 0.
 

MallowGirl12

Member
Jul 18, 2012
49
0
0
So what Mammadom and ScottMac said is true?? whats the best way of learning about Subnet Masks??
 
Last edited:

imagoon

Diamond Member
Feb 19, 2003
5,199
0
0
Ciscopress CCNA books have a fantastic "basics of IP." I am sure if I look there is some basics on the web also.
 

alkemyst

No Lifer
Feb 13, 2001
83,769
19
81
The subnet mask would look like this in binary.

00000000000011111111111111111111

With masks you will never have another "0" once the mask ("1") starts.

Cisco.com under CCNA training has a lot of resourses.

www.1examamonth.com may have free videos as well.
 

drebo

Diamond Member
Feb 24, 2006
7,034
1
81
Then the rule is inversed!

Well not exactly. The only even inversed subnet mask is 0.0.0.0 however the rule works more like this: No octet of an inversed mask will be even except 0.

That's not true. There's no rule that says wildcard masks have to be contiguous. You could build discontiguous masks to, say, match every even numbered address or every odd numbered address.

Weird, and not all that practical...but certainly possible. :)
 

Capt.OBViOUS

Member
Jul 13, 2012
67
0
66
Hi Guys I'm new here and the reason for joining is needing help on Subnet masks questions. The first question is:

The network IP Address allocated to a network administrator is 172.31.0.0/20.Which part is the host and which is subnet mask? How have you been able to identify these parts, and how many subnet masks and hosts per subnet can this network support? Thank You.

:sneaky:
ok,im not an expert in this but i will tell you what i know.(obviously)

ipv4 = 32 bits =4 octects
ie (8 nos).(8 nos).(8 nos).(8 nos).
class A ip will start with any no: rangin from 1 - 126.class b(128-191 ) and class C(192-223)
your ip is 172.30.0.0/20(obviously class b)
where /20 is the corresponding binary.
Your ip in binary will be

11111111.11111111.11110000.00000000
where the last '12' zeros are host bits and the '4' ones before the host bits are subnet bits./20 is the total no of ones.
=
255.255.240.0
block size=16 and no of subnets =2^4=16
ie youll get 16 subnets starting from 172.30.0.0 to 172.30.255.255.:)
 

MallowGirl12

Member
Jul 18, 2012
49
0
0
Thank u 2 everyone for the help, understanding it now :) more help will be appreciated, ScottMac, the website link u gave me i checked, its very useful, although most videos do not work when accepting the agreement, but its a good link :) Capt Obivous, ur way of explaining was useful & easy to understand :D I've checked also if in videos the way u guys explained is right/not, so therefore al the explaining looks correct :) Cheers everyone :D
 
Last edited:

ScottMac

Moderator<br>Networking<br>Elite member
Mar 19, 2001
5,471
2
0
MAlowGirl:
What you will find, over a period of study, is that there are many ways to do the subnetting calculations, many of which are "shortcuts."

While I am all for doing things more efficiently, it will be ultimately to your benefit if you learn things "the long way" to drive home your understanding of how the addressing systems work. It's also very helpful to understand the various number systems (binary, octal, hex) so you can convert (in your head) between them ... different components or systems use different number bases.

At least at the beginning, write out the address in binary, write the mask in binary, and use that to figure out nets, subnets, hosts, etc. Seeing it in a bit-for-bit representation often helps to capture the concepts.

Once you're solid on WHY things are done the way they are doner, some of the "shortcuts" will make a lot more sense, and become easier to apply.

Good Luck
 

alkemyst

No Lifer
Feb 13, 2001
83,769
19
81
I agree learning the math is very important and how they come to be.

Day to day I never really do 'math' though on it. I just build up from /24 or down from it. IMHO if you can double numbers in your head it's the fastest way.