CCENT2

Global Routing Prefix and Subnet ID

The 128-bit addresses used in IPV6 give us a tremendous number of addresses (since we were running out of routable addresses) and is designed specifically with route summarization in mind.

Quick note about route summarization : You that you can take certain routes (maybe eight routes), write them in binary (because that’s what always comes back to), and you can come up with a way to express multiple routes with a single route.

Curing IPV6 Address Anxiety with Compression

Sample IPv6 address :   1029:9183:81AE:0000:0000:0AC1:2143:019B

We do have hex in here. So you have to get used to the fact you’re not just working with 1-9 here. Hex’s in there as well…And notice we have eight blocks. That’s what a lot of people call them! If you want to call them octets or something else, that’s fine.

A non compressed version 6 address has eight sections of 4 values, separated by a total of seven colons. This is an uncompressed IP version 6 address.

Luckily for you and I, there are ways to compress these addresses so we don’t have to enter so many numbers and letters.

Reminder: There is no difference between an upper-case letter and a lower-case letter in Hex.

Two very simple rules when it comes to compressing IP version 6 addresses:

If you have consecutive fields of zeros they can be expressed with two colons. It doesn’t matter if you have two consecutive fields of zeros or eight consecutive fields of zeroes. The only key with zero compression is that you can only do it once per address.

Here’s an example:

Original IPv6 address:     1234:1234:000:0000:0000:0000:3456:3434

Same address with zero compression:   1234:1234::3456:3434

Original IPv6 address:    1234:0000:0000:1234:0000:0000:3456:1234

You could use :: to represent one of those sets of consecutive zeros, but only one.

Leading zero compression allows us to drop the leading zeros in any field.

The key rules with leading zero compression:

You have to leave at least one number in each field, even if the field is all zeros.

You can perform leading zero compression as often as needed / desired in a single address.

You are allowed to use both of these techniques in a single address. Just remember the frequency rules and you’re all set!

Original address:  1111:0000:0000:1234:0011:0022:0033:0044

You could do zero compression on that second and third block. Put a double colon in there and then just leave the rest of it alone. You don’t need to use as much as leading zero compression as you can. But for exam purposes keep that in mind that there are several legal ways of expressing any IPv6 address that has at least one zero at it.

Newly compressed address:   1111::1234:11:22:33:44

We use zero compression to use a double colon to replace the second and third fields or blocks which were both all zeroes. Leading zero compression replaced the two zeros at the beginning of each of the last four blocks.

Watch out for incorrectly expressed IPv6 addresses, both on your exam and in real-world network documentation:

All immediately illegal:

  • More than two consecutive colons
  • More than one set of two consecutive colons
  • Letters from G – Z

Immediately Illegal:   1111:::: …

Immediately Illegal:   1111::2222:3333:: …

Immediately Illegal:   1111::H222 …

“Uncompressing” Compressed IPv6 Addresses

If you see the double colon (the one legal one that is), just put enough blocks of zeros back in until you have eight blocks.

Compressed :  1234:123:AA::BBBB:CCC

The double colon represents three blocks of “0000”

1234:123”AA:0000:0000:0000:BBBB:CCC

Put leading zeroes in each remaining block until each block has four values, and you are all set.

Full expression: 1234:0123:00AA:0000:0000:0000:BBBB:0CCC

The Global Routing Prefix

IPv6 addresses have huge advantages over IPv4 addresses, especially when it comes to subnetting and summarization. (You’ve done some IPv4 subnetting but haven’t done any summarization yet in this course.)

Quick explanation of summarization: If we write out some of the routes in our routing tables in binary, we can see what bits they have in common and we may be able to represent multiple routes with just one entry in the routing table (a summarized route)

It’ll keep our routing table complete and concise, to make our overall routing faster.

Frankly, the IPv4 addresses were not designed with these two important routing features (subnetting and summarization) in mind, but IPv6 global unicast addresses certainly were.

When an organization acquires a block of IPv6 addresses, that block has already been subnetted just a bit by the IANA, the Internet Assigned Numbers Authority.

(There is a bit of a food chain when it comes to IPv6 address blocks and at the top of that food chain is IANA)

This is one authority we all have to respect.

The IANA has the largest blocks of addresses(the whole pie), and assigns subnets from those blocks to Regional Internet Registries (RIRs) in accordance with very strict rules.

In turn, the Registries assign subnets of their address blocks(address of those blocks)  to ISPs

