• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

a newbie needs help with subnetting.

puribong

Member
hi...
I started to taking a network course and my teacher game me a homework. I paid attention in class as much as possible but I still don't know how to do with the homework. I hoped that maybe a somebody can help me with my homework.
oh well here is one of the questions from homework. I think I will able to do other questions in same kind if I can figure this question out.

Requried Number of Physical Segment: 100
Maximum Number of Hosts/Physical Segment: 88000
Network Address: 39.0.0.0

Proposed Custom Subnet Mask: ? I need to figure this out.
Number of subnets supported: ? this one too.
Maximum Number of Host ID per Subnet ? this one too.

as you can see above, I am given first 3 field, and I need to find next 3 field. I know that 39 is Class A and default gateway is 255.0.0.0 but I am stuck there. I don't know what to do from there.. Can somebody who is genius in Networking maybe help me?
Thanks a lot in advance..
 
Well, for an n bit netmask, you get 2^n - 2 usable addresses. Trying some values for n out on the calculator says that n=16 only gets you 65534, so you need n=17 for 131070 hosts. So grab your textbook and work out what a 17-bit netmask looks like in xxx.xxx.xxx.xxx notation. And once you figure that out, it shouldn't be too hard to figure the maximum number of subnets either.
 
REMEMBER: Host bits start from the right, network from the left

You know you're working with a class A network. That means you're losing your first octet to network:

nnnnnnnn.????????.????????.????????

You know you need 88,000 hosts. Well, the only thing near that is, as said before, is 2^17, 131070. That means you need 17 host bits:

nnnnnnnn.???????h.hhhhhhhh.hhhhhhhh

What's with the ?s. Well, we've got network and hosts, so we're missing subnets ...

nnnnnnnn.sssssssh.hhhhhhhh.hhhhhhhh

If you count those Ss and Hs, you'll get 7 and 10. 2^7 = 128 Subnets, each with 2^17 = 131070 Hosts

1 - 39.0.0.0 - 39.1.255.255
2 - 39.2.0.0 - 39.3.255.255
3 - 39.4.0.0 - 39.5.255.255
4 - 39.6.0.0 - 39.7.255.255
...
127 - 39.252.0.0 - 39.253.255.255
128 - 39.254.0.0 - 39.255.255.255

Usually, once you find the correct number of bits to mask off for hosts or subnets, it all falls into place.

~~~~~~~~

However, sometimes they'll tell you something like ... you have a class B network (say 160.32.x.x), and you need 48 subnets. What is the subnet mask and # of hosts per subnet?

The class b tells you that you're losing your first two octets to network:

nnnnnnnn.nnnnnnnn.xxxxxxxx.xxxxxxxx.

You know that you need 48 subnets ... well, the closest thing is 64. 2^n = 64. n=6. Hence, you get 6 subnet bits, and the rest become host bits.

nnnnnnnn.nnnnnnnn.sssssshh.hhhhhhhh
11111111.11111111.11111100.00000000
255...........255...........252...........0

If you count up the Hs, you'll see there are 10. 2^10 = 1024 hosts per subnet.

~~~~~~~~~

This applies to Class C networks, where most people spend their lives because they don't get to work with Class As ;-) ... say you have a class C of 209.12.100.x. You need to slice that up into a bunch of subnets, each with 4 hosts (say it's for DSL or something). The work here is almost done for you already -- you are class c, so you lose three octets to network. You need 4 hosts per subnet. 2^n = 4. n=2. So that gives you 2 host bits. The rest becomes your subnet.

nnnnnnnn.nnnnnnnn.nnnnnnnn.sssssshh

255.255.255.252

6 Ss, 2 Hs ... 2^6 = 64 subnets ... 2^2 = 4 hosts per subnet.

All it boils down to is determining the number of subnet or host bits (whichever it's asking for), and then sticking them in the right place -- network bits on the very beginning, then subnet bits, then host bits.

Yes, I know this is not the most scientifically/mathematically exacting way to do things, but it helps me get past the truckload of confusing ones and zeros ... knowing n is network, s is subnet and h is host always makes it a lot easier for me to follow.

randal
 
Surprisingly, I started doing it that way not because I learned it like that (I was taught the 1s and 0s method), but because I was using Wild Packets IP Subnet Calculator, and it has a thing on there called the "Subnet Bit Map". I glanced at it and it blew me away at how easy it made things -- instead of numerous ones and zeros, you get to work with 3 subsets of smaller letters.

Although I can still do it by ones and zero (which is just the nitty gritty of the letter method), I almost *never* do. Breaking down the subnet into it's three parts just makes things easier.

Oh, and just an FYI for you up-and-coming network guys, most people don't work with anything bigger than a couple class C networks ... at least until you attain Guru status *cough*spidey*cough* and become the network admin for a huge megacorp that has millions of IPs. I don't think I've had to do any supernetting for any job, and where I work now we have over 4,000 IP addresses.

Cheers,
randal
 
Back
Top