miércoles, 20 de junio de 2012

How to build an IPv6 address

An IPv6 address is composed by 8 fields of 16 bits and is represented like this:


Where each x is an hexadecimal value. If, in one of the fields we have zeros at the left it is not necessary to write them, also if a field has only zeros its representation can be simplified.

For example:


Simplified will be like this: 1080::8:800:200C:417A


Simplified: ::1

Addresses are formed like this:


Site prefix: Composed of 48 bits. Describes the public topology that the ISP asigns.

Subnet ID: Composed of 16 bits. Is assign by the user or the site administrator. The subnet ID describes the private topology, also denominated site topology.

Interface ID: Composed of 64 bits. Contains the interface ID, also denominated token. The interface ID is configurated automatically using the MAC address of the interface or manually with the EUI64 format.

To convert the MAC address using the EUI64 format we just have to use this simple formula. But first let's see the parts of a MAC address.



The first field of 8 bits, in this case: 00. Is the universal/local bit (seventh bit).
The second and third field of 8 bits, in this case: 04:AC are the company ID.
And the three remaining fields, in this case: 66:7D:47 are the ID established by the company.

EUI64 convertion formula:

02:[company ID]:FF:FE:[ID established by the company]

Then using the MAC address of the example, the EUI64 format would be:


And finally to use this format as the interface ID of the IPv6 address, two fields of 8 bits have to be grouped to make fields of 16 bits:


Simplified: 204:ACFF:FE66:7D47

Now that we have the interface ID we can make an IPv6 address (this example uses an IPv6 global address):


Some types of IPv6 addresses:

Non-specified address (0:0:0:0:0:0:0:0): This address shall never be asign to a node. This address indicates the absence of an address.

Link-local address: A link-local address is asign automatically to an IPv6 interface when it is activated.

Site-local address: It's an established range of addresses that are similar to the IPv4 private addresses. These addresses are used preferentially inside a site or in a LAN.

Global address: It's also an established range of addresses that are similar to the IPv4 public addresses.


And that's all hope it helps :)

No hay comentarios:

Publicar un comentario