Tuesday, April 6, 2010


I'll now touch on IPv6. We'll first ask: Is there a need to upgrade to IPv6? We've survived this far, will we ever need it? That is a definite yes! There is an address shortage in places like Virginia, and Asia! IP addresses are also poorly allocated. Agencies needing class C asked for class B. Estimates on IPv4 estimation largely debated and is expected to be around 2009 to 2041.
There are more and more new network devices on the rise. Sooner or later, everything would have an IP address associated to it. NAT is now seen as a hindrance to innovation.

IPv6 natively supports IPsec. IPv6 also supports mobility where the IP address would be portable everywhere. IPv6 also has a simpler header compared to IPv4.

IPv6 moved from 32-bit to 128-bit. In the 32-bit IPv4, there were 4294967296 address combinations. In IPv6, there are 3.4028236692093846346337460743177*10^38 addresses. IPv6 addresses are written in 8 groups of 4 hex characters each. Instead of dots, they are separated by colons.

There are some rules to make IPv6 more manageable. Let's take this IP:

You can eliminate groups of zeroes with two colons:

You can also drop leading zeroes:

Along with more addresses, the IPv6 also have a simpler header. The 20-byte IPv4 header is made up of:
Version|Header length|ToS|Total length|Identification|Flags|Fragment offset|TTL|Protocol|Header checksum|32-bit source|32-bit destination|Options|Padding

Length wise, IPv6 headers are longer due to the size. However, it has less fields and is thus easier to process:
Version|Traffic class|Flow label|Payload length|Next header|Hop limit|128-bit source|128-bit destination

In IPv4, there are three different ways to send packets:
Unicast - Send to one
Multicast - Send to group
Broadcast - Send to all

In IPv6, there are still three, but broadcast has been removed:
Unicast - Send to one
Multicast - Send to group
Anycast - Send to closest

Anycast can be used by giving more than 1 website server the same IP address. The routing protocols will then route you to the nearest website with that address. This will automatically load balance you to the closest server.

There are three scopes in IPv6:
Link-local - Layer 2 domain. For people who are plugged in the same switch or two routers on the same link, then the link local is used.

Unique-local (Previously called Site-local) - Similar to RFC1918 private addresses. They are unique in an organization. Site-local scope addresses are optional.

Global - Addresses for the Internet 2. These are fully routable in the internet.

Link Local addresses are automatically generated as an IPv6 host comes online. This is similar to the 169.254.x.x addresses of IPv4. Link local addresses will always begin with FE8 followed by 52 bits of zeroes (it is compulsory for the first 10 bits to be 1111111010). The last 64-bits is the 48-bit MAC address with FFFE squeezed in the middle. For example, if my MAC address is: 1234.5678.90AB

Then my link local address would be:

FE8 = 12-bits
MAC+FFFE = 64-bits
Zeroes = 52-bits
Total = 128-bits

Unique local RFC4193 addresses (previously known as Site-local RFC3513) are used to identify the boundary of organization networks. It uses the following format:

The first 8-bits of a Unique-local address is:

X will be 1 if locally assigned by an Administrator. Setting it to 0 is for future use, so the first 8 bits should start with FD00::/8.

The structure of a unique-local address should be:
FD00|40-Bit Global ID|16-bit Subnet ID|64-bit Interface ID

Finally, Global Addresses have their high-level 3 bits set to 001. This means that addresses will start with 2000::/3. The global routing prefix is 48-bits or less. The subnet ID is 64-bits minus the global routing prefix. The primary addresses expected to comprise the IPv6 internet will start with the 2001::/16 subnet.

1 comment :

  1. I've been skimming through some of your blogs, they are really informative. Thanks for writing them!

    I did catch one typo above, when you mentioned:

    Then my link local address would be:

    You left out the "0" at the end of the link-local prefix (FE80).