Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subnetting -- PLEASE helpppp!

Status
Not open for further replies.
May 6, 2003
4
0
0
US
Please answer this question for me -- very confused??????

I have a class C IP addy: 196.168.10 and want to subnet it!
If I use a 255.255.255.192 subnet that gives me 4 networks (0,64,128,192) and 62 host addys per network.
Network 1: 196.168.10.0
196.168.10.1 --> 196.168.10.62
Broadcast 196.168.10.63

Network 2: 196.168.10.64
196.168.10.65 --> 196.168.10.126
Broadcast 196.169.10.127

Network 3: 196.168.10.128
196.168.10.129 --> 196.168.10.190
Broadcast 196.168.10.191

Network 4: 196.168.10.192
196.168.10.193 --> 196.168.10.254
Broadcast 196.168.10.255

Why can I only use networks 2 and 3? It seems network 4 should certainly be able to be used and network 1 seems vaild except for the possible problem with 196.168.10.0 being the first network.

I have had this explained before -- all 0's or all 1's is not exceptable, but You never end up with all 1's or 0's in networks 1 or 4.

The network portion of the first network is:
1100100.10101000.00001010.00 -- this is not all 1's or 0's???

The network portion of network 4 is:
1100100.10101000.00001010.11 -- this is not all 1's or 0's either??????

What am I doing wrong here! I am obviously not think about this correctly, but I cannot figure out where my falicy lies????????

Thank you all in advance for your help
 
I realize this is not the way it is and I do my job the way without using Network 1 or 4 in this example or network 1 and network n in any other subnetted environment, but it has bugged me for a long time!
 
Hi

I think the problem is the your understanding of the AND process of the address and the mask. Most people have problems here and I struggle as well but here goes...
As the problem and the mask only deal with the last octet then I will not include them here.
A mask of 192 represents the first 3 bits of the last Octet ie 0110 0000 = 192 therefore an address such as network 1 which ends in a zero would AND out as follows:
1111 1111 = 256 (example only)
0000 0000 = 0 ( your network 1 last octet)
011}0 0000 = 192 (Your mask with network considered)
011}0 0000 = 0 (result of AND)
Its a little hard to draw, but I think you will get my drift, is that you must discount the portion of the address which is taken by the mask which I have put a bracket around. ie The first 3 bits of the last octet.
Same I think with you last address - I did not do the math but it looks like it is the same as your mask and therefore would AND out to be all Zero's. As you mentioned you can not use all Zero's or all One's. Some one else may like to expand on this and give some more idea's to going forward.
Hope I have been some help.

Regards

David
 
<marc's little subnetting tutorial> [smile]

IP 196.168.10.x with SN 255.255.255.0
take a look at the binary:
Code:
 IP:
Code:
11000100.10101000.00001010.
Code:
xxxxxxxx
Code:
 SN:
Code:
11111111.11111111.11111111.
Code:
00000000

The blue bits of the IP address are the Network Number, the red bits are the Host Number.
You cannot have a Host Number of all 1s or all 0s.

IP 196.168.10.x with SN 255.255.255.192
binary:
Code:
 IP:
Code:
11000100.10101000.00001010.ww
Code:
xxxxxx
Code:
 SN:
Code:
11111111.11111111.11111111.11
Code:
000000

To give you your choice of networks,
Code:
  ww=00   IP:
Code:
11000100.10101000.00001010.00
Code:
xxxxxx
Code:
  ww=01   IP:
Code:
11000100.10101000.00001010.01
Code:
xxxxxx
Code:
  ww=10   IP:
Code:
11000100.10101000.00001010.10
Code:
xxxxxx
Code:
  ww=11   IP:
Code:
11000100.10101000.00001010.11
Code:
xxxxxx
Code:
This gives you 4 subnets in total - IP ranges:
196.168.10.1   --> 196.168.10.62
196.168.10.65  --> 196.168.10.126
196.168.10.129 --> 196.168.10.190
196.168.10.193 --> 196.168.10.254

If you're wondering where the missing IP addresses went, they'll be the addresses with Host Numbers of all 1s or all 0s.
[COLOR=green][b]</tutorial>[/b][/color]

And now fractal, you have thoroughly confused me, because we have the same results.  According to my reckoning, the IP ranges you give for all 4 networks are valid.

What problems / symptoms do you have when you tried to use Networks 1 & 4?  Perhaps there is another issue on your network preventing you from using these addresses.

