# The &quot;Theory of Subnetting&quot;? 8 replies

Kilobyte

What does the Fox say?

69,060 XP

23rd November 2002

6,468 Posts

#1 8 years ago

A fellow student at the school I have been attending is trying to understand the "theory of subnetting", but does not believe the teacher has taught on that subject. He is trying to become Cisco Certified.

I've been stumbling around through the internetz, and I think I've discovered what this "theory of subnetting" is. In the process I've also discovered that converting to binary is stupid easy, but a time consuming process. Anyway, perhaps our more knowledgeable members (such as Sgt. D. Pilla) could shed some light on this subject.

So a Subnet is 11111111.11111111.11111111.00000000 (255.255.255.0)

Which means that the 0 is a wildcard.

255 = 192 255 = 168 255 = 1 0 = *

An example given was 255.255.240.0 (11111111.11111111.11110000.00000000) 255 = 192 255 = 168 240 = 1 - 15 (1111) 0 = *

But 16 and higher cannot fit because they cannot be expressed as four digit numbers in binary. 11110000 ____1111 = 15 ___10000 = 16, and sixteen does not fit into the four zeroes.

Freyr VIP Member

A2Files Staff

46,876 XP

6th February 2005

4,275 Posts

#2 8 years ago

The theory of subnetting? Eh?

I know networking (I do IT Professionally), but I can't for the life of me understand what your trying to ask. You seem to have morphed to asking questions about what a subnet is to basic binary.

In any case, as you say binary numbers are represented by groups of 4 numbers. When you goto groups of 8, then your adding another order of magnitude.

eg, you move from being 1,2,4,8 to 1,2,4,8,16,32,64,128 not 1,2,4,8,1,2,4,8!

(11111111.11111111.11110000.00000000)

The third set of numbers is not 240. Break down the binary into the figures.

11110000

1+2+4+8 = 15

16 is represented as 00001000

00001111 is 16+34+64+128 = 240

Reading binary doesn't take a moment. Just grab a pen, draw out the columns and put the numbers at the top and then write whatever your binary sequence is in the table and it's just basic addition. It stumps me why people find it difficult. =p

Have I answered what you needed to know?

Kilobyte

What does the Fox say?

69,060 XP

23rd November 2002

6,468 Posts

#3 8 years ago

I guess it depends on how your used to writing binary, "backwards" is the most common way I've seen it written. Conversion Table - Decimal, Hexadecimal, Octal, Binary

Which brings me to my question for this "Theory of Subnetting";

"So 16 is not a valid IP address for the 240 section of a subnet, because the total of binary digits in 16 exceeds the number of zeroes in order in the binary form of 240."

Could that be considered a correct answer? Given that you are unfamiliar with the theory, I don't expect you to confirm the answer.

Again, there is a class that is taught in preparation for Cisco certification, which I have not taken, nor is it part of my current major. I've got 3 days before I can ask anybody at the school.

Freyr VIP Member

A2Files Staff

46,876 XP

6th February 2005

4,275 Posts

#4 8 years ago

Your right, i'm wrong. Backwards (or more correctly adding figures to the left) is actually the correct way of doing it.

Personally, I think that you wrong with that answer. I think the correct answer is that you can't have 16 because it's the last address of the range (240-256=16) and reserved for the broadcast address.

You can't use the first address in a range because it's the host, or the last because it's the broadcast address. IIRC.

Sgt. D. Pilla

Uber Geek

50 XP

23rd October 2007

3,473 Posts

#5 8 years ago

Which means that the 0 is a wildcard.

255 = 192 255 = 168 255 = 1 0 = *

Your right, but how did you come to that conclusion? Any IP in the range of 192.0.0.0 and 223.255.255.255 is a Class C subnet There shouldn't be a need to work it out via binary.

If I need to convert binary to a number I do it in a table form (as Freyer suggested)... Say my binary number is the one you used, 11110000 I have a '1' or a 'yes' for the first 4 bits, 1, 2, 4, 8....see below.

1 2 4 8 16 32 64 128 * * * * - - - -

= 1+2+4+8 = 15

To convert a numerical octet digit into binary, just do it the other way around... Say we want to convert 16 into binary now...

