Subnetting

Charles Steinkuehler charles at steinkuehler.net
Wed Nov 20 13:14:07 CST 2002


dt-kclug at xr7.org wrote:
> On Tue, 19 Nov 2002, Lucas Peet wrote:
>> My question is:  How can I split a Class C block of IP addresses like so
>> - 
>> 
>> Network #1:
>> NetIP:		10.0.0.0
>> Usable IP's:	10.0.0.1-2
>> Broadcast:		10.0.0.3
>> 
>> Network #2:
>> NetIP:		10.0.0.4
>> Useable IP's:	10.0.0.5-254
>> Broadcast:		10.0.0.255
>> 
>> Is this even possible?  What other alternatives would I have besides
>> subnetting, if I want both the above networks separately routable on
>> different interface cards?
> 
> This is not possible.  Look at the addresses and masks in binary to see
> why.  Netmasks are always 1's through the network part of the address, and
> the /24 notation means that the netmask is 24 1's followed by 8 0's
> (255.255.255.0).  This is easier to describe with this notation...
> 
> There isn't anything that forces you to use the same netmask for the whole 
> /24 (class C) block.  Following your example, you could have 2 /30 
> networks (0-3 and 4-7).  Since these two networks together make up a /29, 
> you could then have another /29 (8-15) to fill out a /28.  This repeats 
> until you fill up the /24; you would have a /25 (128-255) at the top.
> 
> I know this doesn't solve your problem, since you wind up with 7 subnets
> total, but it should at least explain why you can't get there from here.

As mentioned, "real" subnets must come in sizes that are powers of two, 
and if you want to subnet your /24, there's no way to make a subnet 
bigger than a /25 (128 IPs).

Depending on exactly what you need the IPs for, however, you may be able 
to use something like proxy arp, which can arbitrarily split subnets 
however you want (the IPs on seperate networks don't even have to be 
contiguous), or you can use private IPs, ip tunneling, or various other 
tricks to avoid consuming your public IPs, which are hard to come by.

A better description of what you're trying to do would help a lot with 
trying to suggest alternate solutions.

-- 
Charles Steinkuehler
charles at steinkuehler.net




More information about the Kclug mailing list