From owner-freebsd-questions Thu Apr 27 8:49:52 2000 Delivered-To: freebsd-questions@freebsd.org Received: from starbug.ugh.net.au (starbug.ugh.net.au [203.31.238.37]) by hub.freebsd.org (Postfix) with ESMTP id 3099D37B90E for ; Thu, 27 Apr 2000 08:49:47 -0700 (PDT) (envelope-from andrew@ugh.net.au) Received: by starbug.ugh.net.au (Postfix, from userid 1000) id ED169A839; Fri, 28 Apr 2000 01:50:13 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by starbug.ugh.net.au (Postfix) with ESMTP id EA8795410; Fri, 28 Apr 2000 01:50:13 +1000 (EST) Date: Fri, 28 Apr 2000 01:50:13 +1000 (EST) From: andrew@ugh.net.au To: Duke Normandin Cc: freebsd-questions Subject: Re: OT - subnet masks In-Reply-To: <009301bfb05b$34f5cde0$57dba7d1@webserver> Message-ID: X-WonK: *wibble* MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 27 Apr 2000, Duke Normandin wrote: > Q. When a person acquires an IP address, is he given just the netid > portion of the IP, or both the netid & hostid? A user is allocated an IP and a netmask. If you are on the end of a modem your ISP probably gives you an IP of 255.255.255.255 meaning you only get one IP. A small business might be given an IP of 132.234.112.0 and a netmask of 255.255.255.0 meaning they can use all the numbers from 132.234.112.0 to 132.234.112.255 (note .0 and .255 are reserved as network and broadcast addresses respectively). > I can follow the example (255.255.255.224) above to the point of "seeing" > that 6 subnets are available for the subnet mask of 11100000; and that > the available hostids will range from 1-30. I just can see how I would > determine which of the 6 available subnets (above) to use. Or can I use > anyone one of the six that "works for me"? Tia.... It depends what you were allocated. Take the small business above. Assume they had a number of small networks. The business could use a netmask of 255.255.255.224 and have 132.234.112.1->132.234.112.30 allocated to the accounting network, 132.234.112.33->132.234.112.62 allocated to the engineering network etc. They could even mix and match netmasks (as long as nothing overlapped). ie all the machines in accounting have a netmask of 255.255.255.224 and have IPs in the range of 132.234.112.1 -> 132.234.112.30. In engineering all the machines have the netmask of 255.255.255.192 and have IPs in the range of 132.234.112.33 -> 132.234.112.94. This works as long as the router in the middle knows what is going on. Each host only has to use the netmask to determine which machines arent directly addressable on the network. The ISP has allocated the business 132.234.112.0/24. The business allocated accounting 132.234.112.0/27. The ISP may have been allocated 132.234.0.0/23 by its upstream provider. BTW the /x indocates x bits in the address are used to represent the network. Andrew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message