What is 16 take 128? Can't do, so it's first bit is a 0. What is 16 take 64? Can't do, so the second bit is a 0. What is 16 take 32? Can't do, so the third bit is a 0. What is 16 take 16? Can do, so the forth bit is a 1. We are left with 0, you can't take away from 0; thus the remainding bits are 0.

128 64 32 16 8 4 2 1 0 0 0 1 0 0 0 0 = 00010000

You can't use the first address in a range because it's the host, or the last because it's the broadcast address. IIRC.

Correct.

"So 16 is not a valid IP address for the 240 section of a subnet, because the total of binary digits in 16 exceeds the number of zeroes in order in the binary form of 240."

I would agree with this. Because Cisco CCNA1 teach's us to work out binary the way we have, in which case 15 is the numerical digit of the third octet, 16 isn't, simply because the binary number we were given was 11110000 not 00010000. There for I would agree with the answer.

With that said, I can't remember my CCNA1 and 2 for the life of me...It was 5 - 6 years ago now. So I maybe wrong.

Freyr VIP Member

A2Files Staff

46,876 XP

6th February 2005

4,275 Posts

#6 8 years ago

Sgt. D. Pilla;5419747Your right, but how did you come to that conclusion? Any IP in the range of 192.0.0.0 and 223.255.255.255 is a Class C subnet There shouldn't be a need to work it out via binary.[/QUOTE]

:nodding:

The last time I needed to translate a number in binary was looking at a program written in assembly language for a something that written on a 1980 era Einstien in maybe 1990?

Sgt. D. Pilla;5419747 If I need to convert binary to a number I do it in a table form (as Freyer suggested)... Say my binary number is the one you used, 11110000 I have a '1' or a 'yes' for the first 4 bits, 1, 2, 4, 8....see below.

1 2 4 8 16 32 64 128 * * * * - - - -

= 1+2+4+8 = 15

The problem is that doing it this way is bad practice, like me you've forgotten to do the switch. The result is 240.

If you do use a table, don't get into bad habits like us by writing the numbers from left to right. Do it from right to left for goodness sake. You can see why doing it the way we were taught and then inverting the binary before putting it into the table is considered bad practice these days.

Ie; do it:-

128 64 32 16 8 4 2 1 [QUOTE=Sgt. D. Pilla;5419747]Correct.

I'm not entirely sure on these points, I didn't do a CCNA course in the first place. I just know what's of practical use.

As you agreed, you can't use the first or last addresses in a range because they are reserved. In a /240 range that means you have 16 addresses, of which 14 are addressable.

16, being the last is the broadcast address, and therefore can't be assigned as an IP address. Obviously that's correct in real world networking, but is it a correct answer in the realms of school theory?

Enterprise2002

50 XP

15th December 2002

873 Posts

#7 8 years ago
Freyr;541983816, being the last is the broadcast address, and therefore can't be assigned as an IP address. Obviously that's correct in real world networking, but is it a correct answer in the realms of school theory?

I recently did part of the Cisco CCNA course (until my uni decided to drop it randomly... which is unfortunate).

In any case we were simply taught what you've just said above. First and last addresses are reserved with everything in between being able to be assigned to a host.

Kilobyte

What does the Fox say?

69,060 XP

23rd November 2002

6,468 Posts

#8 8 years ago

Sgt. D. Pilla;5419747Your right, but how did you come to that conclusion?[/QUOTE] I mispoke, I did not come to a "conclusion", but I found an explanation on Experts Exchange.

It stated that the last string of zeroes indicated a wildcard. (11111111.11111111.11110000.00000000)

Spoiler:

[quote=Newsboy]It's really pretty important to know the theory of subnetting before you do it. Do you understand how binary works? Basically in subnetting a 1 means that the number has to be identical to all others on the network and a 0 means it must be unique.

So if the above is true then you can actually do whatever you want as long as your 1's are on the left and your 0's are on the right like this. (11111111.11111111.11110000.00000000)

The author mentions this "theory", but it is not 100% clear that he is explaining the theory. I should have posted that quote in the original article.

Yannick

A psychedelic experience.

50 XP

16th April 2004