(The IANA does not assign subnets directly to ISPs). Then the ISPs subnet their address blocks they’ve been given, and those subnets come to the customers.

So again they started the IANA, then those get passed down to RIRs, they subnet it again, those go to the ISPs. The ISP subnet it again, and finally they go to you and me

(I’d recommend a visit to www.iana.org/numbers for more information on this process. But this is beyond the scope of the exam)

“Now It’s Our Turn”

Well now it’s our turn to start subnetting. We’ve requested a block of routable IPv6 addresses from our ISP – a “global routing prefix”, in IPv6 terminology –  and we’ve got them ( we’ve got the block ) . Now it’s time to subnet the block again and this time you and I are in charge of the subnetting.

The global routing prefix from our ISP comes with a prefix length, and in our example we’ll use a /48. The prefix length in IPv6 is similar to the network mask in IPv4. Actually, the /48 prefix length is so common that prefixes with that length are often referred to simply “forty-eights”. We’ll assume a global routing prefix of 2001:1111:2222.

With an IPv6 address  128 bits long and our prefix length set at 48, that would leave us 80 bits for subnetting. Not so fast my friend!

We also have an interface identifier in the mix, and it’s almost always 64 bits long. This ID is found at the end of an IPv6 address, and it’s really the host portion of the address (it identifies the host).

So you can see it’s similar to IPv4. You get your network portion of the address at the beginning, then you get your host portion of the address at the end, and subnet information in the middle.

So if we have a 48 bit prefix at the beginning of the address and a 64 bit interface identifier at the end, that leaves us 16 precious bits for subnetting.

And that’s what we have right now:

Global routing prefix: 2001:1111:2222  (48 bits)

Subnet ID: 16-bit value, found immediately after the GRP

Interface ID: 64-bit value that concludes the address

To calculate the number of valid subnets with IPv6, we’ll use the same formula we used earlier with IPv4 subnets. That’s  2 to the 16th power, resulting in 65,536 subnets. That should cover us for a while!

Determining the subnet IDs

This is actually the easy part! Our GRP is 2001:1111:2222,  so we know the next block will begin representing subnets (the fourth block down from left to right)

You can just start writing them out or enter them in a spreadsheet (highly recommended!) and go from there.

The first 12 subnets would have a fourth block of …

… and yes, I used this number of subnets (12) in particular just to gently remind you of the hex values that we’re using here.

So the first four resulting subnet IDs are…

2001:1111:2222:0001:: /64

2001:1111:2222:0002:: /64

2001:1111:2222:0003:: /64

2001:1111:2222:0004:: /64

A couple of important points regarding the subnet ID:

  • The 64 bit mask here covers the 48 bit GRP and the 16 bit subnet field.
  • Just as IPv4 subnet numbers shouldn’t be assigned to hosts, neither should a IPv6 subnet ID. The router will actually allow you to do so, but you’ll get a warning that I’ll show you later.

As you’d expect, any interface that will run IPv6 must have an IPv6 address. We have an interesting choice here:

  • Enter the full address manually.
  • Just enter the subnet ID (2001:1111:2222:0001:: /64, in this case) and let the router come up with the interface ID part of the address.

We’ll see both techniques in action.  Right now, we’ll go with the manual application, using the first subnet available and the first host address.

The full uncompressed address is

2001:1111:2222:0001:0000:0000:0000:0001 /64

Applying both zero and leading zero compression techniques, the address can be entered as 2001:1111:2222:1::1 /64. Here’s a block-by-block breakdown of how I arrived at that address:

Blocks 1 – 3 are left alone.

Block 4 is compressed from 0001 to 1

Block 5, 6, and 7 are replaced with a double colon.

Block 8 is compressed from 0001 to 1.

We mentioned about not using the subnet ID address as a host address … which in this case is what it’s the exact same thing as the full address we see here except that last one would be a zero.

So we know the subnet ID is 2001:1111:2222:0001:: /64.

Configuring and Verifying IPv6 Addresses

Let’s try putting that address on an interface and see exactly what happens.

So a little extra information : Can I run IPv4 on the same router?  yes you can.

Here I have the same config that we’ve had on the serial interface on R2 throughout the course and I’ve got a static IP route there, a v4 IP route and there’s nothing wrong with that.

You can run v4 and v6 on the same router… no problem whatsoever…

But when we configured v4 throughout the course, did I have to enable it?

