ipcalc and sipcalc

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

ipcalc and sipcalc

Thufir Hawat
Just looking at these two tools.  I see different online converts from
IPv4 to IPv6.  Can either or both of these tools perform that conversion?

see:

https://www.ultratools.com/tools/ipv4toipv6



something like that?




thanks,

Thufir


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: ipcalc and sipcalc

Liam Proven
On 26 November 2017 at 13:05, thufir <[hidden email]> wrote:
> Just looking at these two tools.  I see different online converts from
> IPv4 to IPv6.  Can either or both of these tools perform that conversion?
>
> see:
>
> https://www.ultratools.com/tools/ipv4toipv6
>
> something like that?

*Wrinkled forehead*

What?

My IPv6 understand is weak -- although I have studied it for
certification exams, I've never deployed it  -- but that makes no
sense.

It's meaningless. It's like saying "here is what you'd look like if
you had been born a pomegranate" or something. You can't _translate_
addresses. Well, a gateway can, but it maintains an internal mapping
table that is fairly meaningless.

AIUI.

--
Liam Proven • Profile: https://about.me/liamproven
Email: [hidden email] • Google Mail/Talk/Plus: [hidden email]
Twitter/Facebook/Flickr: lproven • Skype/LinkedIn/AIM/Yahoo: liamproven
UK: +44 7939-087884 • ČR/WhatsApp/Telegram/Signal: +420 702 829 053

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: ipcalc and sipcalc

J.Witvliet
In reply to this post by Thufir Hawat
Pointless exercise.
Either you have v6, or you don’t.
There was is no migrating.
And with free tunneling services, there is no excuse for not doing v6

Sent from my iPhone

On 26 Nov 2017, at 13:39, Liam Proven <[hidden email]> wrote:

On 26 November 2017 at 13:05, thufir <[hidden email]> wrote:
Just looking at these two tools.  I see different online converts from
IPv4 to IPv6.  Can either or both of these tools perform that conversion?

see:

https://www.ultratools.com/tools/ipv4toipv6

something like that?

*Wrinkled forehead*

What?

My IPv6 understand is weak -- although I have studied it for
certification exams, I've never deployed it  -- but that makes no
sense.

It's meaningless. It's like saying "here is what you'd look like if
you had been born a pomegranate" or something. You can't _translate_
addresses. Well, a gateway can, but it maintains an internal mapping
table that is fairly meaningless.

AIUI.

--
Liam Proven • Profile: https://about.me/liamproven
Email: [hidden email] • Google Mail/Talk/Plus: [hidden email]
Twitter/Facebook/Flickr: lproven • Skype/LinkedIn/AIM/Yahoo: liamproven
UK: +44 7939-087884 • ČR/WhatsApp/Telegram/Signal: +420 702 829 053

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. De Staat aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die verband houdt met risico's verbonden aan het elektronisch verzenden van berichten.

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. The State accepts no liability for damage of any kind resulting from the risks inherent in the electronic transmission of messages.
--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: ipcalc and sipcalc

Colin Watson
In reply to this post by Liam Proven
On Sun, Nov 26, 2017 at 01:25:28PM +0100, Liam Proven wrote:

> On 26 November 2017 at 13:05, thufir <[hidden email]> wrote:
> > Just looking at these two tools.  I see different online converts from
> > IPv4 to IPv6.  Can either or both of these tools perform that conversion?
> >
> > see:
> >
> > https://www.ultratools.com/tools/ipv4toipv6
> >
> > something like that?
>
> *Wrinkled forehead*
>
> What?
>
> My IPv6 understand is weak -- although I have studied it for
> certification exams, I've never deployed it  -- but that makes no
> sense.
>
> It's meaningless. It's like saying "here is what you'd look like if
> you had been born a pomegranate" or something. You can't _translate_
> addresses. Well, a gateway can, but it maintains an internal mapping
> table that is fairly meaningless.

[I'm an amateur network architect at best, but have deployed IPv6 at
home in a few different ways over the last 15 years or so.]