<marc>   [i]i wonder what will happen if i press this...[/i][pc][COLOR=green][ul][i][li]please give feedback on what works / what doesn't[/li][COLOR=red][li]need some help?[/color] how to get a better answer: faq581-3339[/li][/ul][/color]
 

ok, lets start with some math:
The Subnetting formula is:

n
2 - 2 = x

&quot;n&quot; = Borrowed Bits from the host portion
&quot;x&quot; = Total of USABLE subnets

applied to your case: (2²) - 2 = 2

This means you borrowed (turned on) 2 bits from
the host portion to make 4 subnets (2 USABLE).

So I'll try to answer your first question
(why you get only 2 USABLE subnets?)

to do that, let's go back for a moment, let's say that you
didn't do the subnetting yet, so your original IP is 192.168.10.0/24

Your FIRST IP 192.168.10.0 --> identifies your &quot;non-subnetted&quot; network
Your LAST IP 192.168.10.255 --> broadcasts your &quot;non-subnetted&quot; network
(ALL IP's in the middle are usable)

So, basically the same criteria applies once you subnet your network,

Your FIRST SUBNET 192.168.10.0 --> identifies your &quot;subnetted&quot; network
Your LAST SUBNET 192.168.10.192 --> broadcasts your &quot;subnetted&quot; network
(ALL subnets in the middle are usable)

Also, the same criteria applies to your USABLE subnets, as you correctly
described on your posting:

Network 1:
196.168.10.0 <-- identifies the subnet
196.168.10.63 <-- broadcasts the subnet
(ALL IP's in the middle are usable)

Network 2:
196.168.10.64 <-- identifies the subnet
196.169.10.127 <-- broadcasts the subnet
(ALL IP's in the middle are usable)

Network 3:
196.168.10.128 <-- identifies the subnet
196.168.10.191 <-- broadcasts the subnet
(ALL IP's in the middle are usable)

Network 4:
196.168.10.192 <-- identifies the subnet
196.168.10.255 <-- broadcasts the subnet
(ALL IP's in the middle are usable)

in short:
•the limitation is not the subnet address being the first one itself,
but the function of the IP alltoghether (to identify)

•the limitation is not the subnet address being the last one itself,
but the function of the IP alltoghether (to broadcast)

3 NOTEs:
A) I tried to make simple, so I know already that the terminology
used is not &quot;very TECHNICAL&quot;.
B) I you are still in need of a &quot;very TECHNICAL&quot; answer, I recomend you
to read the RFC950, have fun! ;)
C) Today's classless routing protocols allow you to use the first and last subnets,
however, you have to take some precautions, like making sure that all of your
network components (eg. Routers) are classless.

--/--

Answer to your second question:
(bits not being all 0's / 1's)

Remember, you borrowed 2 bits from the last
octect by turning them ON (1) so if:

Your ORIGINAL (class C) Subnet Mask was:
11111111.11111111.11111111.00000000 <or> 255.255.255.0

After subnetting, your CUSTOM Subnet became:
11111111.11111111.11111111.11000000 <or> 255.255.255.192

that means, that you only have 6 bits left to play with when
assigning hosts' IP's. Now the formula in this case is VERY simple
(and is right here where U are getting confused)

Formula:
&quot;Host bits can't be all zeros or all Ones&quot;

did U get it? it's saying &quot;HOST&quot; bits,
so once you did the subnetting, you only play
with the host bits when assigning IP's,
but let's do the math, and see if it matches up:
NOTE: I'll put in binary only the last octect, as David did.


Network 1:
Subnet Address: 196.168.10.0 / Last octect in Binary: 00000000
Subnet Brdcast: 196.168.10.63 / Last octect in Binary: 00111111

Network 2:
Subnet Address: 196.168.10.64 / Last octect in Binary: 01000000
Subnet Brdcast: 196.169.10.127 / Last octect in Binary: 01111111

Network 3:
Subnet Address: 196.168.10.128 / Last octect in Binary: 10000000
Subnet Brdcast: 196.168.10.191 / Last octect in Binary: 10111111

Network 4:
Subnet Address: 196.168.10.192 / Last octect in Binary: 11000000
Subnet Brdcast: 196.168.10.255 / Last octect in Binary: 11111111

so, as you can see, the last 6 bits of the 4th octect, are always
&quot;0&quot; for the subnet address and always &quot;1&quot; for the broadcast address

Also, we did not even need to do any anding procedure, since we
are not dealing with &quot;routing between subnets&quot; issues here, or
anything like that. Sorry David. Also, David, the 192 represents
the FIRST 2 (two) bits of the last octect, not the first 3.
I just thought it was ok to make a correction, that's it.

I hope this is of any help for you guys, ;)
 
