Board index » Original Member Tutorials: Why not write one Today » Networking Tutorials

 


Post new topic Reply to topic
Author Message
 Post subject: Tutorial - IPv6
PostPosted: Sun Jun 21, 2009 3:08 am
  

User avatar
I HAVE a real life, and it's HERE

Joined: Sat Jun 17, 2006 2:56 am
Posts: 341
Location: Atlanta
I've been reviewing IPv6 recently and thought it might be helpful (both to me and the site) to compile a tutorial using the information I've come across. This covers a very broad range of information ranging from questions that would satisfy a beginner with a passing interest to questions geared more towards satisfying sys admins looking into installing and using the IPv6 stack. I've tried to stick with a Q&A format to make it easier to use as a reference for those who are just passing through. Sources are listed at the end of the document.


IPv6

What is it?

IPv6 stands for "Internet Protocol version Six" and it defines a new addressing scheme for computers that connect to the internet. An "IP" address in layman's terms is similar to a home address or PO box. When someone wants to send something to you through the postal service, they must have your address in order to do so. Computers and other internet using devices (WiFi phones, netbooks, routers, pretty much anything that uses a web browser, etc) must have an IP address to communicate with other internet devices.

Why do we need it?

Most internet devices currently use "IPv4", which allows for a theoretical maximum of 4,296,967,296 addresses (or 2 to the 32nd power) minus those addresses that are reserved for a variety of reasons. Believe it or not, we have exhausted this pool of some ~4.3 billion addresses to such a point that we are forced to use complicated methods of conserving address space. Even using these methods, the developers of IPv6 project that IPv4 address space will be exhausted by approximately the end of 2011 or the beginning of 2012.

Four billion addresses exhausted? How is that possible?

Earlier I mentioned that every device that connects to the internet requires an IP address. By "device", I meant every port of a router, every network card (wireless or wired), every wireless capable phone, every server you access for a web site, and more. It adds up quickly when every internet user requires multiple IP addresses to stay online.

Okay, now I get it. So what does an IPv6 address look like?

IPv6 allows for 128 bits of addressing space, thus the maximum number of possible addresses is 2 to the 128th power. Simply put, this allows for a massive number of possible addresses. Because we are now dealing with such large numbers, IPv6 addresses are generally expressed in hexadecimal notation (which results in a shorter number to look at than when expressed in decimal notation) and are often abbreviated. Whereas an IPv4 address may be expressed as 192.168.0.1, an IPv6 address looks more like ff02::1. This is a grossly abbreviated example which I'm using purely to illustrate a point. Fully expanded, this same address of ff02::1 would be written out as ff02:0000:0000:0000:0000:0000:0000:0001. IPv6 addresses always consist of 32 hexadecimal digits, separated by colons (:) into eight sections of four digits. Consecutive zero's can be abbreviated once in any single IPv6 address with two colons "::". This can be done because the number of hexadecimal fields (eight fields of four digits each) is constant. Every IPv6 address is 128 bits, which is always represented in hexadecimal by eight fields of four digits, and each field is separated by a colon.

I notice there is a lot more space in an IPv6 address. What will all of that space be used for?

Much of IPv6 address space is used for compatibility with IPv4 or lower level protocols (such as MAC addressing). An IPv6 address can contain an entire IPv4 address or may contain the MAC address of the destination machine. Otherwise, if not utilized for backwards compatibility, the address space is used much the same way as in IPv4. The first portion of the address is used to specify the network, the mid portion for subnetting, and the end is used for host space.

I see. Are there varying "types" of IPv6 addresses as there are varying IPv4 addresses?

Yes, there are a variety of different types of IPv6 addresses. You may be already be familiar with several IPv4 types of addresses, such as unicast or broadcast.

A unicast IPv6 packet is intended for a single computer, router, or more accurately a single network interface. This is used when data needs to be transferred between two specific devices. IPv6 further defines a variety of unicast addresses that I'll explain in greater detail later. These are the global unicast address, link-local address, and unique local unicast address. This is the most widely used type of address.

An anycast address can be directed toward a group of network interfaces but is only received by the nearest or most easily reached interface. This may be used (for example) by a computer issuing a query to multiple DNS servers. It only needs one response, but it addresses the query to a variety of servers but only needs the query answered by whichever server is able to respond quickest. Routers may make use of anycast addresses when attempting to learn a route to a given IP range.

