Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #258586
| From | <tomas@tuxteam.de> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: netmask question |
| Date | 2023-05-22 07:00 +0200 |
| Message-ID | <Gy5Oh-aAZD-1@gated-at.bofh.it> (permalink) |
| References | <Gy3Mt-azy9-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[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
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
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
csiph-web