Solved

Posted on 2005-05-13

I have class b address of 172.38.0.0/255.255.0.0 and one of the techicians came up with the following:

1st floor = 172.38.1.0 - 172.38.1.255/255.255.255.0 (max host/subnet 254). Additional subnets requiring a mask of 255.255.255.0 = 172.38.2.0 - 172.38.31.0

2nd floor = 172.38.32.0 - 172.38.32.127/255.255.255.128 (max host/subnet 126). Additional subnets requiring a mask of 255.255.255.128 = 172.38.33.0 - 172.38.63.0

I know that he subnetted the orginal class B address using VSLM. However, what i don't understand is this. The 1st floor subnet mask should give me:

11111111.11111111.11111111.X and the third octet should allow me the following: 00000001 - 11111110 in subnets. So the available subnets should be from 172.32.1.0 to 172.32.254.0 for the first floor. Why is it to .31 only?

As for second floor, the subnet mask produces the following 11111111.11111111.11111111.10000000. How does he end up with a subnet begin .32?

Can someone explain this to me? I am confused

Thanks

1st floor = 172.38.1.0 - 172.38.1.255/255.255.255.0

2nd floor = 172.38.32.0 - 172.38.32.127/255.255.255.

I know that he subnetted the orginal class B address using VSLM. However, what i don't understand is this. The 1st floor subnet mask should give me:

11111111.11111111.11111111

As for second floor, the subnet mask produces the following 11111111.11111111.11111111

Can someone explain this to me? I am confused

Thanks

12 Comments

1. you start off by saying you have class B address range of 172.38.0.0/255.255.0.0. do you mean this was the range assigned to you by your ISP? If so thats alot of addresses (over a million)

2. later you start talking about the 172.32.1.0 address range which is a different range of addresses all together. are we dealing with 172.38.x.x pr 172.32.x.x????

3. you later say "So the available subnets should be from 172.32.1.0 to 172.32.254.0 for the first floor. Why is it to .31 only?"... where are you getting the 31 from? i think he stopped at 31 b/c of the RFC 1918 i mentioned earlier, but that RFC only applies if you are using the private class B range of 172.16.0.0 thru 172.31.255.255

I meant on the first floor, the subnet mask is

11111111.11111111.11111111

Secondly, the second floor has a subnet mask of 255.255.255.128 on the same class b address 172.38.0.X The technican ended up with starting subnet of 172.38.32.0-172.38.32.127

And on the third floor he has the same subnet mask of 255.255.255.128 but with the addressing of 172.38.32.128 - 172.38.32.255

but the subnet mask is 255.255.255.128 -> 11111111.11111111.11111111

So far It looks like the techican took one of the 255.255.255.0 subnets and subnetted it again into two 126 host subnets. But i am not sure.

with a mask of 255.255.255.128 the starting point of the subnet isn't 172.38.32.128. with a mask of 255.255.255.128 you are subnetting the 4th octet, not the third anyway. why he didn't go to 172.38.2.x i dont know. it would make much more sense than jumping to 32 from 1 wouldn't it? it would make much more sense to have 172.38.1.x for the first floor and 172.38.2.x for the second floor and so on. that way the third octet number would match the floor number which would be easier to keep track of.

him stopping at 172.38.31.0 is totally incorrect. with a mask of 255.255.255.0 on 172.38.2.0 the range is 172.38.2.1 thru 172.38.2.254. Again, he didn't what what he was doing.

you might want to use a subnet caclulator to do the math for you. here is an easy web-based one that i use:

http://www.subnetonline.co

also, let me correct myself before someone else does...172.38.0.0/255.255.

the original class b address of 172.38.0.0 and subnetted it with 255.255.255.0 which of course gives him available subnets from 172.38.1.X - 172.38.254.X.

