Subnetting Question.
TechJunky
Member Posts: 881
in CCNA & CCENT
Since this is where most of this type of activity happens I thought I would post here.
Lets say I have a 192.168.2.0/27 network.
This would mean I would have a subnet of 255.255.255.224
So the ip addresses usable would be as follows..
192.168.2.33 - 192.168.2.62
192.168.2.65 - 192.168.2.94
192.168.2.97 - 192.168.2.126
192.168.2.129 - 192.168.2.158
I got this because there are only 32 bits left on the host side... and minus 2 for the broadcast and ?? I forget the other one, i just remember the rule.
So that leaves 30 hosts per ip range.
So is that correct? And am I calculating them the right way?
I borrowed 3 host bits to get my 255.255.255.224 network mask.
Oh, and the first set of 32 are unusable. So thats why I started at 33. Hopefully I am doing all of this correctly.
Thanks.
Lets say I have a 192.168.2.0/27 network.
This would mean I would have a subnet of 255.255.255.224
So the ip addresses usable would be as follows..
192.168.2.33 - 192.168.2.62
192.168.2.65 - 192.168.2.94
192.168.2.97 - 192.168.2.126
192.168.2.129 - 192.168.2.158
I got this because there are only 32 bits left on the host side... and minus 2 for the broadcast and ?? I forget the other one, i just remember the rule.
So that leaves 30 hosts per ip range.
So is that correct? And am I calculating them the right way?
I borrowed 3 host bits to get my 255.255.255.224 network mask.
Oh, and the first set of 32 are unusable. So thats why I started at 33. Hopefully I am doing all of this correctly.
Thanks.
Comments
-
dynamik Banned Posts: 12,312 ■■■■■■■■■□You need to increment your range of usable addresses by one. The other number you can't use is the network number, which is the lowest in the range. You take one off of each side, not two off the end.
i.e. the last octet in the first range you listed would be 34-63 -
TechJunky Member Posts: 881dynamik: How is it 34?
Wouldnt it be 33?
So...
192.168.2.1 - 192.168.2.31, because 30 usable hosts...
192.168.2.0 for the gateway and 192.168.2.32 for the broadcast? Then .33 would be the next? correct? -
dynamik Banned Posts: 12,312 ■■■■■■■■■□TechJunky wrote:dynamik: How is it 34?
Wouldnt it be 33?
Whoops. I usually write out the whole range, and I think I confused myself looking at what you had. You're right, sorryTechJunky wrote:So...
192.168.2.1 - 192.168.2.31, because 30 usable hosts...
192.168.2.0 for the gateway and 192.168.2.32 for the broadcast? Then .33 would be the next? correct?
The full range would be 192.168.2.0-192.168.2.31. 192.168.2.0 is the network address (all host bits 0) and 192.168.2.31 is the broadcast (all host bits 1). 192.168.2.1-192.168.2.30 would be the usable addresses. The next range starts at 192.168.2.32.
The mistake I made was thinking the first range went through 32. I had 5 bits = 32 hosts in my head and went with that. It only goes to 31 when you start with 0 though
Edit: I just saw you edited your original post. Why are you saying the first range is unusable? -
mamono Member Posts: 776 ■■□□□□□□□□You are doing just fine. Remember, http://www.subnettingquestions.com is a valuable resource!
-
networker050184 Mod Posts: 11,962 ModThe ??? isn't for your default gateway its for your network address.An expert is a man who has made all the mistakes which can be made.
-
Kaminsky Member Posts: 1,235Now take it a step further to class B and A.
256-224 = 32 which give network, 20 hosts and broadcast. For a class C
Now say it is 150.168.2.0 /19 gives 32.0 as the subnet boundary. <Now you do network, range and Bcast>
Now say it is 150.168.2.0 /27 gives 0.32 as the subnet boundary. <Now you do network, range and Bcast>
Now say it is 10.168.2.0 /11 gives 32.0.0 as the subnet boundary. <Now you do network, range and Bcast>
Now say it is 10.168.2.0 /19 gives 0.32.0 as the subnet boundary. <Now you do network, range and Bcast>
Now say it is 10.168.2.0 /27 gives 0.0.32 as the subnet boundary. <Now you do network, range and Bcast>
If you write the "0.", working out the subnet boundaries from that becomes a doddle. The big trap everyone falls into whilst learning this and in the exam is forgetting the "0." to get a true representation of the boundary... They always just remember the "32" and then completely lose the plot trying to re-figure out where that 32 should go. Make a determined effort to remember the "0." and everything else just falls into place.
Play with this and write out the binary and you have it sussed. Then hit subnettingquestions at least 2 hours a day, every day for 2 weeks and you'll never forget it.
Kam.Kam. -
TechJunky Member Posts: 881Dynamik: I was being an idoit. I have no idea why I said the first whole ip range wasn't usable. I mean't the Gateway/broadcast I just couldn't think of the terms.
All the information is starting to mish mosh in my head.
Kaminsky: I would assume this information is as follows.
150.168.2.0/19
150.168.2.0
255.255.224.0
150.168.2.0 network address
150.168.2.1 - 150.168.2.254
150.168.2.255 broadcast
150.168.2.0/27
255.255.255.224
150.168.2.0 network address
150.168.2.1 - 150.168.2.30
150.168.2.31 broadcast address
Im not going to do the rest because I need to continue studying some DNS stuff before tomorrow, but I think I have the hang of it. -
skeet2331 Member Posts: 87 ■■□□□□□□□□networker050184 wrote:The ??? isn't for your default gateway its for your network address.
You are completely correct. I think I had a moment when I posted that earlier. Sorry. -
Kaminsky Member Posts: 1,235150.168.2.0 255.255.224.0 (32.0)
150.168.2.0 network address
150.168.2.1 - 150.168.2.254
150.168.2.255 broadcast
The subnet is for a class B (the very first thing you need to take note of is the first octect of the IP address) so the subnet starts at 150.168.
This gives 8 subnets with 8,190 hosts per subnet
The subnet boundary is 32.0 - IE it goes up in two octect chunks.
Subnet 1: 150.168.0.0
Host Range: 150.168.0.1 - 150.168.31.254 (8,190 hosts .... yes - 150.168.0.255 is a valid host id)
Broadcast: 150.168.31.255
Subnet 2: 150.168.32.0
Host Range: 150.168.32.1 - 150.168.63.254
Broadcast: 150.168.63.255
Subnet 3: 150.168.0.0
Host Range: 150.168.64.1 - 150.168.95.254
Broadcast: 150.168.95.255
Subnet 4: 150.168.96.0
Host Range: 150.168.96.1 - 150.168.127.254
Broadcast: 150.168.127.255
Subnet 5: 150.168.128.0
Host Range: 150.168.128.1 - 150.168.159.254
Broadcast: 150.168.159.255
Subnet 6: 150.168.160.0
Host Range: 150.168.160.1 - 150.168.191.254
Broadcast: 150.168.191.255
Subnet 7: 150.168.192.0
Host Range: 150.168.192.1 - 150.168.223.254
Broadcast: 150.168.223.255
Subnet 8: 150.168.224.0
Host Range: 150.168.224.1 - 150.168.255.254
Broadcast: 150.168.255.255
150.168.2.0/27 255.255.255.224 (0.32)
150.168.2.0 network address
150.168.2.1 - 150.168.2.30
150.168.2.31 broadcast address
The workings on this one are correct and you will get 2,048 subnets each with 30 hosts. The more network bits you use, the more subnets you get. The fewer network bits you use, the more host ranges you get depending on the class obviously.
Kam.Kam. -
netexpertsindia Member Posts: 1 ■□□□□□□□□□dynamik wrote:TechJunky wrote:dynamik: How is it 34?
Wouldnt it be 33?
Whoops. I usually write out the whole range, and I think I confused myself looking at what you had. You're right, sorryTechJunky wrote:So...
192.168.2.1 - 192.168.2.31, because 30 usable hosts...
192.168.2.0 for the gateway and 192.168.2.32 for the broadcast? Then .33 would be the next? correct?
The full range would be 192.168.2.0-192.168.2.31. 192.168.2.0 is the network address (all host bits 0) and 192.168.2.31 is the broadcast (all host bits 1). 192.168.2.1-192.168.2.30 would be the usable addresses. The next range starts at 192.168.2.32.
The mistake I made was thinking the first range went through 32. I had 5 bits = 32 hosts in my head and went with that. It only goes to 31 when you start with 0 though
Edit: I just saw you edited your original post. Why are you saying the first range is unusable? -
-_M S K_- Member Posts: 9 ■□□□□□□□□□skeet2331 wrote:networker050184 wrote:The ??? isn't for your default gateway its for your network address.
You are completely correct. I think I had a moment when I posted that earlier. Sorry.
isn`t ??? for the subnet address?
correct me if I am wrong...-_M S K_-
_____________________
BS Electronic Engineering