ipcalc and sipcalc

Joel Rees joel.rees at gmail.com
Tue Nov 28 12:05:42 UTC 2017


2017/11/28 19:58 "thufir" <hawat.thufir at gmail.com>:
>
> On Mon, 27 Nov 2017 13:02:47 +0000, Colin Watson wrote:
>
> >  * sipcalc understands IPv6, but it's mainly a subnet calculator; as far
> >    as I can see its "v4 in v6" output mode is for converting the other
> >    way, i.e. taking an IPv6 address, assuming that it's an IPv4-mapped
> >    address, and rendering the last four octets in IPv4 style.
> >
> > I'd generally recommend ipv6calc instead of either of these if you're
> > trying to do address conversions.
>
>
>
> Thanks for using your clairvoyance to understand the question I (think)
> that I meant to ask!  I'm trying to read or parse ipv6 addresses (when
> they have a direct correlation to ipv4 addresses).
>
> Reading the man page:
>
> thufir at dur:~$
> thufir at dur:~$ ipv6calc --ipv4_to_6to4addr 192.168.1.1
> No action type specified, try autodetection...found type: conv6to4
> 2002:c0a8:101::
> thufir at dur:~$
>
>
> they give that as an example for typical usage, although they use
> 127.0.0.1 instead.  Give me pencil, paper, and lots of time, I can
> convert between binary and decimal.  Not so much hexadecimal...

It's worth the practice.

> I went to an online hex to dec converter, and c0 converts as 192.  But,
> 2002 hex converts to 8194, so don't see how that helps at all.  Or does
> it?

Well, what are you expecting to see the ipv4 address appended to?

a8 is 168.

101 is 1 in each of two adjacent bytes, or the 1.1.

> so, this "converts" or "translates" ipv4 to ipv6?

Maybe, for some meaning of "convert".

> also, is the above correct usage?  Because it seems to be saying there's
> an error, no action type specified.

man ipv6calc

or

ipv6calc --action -?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20171128/5575ed2e/attachment.html>


More information about the ubuntu-users mailing list