(electronic music)
- In the previous video, I introduced you to the concept
of IPv6 and why it was created in the first place,
and we did a brief look at an IPv6 address,
and we saw that it was really big, it was 128 bits
in binary, and we saw that instead of representing that
in dotted decimal notation like we do
with an IPv4 address, IPv6 addresses
are represented in hexadecimal,
that every four bits and binary are represented by
a single hexadecimal character that can be anything
from zero to F, with zero meaning zero
and F meaning fifteen,
and then after four hexadecimal characters,
we have the colon.
And those four hexadecimal characters together
were called a word.
Sixteen bits is called a word,
so for every word there was a colon.
So now what we're going to look at is,
normally in discussing IP addresses,
I would focus on the network portion first,
because that's what we did with IPv4,
and we talked all about the network portion,
but in order to really talk about the network portion
of an IPv6 address, first we actually have to understand the
second half of the address, the host portion.
Because the host portion, you come up with that
in a slightly different way than we do in IPv4,
and I'm going to be using a term called EUI-64.
EUI-64 is one of the ways that the host portion
of an IPv6 address is created,
and I'm going to be referencing that term a lot
when I'm talking about various different kinds of
IPv6 addresses, and if you didn't know what EUI-64 meant,
that would be kind of meaningless to you.
So, let's talk about the host portion.
So, in the world of routed protocols,
a routed protocol by definition has to provide
some sort of layer three address
to what is being encapsulated.
And we know that a routed protocol,
whatever that address is, however big or small it is,
it has to be sub-dividable into two pieces.
Part of the address has to be the network,
or sometimes we call the prefix,
the other half of the address is the host ID,
or sort of like the serial number of the individual host
in that network.
So it has to be sub-dividable into two pieces.
So we mentioned, we talked about IPv4,
we looked at how the subnet mask was the tool,
the comparison tool that we use against the IPv4
address, to determine where that dividing line was,
between the network portion and the host portion.
So in an IPv6 address, same rules apply.
Even though the address is much bigger,
we need a subnet mask, and a subnet mask tells us
where within those 128 bits the dividing line needs to be.
Now in IPv6, the second portion of the address
that is unique just to your laptop,
technically those bits, we don't call them host bits.
We have a different name for them.
They're called the interface ID.
It means basically the same thing,
your interface ID, your host bits, same thing.
It's a unique set of bits just for you
on this particular network that you're sitting on right now.
But you should be familiar with the fact that we
no longer call them host bits,
they're called an interface ID.
Now, according to the Internet Assigned Numbers Authority,
remember them?
They're at the top of the food chain as far as governing
all numbers related to the internet,
they really strongly advise that IPv6 addresses be split
evenly right down the middle.
That the first 64 bits be for the prefix, or the network,
and the second 64 bits be for the interface ID.
Now it's a recommendation.
You don't have to do that.
Just like in the world of IPv4,
if I gave you a 32 bit IP version 4 address,
you could create whatever subnet mask you wanted to,
to put that dividing line wherever you wanted to.
You could say that the first 19 bits are the network,
or the first 26 bits, or the first 12 bits.
Same thing is true with IPv6.
Anywhere within those 128 bits,
you could set that dividing line,
but, the problem is, if you don't go with the
recommendation of cutting it right down the middle,
then some of the other benefits that you have
of IPv6 are lost.
Some of the other benefits that come with IPv6
you cannot take advantage of if you don't
split your address right down the middle.
So that's why it's just really a good idea to do what the
Internet Assigned Numbers Authority recommends that you do.
Okay, so the nice thing here, one thing that's kind of
easier, okay, yeah, it's kind of disappointing that when
we're representing the IPV6 address itself, it's so big,
and we have to remember all these hexadecimal characters,
and where the colons go.
So yes, an IPv6 address, typing it into the keyboard
is a lot more cumbersome than typing in an IPv4 address.
But, there is a trade off.
When you're typing in your IPv4 address,
when you get to the subnet mask,
you had to type in the subnet mask as another
dotted decimal number, 255.255.255.whatever, 248.
In IPv6 as you can see here on the slide,
you can actually type in the subnet mask,
actually, you don't have a choice.
You type in the subnet mask as the shorthand notation,
as a forward slash and a number,
like /64 is what you would commonly see.
So like this number here that we see in black,
2001, and then ending with ::3a/64.
That is exactly how you would type an IPv6 address
into your router's interface, for example.
So when we get to actually configuring routers
and switches and putting addresses on them,
we'll use the IP address command to put in IPv4 address,
and we'll use the IPv6 address command
to put an IPv6 address.
And with the v6, we will not have to use dotted decimals
for the subnet mask, so that will be kind of nice.
Now let's do some comparing and contrasting here.
With IPv4, which is what you're most familiar with
right now, how does a device,
let's just think about a laptop for a moment,
how can a laptop obtain an IPv4 address?
How does it get on your system?
What are the various ways?
Well, hopefully you said, if you're talking about Microsoft
Windows specifically, there are three ways, right?
You could get it via DHCP,
and that is the way the vast majority of hosts obtain
their IP addresses,
via the Dynamic Host Configuration Protocol,
on by default.
Or, if we're talking about a host that never moves,
like a server that's always in one position,
we could statically configure it on that device
so it always has the exact same IP address,
or if we're talking about Microsoft Windows,
we know that if Windows is configured to try DHCP,
and then DHCP fails,
it will fall back to that 169.254 address,
that automatically provisioned IP address.
So those are the three ways,
and that last one, we don't really like to see, right?
When we're on a Windows device,
and we see that the IP address is 169, it's like,
uh-oh, that's not a good thing, it should not be that.
Well, in the world of IPv6,
you have the first two methods are exactly the same.
There is a DHCP version of IP, it's called DHCPv6,
so you can certainly use that.
You can still statically configure your IPv6 address
on your laptop or on your router,
or, IPv6 actually has a totally unique way that IPv4
doesn't have which is called
Stateless Address Automatic Aonfiguration, SLAAC.
Stateless Address Automatic Configuration.
And by using SLAAC, an interface, a nic card,
can automatically obtain a globally routable prefix,
a prefix that actually could be used
to get to and from the internet without using DHCP.
And towards the end of my IPv6 discussion videos,
we'll talk a little bit about that,
when we talk about something called IPv6 neighbor discovery,
that is how Stateless Address Automatic Configuration works.
But that's something that's kind of unique to IPv6,
where it doesn't need technically DHCP to get
a useful address for itself.
Now, I want to focus in here in this presentation on the
interface ID, so let me bring up the whiteboard here,
and zoom in on this.
So let's say that I was on a router and I am at,
I mentioned this mode briefly,
do you remember what I called this mode
in some previous videos?
This was called User Exec mode, and I said,
you really can't do much from this level,
so I said we want to move up to the next level,
which, what does the prompt look like,
what symbol does it take at the next higher level?
It's a pound sign.
And what did we technically call this configuration mode,
or level?
This was called Privileged Exec, Privileged Exec.
Now what actual IOS command did I have to type in
when I was at User Exec level to get me to
Privileged Exec?
That was the single word of enable,
and that's why Privileged Exec is sometimes called
Enable Mode, you'll hear that a lot,
but technically it's called Privileged Exec.
Okay, now from Privileged Exec mode,
can I start configuring this device?
Can I start adding IP addresses,
and turning on routing protocols, and doing all of that?
No, I can't.
So now I need to get to another mode.
What is the next mode called that will actually be
the very first mode that allows me to do
any kind of configuration?
That mode is called Global Configuration Mode.
And what would the prompt look like to tell me
that I'm in Global Configuration Mode?
I would see in parentheses the word config,
and the the hash symbol.
And, review question.
How do I get from Privileged Exec
into Global Configuration Mode?
I have to type two words, configure terminal.
Most people usually shorten that to config t.
Cisco IOS does recognize that config t means
configure terminal.
Okay.
So right now, let's say that I have a router
that looks like this, it's got two interfaces on it,
and the interface where I want to apply my IPv6
and my IPv4 address,
I'm going to make this a dual stack device,
It's going to run both v4 and v6.
It's FastEthernet 0/0.
From right where I am right here,
can I start configuring my IPv4 and my IPv6 addresses?
No, I cannot.
The router can't guess my mind,
it doesn't know which interface
that any address would go on, so I have to tell it.
So in this particular case,
from Global Configuration mode,
I would say, okay, the interface I want to go to is
FastEthernet 0/0, and now that will put me into yet another
submode called config interface mode.
So now, anything I type, a relevant command,
it recognizes there's some commands that are
appropriate for putting on this interface,
and there are some commands that are not appropriate.
If I tried typing in a command here for example to
change the name of the router,
let's say I said oh, I don't want it to be called router,
I want to be called Keith's Router.
Well, if I tried typing in the command to do that
right here, it would recognize that that command
was not at the appropriate level,
and it would either get me an error message,
or it would bounce me back to the level where
I'm supposed to be.
But right now, I want to type in an IPv4 address.
So let's say I want to give this thing the IPv4 address
of 20.1.1.1 with a /24 mask.
Do you remember what the command was to do that?
That command was IP address, which means it was an
IPv4 address, 20.1.1.1, and then we have to put in our
subnet mask in dotted decimal.
Okay, and then as soon as I hit the enter key,
that will take effect,
and it will put me right back
in Interface Configuration Mode.
I haven't left it yet,
it assumes I still want to be there.
Now, let's say, I'm going to have to use an arrow here,
because an IPv6 address is quite large,
let's say that on that same interface,
I want to apply an IPv6 address that is this.
Let's say it's 2001:1111:0:aaaa,
okay, so right there, if we add that up,
that's the first half of my address,
that's my network,
because remember, this is a word.
2001 is a word, and a word is 16 bits,
so 16 plus 16, plus 16, plus 16, gives me 64,
so there's my prefix, I'll put a colon there.
Now the rest of this address is going to be my
interface ID, and then at the end of it,
I'm going to put /64 to indicate that this portion
is the network.
Now as far as the interface ID is concerned,
on the router, I have two choices.
I could statically configure it.
Maybe I want it to be like this,
maybe I want the interface ID to be 2222:1111:0:a,
well then I would simply type IPv6 address
2001:1111:0:aaaa, colon,
and then I would put 2222:1111:0:a/64.
So by manually typing in this portion,
I've just statically provided the last 64 bits.
I've told it what its interface ID should be.
Just like when I gave the IPv4 address,
part of this was the host bits.
I told it what the host bits were.
But with IPv6, there is an alternative.
Now usually when you're talking about devices
that have static IP addresses,
like routers interfaces, like servers,
you would want to do this,
you would want to give it a static interface ID,
and probably something that's easy to remember,
like 000001, or 000002, or something like that.
This one here is not all that easy to remember.
But, on laptops and tablets and smartphones
that are running IPv6, typically they get all of their
address information dynamically,
and so they will obtain their prefix,
their network dynamically,
and then they will by themselves come up with
their interface ID without any help from anybody else.
Now if I wanted the router to do that same thing,
I could type this.
IPV6 address 2001.1111.0.aaaa,
and then I would say ::/64,
so now remember, what does the :: mean?
That means this covers a whole bunch of zeros,
so right now I've given him his first 64 bits and the ::
is saying the last 64 bits are zeros,
but I'm going to add one additional element here
to tell him, well wait a second,
I don't want your interface ID to be all zeros,
I want you to make it up yourself using the EUI-64 protocol.
So at the end of the IP address when you do not supply
the interface ID, you just do a ::/64,
and then you do EUI-64 as an additional keyword.
I didn't have to do that up here,
because I gave it the interface ID,
but down here, that says use the special rules,
the special protocol to come up
with an interface ID yourself.
Now you might be wondering, well, how does he do that?
And actually, we do need to talk about that,
because your CCNA exams will expect you to know,
how an EUI-64 interface ID is determined.
So let's take a look at that.
Now as of the time that I'm doing this recording right here,
we haven't really talked about ethernet.
I've mentioned it here and there as a layer two
data link layer protocol that's the most common.
I've said that if you have a wired nic card
that actually has a wire coming out of it,
99.9% of the time it's going to be running ethernet.
And I mentioned that all layer 2 protocols have to have
some kind of a layer 2 address.
You have to have some way of identifying yourself
on this wire, and in the case of ethernet,
not only does your nic card have an identifier,
remember we called that a burned in address,
remember we talked about that,
because it was burned in by the manufacturer
when it was made?
Well, when I put an ethernet frame on the wire,
I also have to include the destination address of
who on this wire it's going to, and this is a key thing.
When we're talking about layer 3, the networking layer,
I have a source address, a source IP address,
my destination layer 3 address may be somebody on my wire,
but it's probably not.
It's probably somebody on a completely different network
than me, could be somebody who's thousands of miles
away from me.
So the source and the destination IP address usually are not
on the same subnet, on the same network.
Usually they're on different.
At layer 2, though, at layer 2,
the source and destination layer 2 addresses
have to be on the same wire,
they have to be on the same wire.
Now you might be thinking, now wait a second Keith,
if my laptop is trying to communicate to a server
that's across the country,
I can understand how the layer 3 addresses
would be different,
but how could I address my layer 2 frame to someone
on my wire if I'm not really trying to get to someone
on my wire, I'm trying to get to someone
across the country?
This is where the router comes into play.
For example, if this was my PC right here,
and let's say my PC had the IP address of
1.1.1.1./24, and somewhere out there in the world,
we don't know where it is,
is the ine.com web server,
and let's say it had the address of 7.7.7.7/24,
well if I told my PC,
that's where I need you to go,
the first thing any device does when it creates a packet
it says, okay, I'm going to do a quick comparison,
I'm going to compare my address, my IP address,
or my IPv6 address against the destination address,
and I'm going to ask myself, are we in the same network?
Are we in the same subnet?
In this case, the answer is clearly no, we are not.
I'm trying to get to 7.something, I am 1.something,
we are not in the same subnet.
So now in this case when the answer is no,
the device I'm trying to reach is not on my cable,
it's not on my subnet,
then the device says okay, well, how do I get my data there?
Oh, that's what my default gateway is for,
that's what my router is for, so here's what I'll do.
When I create my packet, so here's my IP packet,
I'll put a destination of who I'm trying to reach,
I'll put a source of who I am,
and then when I hand that down to the data link layer
at layer 2, the data link layer is going to put
his own header on front of that.
Well, I have a nic card that connects to this wire,
and that nic card has a layer 2 address.
Now in the case of ethernet,
which is what is used most often,
that address is called a MAC address,
Media Access Control address, a MAC address.
And just like IPv6 addresses are represented in
hexadecimal, MAC addresses are represented in
hexadecimals as well,
so it's a good thing we already know hexadecimal,
because once we get into the ethernet section we talk
about MAC addresses in more detail,
they'll make more sense.
So a MAC address may look like this.
So that would be the MAC address of my nic card.
So that was whoever made my nic card, Intel,
or whoever it is, stamped that MAC address on it
when they created it.
So anytime a layer 2 frame is going to me,
or coming from me, this MAC address will be in it.
And similarly, the router has a MAC address on his nic card
connected to that wire.
Why don't we just say he's 0002:aaaa:bbbb,
because this is hexadecimal.
So now in this particular case,
when ethernet goes to put the ethernet header on the front,
it will say, trying to give myself enough room here,
that the destination is 0002:aaaa:bbbb,
and it will say the source is 00002:1111:2222.
I kind of ran out of room here, but you get the idea.
So you can see the way this works is that everything
that's put on the wire at layer 2 has to be sourced
from the MAC address of the nic card that created it,
and it has to be going to a nic card that's on this wire.
So that's what we see here,
it's coming from my MAC address,
going to the MAC address of the router,
so initially when the router sees this ethernet frame
coming in, he's going to say oh,
somebody's trying to talk to me, okay.
But then when he strips off this blue section,
he says okay, it looks like it's me at layer 2,
now let's pass it up the OSI model to layer 3.
When he strips that off,
he'll say oh, the destination is not me,
it's somebody else, 7.7.7.7.
Okay, as a router, I guess my job is to route that packet
and send it on its way.
Now why am I talking about MAC addresses
in the context of a video where we're talking about
IPv6 interface ID's?
Because when you use the EUI-64 keyword
to dynamically come up with your interface ID,
the MAC address of your nic card is going to be a
critical component of that.
So let's go back to this.
Given the fact that your network prefix in IPv6 is
64 bits long, the other half of the address,
the interface ID, is also 64 bits long.
But if you remember hexadecimal,
each one of these characters was equal to 4 bits.
Right?
So I'll just write out the first part of it.
0000:0000:0000:0010.
So that right there encompasses this.
So that is a word, right?
That's 16 bits, 16 times 3 is 48.
48.
Now think about this for a second.
If I say EUI-64, what I'm telling him is,
take your MAC address and turn it into a 64 bit
interface ID, but he says,
but the number you're giving me is not a 64 bit number,
it's a 48 bit number, it's too short.
So one of the things that EUI-64 does
is it expands that MAC address
by putting in some characters in the middle.
So it says, okay, here's what I'm going to do.
0002:aa,
that's the first half of the MAC address, aa,
he says okay, here's what I'm going to do,
now that I've split it up,
in order to expand this out into a 64 bit number,
I'm going to put in the middle here, ff:fe.
We're not done yet, but we're almost there.
So this is part of what EUI-64 does,
to dynamically create an interface ID,
it take the MAC address, cuts it in half,
and puts ff:fe in the middle.
So look, we've just taken a 48 bit number,
and what did we do?
We added another 16 bits to it, right?
Because each one of these characters is 4 bits,
so now, 48 plus 16, now we've got ourselves a 64 bit number.
But we're not quite done.
In the world of ethernet,
and we'll talk more about this when we talk about ethernet,
but, 00,
this bit right here has a special name.
That bit is called the individual group,
that's called the Universal Local bit,
or sometimes called the Global Local bit.
And that'll be explained more in the ethernet section.
It's also sometimes called Universal/Local bit.
And I'm not really going to explain right now
why it's important in the context of Global Local,
Universal Local, but what I am going to say is when
you're talking about an interface, when you're talking about
EUI-64, whatever that bit was in the original MAC address,
it gets changed to just the opposite.
So what we would end up having happen here is we would have,
I'll do it down here,
so this was the original, 0000:0000:0000:0010,
and then we had aaaa:bbbb, so that's what we had.
So now what we're going to do is we're going to
take this bit, and we're going to flip it
to just the opposite.
One little bit change which will give us
0000:0010:0000:0010, aaaa:bbbb.
And so if I convert this word back into hexadecimal,
that would give me the numbers of 0202:aaaa:bbbb.
So now when we go back up to our EUI-64,
not only does it have to split this address in half
and put ff:ee in it, but now that we've flipped the bit,
our EUI-64 interface ID becomes 0202:aaff:feaa:bbbb.
And that is what would be applied to the second portion
of the IPv6 address as the, what we used to call host bits,
but we now call the interface ID.
So let's do an example of this, let me give you an exercise
and see if you can figure this out.
You might want to take a screenshot of this real quick.
Alright, so, here is a laptop let's say.
And it's MAC address is equal to 021a:5555:6677,
and on that laptop,
you say IPv6 address 2001:2222:3333:4444::/64,
and then you say EUI-64.
So now my question to you is,
what will the full address be?
When it creates the interface ID,
what will be the full address?
Pause the video, and then press play when you think
you've figured it out.
Alright, so, it doesn't really matter
which order we take it,
I'm going to do the bit flipping first.
So it's going to be flipped right here,
so we know that 02 is 0000, 0010,
and we know that it's this bit,
the Universal Local bit that's going to be changed,
so that will be changed to 0000, 0000,
that's going to be the change, okay so now,
we've gone to 001a, instead of 021a,
it's been now changed to 001a,
:55, and now we've got to put the ff:fe in there,
ff:fe,
and then we put the remainder of the MAC address,
55:6677.
So that is the answer,
by using EUI-64 this is the interface ID
that it comes up with.
(electronic music)