News for hackers. Stuff that matters.
Re:IPv4 addresses are silly, inet_aton(3) doubly so by einpoklum on Wednesday November 03, 2021 @08:08AM (#29093518)
1. Without delimitation, everything becomes long and confusing (including a single hexadecimal number for IPv4).

2. You absolutely lost me with your IPv6 example:

  * I need to remember whether to use one colon or two, for each delimited number
  * How do I even know the range of each delimited value is the same?
  * How can I be sure what basis each of the delimited values is? I mean, you can tell me it's hex, but without someone telling me, I'm never quite sure.
With IPv4, it's easy: Four dot-delimited numbers, each between 0 and 255, in decimal notation.

Can you describe valid IPv6 addresses like that?

Re:IPv4 addresses are silly, inet_aton(3) doubly so by gorgoiler on Wednesday November 03, 2021 @08:32AM (#29093707)
IPv6 is also easy!

The first 64 bits are the network and the last 64 bits are the host address. You write them out in groups of four hex chars (16 bits per group) separated by colons.

To make them a little more memorable, leading 0s in a group can be omitted, and '::' will be expanded to fill the middle of an address with 0s.

The 64/64 split is always the same for local networks, unlike IPv4 CIDR where the widths of each part are based on how rich you are :)

In full, without any abbreviations, `2001:db8:60:12::1` breaks down into:

`2001:db8::` – your ISP.

`2001:db8:60::` – you, their customer. This is the number you end up typing a lot, just like you type "31.101.24.xxx" if you are lucky enough to own an IPv4 /24.

`2001:db8:60:12::` – an actual network, in this case your network number 12, e.g. your toilet soap dispenser level monitoring network

`2001:db8:60:12::1` – soap dispenser controller PC

`2001:db8:60:12:7223:24ff:fe02:844e` – random soap dispenser with a giant weird self-assigned address that you don't need to care about remembering because the dispenser connects to your controller PC, not the other way around (if you did, you'd assign it a memorable address :P)

Re:IPv4 addresses are silly, inet_aton(3) doubly so by whoknowswhat11 on Wednesday November 03, 2021 @10:53AM (#29095511)
Actually, the 64/64 split is not always the same.

I cannot get my ISP to allocate me a SINGLE static ipv6. So it's much MUCH more expensive to get an ipv6 address than an ipv4 static IP address.

Re:IPv4 addresses are silly, inet_aton(3) doubly so by tsimionescu on Wednesday November 03, 2021 @08:26AM (#29093656)
Valid IPv6 addresses are 8 colon-delimited numbers, each between 0 and FFFF, in hex notation: FFFF:0:0:0:0:0:2:1

For convenience, one stretch of all-0 numbers can be omitted. FFFF::2:1

For bizarre reasons, the last 2 numbers can be replaced with an IPv4 address... FFFF::0.2.0.1

Re:IPv4 addresses are silly, inet_aton(3) doubly so by einpoklum on Wednesday November 03, 2021 @11:17AM (#29095874)
Convenience and notation variance are more confusing than useful. If it had just been 8 numbers, with no ommissions or replacements, I would have better been able to keep track.