This page was exported from Free Cisco Training & Resources - Certification Exam Preparation
[ https://www.ciscobibles.com ] Export date: Wed Mar 12 20:55:23 2025 / +0000 GMT |
||||||||||||||||||
Converting IPv4 to IPv6 and backConverting from IPv4 to IPv6 Is so easy, yet everyone seem to convert a IPv4 address to binary, then to IPv6. Why? Why waste time and do things the long way? Not cool. Firstly before starting I will assume everyone knows the following:
Two more things I would like to mention before explaining the conversion.
An IPv6 address : example 2001:0db8:85a3:0000:0000:8a2e:0370:7334
Then converting is easy. Lets take the following IPv4 address : 192.168.99.1 and convert it to Hex. Step1 > Divide the first octet (192) by 16 (since Hex is a Base-16) Step2 > Repeat step 1 with the second octet (168), Step3 > Repetition rules!!! Third octet (99) Step4 > Last octet So the IPv4 address of 192.168.99.1 in IPv6 address format is C0A8:6301 - - - - Converting back from IPv6 to IPv4 Now to convert the address C0A8:6301 back to IPv4, the reverse method would apply. Let me point one more thing about Base-16 out to understand why I'm doing what I am below: 160 = 1 161 = 16 Taking the same address C0A8:6301, first divide the address into 2 Tuple-groupings (2 Hex Characters) = C0 A8 63 01 Step1 > Take C0 and multiply the first character ‘C' by 16 and the second character ‘0′ by 1. Step2 > Repeat the same process with A8, Step3 > Repeat the same process with 63, Step4 > Repeat the same process with 01, This will give you an IPv4 address of 192.168.99.1 Easy, easy! |
||||||||||||||||||
Post date: 2009-04-09 14:45:37 Post date GMT: 2009-04-09 06:45:37 Post modified date: 2010-07-22 23:50:08 Post modified date GMT: 2010-07-22 15:50:08 |
||||||||||||||||||
Powered by [ Universal Post Manager ] plugin. HTML saving format developed by gVectors Team www.gVectors.com |