The Flat Earth Society

Other Discussion Boards => Technology & Information => Topic started by: junker on December 07, 2013, 06:13:48 AM

Title: How to Subnet, an Example
Post by: junker on December 07, 2013, 06:13:48 AM
How to subnet the following IP:
10.96.42.37 /28


1) Determine your subnet mask based on the “slash” or “CIDR” notation (the /28).  It is about which bit is on and off in each octet, which I can explain more if anyone wants.  A quick reference to all relevant IPv4 subnet masks:

/1 - 128.0.0.0
/2 - 192.0.0.0
/3 - 224.0.0.0
/4 - 240.0.0.0
/5 - 248.0.0.0
/6 - 252.0.0.0
/7 - 254.0.0.0
/8 - 255.0.0.0
/9 - 255.128.0.0
/10 - 255.192.0.0
/11 - 255.224.0.0
/12 - 255.240.0.0
/13 - 255.248.0.0
/14 - 255.252.0.0
/15 - 255.254.0.0
/16 - 255.255.0.0
/17 - 255.255.128.0
/18 - 255.255.192.0
/19 - 255.255.224.0
/20 - 255.255.240.0
/21 - 255.255.248.0
/22 - 255.255.252.0
/23 - 255.255.254.0
/24 - 255.255.255.0
/25 - 255.255.255.128
/26 - 255.255.255.192
/27 - 255.255.255.224
/28 - 255.255.255.240
/29 - 255.255.255.248
/30 - 255.255.255.252

So the subnet mask of /28 is 255.255.255.240


2) Determine block size.  Simple, 256 - (the value of the octet you are subnetting in)

   In this case, “256 - 240” which is 16


3) Determine the network address of the subnet.  This is the first IP in the subnet, but it is not useable.  Start at 0, then count by the block size until you reach the range of the octet you are subnetting in.  In this case /28 is in the last octet, so based on IP 10.96.42.37 you are trying to find the range where .37 falls.  0, 16, 32, 48…  .37 falls in between 32 and 48, so 32 is the network address, more specifically 10.96.42.32 is the network address.


4) Determine the broadcast address of the subnet.  This is always the IP before the next network address.  Since, in step 3 we determined 10.96.42.32 is a network address, and 10.96.42.48 is the next network, 10.96.42.47 is the broadcast address.  The broadcast address is also not a useable IP.


5) Determine the number of useable host IPs.  Easy step…  (2^n)-2 where n = 32 - (the CIDR number).  In this case, 2^(32-28)-2=14.  It makes sense, the block size is 16, so there are 16 IPs in the subnet, you can’t use the network address or the broadcast address, so subtract 2.


6) Determine the useable host range.  Steps 3 and 4 are great, but you can’t use the IP addresses.  So, find out what you can use.  This is easy, the range starts at the IP after the network address, and ends at the IP before the broadcast address.  So, in this instance, the useable range is 10.96.42.33-10.96.42.47.



I have no idea why I posted this, but if you have any questions, or want to know more about networking in general please ask.


DISCLAIMER:  I AM NOT QUALIFIED
Title: Re: How to Subnet, an Example
Post by: Saddam Hussein on December 07, 2013, 06:16:05 AM
How do I use YouTube to hack a website?
Title: Re: How to Subnet, an Example
Post by: junker on December 07, 2013, 06:17:05 AM
How do I use YouTube to hack a website?

THAT IS OUTSIDE OF THE SCOPE OF THIS THREAD

I AM NOT QUALIFIED
Title: Re: How to Subnet, an Example
Post by: jroa on December 07, 2013, 06:22:21 AM
junker, good job.  My only suggestion would be to actually explain the purpose of a subnetwork, what the subnet mask does as far as dividing a network up, and a little better explanation on how the subnets interact with the networks. 
Title: Re: How to Subnet, an Example
Post by: junker on December 07, 2013, 06:32:41 AM
junker, good job.  My only suggestion would be to actually explain the purpose of a subnetwork, what the subnet mask does as far as dividing a network up, and a little better explanation on how the subnets interact with the networks.

Oh, fuck that.  If people have questions, they can ask and I will answer.