No because it’s enabled by default. Version 6 is not!  IP version 6 is not enabled by default on a Cisco router.

Let me show you this command (which I would be astonished if it didn’t come up somehow on your exam)  It’s ‘IPv6 unicast-routing”.

This enables routing version 6 routing on the router as a whole.

If you configure interfaces first and you put IPv6 addresses on them, you have enabled version 6 on that interface. The problem is routing is not going to work until you run this command.

So it can drive you a little nuts if you leave this command out. But the rest of your config for Version 6 is fine!

I strongly recommend you whenever you’re starting a lab with v6 or config for a customer, always enter this command first. You know it’s kind of like NAT, when you just put ‘IP nat inside’,  and ‘IP Nat outside’ up immediately on the right interfaces, the first thing you want to do with v6 is enter this command!

Now let’s go over to the interface… and the first key is putting IPv6 address there.

Note : Don’t forget to put “ipv6” instead of “ip”

We’ll see all of these options in action. But right now let’s stick with this manual addressing and choose the first option.  

Now this would be the address for the actual subnet ID that we’re working with right now.

I put a slash 64 in. And I got an invalid input detected at carrot!

With most iOS versions you’ve got to have this all connected (no space)

Now it was accepted! So if you ever see that carrot pointing at your slash, you just have to slide it over one and have it all connected.

Here’s the warning I wanted to show you. If you enter the subnet ID itself as a host address, you’re going to get this warning from a Cisco router. Now that address has been accepted and it’s calling it a “subnet router anycast”. Basically this is a fancy way of saying hey this is the subnet ID number itself. You can’t put this on a host or you shouldn’t.

But the thing is the router will accept it. So what I’m going to do since I have been warned about it, is that I will repeat the command (with my up arrow + Ctrl A) and move the cursor at the front and type ‘no’ .

what we will do now is put that first host address in (that we talked about earlier)

and no messages no warnings just the way we like it! This address has been accepted.

You remember earlier with the ‘IPv6 unicast-routing’ command what kind of confirmation did we get after we ran that command ? Nothing at all!

The only message we got here was a warning and when we did something we should do, we didn’t get any message.

So let’s go ahead and just verify with show IP interface to make sure everything is fine.

Fast ethernet 0/0 is up, line protocols is up, the Internet Protocol processing disabled!!

That does not sound good!  But we see all this information about serial 0/1/0 and everything else…

What did I do here? I did not put v6 at the end of IP.

Now the only interface we’re seeing here is fast ethernet 0/0 because that’s the only interface we’re actually running version 6 on.

Again when we run the unicast routing command (IPv6 unicast-routing) that’s enabling IP version 6 globally. But it’s not going to be enabled on a per interface level until you actually give the interface an IPv6 address.

We’ll focus more on the first part (in the red circle)… what’s different from IPv4?

Link-local address… It looks something totally different than anything we’ve got as far as the global unicast address goes. We didn’t even enter a link local address. So where did it come from? We’ll be talking about that very shortly. But just ignore ‘no virtual link local addresses’ in the next line. The link local address and this virtual link local address is not the same thing.

Also it says that we’ve joined some groups but we didn’t join these!! As you can see, these are also hex values. These are some default groups that we’ve been assigned to.

We didn’t do it manually. But here’s your output of show IPv6 interface. We’ll talk about them later.

There is a brief option for this command

Here we see information regarding all four of the interfaces on this router, whether they have IPv6 enabled on them or not. So that’s an important difference here with these commands.

And notice fast ethernet 0/0 is up and up, and there’s that link local address again… and right under it is our global routing address and it’s the same information that we saw with ‘show IPv6 interface’ before.

That’s our global unicast address under the link local address.

Fast Ethernet 0/1 administratively down/down (shutdown) and same goes for serial0/2/0.

Notice that serial 0/1/0 is up and up, but we see the word “unassigned: under it, and the unassigned is referring here to the fact that no IPv6 addresses have been assigned to this particular interface. ( This is the physical and logical state of the interface ) and we saw that that was up but it’s got a v4 address on it.

You can indeed filter the output of ‘show ipv6 interface’ by putting the name of the interface that you want to see IPv6 information for.

Now of course on the router right now we have one interface enabled IPv6 so I was just running ‘show ipv6 interface’ to get you used to that.

But as you get more and more interfaces on your router with IPv6 running on them, than you might want to filter a little bit just by putting the interface name at the end.

Exit mobile version