Friday, February 4, 2011

IPv6 and Transition Strategies

I'm sure by now you've heard that the world is running out of addresses.  It seems like once every few months, on a slow news day the reporters dust off this old classic of impending doom that we'll be out of addresses within just a few short weeks, but luckily we have network administrators working to implement a new technology.

Well, it is true that we are running out of address space, and have been for a while, will we run out by the end of this year?  Possibly, but I doubt it.  People have been crying the end is near since 2002, and we've made it last this long, what's another year?  My guess is we'll have switched to IPv6 long before we would have run out completely, and as more people start to switch over, the demand for IPv4 addresses will not be so pressing.

With all that said, it IS time to start thinking about IPv6, so I'm going to give you the skinny on what it's made up of, and how we're transitioning to it.

The typical IPv4 address looks something like this: 141.219.10.55, comprised of 4 chunks of decimals ranging from 0-255, separated by periods.  Now when I started thinking about IPv6 I thought they'd just tack on another 2 chunks, so the address would look like 141.219.55.28.244.53, but no, it's not like that at all!  You see, the powers that be never wanted to have to make this transition ever again, so they made up a scheme that gives us more combinations than we could ever hope to use (at least not in the next few centuries).  An IPv6 address looks like this:
2001:0DB8:AC10:FE01:0000:0000:0000:0000

Whoa, are those letters!  Yup, an IPv6 address is made up of hexadecimal, so there's even more combinations.  If you don't understand hexadecimal, you might want to do a little research, I'll go over the combinations as review, but it might be a good idea to do some practice with it.
0000 = 0
0001 = 1
0010 = 2
0011 = 3
0100 = 4
0101 = 5
0110 = 6
0111 = 7
1000 = 8
1001 = 9
1010 = A (10 is A)
1011 = B
1100 = C
1101 = D
1110 = E
1111 = F
So each Hexadecimal character is comprised of 4 bits, which means a whole IPv6 addresses is made of 128 bits.

Must be a pain to set an interface with all those letters/numbers, huh?  Well yes, it is, but there are some shortcuts to make it a little easier.

First, you can drop any consecutive blocks of zeros by using a double colon.
2001:0DB8:0010:FE01:0000:0000:0000:0000 turns into
2001:0DB8:0010:FE01::
Just know that you cannot do this
2001:0DB8:0000:0000:FF31:054B:0000:0000:EE26
2001:0DB8::FF31:054B::EE26
That's because your router won't know where to put how many zeros to put back where.

Second, you can drop any leading zeros, so our initial address is reduced down into
2001:DB8:10:FE01::

There are also a bunch of types of IPv6 addresses you need to be aware of.  These are strictly memorization, so write them down on flash cards and look over them often!
Unicast - Packets addressed to a unicast address go out a single interface
Global Unicast - Publicly routable addresses
Link-Local Address - Private addresses, not to be routed
Unique-Local address - Routable within multiple local networks.
Multicast -  Packets are delivered out  all interfaces indicated by the multicast address.
Anycast - Really cool, this one identifies multiple interfaces, and the packet is delivered to the closest one.  Picture this, your company has web servers in 5 different countries.  You give them all the same anycast address and hosts will automatically be directed to the one that is closest to them!

Notice I didn't say anything about broadcasts.  They're gone!  Poof, no such thing in IPv6.

Addresses you should know:
0:0:0:0:0:0:0:0 or :: - Source address of a host (for stateful configuration)
::1 - The new 127.0.0.1
:0:0:0:0:0:0:192.168.1.1 - IPv4 address in a mixed IPv6/v4 network
FE80::/10 - Link-local unicast range
FD00::/8 - Unique local unicast range
2000:/3 - All publicly routed addresses start this way
FF00::/ - Multicast addresses

With IPv6 addresses being so long, DHCP and auto-address configuration are incredible useful tools.  The way auto-address configuration works is the device learns its prefix information from the router and appends it's own MAC addresses as the interface ID.  A MAC address is only 48-bits, and the interface ID has to be 64, so it shoves "FFFE" right into the middle of it.
So a MAC of 00-50-56-C0-00-08 becomes an interface ID of
0050:56FF:FEC0:0008 -> 50:56FF:FEC0:8
This is known as an EUI-64 identifier.

As for the converting process, there are several tools to help us ease our way over to IPv6, so we don't have to pick a date and say "if you're not using IPv6, you're not going to get on the internet."

Dual Stack Routers - This is definitely the most simple.  All it does is have a router run both IPv4 and IPv6, so it can support both networks.  To set it up (assuming you already have IPv4 set up), just turn on ipv6 routing, and apply IPv6 addresses to interfaces.
Router(config)#ipv6 unicast-routing
Router(config)#int fa1/1
Router(config-if)#ipv6 address 2001:db8:10:1:/64 eui-64 (this tag at the end fills in the interface ID for you!)

Tunneling - 6to4 carries Teredo, which places the IPv6 packets into UDP packets, which NAT doesn't nuke.

NAT-PT - My least favorite method, it doesn't encapsulate the data, it just rips it out of the packet and sticks it in the opposite type.  Imagine sending  an IPv4 packet, NAT will rip out the data and put it in an IPv6 packet.  Sounds kind of brutal if you ask me.  My texts and teachers say to try to avoid it, so I'll do just that.

Last thing you should know, most of the routing protocols had to change a little bit to support IPv6.  For the ICND2 you shouldn't need to know too many specifics, but I'll go over the basics.

RIP survived, it's now called RIPng (next generation).  Instead of using the network command to turn on RIP interfaces, just go under the interface and turn rip on.
Router(config-if)#ipv6 rip 1 enable
This'll start the rip process if you haven't created it already, and RIP will advertise this interface's subnet.

EIGRP is also very similar, it uses the multicast address FF02::A now, (IPv4 was 224.0.0.10).  OSPF did something similar to keep part of its identity.  Just like RIP, you don't use the network command anymore, just turn on the router process (you must do a no shutdown on the router process now!), and enable ipv6 on the interface
Router(config)#ipv6 router eigrp 42
Router(config-router)#no shut
Router(config-if)#ipv6 eigrp 42

OSPF is similar to it's predecessor, it even still uses 32-bit values for it's RID, area ID, and LS ID, but you must assign them manually since you don't have IPv4 addresses anymore.
Multicast addresses used for LSAs are FF02::5 and FF02::6.

Router(config)#router ospf 1
Router(config-router)#router-id 1.1.1.1
Router(config-if)#ipv6 ospf 1 area 0.0.0.0

Phew.  If I had to tell you 3 things to remember most from this post, it would be why we need IPv6, what an IPv6 address looks like (and how to shorten it), and the methods of transitioning from IPv4 to IPv6.

Thanks for reading!

Thursday, February 3, 2011

Great News!

I took the ICND2 today and passed!  I'm limited in what I can say about the exam, but I can tell you that the things I posted about I tended to know much more about than the things I didn't.  The exam was pretty fair, and I didn't feel very confident when I finished the last question, but I ended up doing very well.

I woke up at about 5am this morning with the jitters (and spent the hour before getting up listening to my roommate play video games through the wall) and studied until about 7am, then drove 2.5 hrs to the testing center (I live in the middle of nowhere).  Little did I realize that the testing center was in a different time zone, so I was actually about an hour early.  I used this time to do some last minute review on WANs, EIGRP, OSPF, and IPv6, so it all turned out for the best.

Being CCNA certified is all well and good, but I want to keep going!  I'll try to finish out my posts on the ICND2 topics before I start moving on to study for my CCNP studies, so don't worry!