After receiving a request from Martin on the misc@ mailing list to make IPv6 the default version for netcalc, I decided to implement my original idea of dynamically detecting which version IP address the user supplies so that no switch is necessary to discern the two. It was a trivial change but definitely an improvement; and, like Martin remarked, "it's 2019 after all." Despite the fact that IPv4 still traffics most of the Internet with approximately 75% coverage, any encouragement to implement its successor should be the default position.

I am a little surprised that IPv6 wasn't the default being taught at university as late as November 2018. In any case, it's now no longer necessary to use the -6 switch to specify IPv6 in netcalc:

$ netcalc dfa2:984b:2b37:b4a5:594b:fcbd:66be:4faf/111

Address        : dfa2:984b:2b37:b4a5:594b:fcbd:66be:4faf
CIDR notation  : dfa2:984b:2b37:b4a5:594b:fcbd:66be::/111
Start address  : dfa2:984b:2b37:b4a5:594b:fcbd:66be::
End address    : dfa2:984b:2b37:b4a5:594b:fcbd:66bf:ffff
Block size:    : 131,072 contiguous usable hosts

And a switch still isn't needed for IPv4 either:

$ netcalc

Address           :
CIDR notation     :
Address range     : ——
Broadcast address :
Subnet mask       : [0xffffffe0]
Address block     :   30 contiguous hosts

Magic! The updated version is available on the projects page. Alternatively, you can clone either my self-hosted Fossil or sourcehut repository.


comments powered by Disqus