A multicast address is intended to communicate with multiple interfaces within a given range. The first octet (expressed as two hexadecimal digits) of a multicast address begin with "FF", to represent all binary 1's. The last four bits of the next octet are used to signify the address scope. The address scope determines how many and exactly which network interfaces a packet should be sent to. IPv6 specifies the following different scopes to which a multicast address can be sent: node-local, link-local, site-local, organization-local and global. For example, a link-local multicast may reach all nodes connected to the same switch. An organization-local broadcast would include all nodes in a company's network. A global multicast would include multiple nodes across the web

A broadcast address as defined in IPv4 no longer exists in IPv6. Multicast addresses are used instead.

The loopback address in IPv6 is ::1, which of course is short for 0000:0000:0000:0000:0000:0000:0000:0001. This performs the same function as 172.0.0.1 in IPv4.

Now let's come back to the specific types of unicast addresses.

A global unicast address is analogous to the IPv4 public address and is intended for general communication and routing across and between networks. You may see this type of address abbreviated as "GA", which stands for "global address".

A link-local unicast address is analogous to the IPv4 "automatic private IP address". This is the address an interface will use when it requires an address but none is provided (this happens if no DHCP server is available, or if the DHCP server is not configured to support IPv6). In IPv6, this sort of address will always begin with "fe08". You may see this type of address abbreviated as "LLA", short for "local-link address".

A unique local unicast address is analogous to the IPv4 private address, used for communication within a private network and not on the open web. These addresses always begin with the hexadecimal digits "fd" and are often abbreviated as "ULA" for "unique local address".

This only covers the various different IPv6 addresses on a very basic level. By all means feel free to research each of these in greater depth as each of the above have been covered in much greater detail in other documents on the web.

Earlier you mentioned that sometimes part of the IPv6 address is used for backwards compatibility. Can you explain what methods are currently used for backwards compatibility with IPv4?

A variety of protocols exist to provide backwards compatibility with IPv4 and will likely be used heavily in the coming years as the inevitable transition to IPv6 draws nearer. This topic alone is truly huge and merits a great deal of study. I will attempt to briefly cover the most popular protocols, but one may wish to refer to the Microsoft white doc for more detail on IPv4 to IPv6 transition technologies: http://download.microsoft.com/download/ ... 6Trans.doc. Three popular technologies used for compatibility are Tredo, ISATAP, and Tunneling.

Tunneling is the process of encapsulating (ie including within) an entire IPv6 packet within an IPv4 header to allow IPv4 compatible routers to route the IPv6 packet to the destination network. This configuration requires the IPv6 MTU to be 20 bytes smaller to allow room for the IPv4 header.

ISATAP (intra-site automatic tunnel adressing protocol) includes the entire IPv4 address within the IPv6 address. The IPv4 address make up the final four octets of the IPv6 address. You can generally see when ISATAP is in use because the IPv6 portion is expressed in hexadecimal notation, but the IPv4 portion is expressed in decimal. For example, you may see an address of fe80:5efe:0000:0000:192.168.0.1.

Teredo is a form of NAT, but is commonly referred to as NAT-T and in a nutshell pairs an internal IPv6 address with an external IPv4 address for communication outside of the private network.

I've heard that using IPv6 is more secure. Is this true? Why?

Generally IPv6 is considered to be more secure than IPv4. The often cited reason for this is that IPsec is required by IPv6 but is optional in IPv4. Aside from that simple fact, IPv6 security is beyond the scope of this tutorial.

Sources: http://www.ipv6.org/ , http://en.wikipedia.org/wiki/IPv6 , http://www.laynetworks.com/ipv6.htm#CH11 , http://technet.microsoft.com/en-us/libr ... 26956.aspx

_________________
Only amateurs attack machines; professionals target people. Bruce Schneier


          Top  
 
 Post subject: Re: Tutorial - IPv6
PostPosted: Sun Jun 21, 2009 3:09 am
  

User avatar
I HAVE a real life, and it's HERE

Joined: Sat Jun 17, 2006 2:56 am
Posts: 341
Location: Atlanta
I didn't want to add this to the same post as the tutorial, but I'm wide open to criticism. As I said in the intro, I put it together while researching it, so if I missed something or if I'm way off, please point it out so I can correct it. :)

_________________
Only amateurs attack machines; professionals target people. Bruce Schneier


          Top  
 
 
Post new topic Reply to topic



Who is online

Users browsing this forum: No registered users and 1 guest


Display posts from previous:  Sort by  
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group