You subnet to get IPs.  I can also teach you all about the OSI, especially layers 2 and 3.  I am a pro, almost qualified.
Title: Re: How to Subnet, an Example
Post by: bj1234 on December 07, 2013, 06:35:56 AM
How does subnetting let me hack youtube videos?
Title: Re: How to Subnet, an Example
Post by: xasop on December 07, 2013, 06:48:03 AM
You subnet to get IPs.  I can also teach you all about the OSI, especially layers 2 and 3.  I am a pro, almost qualified.

Can you teach me about layer 6? It's the one I know least about.
Title: Re: How to Subnet, an Example
Post by: junker on December 07, 2013, 06:49:54 AM
You subnet to get IPs.  I can also teach you all about the OSI, especially layers 2 and 3.  I am a pro, almost qualified.

Can you teach me about layer 6? It's the one I know least about.

lol no one uses presenation layer willingly
Title: Re: How to Subnet, an Example
Post by: xasop on December 07, 2013, 06:59:31 AM
lol no one uses presenation layer willingly

How would you know? You're not qualified.
Title: Re: How to Subnet, an Example
Post by: junker on December 07, 2013, 07:01:33 AM
lol no one uses presenation layer willingly

How would you know? You're not qualified.

I know :(
Title: Re: How to Subnet, an Example
Post by: jroa on December 07, 2013, 07:20:15 AM
Can I subsnets with IVP6? ???
Title: Re: How to Subnet, an Example
Post by: junker on December 07, 2013, 07:27:45 AM
Can I subsnets with IVP6? ???

Yes.
Title: Re: How to Subnet, an Example
Post by: jroa on December 07, 2013, 07:45:12 AM
Please explain. 
Title: Re: How to Subnet, an Example
Post by: Lord Dave on December 07, 2013, 02:07:44 PM
I used to know this stuff but its been years.  Thanks for the refresher.
Title: Re: How to Subnet, an Example
Post by: junker on December 07, 2013, 04:02:56 PM
Please explain.

https://supportforums.cisco.com/docs/DOC-17232

Cisco does it better.

This thread is based on IPv4 which I am nearly qualified in.  Keep questions related to that.  I can only hope to be qualified on IPv6 in the coming decades.
Title: Re: How to Subnet, an Example
Post by: Rushy on December 07, 2013, 11:28:30 PM
How do I brute force AES-256?
Title: Re: How to Subnet, an Example
Post by: junker on December 07, 2013, 11:32:08 PM
How do I brute force AES-256?

A lot of super computers, and a lot of time.
Title: Re: How to Subnet, an Example
Post by: Rushy on December 07, 2013, 11:36:21 PM
A lot of super computers, and a lot of time.

Well, you're not wrong.
Title: Re: How to Subnet, an Example
Post by: junker on December 07, 2013, 11:42:20 PM
A lot of super computers, and a lot of time.

Well, you're not wrong.

I am also not qualified.
Title: Re: How to Subnet, an Example
Post by: Fortuna on August 10, 2021, 07:33:07 AM
The worst thing about this shit is that everyone explains it a little bit differently. It's not even that difficult but there are 1000 explanations for it. I'm taking the Network+ next week and I'm just going to memorize the number of hosts and subnets for the /25 - /31 networks. Well, Get fucked CompTIA, if I have to do this IRL I'll just use a subnet calculator lmfao. What is this, 2001?

Also I tried to do your example in my head without looking at the answer and got to 16 subnets with 14 hosts in each, but class Cs are ez. If they ask me abnoout class A or B networks I'll just turn my computer off.
Title: Re: How to Subnet, an Example
Post by: Dr David Thork on August 10, 2021, 08:50:36 AM
The worst thing about this shit is that everyone explains it a little bit differently. It's not even that difficult but there are 1000 explanations for it. I'm taking the Network+ next week and I'm just going to memorize the number of hosts and subnets for the /25 - /31 networks. Well, Get fucked CompTIA, if I have to do this IRL I'll just use a subnet calculator lmfao. What is this, 2001?

Also I tried to do your example in my head without looking at the answer and got to 16 subnets with 14 hosts in each, but class Cs are ez. If they ask me abnoout class A or B networks I'll just turn my computer off.
You should come to the UK. We now have a system where no one ever has to go to class and 50% of the students get an A* or A.
Title: Re: How to Subnet, an Example
Post by: xasop on August 10, 2021, 10:32:39 AM
The worst thing about this shit is that everyone explains it a little bit differently. It's not even that difficult but there are 1000 explanations for it. I'm taking the Network+ next week and I'm just going to memorize the number of hosts and subnets for the /25 - /31 networks. Well, Get fucked CompTIA, if I have to do this IRL I'll just use a subnet calculator lmfao. What is this, 2001?
It's literally just powers of 2. It's more work to memorise it than it is to just figure it out from first principles in the exam, provided you understand the principle.

Also I tried to do your example in my head without looking at the answer and got to 16 subnets with 14 hosts in each, but class Cs are ez. If they ask me abnoout class A or B networks I'll just turn my computer off.
If you're doing subnetting, you're not using classful networks.
Title: Re: How to Subnet, an Example
Post by: Dr Van Nostrand on August 10, 2021, 11:59:31 AM
https://www.calculator.net/ip-subnet-calculator.html
https://www.site24x7.com/tools/ipv4-subnetcalculator.html

I asked the instructor why we have to learn to do this when there are calculators to do this.


Instructor
: What if you're trapped on a desert island without your calculator and you have to assign IP addresses across a SOHO network. You would have to come up with the addresses by hand.
Me: But if you're setting up a network wouldn't you have...
Instructor: Shut Up!
Title: Re: How to Subnet, an Example
Post by: xasop on August 10, 2021, 01:20:27 PM
I asked the instructor why we have to learn to do this when there are calculators to do this.

Instructor: What if you're trapped on a desert island without your calculator and you have to assign IP addresses across a SOHO network. You would have to come up with the addresses by hand.
Well, yes, that is a terrible reason. A better reason is that you need to be able to reason about what the calculators are doing.

The only thing less professional than not using the tools available to help you is using tools without understanding what they do.
Title: Re: How to Subnet, an Example
Post by: Dr Van Nostrand on August 10, 2021, 03:25:50 PM
I asked the instructor why we have to learn to do this when there are calculators to do this.

Instructor: What if you're trapped on a desert island without your calculator and you have to assign IP addresses across a SOHO network. You would have to come up with the addresses by hand.
Well, yes, that is a terrible reason. A better reason is that you need to be able to reason about what the calculators are doing.

The only thing less professional than not using the tools available to help you is using tools without understanding what they do.

That is the most correct answer.

Unfortunately for me, I forgot all the subnetting techniques one day after I took the exam.

If I'm stuck on Gilligan's Island without subnet calculating software and I have to assign IP addresses, I'm screwed.
Title: Re: How to Subnet, an Example
Post by: WTF_Seriously on August 10, 2021, 04:03:41 PM
The only thing less professional than not using the tools available to help you is using tools without understanding what they do.

Someone here:

https://forum.tfes.org/index.php?topic=18335.0

could learn a lot from this statement.
Title: Re: How to Subnet, an Example
Post by: junker on August 10, 2021, 06:27:44 PM
I forgot how helpful old me was.
Title: Re: How to Subnet, an Example
Post by: Fortuna on August 10, 2021, 06:33:11 PM
The worst thing about this shit is that everyone explains it a little bit differently. It's not even that difficult but there are 1000 explanations for it. I'm taking the Network+ next week and I'm just going to memorize the number of hosts and subnets for the /25 - /31 networks. Well, Get fucked CompTIA, if I have to do this IRL I'll just use a subnet calculator lmfao. What is this, 2001?
It's literally just powers of 2. It's more work to memorise it than it is to just figure it out from first principles in the exam, provided you understand the principle.

Also I tried to do your example in my head without looking at the answer and got to 16 subnets with 14 hosts in each, but class Cs are ez. If they ask me abnoout class A or B networks I'll just turn my computer off.
If you're doing subnetting, you're not using classful networks.

Yes, the delineation between classful addressing and CIDR notation is very clear. But that's just how I think about it. Mostly because I've never encountered a network with crazy subnetting before, even at my current job, which has a bunch of LANs across different sites.
Title: Re: How to Subnet, an Example
Post by: Fortuna on August 10, 2021, 08:24:10 PM
255.255.255.0 /24
1 subnet, 254 possible hosts

255.255.255.128 /25
2 subnets, 126 possible hosts

255.255.255.192 /26
4 subnets, 62 hosts

255.255.255.224 /27
8 subnets, 30 hosts

255.255.255.240 /28
16 subnets, 14 hosts

255.255.255.248 /29
32 subnets, 6 hosts

255.255.255.252 /30
64 subnets, 2 hosts

255.255.255.254 /31
128 subnets ... no hosts?

255.255.255.255 /32
256 subnets again no hosts?
Title: Re: How to Subnet, an Example
Post by: xasop on August 10, 2021, 08:59:32 PM
255.255.255.0 /24
1 subnet, 254 possible hosts
It makes no sense to say that a /24 has "1 subnet". What you probably mean is that a /24 can be divided into one /24, two /25s, four /26s, and so forth. But if you start with a /23, you can divide that into two /24s, not one.
Title: Re: How to Subnet, an Example
Post by: Fortuna on August 17, 2021, 02:10:26 AM
Just passed the Net+ but I was shitting my pants for a few hours before the start time. I studied circuit switched networks for hours and didn't see a single question on it.
Title: Re: How to Subnet, an Example
Post by: Dr Van Nostrand on August 17, 2021, 01:52:28 PM
Just passed the Net+ but I was shitting my pants for a few hours before the start time. I studied circuit switched networks for hours and didn't see a single question on it.

* fist bump*

I want to take Security Plus but I'm sure I need to be in to network plus before I try it.

Microsoft has virtual server ISOs ( trial copies) for free download. I'm looking at setting one up in virtualbox to practice on.  I'm guessing that Active Directory is all over the network plus test and I hardly ever use it in my real life.
Title: Re: How to Subnet, an Example
Post by: junker on August 17, 2021, 03:24:00 PM
Just passed the Net+ but I was shitting my pants for a few hours before the start time. I studied circuit switched networks for hours and didn't see a single question on it.

Now forget about 99% of N+ and learn some core routing and switching (Cisco is decent for this, just ignore all their proprietary shit like HSRP and EIGRP). Then move straight to AWS and work on Solutions Architect (https://aws.amazon.com/certification/certified-solutions-architect-associate/) and Advanced Networking (https://aws.amazon.com/certification/certified-advanced-networking-specialty/). Learn Python while doing the above so you can automate anything on-prem. Lastly, send me a bottle of top-shelf bourbon when you are raking in $200K+/yr after following the aforementioned advice.
Title: Re: How to Subnet, an Example
Post by: junker on August 17, 2021, 03:30:40 PM
I'm guessing that Active Directory is all over the network plus test

It isn't.
Title: Re: How to Subnet, an Example
Post by: Fortuna on August 17, 2021, 03:42:29 PM
Just passed the Net+ but I was shitting my pants for a few hours before the start time. I studied circuit switched networks for hours and didn't see a single question on it.

Now forget about 99% of N+ and learn some core routing and switching (Cisco is decent for this, just ignore all their proprietary shit like HSRP and EIGRP). Then move straight to AWS and work on Solutions Architect (https://aws.amazon.com/certification/certified-solutions-architect-associate/) and Advanced Networking (https://aws.amazon.com/certification/certified-advanced-networking-specialty/). Learn Python while doing the above so you can automate anything on-prem. Lastly, send me a bottle of top-shelf bourbon when you are raking in $200K+/yr after following the aforementioned advice.

That’s almost exactly what I had planned out except for Cisco. And I didn’t know IT salaries went that high.
Title: Re: How to Subnet, an Example
Post by: Fortuna on August 17, 2021, 03:46:44 PM
Just passed the Net+ but I was shitting my pants for a few hours before the start time. I studied circuit switched networks for hours and didn't see a single question on it.

* fist bump*

I want to take Security Plus but I'm sure I need to be in to network plus before I try it.

Microsoft has virtual server ISOs ( trial copies) for free download. I'm looking at setting one up in virtualbox to practice on.  I'm guessing that Active Directory is all over the network plus test and I hardly ever use it in my real life.

Not sure exactly what’s on the Sec+, but I’m guessing it’s vendor neutral just like Net+. Like Junker said, there’s no AD at all. I’m assuming Sec+ has some Net overlap so I’d probably do that first. Seems kind of useless to know about security operations without first having at least a broad overview of how networks work.