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


Groups > linux.debian.user > #258582 > unrolled thread

netmask question

Started bycoreyh@free.fr
First post2023-05-22 04:50 +0200
Last post2023-05-23 02:50 +0200
Articles 20 on this page of 39 — 13 participants

Back to article view | Back to linux.debian.user


Contents

  netmask question coreyh@free.fr - 2023-05-22 04:50 +0200
    Re: netmask question Timothy M Butterworth <timothy.m.butterworth@gmail.com> - 2023-05-22 05:00 +0200
      Re: netmask question Tim Woodall <debianuser@woodall.me.uk> - 2023-05-22 09:50 +0200
        Re: netmask question <tomas@tuxteam.de> - 2023-05-22 10:10 +0200
        Re: netmask question coreyh@free.fr - 2023-05-22 11:00 +0200
          Re: netmask question Tim Woodall <debianuser@woodall.me.uk> - 2023-05-22 11:10 +0200
            Re: netmask question coreyh@free.fr - 2023-05-22 12:20 +0200
              Re: netmask question Timothy M Butterworth <timothy.m.butterworth@gmail.com> - 2023-05-22 12:30 +0200
              Re: netmask question Dan Ritter <dsr@randomstring.org> - 2023-05-22 13:10 +0200
        Re: netmask question Timothy M Butterworth <timothy.m.butterworth@gmail.com> - 2023-05-22 12:20 +0200
          Re: netmask question Tim Woodall <debianuser@woodall.me.uk> - 2023-05-22 12:30 +0200
          Re: netmask question <tomas@tuxteam.de> - 2023-05-22 13:10 +0200
    Re: netmask question Charles Curley <charlescurley@charlescurley.com> - 2023-05-22 05:10 +0200
    Re: netmask question <tomas@tuxteam.de> - 2023-05-22 07:00 +0200
      Re: netmask question Tim Woodall <debianuser@woodall.me.uk> - 2023-05-22 09:40 +0200
        Re: netmask question <tomas@tuxteam.de> - 2023-05-22 10:00 +0200
        Re: netmask question Timothy M Butterworth <timothy.m.butterworth@gmail.com> - 2023-05-22 12:20 +0200
        Re: netmask question gene heskett <gheskett@shentel.net> - 2023-05-22 18:20 +0200
          Re: netmask question <tomas@tuxteam.de> - 2023-05-22 21:10 +0200
            Re: netmask question gene heskett <gheskett@shentel.net> - 2023-05-23 01:50 +0200
              Re: netmask question Dan Purgert <dan@djph.net> - 2023-05-23 03:20 +0200
                Re: netmask question debian-user@howorth.org.uk - 2023-05-23 12:50 +0200
                  Re: netmask question Dan Purgert <dan@djph.net> - 2023-05-23 14:20 +0200
              Re: netmask question tomas@tuxteam.de - 2023-05-23 07:00 +0200
            Re: netmask question "Tom Reed" <tom@dkinbox.com> - 2023-05-23 01:50 +0200
              Re: netmask question Greg Wooledge <greg@wooledge.org> - 2023-05-23 02:10 +0200
                Re: netmask question <tomas@tuxteam.de> - 2023-05-23 06:40 +0200
              Re: netmask question Dan Ritter <dsr@randomstring.org> - 2023-05-23 02:30 +0200
                Re: netmask question "Tom Reed" <tom@dkinbox.com> - 2023-05-23 02:30 +0200
                  Re: netmask question Dan Ritter <dsr@randomstring.org> - 2023-05-23 02:50 +0200
                    Re: netmask question <tomas@tuxteam.de> - 2023-05-23 06:50 +0200
                    Re: netmask question Andy Smith <andy@strugglers.net> - 2023-05-27 03:10 +0200
                      Re: netmask question Greg Wooledge <greg@wooledge.org> - 2023-05-27 03:10 +0200
                        Re: netmask question Andy Smith <andy@strugglers.net> - 2023-05-27 03:20 +0200
                  Re: netmask question Greg Wooledge <greg@wooledge.org> - 2023-05-23 02:50 +0200
                    Re: netmask question "Tom Reed" <tom@dkinbox.com> - 2023-05-23 03:00 +0200
                      Re: netmask question Dan Ritter <dsr@randomstring.org> - 2023-05-23 03:20 +0200
                      Re: netmask question Tim Woodall <debianuser@woodall.me.uk> - 2023-05-23 08:30 +0200
                  Re: netmask question Timothy M Butterworth <timothy.m.butterworth@gmail.com> - 2023-05-23 02:50 +0200

