From owner-freebsd-questions Thu May 10 11:57:26 2001 Delivered-To: freebsd-questions@freebsd.org Received: from tethys.valhalla.net (tethys.valhalla.net [195.26.32.112]) by hub.freebsd.org (Postfix) with ESMTP id B51CC37B423 for ; Thu, 10 May 2001 11:57:21 -0700 (PDT) (envelope-from mark@tethys.valhalla.net) Received: by tethys.valhalla.net (Postfix, from userid 500) id 5169133009; Thu, 10 May 2001 19:57:20 +0100 (BST) Date: Thu, 10 May 2001 19:57:20 +0100 From: Mark Drayton To: freebsd-questions@freebsd.org Subject: Re: TCP/IP Subnetting Message-ID: <20010510195720.A31701@tethys.valhalla.net> Mail-Followup-To: freebsd-questions@freebsd.org References: <86r8xxnncd.fsf@pan.penguinpowered.org.uk> <005b01c0d977$9e4b1430$0f01a8c0@phantom> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <005b01c0d977$9e4b1430$0f01a8c0@phantom>; from freymann@eagle.ca on Thu, May 10, 2001 at 01:35:34PM -0400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Gerald T. Freymann (freymann@eagle.ca) wrote: > > I have a /25 IP range that I need to subnet. I need to give 4 > > addresses to one network and the remaining addresses to the other > > network. > > But you also must remain in the proper boundaries of subnetting. You > may find you can't split it exactly as you want, but at least > something close. > > If you have a look here: > > http://www.again.net/cidr > > You want a 4 useable IP subnet... but it shows 2, 6 and 14. > > Network A: Network Address: 192.168.1.128 Broadcast Address: > 192.168.1.135 Subnet Mask: 255.255.255.255.248 Range: 192.168.1.129 - > 192.168.1.134 (6 useable Addresses) > > Network B: Network Address: 192.168.1.136 Broadcast Address: > 192.168.1.255 Subnet Mask: 255.255.255.136 Range: 192.168.1.137 - > 192.168.1.254 (118 useable Addresses) Each byte of a subnet mask can only be one of 0, 128, 192, 224, 240, 248, 252, 254, or 255. You can *only* split a range of addresses in the middle of the block. You can't put the split near one end to get a small block and a big block. ------------------------------------------------------------ | subnet A | subnet B | ------------------------------------------------------------ 0 127|128 255 netmask subnet A: network address: 192.168.1.0 broadcast address: 192.168.1.127 netmask: 255.255.255.128 (or /25) useable address: 126 (192.168.1.1 - 192.168.1.126 inc) subnet B: network address: 192.168.1.128 broadcast address: 192.168.1.255 netmask: 255.255.255.128 (or /25) useable address: 126 (192.168.1.129 - 192.168.1.254 inc) You can keep splitting each subnet in half (until the subnets only contain one address): ------------------------------------------------------------ | subnet A | subnet B | subnet C | ------------------------------------------------------------ 0 127|128 191|192 255 netmask subnet A: network address: 192.168.1.0 broadcast address: 192.168.1.127 netmask: 255.255.255.128 (or /25) useable address: 126 (192.168.1.1 - 192.168.1.126 inc) subnet B: network address: 192.168.1.128 broadcast address: 192.168.1.191 netmask: 255.255.255.192 (or /26) useable address: 62 (192.168.1.129 - 192.168.1.190 inc) subnet C: network address: 192.168.1.192 broadcast address: 192.168.1.255 netmask: 255.255.255.192 (or /26) useable address: 62 (192.168.1.193 - 192.168.1.254 inc) You could now split B or C into smaller blocks again, but only in the middle. The best you can do in your situation is to either have two /26s giving 62 hosts in each block or split the whole /25 into 16 /29s (a /29 has room for 6 hosts) which is going to involve a lot of cocking about with routing between subnets and so on. Essentially you can't have a block broken up the way you want it. I hope this makes sense! Try http://www.freesoft.org/CIE/Course/Subnet/ for more info. Cheers, -- Mark Drayton To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message