This lab will go over IPv6 autoconfig. I will go step by step and show you using commands what happens at each step. I will use a few technologies so that you can see what happens.
I will use a few terms it’s a good idea you understand what they mean:
- IPv6 Address – Unlike IPv4 where the IP address and Subnet Mask is separate. IPv6 combines both parts into a single address. All IPv6 addresses can be broken into two major parts.
- Routing Prefix – This is essentially like the subnet mask in IPv4. (First 64bits)
- Interface Identifier – This is essentially like the IPv4 IP address. (Last 64bits)
- Global Unicast Address – Public Routable IPv6 address. It typically starts with 2000::/3. This gives us the ability to use the range “2000::/3 to 3000::/3” of ipv6 addresses.
- Link Local Address – These addresses start with FE80::/3 and is a reserved ranged. All IPv6 Enabled Interfaces have Link Local Addresses. These addresses never time out and are used by neighbour discovery or when no routers are present.
- EUI-64 – This allows a machine to take its mac address which is 48bit and convert it into a 64bit Interface Identifier. The rule you need to remember is the 7th bit gets flipped and you insert “FFFE” in the middle. I will go over this more later.
- Autoconfig – This is kind of like DHCP but can’t provide things like DNS servers and other info DHCP can give out. It can however allow a device to get an IP address as well as the default gateway.
- ff02::1 – All nodes in an IPv6 network will join this multicast address
- ff02::2 – All routers in an IPv6 network will join this multicast address
Please make sure to read these items. They will be heavily referenced throughout the post. In fact I will sometimes ask you to come back and verify what I said.
The lab will look like this:
What we will do:
- On R1 will be manually configured the Routing Prefix on f0/0. Because this is a lab we’ll use EUI-64 to automatically configure the Interface Identifier of the Global Unicast IPv6 address.
- On R1 we will assign an IP address of 2001:1::1/64 on f0/1
- We will turn on IPv6 routing
- On R2 we will tell f0/0 to use Autoconfig. Using multicast it will find out things like it’s IPv6 and default gateway “auto-magically”.
- On R2 we will assign an IP address 0f 2001:2::1/64 on f0/1
- We will turn on IPv6 routing
R1
Right off the hop let’s do a “show ipv6 int brief”. You will notice both ports are Administratively down. The both do not have any IPv6 addresses applied to them.
Notice there is no Link-Local Address on either of the interfaces! One thing that confused me when I first started looking at Cisco devices as compared to Microsoft devices is that Windows just “magically” created Link-Local Addresses. Why doesn’t Cisco devices do the same?
Well it turns out that Microsoft has enabled IPv6 on every interface by default as we can see here:
If we were to un-check the IPv6 and reboot the computer, the computer would no longer make a Link-Local Address because IPv6 is no longer ENABLED on that particular interface. In essence it would be similar to how Cisco routers work out of the box.
So what is the equivalent command on Cisco devices then? From what I can gather there is 3 ways to get a Link-Local address on the router.
1.) Enable IPv6 on the interface:
To enable IPv6 on a particular interface just go into the interface config and type “ipv6 enable”. Look at the output and see how the Link-Local address get’s automatically created.
2.) Configure a Global Unicast Address on an interface
Because IPv6 requires all ports to have a Link-Local Address when you assign a Global IPv6 address to an Interface, Cisco will automatically enable IPv6 for you in the background. It’s this process that makes the Link-Local address similar to option #1.
3.) Manually enter a Link-Local Address
So if you don’t want the router to create a Modified EUI-64 address and want to manually create a link local address you would need to type in these commands. Notice the IPv6 Link-Local and IPv6 Prefix? The IPv6 Prefix is when you want to enter the Global Unicast Address.
Before we apply the IP addresses we should really run a command to verify that this router hasn’t joined any IPv6 Multicast Groups.
To see what groups an interface has joined you need to type the command “show ipv6 int fa0/0”
The command brings back absolutely nothing which is to be expected! IPv6 hasn’t been enabled yet!
4.) Apply Global Unicast Address
Because we want to do as little typing as possible let’s enter the Global Unicast address as per the lab layout. Doing so will automatically enable IPv6 on that interface and automatically create our Link-Local Address:
- int fa0/0
- ipv6 address 2001::/64 EUI-64
Let’s verify that the router took the command. We will run another show ipv6 command:
Just as we expected! Both the Link-Local and the Global Unicast IPv6 address show up! Great! You might have wondered why I got you to run that “show ipv6 int fa0/0” earlier. Well let’s run it again now that we enabled IPv6 on this interface!
Notice how the interface has also automatically joined multicast FF02::1 address? Go back up to the top of this post. All nodes in a network will join this node! The router did just that.
NOTE – Please notice the Multi-cast joined groups one more time before you proceed!
Let’s actually enable the interface port now.
Notice the interface has now added one more Multi-cast group to the list! Does this address look a bit familiar? It should! The Multi-cast address is made from the Link-Local address. The last 24bits of the the Link-Local address to be precise! “D4:0000”.
This router CAN’T route IPv6 traffic as it stands. Similar to IPv4 you can enable and disable a router’s ability to route traffic. Cisco by default has disabled IPv6 routing.
We will type the command in global config mode “ipv6 unicast-routing”. Yup. That’s all it takes to enable routing!
Let’s re-run the show ipv6 int fa0/0 command we ran earlier and see if anything has now changed!
The router has now become part of the Multicast group FF02::2. This should be expected because we just turned on IPv6 routing on the router. All routers will automatically join FF02::2 and we just proved this!
We’re now done on R1!
R2
We don’t need to cover as much in this setup because we went over so much with R1!
On R1 let’s first make sure there is no IPv6 addresses, and then tell it to autoconfig itself.
Because R1 is a router and is on the same network as R2, R2 will use multicast to ask for an address. We see that the R2 router received a Global Unicast Address from R1 using the Multicast address FF02::1. We can also see once we enable the interface that R2 even configured that R1 is it’s default gateway!
We really should turn on Routing as well since this is a router! Let’s do it now. We will need to use the command “ipv6 unicast-routing” similar to what we did on R1. Again let’s run a “show ipv6 int” command to verify that the router has joined the router Multicast group FF02::2.
We can see it did! Well done. Everything is all setup!
satya says
Hi,
It is very good and useful to understand the basics on IPV 6
Thanks
Satya