Page 1 of 2  [1] 2  Next page →


#258582 — netmask question

Fromcoreyh@free.fr
Date2023-05-22 04:50 +0200
Subjectnetmask question
Message-ID<Gy3Mt-azy9-1@gated-at.bofh.it>
Hello list,

currently the netmask for an IPv4 is 255.255.255.255.
I am just not sure, why can't the netmask for IPv4 be 768.768.768.768?
Can I set that a netmask directly in linux OS?
If so we have much more IPv4 space available, even no IPv6 is needed.

Thank you.
Corey H.

[toc] | [next] | [standalone]


#258583

FromTimothy M Butterworth <timothy.m.butterworth@gmail.com>
Date2023-05-22 05:00 +0200
Message-ID<Gy3W9-azB9-1@gated-at.bofh.it>
In reply to#258582

[Multipart message — attachments visible in raw view] — view raw

On Sun, May 21, 2023 at 10:49 PM <coreyh@free.fr> wrote:

> Hello list,
>
> currently the netmask for an IPv4 is 255.255.255.255.
> I am just not sure, why can't the netmask for IPv4 be 768.768.768.768?
>

The IPv4 standard only allows each octet to be a value between 0 - 255.
Each Octet is 8 binary bits which adds up to a total of 255 if all bits are
set to on.

The only address that should have a netmask of 255.255.255.255 is the
Loopback interface.

Tim



> Can I set that a netmask directly in linux OS?
> If so we have much more IPv4 space available, even no IPv6 is needed.
>
> Thank you.
> Corey H.
>
>

-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀

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


#258590

FromTim Woodall <debianuser@woodall.me.uk>
Date2023-05-22 09:50 +0200
Message-ID<Gy8sN-aCBa-1@gated-at.bofh.it>
In reply to#258583
On Sun, 21 May 2023, Timothy M Butterworth wrote:

> The only address that should have a netmask of 255.255.255.255 is the
> Loopback interface.
>

I don't much use ipv4 any more if I can avoid it but isn't it normal for
point-to-point links to have a netmask of 255.255.255.255?

It definitely can be, maybe not so common as I assumed.

loopback is a /8

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


#258592

From<tomas@tuxteam.de>
Date2023-05-22 10:10 +0200
Message-ID<Gy8M9-aCXh-1@gated-at.bofh.it>
In reply to#258590

[Multipart message — attachments visible in raw view] — view raw

On Mon, May 22, 2023 at 08:41:13AM +0100, Tim Woodall wrote:
> On Sun, 21 May 2023, Timothy M Butterworth wrote:
> 
> > The only address that should have a netmask of 255.255.255.255 is the
> > Loopback interface.
> > 
> 
> I don't much use ipv4 any more if I can avoid it but isn't it normal for
> point-to-point links to have a netmask of 255.255.255.255?

Right -- this one designates an isolated host address: "the computer is the
network" [1]. I think it's rather used to designate host routes or single
hosts in firewall rules. For point-to-point links I think a /23, i.e.
255.255.255.254 seems more appropriate.

> It definitely can be, maybe not so common as I assumed.
> 
> loopback is a /8

Most definitely:

  tomas@trotzki:~$ ip addr show
  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      inet 127.0.0.1/8 scope host lo
         valid_lft forever preferred_lft forever
      inet6 ::1/128 scope host 
         valid_lft forever preferred_lft forever

(I actually make use if it when I want to test web pages locally and want
a host IP different to localhost).

Cheers
-- 
t

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


#258596

