20 June 2012

IPv4 to IPv6 converter for Excel

There are a few scenarios when dealing with unicast ISATAP address when you need to convert between IPv6 and IPv4 addresses

For more infor about this stuff check http://technet.microsoft.com/en-us/library/cc757359(v=ws.10).aspx

This Excel sheet takes some of the conversion hassle out of it.



For the table below use the IP6 Prefix generated by any host on the network as they will be the same.  Then add the IP4 address octets after.




IP6 Prefix
Octet1
Octet2
Octet3
Octet4
2002:a504:b1f:8000:0:5efe:
10
21
35
15
2002:a504:b1f:8000:0:5efe:
0A
15
23
0F
IP6 Address
2002:a504:b1f:8000:0:5efe:0A15:230F

IP6 Prefix
Octet1
Octet2
Octet3
Octet4
=A2
=DEC2HEX(B2,2)
=DEC2HEX(C2,2)
=DEC2HEX(D2,2)
=DEC2HEX(E2,2)
IP6 Address
=CONCATENATE(A3,B3,C3,":",D3,E3)


If you need to go back the other way around you can use the following:



IP6 Address
2002:a504:b1f:8000:0:5efe:0A15:230F
0A15:230F
230F
0A15
0A
15
23
0F
10
21
35
15
IP4
10.21.35.15


IP6 Address
2002:a504:b1f:8000:0:5efe:0A15:230F
=RIGHT(B7,9)
=RIGHT(B7,4)
=LEFT(C8,4)
=LEFT(C8,2)
=RIGHT(C9,2)
=LEFT(E8,2)
=RIGHT(E8,2)
=HEX2DEC(B10)
=HEX2DEC(C10)
=HEX2DEC(D10)
=HEX2DEC(E10)
IP4
=CONCATENATE(B11,".",C11,".",D11,".",E11)


Not very glamorous bit it does the conversions.

No comments:

Post a Comment