Date: Thu, 10 May 2001 19:57:20 +0100 From: Mark Drayton <mark.drayton@4thwave.co.uk> To: freebsd-questions@freebsd.org Subject: Re: TCP/IP Subnetting Message-ID: <20010510195720.A31701@tethys.valhalla.net> In-Reply-To: <005b01c0d977$9e4b1430$0f01a8c0@phantom>; from freymann@eagle.ca on Thu, May 10, 2001 at 01:35:34PM -0400 References: <86r8xxnncd.fsf@pan.penguinpowered.org.uk> <005b01c0d977$9e4b1430$0f01a8c0@phantom>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010510195720.A31701>