Fromcoreyh@free.fr
Date2023-05-22 11:00 +0200
Message-ID<Gy9yy-aDdA-9@gated-at.bofh.it>
In reply to#258590
On 22/05/2023 09:41, Tim Woodall wrote:
> On Sun, 21 May 2023, Timothy M Butterworth wrote:
> 
>> The only address that should have a netmask of 255.255.255.255 is the
>> Loopback interface.
>> 
> 
> I don't much use ipv4 any more if I can avoid it but isn't it normal 
> for
> point-to-point links to have a netmask of 255.255.255.255?
> 
> It definitely can be, maybe not so common as I assumed.
> 
> loopback is a /8

Hello,

In CIDR a host address is xx.xx.xx.xx/32 which means 255.255.255.255.
isn't it?

Thanks.

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


#258598

FromTim Woodall <debianuser@woodall.me.uk>
Date2023-05-22 11:10 +0200
Message-ID<Gy9Id-aDw0-11@gated-at.bofh.it>
In reply to#258596
On Mon, 22 May 2023, coreyh@free.fr wrote:

> On 22/05/2023 09:41, Tim Woodall wrote:
>> On Sun, 21 May 2023, Timothy M Butterworth wrote:
>> 
>>> The only address that should have a netmask of 255.255.255.255 is the
>>> Loopback interface.
>>> 
>> 
>> I don't much use ipv4 any more if I can avoid it but isn't it normal for
>> point-to-point links to have a netmask of 255.255.255.255?
>> 
>> It definitely can be, maybe not so common as I assumed.
>> 
>> loopback is a /8
>
> Hello,
>
> In CIDR a host address is xx.xx.xx.xx/32 which means 255.255.255.255.
> isn't it?
>

It depends on what question you're asking.

An individual address is a /32, but a host address might be listed as a
/24 for example. This means there are 256 addresses that can be reached
without routing.

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


#258599

Fromcoreyh@free.fr
Date2023-05-22 12:20 +0200
Message-ID<GyaNY-aE7t-3@gated-at.bofh.it>
In reply to#258598
On 22/05/2023 11:08, Tim Woodall wrote:
> On Mon, 22 May 2023, coreyh@free.fr wrote:
> 

>> 
>> Hello,
>> 
>> In CIDR a host address is xx.xx.xx.xx/32 which means 255.255.255.255.
>> isn't it?
>> 
> 
> It depends on what question you're asking.
> 
> An individual address is a /32, but a host address might be listed as a
> /24 for example. This means there are 256 addresses that can be reached
> without routing.

I see. thanks.
In some use cases my configuration requires a host address with /32 for 
CIDR. such as postscreen whitelist stuff.

I know 192.168.1.0/24 means a C class.
But 192.168.1.100/24 means what? C class or that separated address 
192.168.1.100?

kind regards
Corey

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


#258604

FromTimothy M Butterworth <timothy.m.butterworth@gmail.com>
Date2023-05-22 12:30 +0200
Message-ID<GyaXD-aEaG-11@gated-at.bofh.it>
In reply to#258599

[Multipart message — attachments visible in raw view] — view raw

On Mon, May 22, 2023 at 6:12 AM <coreyh@free.fr> wrote:

> On 22/05/2023 11:08, Tim Woodall wrote:
> > On Mon, 22 May 2023, coreyh@free.fr wrote:
> >
>
> >>
> >> Hello,
> >>
> >> In CIDR a host address is xx.xx.xx.xx/32 which means 255.255.255.255.
> >> isn't it?
> >>
> >
> > It depends on what question you're asking.
> >
> > An individual address is a /32, but a host address might be listed as a
> > /24 for example. This means there are 256 addresses that can be reached
> > without routing.
>
> I see. thanks.
> In some use cases my configuration requires a host address with /32 for
> CIDR. such as postscreen whitelist stuff.
>
> I know 192.168.1.0/24 means a C class.
> But 192.168.1.100/24 means what? C class or that separated address
> 192.168.1.100?
>

192.168.1.0/24 is the class C network address and 192.168.1.100/24 is the
class C host address. /24 is class C, /8 is Class A, /16 is Class B.


> kind regards
> Corey
>
>

-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀

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


#258605

