Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Apr 2000 01:50:13 +1000 (EST)
From:      andrew@ugh.net.au
To:        Duke Normandin <dnormandin@freewwweb.com>
Cc:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: OT - subnet masks
Message-ID:  <Pine.BSF.4.21.0004280118590.86943-100000@starbug.ugh.net.au>
In-Reply-To: <009301bfb05b$34f5cde0$57dba7d1@webserver>

next in thread | previous in thread | raw e-mail | index | archive | help


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0004280118590.86943-100000>