IPv4-mapped addresses are a real thing
(https://en.wikipedia.org/wiki/IPv6#IPv4-mapped_IPv6_addresses), but
they're pretty confusing since they imply using IPv6-specific tools to
talk to IPv4, and IME they aren't really all that useful in practical
deployments.  A conversion tool for this kind of address is also mostly
unnecessary, since there's syntactic sugar in the IPv6 address format
that lets you just say "::ffff:a.b.c.d" instead of having to convert the
four IPv4 address octets to hex; not much need for a conversion tool
that just adds seven characters to the start.

There are other conversions between IPv4 and IPv6 that can be
meaningful, for example in stateless NAT64 setups (such as RFC6052,
implemented in the tayga package), but those are quite special-purpose.
I wouldn't use that kind of thing for an ordinary dual-stack deployment.

(There's also 6to4, but I really wouldn't recommend using that.  It made
some more sense before the widespread availability of tunnels.  And
there's 6rd, which is supposed to be an improvement over 6to4 but I have
no experience of it since I've never had a provider that supports it;
nowadays my ISP just delegates me some real IPv6 space so it's been a
while since I thought much about transition mechanisms.)

Regarding the tools mentioned:

 * ipcalc is IPv4-only and knows nothing about IPv6.
 * 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.  It supports 6to4, NAT64, and 6rd,
although my most common use of it is to work out what a hardware address
will end up as after stateless autoconfiguration; that's a fiddly
conversion that I can do by hand if I have to but would rather not!

--
Colin Watson                                       [[hidden email]]

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: ipcalc and sipcalc

Thufir Hawat
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@dur:~$
thufir@dur:~$ ipv6calc --ipv4_to_6to4addr 192.168.1.1
No action type specified, try autodetection...found type: conv6to4
2002:c0a8:101::
thufir@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...

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?


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



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





thanks,

Thufir


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: ipcalc and sipcalc

Joel Rees

2017/11/28 19:58 "thufir" <[hidden email]>:
>
> 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@dur:~$
> thufir@dur:~$ ipv6calc --ipv4_to_6to4addr 192.168.1.1
> No action type specified, try autodetection...found type: conv6to4
> 2002:c0a8:101::
> thufir@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 -?


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: ipcalc and sipcalc

Joel Rees

2017/11/28 21:05 "Joel Rees" <[hidden email]>:
>
> 2017/11/28 19:58 "thufir" <[hidden email]>:
>
> >
[...]
> > 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 occurs to me that you may not be aware, but four bits maps neatly to one hex digit, so binary to hex is straightfow[rward.


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: ipcalc and sipcalc

Colin Watson
In reply to this post by Thufir Hawat
On Tue, Nov 28, 2017 at 10:55:44AM +0000, thufir wrote:

> Reading the man page:
>
> thufir@dur:~$
> thufir@dur:~$ ipv6calc --ipv4_to_6to4addr 192.168.1.1
> No action type specified, try autodetection...found type: conv6to4
> 2002:c0a8:101::
> thufir@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...
>
> 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?
>
>
> so, this "converts" or "translates" ipv4 to ipv6?

I've had a hard time answering your question, because it's a bit
underspecified: you haven't told us what the basic thing you're actually
trying to achieve is.  Could you lay out the original problem you have
in a way that doesn't specify a particular solution?  I'll try to answer
anyway, but if I've failed to guess accurately at what you're trying to
do then the answers may be misleading.


There's no single way to convert IPv4 to IPv6.  Step back for a minute
and think about the problem: what are you actually trying to achieve?
You're probably trying to exchange packets between IPv4 and IPv6
networks in some way.  But you can't just send an IPv6 packet to an
IPv4-only system - it would have no idea what to do with it!  Any
address that involves embedding IPv4 in IPv6 that *actually works* must
involve a gateway of some kind that relays packets between IPv4 and IPv6
networks, which means that it must refer to some particular part of the
IPv6 address space that's set up for use in that way.

6to4 is one particular scheme for allowing a system that only has IPv4
connectivity to gain IPv6 connectivity by giving it a chunk of IPv6
address space constructed mechanically based on its IPv4 address.  It
arranges for IPv6 packets to be encapsulated inside IPv4 while they
traverse the IPv4-only link, and to be decapsulated by relay routers
that send them on to the IPv6 internet; the IPv6 addresses are such that
the relay router can extract the IPv4 address and thus send packets
going in the other direction to the right place.

So, for example, if your ISP has assigned you 203.0.113.5 as your IPv4
address [1], then you might assign IPv6 addresses on your network like
this:

  2002:cb00:7105::1
  2002:cb00:7105::2

Here, the "2002:" bit is the 6to4 prefix: that entire slice of address
space, referred to as "2002::/16" to indicate that the prefix is 16 bits
long, is reserved for use by the 6to4 scheme and nothing else.
"2002:cb00:7105::" is a prefix meaning "the 6to4-accessible network
sitting behind the IPv4 address 203.0.113.5".

Because you now have a (large!) slice of address space, you can divide
everything under that up as you see fit.  In IPv6, the first 64 bits
normally identify the network and the last 64 bits normally identify the
host, so this means you have room for 65536 subnets, and you might for
example assign host addresses within each using stateless
autoconfiguration, so the host part of the address could be derived
automatically from the system's hardware Ethernet address; or you could
assign them manually as in my example above, or use some other scheme.

I don't actually advocate using 6to4: before I had an ISP that offered
native IPv6 support, I used a tunnel from he.net instead, which I found
to be more reliable and easier to understand.  The basic idea is
similar, except you get a prefix assigned specifically to you rather
than one mechanically constructed from your IPv4 address: this means,
for example, that you don't have to renumber your network if your IPv4
address changes.


You use 192.168.1.1 as your example, so you might instead just be trying
to allocate IPv6 addresses on your private network without (yet)
worrying about connectivity to the outside world.  (I'm not sure how
useful this will be, but maybe you're just trying to divide the problem
into tractable pieces.)  In that case, you probably don't want to ask a
tool to do the conversion at all, because you only need to deal with the
last part of the address that identifies each particular host.

What I normally do is manually assign addresses to anything I might want
to connect to - hosts that run services and the like - by just
converting the host part of their address to hex, which for small
numbers of computers is trivial; everything else I leave to pick
addresses for itself using stateless autoconfiguration.  (The latter
uses a scheme that you can look up if you need to but that means it
won't clash with addresses you've assigned by just picking small
numbers.)


Anyway, this is a long-winded way to say that you should stop and
explain what you're actually trying to do, because simply converting
IPv4 to IPv6 isn't a useful thing to do without support from some kind
of relaying arrangement, and the best approach may in fact be to forget
about converting addresses entirely and use some other scheme.


[1] It definitely won't have used that particular address - this is from
    one of the small blocks of addresses reserved for use in
    documentation and examples.

--
Colin Watson                                       [[hidden email]]

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users