FromDan Ritter <dsr@randomstring.org>
Date2023-05-22 13:10 +0200
Message-ID<GybAl-aECM-1@gated-at.bofh.it>
In reply to#258599
coreyh@free.fr wrote: 
> On 22/05/2023 11:08, Tim Woodall wrote:
> > On Mon, 22 May 2023, coreyh@free.fr wrote:
> > > In CIDR a host address is xx.xx.xx.xx/32 which means 255.255.255.255.
> > > isn't it?
> > > 
> > 
> > It depends on what question you're asking.
> > 
> > An individual address is a /32, but a host address might be listed as a
> > /24 for example. This means there are 256 addresses that can be reached
> > without routing.
> 
> I see. thanks.
> In some use cases my configuration requires a host address with /32 for
> CIDR. such as postscreen whitelist stuff.
> 
> I know 192.168.1.0/24 means a C class.
> But 192.168.1.100/24 means what? C class or that separated address
> 192.168.1.100?



The C in CIDR stands for Classless; the Class system went away,
even though people still routinely (and slightly incorrectly)
talk about any /24 as a class C.

192.168.1.100/24 either means:

one IP, 192.168.1.100, with a /24 network mask to define the
network

or

the entirety of 192.168.1.*, but badly specified.

The first meaning is more usual.

-dsr-

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


#258601

FromTimothy M Butterworth <timothy.m.butterworth@gmail.com>
Date2023-05-22 12:20 +0200
Message-ID<GyaNY-aE7t-9@gated-at.bofh.it>
In reply to#258590

[Multipart message — attachments visible in raw view] — view raw

On Mon, May 22, 2023 at 3:41 AM Tim Woodall <debianuser@woodall.me.uk>
wrote:

> On Sun, 21 May 2023, Timothy M Butterworth wrote:
>
> > The only address that should have a netmask of 255.255.255.255 is the
> > Loopback interface.
> >
>
> I don't much use ipv4 any more if I can avoid it but isn't it normal for
> point-to-point links to have a netmask of 255.255.255.255?
>

Point-to-point links should have  a mask of 255.255.255.252. This provides
a Network, Broadcast and two host addresses.

 It definitely can be, maybe not so common as I assumed.

>
> loopback is a /8
>

 The 127.0.0.1 is a /8 but you can assign a public IP address to loopback
which is useful on routers. A /32 provides a Network, Broadcast and Host
address as a single address because there is only one host.


-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀

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


#258603

FromTim Woodall <debianuser@woodall.me.uk>
Date2023-05-22 12:30 +0200
Message-ID<GyaXD-aEaG-3@gated-at.bofh.it>
In reply to#258601
On Mon, 22 May 2023, Timothy M Butterworth wrote:

> On Mon, May 22, 2023 at 3:41?AM Tim Woodall <debianuser@woodall.me.uk>
> wrote:
>
>> On Sun, 21 May 2023, Timothy M Butterworth wrote:
>>
>>> The only address that should have a netmask of 255.255.255.255 is the
>>> Loopback interface.
>>>
>>
>> I don't much use ipv4 any more if I can avoid it but isn't it normal for
>> point-to-point links to have a netmask of 255.255.255.255?
>>
>
> Point-to-point links should have  a mask of 255.255.255.252. This provides
> a Network, Broadcast and two host addresses.
>
Why? I'm not saying you cannot do this but I don't see what possible
advantage it offers.

The two cases I see are that you want the individual clients connecting
via p-t-p links to be able to talk in which case you probably want
something bigger than a /30 or you don't in which case a /32 is all you
need.

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


#258606

From<tomas@tuxteam.de>
Date2023-05-22 13:10 +0200
Message-ID<GybAm-aECM-5@gated-at.bofh.it>
In reply to#258601

[Multipart message — attachments visible in raw view] — view raw

On Mon, May 22, 2023 at 06:11:50AM -0400, Timothy M Butterworth wrote:

[...]

> Point-to-point links should have  a mask of 255.255.255.252. This provides
> a Network, Broadcast and two host addresses.

