Come June of 2008, all new systems purchased by the government have to support an updated version of the Internet Protocol: version 6, or IPv6 for short. My boss just let me know that I may be heading up an effort to get our software IPv6 compliant. So now I am in research mode learning about IPv6.
A little background is appropriate for the non-network literate. Most computers are now network aware. The vast majority of these use the internet protocol as part of their networking stack. We use the word stack because networking is done in layers. Each layer on a given machine talks with a comparable layer on the remote machine. There is an overly complex model taught in networking classes that divides it into multiple layers, and most people memorize it to pass the test. Few people use it in everyday work. A simplified way to view it is this: Application->TCP->IP->Ethernet. An application is something like a web browser or an email client, but also many internal programs running on your program reporting your every keystroke to Sony or The Department of Homeland Security. This application talks an application networking protocol like Hypertext Tranport (HTTP), Simple Mail Transport (SMTP), file transport (FTP) and so on. This protocol depends on the transmission control protocol (TCP) to make the end to end connection. TCP does a lot of the heavy lifting in keeping the wires of the internet flowing smoothly. This is called congestion control. TCP is built on top of the Internet Protocol. The most important thing IP provides is routing the communication from our machine to the remote machine and back again. Ethernet is the lowest layer most people have to deal with. It covers many things, including the physical hardware in your computer. Any one of these layers can be swapped out. For instance, at a previous company we used a networking hardware layer called Infiniband instead of Ethernet for certain types of network traffic.
The current, ubiquitous standard is IP version 4 (IPv4). Probably the most visible difference between v4 and v6 is the addressing scheme. When you type a request into a web browser like this http://www.younglogic.com, the http refers to the protocol, and the www.younglogic.com refers to a machine name. That machine name is converted by your computer into a machine address. On my machine I can find out the domain name by typing:
host younglogic.com
And I find out:
younglogic.com has address 208.97.174.16
This string of numbers and periods is an IPv4 address. As long as there has been an internet in use by the majority of the public, this has been the way that a computer is identified on the network. It is stored as a base 2 number (as all computer information is stored) using 32 binary digits (bits). for instance, 16 at the end is stored like this: 00010000. An IPv6 address is 128 bits, or twice as many bits long as a IPv4 address.
If I look at the network information for my machine here at work I see this:
eth0 Link encap:Ethernet HWaddr 00:18:8B:81:F8:1E
inet addr:10.17.124.195 Bcast:10.17.127.255 Mask:255.255.252.0
inet6 addr: fe80::218:8bff:fe81:f81e/64 Scope:Link
The HWAddr 00:18:8B:81:F8:1E is unique to the ethernet chip on my computers motherboard. This is called the Media Access Control (MAC) Address and it is supposed to be universally unique. The inet addr field is the dynamically assigned address my machine has been granted from my company dhcp server. The broadcast and mask fields tell me the scope of view my machine has on the local network. I can send network packets out that are broadcast to all machines on my subnet. My subnet is defined by my address logically anded with my netmask. Thus my subnet is 10.17.127.XXX. All machine with an IP address that starts with 10.17, and who third number has the bits set for 127 (64+32+16+8+4+2+1 but not 128 in Binary 00111111) will see that message.
Notice that my machine has an IPv6 address set as well, even though everything I do is IPv4. Why is that? There seems to be an implicit conversion going on from IPv4 to IPv6. I can’t see an obvious translation from my IPv4 address to by IPv6 address, so the best I can guess is that my company assigns both numbers, but perhaps they come from different schemes. More info as I learn.
Here is the thing about IPv6: everything currently assumes IPv4. The simple tools for network troubleshooting like traceroute and ping are both IPv4 by default. The route command does not seem to have options for IPv6, at least according to the man page. It mentions /proc/net/route, and /proc/net/ipv6_route:
A little google magic shows one way to find routing info:
/sbin/ip -6 route show dev eth0
fe80::/64 metric 256 expires 21323624sec mtu 1500 advmss 1440 hoplimit 4294967295
ff00::/8 metric 256 expires 21323624sec mtu 1500 advmss 1440 hoplimit 4294967295
Ah, and it seems route does work when passed -A inet6:
Destination Next Hop Flags Metric Ref Use Iface
::1/128 :: U 0 3 1 lo
fe80::218:8bff:fec4:284b/128 :: U 0 0 1 lo
fe80::250:56ff:fec0:1/128 :: U 0 0 1 lo
fe80::250:56ff:fec0:8/128 :: U 0 0 1 lo
fe80::/64 :: U 256 0 0 eth0
ff00::/8 :: U 256 0 0 eth0
Much to learn here.