[music]
So this is a review so far.
We know that the original design
of IP was that the address would
be 32 bits long.
We'll talk about the IANA
in just a moment.
Now, the way computers see
it is it's it's just a single
string of 32 bits.
It's 32 bits end to end
of an address.
So really your computer says,
Oh my IP address is 32,147,000,205.
That's my IP address when
I add up those 32 bits,
if I was to convert that 32 bit
number into a decimal number it'd
be some monstrously
large number in the billions.
But we as human beings
can't really work with that.
If I ask you what the IP address
is of your laptop hopefully you're
not going to say,
Oh it's 7,605,000,202.
I'm going to walk away and
I'm going to forget
that 15 seconds later.
So as human beings, we said okay,
that 32 bit number,
we have to come up with a way
that we can use it,
that's readable to us.
So basically what we did
is we said okay,
let's take that string of 32 bits
and cut it into four equal pieces.
Four bytes, right?
Each byte is 8 bits long.
So 8, 8, 8, and 8.
That gives us 32 bits.
Then of each octet of each byte,
we will convert that byte into a
decimal number.
Then we'll put dots
in between them.
So now we'll have 4 decimal numbers
instead of just one monstrously
long decimal number.
So instead of seeing this--
if I gave you that
as my IP address,
well that's fine for my computer.
But as a human being,
after I give you about the 9th bit,
you're going to
forget everything else.
So we cut that into 4 equal pieces,
convert it into decimal,
and we get what's called
dotted decimal,
and that's actually
the real dotted decimal
equivalent of that 32-bit
number that you see right there.
The first 8-bits translate
to the number 2.
The next 8 bits translate
to the number 234.
The 3rd series of 8-bits
translates to 107,
and then the last octet,
the last byte,
is the number 18.
And so, that's how,
we as human beings,
manipulate, and read,
and type-in IP addresses,
and this is what we call
dotted decimal notation.
Computing devices don't need this,
they're perfectly fine with a
string of thousands of bits,
this is just for human convenience.
Okay, so we talked about
how on a broadcast domain,
data could go out in 1 of 3
different ways: broadcast,
unicast, and multicast.
And I said that when
I'm transmitting data,
when my NIC card for my laptop
is transmitting data
it needs to structure
the Layer 2 and the Layer 3
address to be appropriate
to what it wants to do.
So how does it do that?
Well, we talked about Multicast.
Multicast is actually
real easy to represent.
In the world of Layer 3 at IP
if you take a look
at the destination
32-bit address so it's 32-bits
going out as a destination address.
If the 1st 4 of those bits match
1110 that is a Multicast address.
We don't care about what the
remaining 28-bits look like.
As long as the first 4 bits
take that pattern that means this
is a Multicast, one-to-many.
Broadcast, now in the world of IP
we known that an IP address
it's sub dividable,
part of it represents the network,
the broadcast domain.
The remaining part of it is
what we call the host bits.
Now in the case of a broadcast
we've got two options now,
and both of them look at this.
One thing they both have in common
is the host bits are all 1s.
So in an IP address,
if we take our focus away
from the network portion,
we forget about that,
and we move to the
second half of the address,
the host portion of that address.
If you ever see a 32-bit number
that's an IP address in binary,
and you see the host bits
are all 1s just a continuous
string of 1s,
that means you're looking at
a broadcast address.
Now there are two different
flavors of broadcast address.
This first one right here
that says any.111111.
Let's say on the broadcast domain
I'm on right now,
my laptop is connected
to a broadcast domain.
Let's say it's been decided that
the first 8-bits to identify my
network is going to be in
decimal the number 5.
So I am on network number 5.
You know 00000101.
I'm on network number 5.
If my laptop wants to send out a
broadcast to just the devices in
my own broadcast domain this is
what's called a directed broadcast
sometimes called a
subnet broadcast.
I want to talk to everybody
in my domain only.
Then the way I would structure my
destination IP address is I would
say in the network portion 5
because that's my network.
I'm on network number 5,
and then the host portion is where
I would put all of my 1s.
If I'm in network 199,
the network portion would
say 199 in binary,
and then the host portion
would be all 1s,
and that's a way of saying
this is a directed broadcast.
This is directed to everybody
within my domain and
my domain only.
The second one downwards,
the entire 32-bits end to end
is just a continuous string of 1s.
That's what's called a
general broadcast that means to
pretty much the entire world.
Of course it's not going to go
out to the entire world but that's
what a general broadcast is.
Where the entire
32 bit number is all 1s.
Vast majority of time I'd say
probably I don't know,
90% of the time when
a laptop or a host,
any host needs to create a
broadcast it will choose
the second option there.
It'll create a broadcast where
the destination IP address
is just 32 bits of all 1s.
If we convert that into
dotted decimal that
would be 255.255.255.255.
So pretty much any protocol
you can think of that
utilizes broadcast
like ARP, DHCP at Layer 3,
the Layer 3 destination address
will be all 1s the
general broadcast address.
Off the top of my head
I can't think of any
protocols that create
directed broadcast which
is the any .1111.
There probably are some.
I just can't think of any of it
right now that actually do that.
Then unicast.
So we know that unicast is
one-to-one communications
from one device to another device.
So it's pretty much any pattern
that does not match the previous
two patterns, except with all 0s.
We know that any IP address that
starts out with the first octet
being all 0s, that is reserved.
That's called the--
that's actually used more
for routing.
That means it's going to everyone.
It's not really going to everyone.
It's what we call the
default route basically.
But it's not really reserved--
it's a reserved address.
So what's the takeaway from this?
If you see a 32 bit pattern,
in binary,
and you are told that
that is an IP address.
Now somebody asks you,
unlike a multiple choice question,
identify is this IP address
in binary unicast, multicast,
broadcast, or none of the above.
You should be able to do that
because now you know what the
pattern looks like in binary
to identify those three.
So up until this point in time,
we have still retained this idea
that an IP address was 32 bits
long and only the first 8 bits
represent the network.
We had 24 bits of host space,
8 bits of network space.
Now, I mentioned at the very
beginning that that really only
left us with 254 networks,
which back in 1969 was tons.
Then as we started getting into
even just a decade later into the
late 1970s, it very quickly became
apparent that this isn't going
to work;
254 networks is not enough.
There is networks popping up
all over the world
which are modems,
satellites and using Ethernet,
we need more than 254 combinations.
So the designers of IPs said,
Okay, let's take this 32-bit number
now and look at it a
little bit differently.
How can take-- how can we look at
that 32-bit number and somehow
come up with more than
254 networks?
Well, let's do this.
Instead of just looking at the
first 8-bits for the network,
why don't we look at
more than that.
Why don't we take those host bits,
sacrifice some of the host bits,
and add them to the
networking section,
and they came up with
classful addresses.
So in 1981--
and some of you watching might
not have even been born
back then, so in 1981,
classes of addresses
were introduced.
So Class A,
that was like the
original way of doing it.
A Class A address meant that the
first 8-bits represent the network.
The remaining 24 bits
were for the host,
so that was a Class A just like
the beginning when it first was
invented in the late 1960s.
But then they said, okay,
we'll also have a Class B address.
In a Class B address,
instead of the first 8 bits
representing the network,
the first half of the address,
the first 16 bits represent
the network.
In a Class C address,
now 75% of the bits
represent the network,
the first 24 bits represent the
network and only the last 8 bits
represent hosts.
Now the question is, okay,
well if I put a 32-bit number in
binary on a laptop or a PC,
how does it know how to
interpret that 32-bit number?
Let me bring up a whiteboard
here for a second so we can
draw this. Okay.
So here I've got some device.
I'll just go ahead and
draw a laptop or a PC, whatever.
I'm going to give it some
32-bit number.
Actually I'll start off by giving
it a 28-bit number.
So 1 2 3 4 5 6 7 8 9 10 11 12 13
14 15 16 17 18 19 20 21 2 3 4 5
6 7 8. There's a 28 bit number.
I'll leave off the first 4 bits
on the front.
Okay. So in the world of
classful addressing,
when you put an IP address
on a device,
32-bit number,
the first thing that device did was
look at the very first bit.
If that first bit was a 0,
then that device says okay,
now I know exactly how many of
these bits represent the network.
If the first bit is a 0,
that is a Class A address.
and in a Class A address,
just like the old days,
the first 8 bits, the first byte,
only is used to represent
the network,
and then all these other bits here
is a unique host identifier for
this one unique machine
on this network.
Now let's say he looks at
this 32-bit address,
and it starts out with a 1.
Then he says,
Okay, well this is not Class A.
I need to look a little bit
further to figure out
what the class is.
If he sees it after that
the next is a 0,
he says, I'm done.
This is a Class B address,
- which means for 5, 6, 7, 8 -
which means that the first
16 bits represent the network.
So you can see here that with
a Class A address,
it's just like the old days.
I've only got 254 unique numbers
I can come up with.
All 0s is reserved.
All 1s is reserved.
And then I have 254 combinations
in the middle of that.
So 254 networks.
But if I tell my device,
Oh, your address is a
Class B address,
well now I've got
16 bits of network.
That gives me tens of thousands--
actually I think 16 bits gives
you about 65,000 combinations
of unique numbers
you can come up with,
a little bit more than that.
So now we can see,
Oh, I've got a lot more
networks available with 16 bits,
but what's the downside?
You know with a Class A network,
yeah, I've only got 254 of them,
but on each one of those networks,
I've got a lot of hosts.
I've got 24 bits of host bits
on a Class A network.
That's 2 to the power of 24.
I think that's something like
16 million or something like that.
So that means on one single cable,
you could have about 16 million
devices all in the same group,
all at the same network address,
not really feasible.
With Class B,
I've got a lot more
networks available to me,
but I'm sacrificing my host space.
Now, instead of 24 bits for a host,
I've only got 16 bits for host,
which is still an awful lot.
That means with Class B,
I've got well over 65,000
networks to me
and each one of those networks
also has 65,000 combinations of
hosts it can have on that one wire,
but they didn't stop there.
They said, okay, if I give a device
a 32-bit number as an IP address
and it sees that the
first two bits are 11,
then it looks at the
third bit as 110, now he says,
Okay, now I know that of
my 32-bit number, the first 24 bits
- which would extend
right about here -
is my network address.
That's our Class C address.
So the Class C you can see
there's even more networks.
We've got 2 to the power of 24
so we got millions and millions and
millions of Class C
networks available,
but each one of those
Class C networks only has 8 bits
left over for host space,
and we know the all 0s and
all 1s hosts are reserved.
So that means we got 254 hosts
for each Class C network.
So those are all the networks
that were designed for
unicast transmission
for one-to-one transmission.
See here, if I've got a Class A
network that starts out with 0,
so if I've got
01234567.anything-- we know
that this number is reserved.
You can't start out any
network with all 0s,
and we also know that this
number is reserved.
You can't start out any
network with that.
So basically it tells us that from
1.anything through-- actually,
wait, hold on a second.
It's still got to retain the 0
in the first bit.
So we've got in the middle here,
1.anything,
that's our first usable Class A
network through and that number
right there was 127.
And that gets us back to our slide.
That's where we saw this.
Class A networks, technically,
can't use the all 0s,
so 1-dot-anything through
127-dot-anything.
Also it gets a little sticky here,
but, technically,
127 is also a reserved number.
Just like a network number can't
start out with all 0s and it can't
start out with all 1s,
127 is also a reserved number
for special usage.
It's called the loopback network.
If you ever want to google that,
the loopback network is anything
that starts out with 127.
So really,
in your pursuit of your CCNA,
what you need to memorize--
you need to memorize
a couple of things.
You can identify a Class A network
by the binary if the very first
bit is a 0 that's Class A.
And you should probably also
memorize the dotted decimal.
So I'm just going to put a line
through this because
127 is reserved
for loop back so 126 dot anything.
So the usable range of Class A
networks are 1 dot anything up to
126 dot anything,
that's the usable range
of Class A networks.
Now when we go into Class B
networks that starts out with 10,
well 10000 is the number 128,
and if I keep that pattern of 10--
get rid of some of this here.
10 and then 123456,
and then 10123456,
so that's my full range of
Class B because we know Class B
has to start with 10 in binary.
So if I translate that back in a
dotted decimal that's
128 dot anything up to 191 dot
anything so that's also something
you should memorize as you pursue
in your CCNA certification is that
Class B is recognizable
in binary by any IP address that
starts out with 10 and is
recognizable in dotted decimal
by any IP address that falls within
the range of 128 up to 191.
Then finally we have our
Class C addresses.
We know that Class C in binary
starts with 110 so the
smallest number
we could come up with that retains
that pattern is that,
and the largest number that
we could come up that retains
that pattern is that.
So here we have 192 dot anything.
That's the smallest Class C network
anything that begins with 192
and 223 dot anything.
So this is your full range
of Class C networks.
Anything that starts out with 110
in binary or in dotted decimal,
anything that falls within the
range of 192 to 223.
That's what we see here.
Class D networks,
this is reserved for multicast.
So if I've got that situation
where I'm sending one sender,
one transmitter is sending a
single stream of data that multiple
devices are going to pick up,
but I don't want to be for everyone
- it's not a broadcast,
it's a multicast -
then you would use an
address in the Class D space,
and the way you would recognize
that in binary and you start to
see the pattern right here
are the first 4 bits.
So the smallest multicast address
is anything beginning with 224,
and that's the largest multicast
address which is 239 dot anything
so that's your range of multicast
addresses all starting with 1110
in binary and dotted decimal
falling in the range of 224 to 239.
And then the last range
of networks is--
I wouldn't even say networks.
The last range of classful IP
addresses is what's called the
Class E.
This was originally known
as the experimental range.
And if we go to our binary
once again,
you can see it's going to be the
next pattern available to us.
So Class E experimental addresses
start out with 1110,
so the first 5 bits are 11110.
You're never going to see any
IP packet with a Class E
source or destination.
It was reserved as future use and
it never really came to fruition.
So even today and here we are
in 2015 where IPv4 networks
are almost entirely gone,
almost entirely used up,
this space has never been utilized
and will never be utilized,
Class E.
If you're curious as to why,
if you're watching this in
the live class right now,
in the files section in the
upper right you'll see I've
included a PDF of the slides,
and in the notes section
I've included a URL in there that
talks about why Class E
is never going to be used.
Just to really briefly summarize
for the last, I don't know,
3 or 4 decades the
IP protocol stack,
the code that implements IP
has been written in such a way
that whether that code is
implemented on a router,
or a laptop, or a tablet,
or a smartphone,
every device has always recognized
that Class E is not usable.
If you try putting a Class E
address on your laptop,
or on a smartphone, or on a router,
you'll get an error message because
it recognizes in the code that
this is reserved for future use.
So some people have said,
well, here we are today
in the modern world,
we need this space.
we've run out of IPv4 addresses.
Let's reclaim the Class E so we
can get some more space out of it.
Well that URL in the PDF
goes into a little bit of detail.
Basically it says well let's
think about that for a second.
With the way that people
are using IP these days,
with how many new networks are
coming online every single day,
if theoretically we could use
the Class E space,
that might extend the usable life
of IPv4 for maybe another 5 or
6 years, maybe,
but what would that require?
That would require that all the
software developers that developed
Windows, Linux, and the Apple
operating systems-- they have to go
back into their code,
rewrite the code so that this is
now an acceptable address.
It wouldn't spit out an error.
It would recognize that
as being useful,
and what about you that
already own a laptop,
how are you going to go into your
IPv4 code and change it so that
it now recognizes that this is okay
it's all right to see that,
you can't.
So they said,
look the time and the effort
it would take to take all the new
equipment that's being developed to
recognize that as being all right,
and to somehow go to everybody's
existing smartphone, and tablet,
and PC and say okay,
it's okay now, it's all right,
it's not theoretically possible to
do that.
It's just not feasible to do that
as a end result to only
give yourself maybe
5 extra years of life of IPv4.
So that's why Class E
will never come to anything,
just won't be usable for anything.
And somebody has asked--
so Ganesh has asked me to
elaborate a little bit on what this
concept is of the loopback address,
which is basically anything
beginning with 127.
Basically the way
I understand this is that any
device that's running IP whether it
be a router or a laptop
or a tablet,
when you tell that device,
Hey, I want you to create a packet,
and I want the destination of
that packet to be 127 dot anything,
the way the device interprets it,
it says, Okay, well that means that
basically I'm testing myself.
I'm testing to see if my own
IP protocol
is working and is functional.
So when you tell a device like
a laptop or PC or router to create
a packet going to 127 dot anything,
it will create that packet,
but it never leaves the brain
of the device.
It will never actually go on the
wire and go anywhere.
It's like you're
talking to yourself.
It's like, Hey, IP are you there?
Yep, I'm here.
Okay, we're good.
So that's what they mean
by loopback.
It doesn't leave the device
it's basically a way of just
testing to see if your own
IP protocol is working.
So for example,
if I open up a DOS prompt here,
if I ever was wondering,
I say, Oh, you know,
I can't get to the Internet,
I can't get to my email server,
I can't get to anything.
I wonder if there is some bug in my
Microsoft implementation of IPv4
in my laptop.
Could IPv4 be buggy in my laptop?
I can test that by just saying,
ping 127.pretty much anything,
5.6.7.
And the fact that I'm getting
a reply tells me that my own local
implementation of IPv4 is okay.
I've just basically pinged
my own CPU.
So that's what the loopback network
is used for.
And really doesn't matter
what it is, 127.88.99.100,
just the fact that it's beginning
with 127 tells the IP protocol
implementation that this is a
loopback test.
You can do this on a router,
or a laptop,
or anything that gives you the
ability to send a packet to 127,
so that's what that's reserved for.
Well if you don't have
any questions for me,
I've got some questions for you.
So I promised you that
during this presentation,
I'll have some periodic quiz
questions that would pop up.
So I'm going to give you a couple
of them right now and then we'll
take our first break.
Here's what I'm going to do.
These questions should be
pretty quick for you to answer.
So I will display the question.
I'll maximize it here
so you don't see me.
And when you see the question,
I will give you 30 seconds to think
about it, come up with the answer.
You don't have to type in the
answer if you don't want to,
just try to come up with it
on your own.
And after 30 seconds,
I will show you the answer
and we'll talk about it.
So let's go to question number 1.
Identify which of the IP addresses
below belong to a Class B network.
You have 30 seconds.
And if you're watching this
as a recorded session,
you can just press the pause button
right now to pause this recording,
and then play it when you think
you have the answer.
Okay, so it's been 30 seconds.
So which of these are
Class B networks?
Here is your answer.
Answer C and D.
We know that binary,
any IP address that begins
with a combination
of 10 is a Class B network.
That's why answer C is correct.
And we know that if it
begins with 10,
that means the range of Class B
networks is anything from 128 up
to 191.
And that's why answer D is
also the correct answer.
Let's go on to the next one.
Identify which of the IP addresses
below belong to a Class C network?
Okay, time is up.
So Class C network,
the answers would be
answers B and E.
With Class C,
anything in binary that
begins with 110 is Class C.
And in dotted decimals,
that means your first octet
is going to fall
within the range of
192 up to 223.
[music]