In practice, I've seen both: /30 and /31. Wikipedia [1] quotes RFC3021,
which states /31 for that case:

  "As a special case, a /31 network has capacity for just two hosts.
   These networks are typically used for point-to-point connections.
   There is no network identifier or broadcast address for these
   networks"

Cheers

[1] https://en.wikipedia.org/wiki/Internet_Protocol_Version_4#First_and_last_subnet_addresses

-- 
t

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


#258584

FromCharles Curley <charlescurley@charlescurley.com>
Date2023-05-22 05:10 +0200
Message-ID<Gy45P-azTo-1@gated-at.bofh.it>
In reply to#258582
On Mon, 22 May 2023 04:49:07 +0200
coreyh@free.fr wrote:

> currently the netmask for an IPv4 is 255.255.255.255.
> I am just not sure, why can't the netmask for IPv4 be 768.768.768.768?
> Can I set that a netmask directly in linux OS?
> If so we have much more IPv4 space available, even no IPv6 is needed.

You need to do some serious reading. I suggest you start with this
article. https://en.wikipedia.org/wiki/IP_address

The reason your idea won't work for IPV4 is explained in
https://en.wikipedia.org/wiki/IP_address#IPv4_addresses Each of the
four quads represents 8 unsigned bits. So the range is 0 to 255. 768
won't fit in 8 bits.

Now, if you want to define a new IP protocol, go ahead.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/

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


#258586

From<tomas@tuxteam.de>
Date2023-05-22 07:00 +0200
Message-ID<Gy5Oh-aAZD-1@gated-at.bofh.it>
In reply to#258582

[Multipart message — attachments visible in raw view] — view raw

On Mon, May 22, 2023 at 04:49:07AM +0200, coreyh@free.fr wrote:
> Hello list,
> 
> currently the netmask for an IPv4 is 255.255.255.255.
> I am just not sure, why can't the netmask for IPv4 be 768.768.768.768?
> Can I set that a netmask directly in linux OS?
> If so we have much more IPv4 space available, even no IPv6 is needed.

Charles is right: the Wikipedia page is a good resource here.

The short answer is: an IPv4 address is, behind the scenes a 32 bit
number; for (human) display it is subdivided into four 8 bit chunks
(called "octets" for obvious reasons), and those octets only can
go from 0 to 255 (since 2^8 == 255).

There are more limitations to netmasks: since the net part of an
address has to be "to the left" and the host part "to the right",
you can only have netmasks with all (binary) ones to the left and
all (binary) zeroes to the right. Some examples:

 |                              binary |         decimal |
 |-------------------------------------+-----------------|
 | 11111111.11111111.11111111.00000000 |   255.255.255.0 |
 | 11111111.11111111.11111111.10000000 | 255.255.255.128 |
 | 11111111.11111111.11111111.11000000 | 255.255.255.192 |

Therefore it is sufficient to specify how many "one" bits there
are in your netmask. These days it is customary to just write
that (after a slash) to specify the netmask. For an IP address
of the third type, you might write, for example:

  192.168.12.11/26

...the "26" specifying the netmask.

Cheers
-- 
t

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


#258589

FromTim Woodall <debianuser@woodall.me.uk>
Date2023-05-22 09:40 +0200
Message-ID<Gy8j7-aCxQ-1@gated-at.bofh.it>
In reply to#258586
On Mon, 22 May 2023, tomas@tuxteam.de wrote:

  number; for (human) display it is subdivided into four 8 bit chunks
> (called "octets" for obvious reasons), and those octets only can
> go from 0 to 255 (since 2^8 == 255).
>
Nit, but 2^8 is 256.

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


#258591

From<tomas@tuxteam.de>
Date2023-05-22 10:00 +0200
Message-ID<Gy8Ct-aCEK-1@gated-at.bofh.it>
In reply to#258589

[Multipart message — attachments visible in raw view] — view raw

On Mon, May 22, 2023 at 08:32:14AM +0100, Tim Woodall wrote:
> On Mon, 22 May 2023, tomas@tuxteam.de wrote:
> 
>  number; for (human) display it is subdivided into four 8 bit chunks
> > (called "octets" for obvious reasons), and those octets only can
> > go from 0 to 255 (since 2^8 == 255).
> > 
> Nit, but 2^8 is 256.

