Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Jan 2001 17:37:18 -0600
From:      Marius Strom <marius@marius.org>
To:        Troy Settle <troy@psknet.com>
Cc:        Colin Campbell <sgcccdc@citec.qld.gov.au>, freebsd-isp@FreeBSD.ORG
Subject:   Re: Hosting with multiple subnets
Message-ID:  <20010109173718.C1302@marius.org>
In-Reply-To: <BFEGKDHLHDNOJEIHJDBACEOHCAAA.troy@psknet.com>; from troy@psknet.com on Tue, Jan 09, 2001 at 06:09:24PM -0500
References:  <Pine.BSF.4.21.0101100831260.57827-100000@guru.citec.qld.gov.au> <BFEGKDHLHDNOJEIHJDBACEOHCAAA.troy@psknet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
But man would that make for a nasty routing table. =]

On Tue, Jan 09, 2001 at 06:09:24PM -0500, Troy Settle wrote:
> 
> Colin,
> 
> I'm breaking netiqet by copying this back to the list, but I think that many
> folks will find this useful or even educational.
> 
> You are correct, in that on a /26 subnet, you only have 62 usable IP
> addresses, however, if you treat it as a group of 64 /32 subnets, you can
> use all 64 addresses in the /26 that you allocated for web hosting.  The
> same thing applies to dynamic IP pools on your NAS.
> 
> Keep in mind, though, that this does not work if you are not properly
> subnetted.  If the subnet on your LAN is a /24, you can not use the network
> or broadcast addresses.  If, however, you use the first /26 (0-31) for your
> LAN, then route the last /26 (192-255) to your web server at .10, you can
> treat all 64 addresses in 192/26 as /32 subnets, giving you use of all 64
> addresses (including .255).
> 
> This concept does extend to a /24.  If you treat it as a group of 256 /32
> subnets, you can use all 256 addresses for web hosting or dialup.  It works
> for /any/ size CIDR block of IP addresses.  Give me a /16, and I'll give you
> 65,536 usable addresses for web hosting.
> 
> --
>   Troy Settle
>   Pulaski Networks
>   540.994.4254
> 
> It's always a long day, 86400 doesn't fit into a short
> 
> 
> 
> ** -----Original Message-----
> ** From: Colin Campbell [mailto:sgcccdc@citec.qld.gov.au]
> ** Sent: Tuesday, January 09, 2001 5:38 PM
> ** To: Troy Settle
> ** Subject: RE: Hosting with multiple subnets
> **
> **
> ** Hi,
> **
> ** On Tue, 9 Jan 2001, Troy Settle wrote:
> **
> ** > Agreed, but you could have given an example of one of the good
> ** ways to do
> ** > it.  Here's how I set up for hosting:
> ** >
> ** > 192.168.10.1/26 - gw address
> ** > 192.168.10.8/26 - fxp0 on my web server
> ** > 192.168.20.0/23 - bound to lo1 on the web server
> ** >
> ** > I use zebra to implement OSPF to get the routes kicked around
> ** my network,
> ** > but it could easily be done with a static route on the gateway router.
> ** >
> ** > Doing it like this keeps the arp tables small.  I don't know
> ** if it really
> ** > matters or not, but I like it like that.
> ** >
> ** > I also use a script rather than rc.conf to do my bindings:
> ** >
> ** > for i in `jot 256 0`
> ** >  do ifconfig lo1 inet 192.168.20.${i} netmask 0xffffffff alias
> ** > done
> ** >
> ** > And, yes, I do bind the /whole/ subnet.  I won't use .0 or
> ** .255, but with a
> ** > /26, I will use all 64 addresses.
> **
> ** You cannot use ALL addresses in a subnet. A /26 gives you 62 usable
> ** addresses. The host address that is all 0's is the sub-network
> ** address and
> ** the host address that is all 1's is the broadcast address. With
> ** a /26 mask
> ** you have four subnets as follows:
> **
> ** Subnet 1
> ** --------
> ** 192.168.10.0 = network address
> ** 192.168.10.1-192.168.10.62 = usable host addresses
> ** 192.168.10.63 = broadcast
> **
> ** Subnet 2
> ** --------
> ** 192.168.10.64 = network address
> ** 192.168.10.65-192.168.10.126 = usable host addresses
> ** 192.168.10.127 = broadcast
> **
> ** Subnet 3
> ** --------
> ** 192.168.10.128 = network address
> ** 192.168.10.129-192.168.10.190 = usable host addresses
> ** 192.168.10.191 = broadcast
> **
> ** Subnet 4
> ** --------
> ** 192.168.10.192 = network address
> ** 192.168.10.193-192.168.10.254 = usable host addresses
> ** 192.168.10.255 = broadcast
> **
> ** Colin
> **
> **
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-isp" in the body of the message
> 

-- 
Marius Strom <marius@marius.org>
Professional Geek/Unix System Administrator
URL: http://www.marius.org/
http://www.marius.org/marius.pgp 0x55DE53E4
 
"Never underestimate the bandwidth of a mini-van full of DLT
tapes traveling down the highway at 65 miles per hour..."
	-Andrew Tanenbaum, "Computer Networks"


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010109173718.C1302>