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


Groups > comp.programming > #3065 > unrolled thread

LAN programming

Started bybob <bob@coolfone.comze.com>
First post2013-02-20 14:05 -0800
Last post2013-02-20 16:10 -0800
Articles 4 — 4 participants

Back to article view | Back to comp.programming


Contents

  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

#3065 — LAN programming

Frombob <bob@coolfone.comze.com>
Date2013-02-20 14:05 -0800
SubjectLAN programming
Message-ID<de83f76f-3c54-417f-a9cb-927696cbe352@googlegroups.com>
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.


Thanks.

[toc] | [next] | [standalone]


#3066

FromIke Naar <ike@iceland.freeshell.org>
Date2013-02-20 22:49 +0000
Message-ID<slrn3vfskiakoe.9q8.ike@iceland.freeshell.org>
In reply to#3065
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.

[toc] | [prev] | [next] | [standalone]


#3067

FromRobert Wessel <robertwessel2@yahoo.com>
Date2013-02-20 16:55 -0600
Message-ID<5pkai8tmu0mr09jhi1j5177ppenhcbt6de@4ax.com>
In reply to#3065
On Wed, 20 Feb 2013 14:05:35 -0800 (PST), 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.


All-zeros and all-ones are reserved, so 1..254 are available for hosts
in the case of a /24.  Now the 192.168 block is actually a /16, so
what your actual subnet is depends on the way you've segmented the
network, although subnetting it into a bunch of /24s *is* common.

[toc] | [prev] | [next] | [standalone]


#3069

FromGeoff <geoff@invalid.invalid>
Date2013-02-20 16:10 -0800
Message-ID<6apai8t47elfoedlc77fmmfrfoqme04bpt@4ax.com>
In reply to#3065
On Wed, 20 Feb 2013 14:05:35 -0800 (PST), 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.
>
>

It depends on the net mask. For a net mask of 255.255.255.0 the hosts can be
numbered 1 to 254 for that subnet. For a net mask of 255.255.0.0 then hosts can
be numbered 1.1 through 254.254 if you need to enumerate all hosts. 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.programming


csiph-web