Eh' -- off-by-one error. We C programmers do that ;-P

But yes, thanks for the clarification.

Cheers
-- 
t

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


#258600

FromTimothy M Butterworth <timothy.m.butterworth@gmail.com>
Date2023-05-22 12:20 +0200
Message-ID<GyaNX-aE7t-1@gated-at.bofh.it>
In reply to#258589

[Multipart message — attachments visible in raw view] — view raw

On Mon, May 22, 2023 at 3:32 AM Tim Woodall <debianuser@woodall.me.uk>
wrote:

> On Mon, 22 May 2023, tomas@tuxteam.de wrote:
>
>   number; for (human) display it is subdivided into four 8 bit chunks
> > (called "octets" for obvious reasons), and those octets only can
> > go from 0 to 255 (since 2^8 == 255).
> >
> Nit, but 2^8 is 256.
>

In binary the first address is 0 which is all bits off. In a /24 network
the .0 is reserved for network addresses and 255 is reserved for broadcast
which means there are 254 usable host addresses!

-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀

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


#258609

Fromgene heskett <gheskett@shentel.net>
Date2023-05-22 18:20 +0200
Message-ID<Gygql-aHpq-1@gated-at.bofh.it>
In reply to#258589
On 5/22/23 03:32, Tim Woodall wrote:
> On Mon, 22 May 2023, tomas@tuxteam.de wrote:
> 
>   number; for (human) display it is subdivided into four 8 bit chunks
>> (called "octets" for obvious reasons), and those octets only can
>> go from 0 to 255 (since 2^8 == 255).
>>
> Nit, but 2^8 is 256.
> 
> .
The octets count from base 0 Tim.

Cheers, Gene Heskett.
-- 
"There are four boxes to be used in defense of liberty:
  soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
  - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/>

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


#258611

From<tomas@tuxteam.de>
Date2023-05-22 21:10 +0200
Message-ID<Gyj4R-aJ3P-7@gated-at.bofh.it>
In reply to#258609

[Multipart message — attachments visible in raw view] — view raw

On Mon, May 22, 2023 at 12:16:09PM -0400, gene heskett wrote:
> On 5/22/23 03:32, Tim Woodall wrote:
> > On Mon, 22 May 2023, tomas@tuxteam.de wrote:
> > 
> >   number; for (human) display it is subdivided into four 8 bit chunks
> > > (called "octets" for obvious reasons), and those octets only can
> > > go from 0 to 255 (since 2^8 == 255).
> > > 
> > Nit, but 2^8 is 256.
> > 
> > .
> The octets count from base 0 Tim.

That's right, but then they go 0 .. 2^8 - 1. 2^8 is still 256, Tim does
have a point there :-)

Cheers
-- 
t

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


#258618

Fromgene heskett <gheskett@shentel.net>
Date2023-05-23 01:50 +0200
Message-ID<GynrP-aLuC-1@gated-at.bofh.it>
In reply to#258611
On 5/22/23 15:04, tomas@tuxteam.de wrote:
> On Mon, May 22, 2023 at 12:16:09PM -0400, gene heskett wrote:
>> On 5/22/23 03:32, Tim Woodall wrote:
>>> On Mon, 22 May 2023, tomas@tuxteam.de wrote:
>>>
>>>    number; for (human) display it is subdivided into four 8 bit chunks
>>>> (called "octets" for obvious reasons), and those octets only can
>>>> go from 0 to 255 (since 2^8 == 255).
>>>>
>>> Nit, but 2^8 is 256.
>>>
>>> .
>> The octets count from base 0 Tim.
> 
> That's right, but then they go 0 .. 2^8 - 1. 2^8 is still 256, Tim does
> have a point there :-)
> 
I don't see it, 255 is all 8 bits set, 256 is all 8 bits cleared and 
carry set.

> Cheers

Cheers, Gene Heskett.
-- 
"There are four boxes to be used in defense of liberty:
  soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
  - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/>

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


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | linux.debian.user


csiph-web