Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #3066

Re: LAN programming

Path csiph.com!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail
From Ike Naar <ike@iceland.freeshell.org>
Newsgroups comp.programming
Subject Re: LAN programming
Date Wed, 20 Feb 2013 22:49:03 +0000 (UTC)
Organization A noiseless patient Spider
Lines 20
Message-ID <slrn3vfskiakoe.9q8.ike@iceland.freeshell.org> (permalink)
References <de83f76f-3c54-417f-a9cb-927696cbe352@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Injection-Date Wed, 20 Feb 2013 22:49:03 +0000 (UTC)
Injection-Info mx05.eternal-september.org; posting-host="0be15772a183805a7eecac7d41b73a46"; logging-data="22274"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/sjQBSzc0nGyCIhjogxpxB"
User-Agent slrn/0.9.9p1 (NetBSD)
Cancel-Lock sha1:WR7JkSNrJSREMIRe930DlNeO56E=
Xref csiph.com comp.programming:3066

Show key headers only | View raw


On 2013-02-20, bob <bob@coolfone.comze.com> wrote:
> Let's say you are programming on a network where hosts have IP
> addresses that are 192.168.0.x.
> Can someone help me remember what the valid values of x are for a PC?
> Is it something like 1 to 254?
> Maybe 2 to 254?
> I know some values are reserved or used for broadcasting or something,
> but I can't remember exactly what the deal is.

Assuming a subnet mask of 255.255.255.0, for the host part of the
IP address (the 'x' in your example) the values all-bits-zero (0)
and all-bits-one (255) are reserved for the network and the broadcast
address, respectively.  Also, you cannot use any value that is
already in use by other equipment on the network. If there's a
router that connects your network to other networks, and that router
has address 192.168.0.1 on your network, then you cannot use that
address for a PC.

So, valid values of x for a PC are 1..254, excluding values
that are already in use by other equipment on the network.

Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

LAN programming bob <bob@coolfone.comze.com> - 2013-02-20 14:05 -0800
  Re: LAN programming Ike Naar <ike@iceland.freeshell.org> - 2013-02-20 22:49 +0000
  Re: LAN programming Robert Wessel <robertwessel2@yahoo.com> - 2013-02-20 16:55 -0600
  Re: LAN programming Geoff <geoff@invalid.invalid> - 2013-02-20 16:10 -0800

csiph-web