For whatever reason he decided to reserve the first 32 subnets for the first floor (can't read the reasoning behind it, smudged) which is .1-.31

He took the 172.38.32 subnet. This is where he got his 172.38.32.0 - 172.38.32.127 and 172.38.32.128 - 172.38.32.255 ip from.

Looks like he treated the 172.38.32.X subnet as if it was a class C address and resubnetting it by borrowing 1 bit from the 4th octet.

Regardless if he was insane or not in his approach to dishing out ips was his subnetting technically correct?

One more thing:

I was told that both of these are on the same subnet.

160.149.115.8 /255.255.252.0

160.149.114.66 /255.255.252.0

How is this possible? If you borrowed 6 bits from the third octet shouldn't the last remaining 2 bits be added to the host instead of the subnet?. Why is it added to the subnet instead?

X.011100 + 11. = .115

X.011100 + 10. = .114

If this is possible then I assume the very first subnet availabe on 255.255.252.0 would be 160.149.4.X (X.000001 + 00.X) - 160.149.7.X (X.000001 + 11.X) right?

160.149.115.8/22 (mask 255.255.252.0) has 10 bits in the host portion and 22 bits in the network portion. It's "naturally" a "class B" network (with 16 network bits) so, it's subnetted with 6 bits. In other words, it's like this:

NNNNNNNN.NNNNNNNN.SSSSSSHH

Now we're working on the 3rd octet, as you said. We're borrowing 2 bits from the host portion. A quick and easy cheat is that 2^2 bits borrowed = your "network incrementer". So, starting with 0, the networks are going to go like this:

.0, .4, .8, .16, .20, ... .108, .112, .116. Notice that last range.

This means your subnet goes from 160.149.112.1 through 160.149.115.254 (.0 is network, and .255 is broadcast). So, this means that 160.149.115.8 and 160.149.114.66 both /22 are on the same subnet, which is 1022 addresses in size.

I'll seperate the other part into a different post.

On the first floor, What happened to the 172.38.0.0/24 subnet? Can't use it - no "subnet zero"? That's fine. Why did he leave 29 subnets with 254 hosts each left over?

On the second floor, subnetting more, he puts in 172.38.32.0/25. Why the sudden drop in the number of hosts? And then he forgets about the 172.38.32.128/25 subnet he created.

I'd like to know how many floors you have, how many hosts you have and what kind of growth room you need.

160.149.115.8 with a mask of 255.255.252.0 has a begining address of 160.149.112.1 and an ending address of 160.149.115.254 so yes they are both on the same subnet. thats just the way it is. 2+2=4, thats just the way it is. I think you are misunderstadning how to manually calculate subnets and that is why you are getting confused.

what you are doing by adding things to the IP addresses isn't correct at all (or either you aren't doing that method correctly). I've never heard of any method where you add anything. you have to remember, its called a MASK for a reason. it means that you mask out that part of the address, meaining it is irrellevant. I think you are confusing yourself when you are thinking in terms of borrowing IPs when you are calculating subnets.

for example:

160.149.115.8 in binary is 10100000.10010101.01110011

255.255.252.0 in binary is 11111111.11111111.11111100

so the last 10 digits are irrlevant since they are masked out as far as subnetting goes

to figure out the network address you convert the host portion to 0s to end up with:

10100000.10010101.01110000

11111111.11111111.11111100

to figure out the broadcast address you convert the host portion to 1s to end up with:

10100000.10010101.01110011

11111111.11111111.11111100

i put the masks right below the net and broadcast addreeses so you could see whats going on.

all the numbers between the network address and broadcast address are useable IPs. that is the nuts and bolts method and works for all masks regardless of which octed. subnetting the last octet is of course easy

we all now that each bit represent a value. there are 8 bits to one octet, each bit representing one value

1 1 1 1 1 1 1 1 = octet

128 64 32 16 8 4 2 1 = value for each bit

So something like this 10000000 would mean 128

and something like this 10000010 would mean 130 because it's

1 0 0 0 0 0 1 0

128 0 0 0 0 0 2 0 ----> adding 128 and 2 gives you a number of 130

Now

IP: 160.149.115.8

10100000.10010101.01110011

In order to be 115, it needs the remaining two bits which if you notice would have belonged to the host. By adding 112 + 3 (the last 2 remaining bits in the 3rd octet) You get 115 for the value of the third octet.

yes, x.x.115.8 and x.x.114.66

x.x.115.8 = x.x.011100 11.00001000

x.x.114.66 = x.x.011100 10.01000010

^

with mask

y.y.252.0 = y.y.111111 00.00000000

^

now count 011100 & 00 = 01110000 = 112 is a decimal number of subnet

A B

here we don't care what is B (host part). To get next subnet we have to increase our subnet number (A) just on one

011101 & 00 = 01110100 = 116

A+1 ...

So your 114 and 115 are on the same subnet:

subnet address: 160.149.112.0

valuable hosts: 160.149.112.1 - 160.149.115.254

subnet broadcast: 160.149.115.255

Hope this is clear. To answer your main question about subnetting your LAN - as mentioned by pseudocyber it's needed more information about number of addresses per floor you need (not only users, don't forget about servers, printers, firewalls and etc.), number of floors, any plans for the future growth.

Regards.

as i mentioned earlier this business you are doing with adding and subtracting digits is incorrect and that is what is causing you to come up with incorrect answers. 160.149.115.8 has a third octet of 01110011 = 115 regardless of its subnet mask. The subnet mask NEVER EVER NEVER EVER changes the IP address. If you think of it like you are doing you will never figure out the correct answer. The subnet mask is used to tell you which subnet the IP address is on. It will tell you what the NETWORK address is and the BROADCAST address. All the numbers between the net and broadcast addresses are your usable IPs. If you use the method i posted above you will never go wrong (as long as you do it correctly). Or you can just use a subnet calculator which is even easier.

By clicking you are agreeing to Experts Exchange's Terms of Use.

Title | # Comments | Views | Activity |
---|---|---|---|

installed old nagios.... | 13 | 59 | |

Looking for recommendations for a suitable RADIUS server | 10 | 43 | |

Need help networking Zebra tlp 2824 plus lan printer in homegroup | 6 | 37 | |

Wireshark | 4 | 32 |

Join the community of 500,000 technology professionals and ask your questions.

Connect with top rated Experts

**14** Experts available now in Live!