Breakerfall:

You say in your post
&quot;This means you borrowed (turned on) 2 bits from
the host portion to make 4 subnets (2 USABLE).&quot;


But you then went on to list 4 subnets.
Perhaps I misunderstood your post.

Are you saying you can only use 2 subnets?
My calculations suggest you can use all 4, given the IP ranges as your post and mine.

Regards, Marc.
 
I am hopelessly confused here.

As a practical matter I can see a problem where somewhere on the network a Class C or /24 subnet mask is being applied by a device. Some SOHO class routers, for example, only let you use /24 subnet masks.

So I see a problem as a practical matter with the plan first suggested.

But if there are no device limitations on the network, I fail to see why 192.168.1.x/26 does not yield 4 valid subnets as suggested in the original thread.



 
to Manarth:
Yes, that's exactly what I'm saying. Borrowing 2 bits from the last octect, yields 4 subnets, BUT you can ONLY use 2
(Read the formula), unles you set up the whole network using classless components, including the use of classless protocols (that takes me to respond to BCASTNER, who's using a classful router, and that's why you can't use the first and last subnet, again, read the formula)

hope this was of help
 
I understand the distinction between classful & classless networks, and I'm aware that some routers only support classful networks.

If this is the case, why would 2 of the /26 subnets be usable and the other 2 unusable?

Surely if the routers do not support classless routing, they won't support ANY of the classless subnets?

btw, I read the post thoroughly (many times!) - please excuse me if I've missed the blindingly obvious - but I cannot find any explanation of WHY the no. of usable subnets is less than the number of possibilities.

cheers, Marc.
 
here we go: classfull routing protocols doesn't provide the SNMmask or prefix length with each route, so when you use clasfull protocol (like RIP-1) the router won't be able to tell the difference between a route to the whole network and the all &quot;0&quot; subnet, in the same way, it won't be able to distinguish if a broadcast would have to be sent to the entire network or just the all &quot;1&quot; subnet.

I hope that answers the &quot;WHY&quot; no.
Like I said before, I tried to make it simple,
but if you still ned more precise info, read RFC950
 
>>Surely if the routers do not support classless routing, they won't support ANY of the classless subnets?

If a router doesn't support classless protocols, it won't be able to use the first and last subnet, but it might let you set up the subnets without problems. got it?

Pd: this is a VERY interesting topic, since the use of classless protocols is something new. There is a lot of discussion going on around this issue.
PD2: certification exams still assume the deployment of classfull networks in it's questions.
 
Gentlemen, this is intruiging. I'm wrestling with a similar issue, so lets flip it all around.

My company has essencially broken down our class B and handed out class C addresses to its service centers. Due to the size of our service center, we have 7 class C addresses. This causes our clients to go through the router each time they need to access network resources on another subnet. Now for the fun..

In order to streamline traffic, I want to supernet our class C's. In my understanding of the ANDing process, I adjusted test clients to /20 sunbnets and it worked without a hitch. My concern was that clients would need a host file to communicate with some subnets outside my LAN range. This is not the case and I'm not sure where to place the blame or credit. Your discussion brought up classless routing, on which I'm a bit unclear. Would/Could this be the reason for proper communication w/o a host file?
 
It looks like I am going to have to read RFC950!!!
If I can keep myself awake -- LOL.
 
After re-reading it I think I have the argument, that if the network hits a class-C only device it will recognize only the first two bits of the last octet of the subnet if they are either 10 or 01, but will not distinguish the first subnet (00) or the last subnet (11) as seperate networks because they are always being anded by 11 in the subnet mask.
 
Breakerfall - thanks, that cleared up the confusion.

My confusion was stemming from my understanding that if the router didn't support classless routing, how could it support the 2 subnets established: the answer is of course the only 2 IPs actually conflicting with classful addressing belong to the first subnet and the last subnet.

I wonder how much of fractal's network actually works: can the 2 subnet's communicate between each other? If so, perhaps there is a combination of classful and classless routers in use.

fractal: I suggest using a packet sniffer (ethereal?) on the network to see what's happening when you use subnets 1 & 4.


<marc> i wonder what will happen if i press this...[pc][ul][li]please give feedback on what works / what doesn't[/li][li]need some help? how to get a better answer: faq581-3339[/li][/ul]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top