Tag Archives: ipv4 address

Convert: IPv6 to IPv4


convert-ipv6-ipv4

First requirement that you need to understand this topic is to understand first IPv6. Once you have understood what an IPv6 is all about, you are ready the challenge of converting IPv6 to IPv4 and vice-versa.

Given an IPv4 address of 192.168.1.1. Let us try to convert it to IPv6:

192.168.1.1

First of all, you can group these numbers that are separated with period:

192                     .                     168                     .                     1                     .                     1

As shown above, the address is now divided into four groups. You will use them to get its IPv6 equivalence. If you have noticed, IPv6 has hexadecimals (e.g., fe80::200:f8ff:fe21:67cf, etc.):

Make sure that you know how to convert hexadecimal numbers. We are performing that today:

192         /             16                   =             12                remainder                 0

168         /             16                   =             10                remainder                 8

1              /             16                   =             0                  remainder                 1

1              /             16                   =             0                  remainder                 1

Next is, we will get those numbers at the top:

12                    0                       10                     8                         0                        1                     0                         1

We are aware that there is no number such 12 in hex so,.. it will become:

C   0   A   8    :    0   1   0   1

Hoping,things gets clear. To convert IPv6 to IPv4, just do the same thing. convert hex to decimal:

C0

A8

01

01

Now, could you do that for me? just leave your answer as a comment. Thanks.

Advertisements