[music]
So let's take a look at our
whiteboard for a moment.
We've got this concept here of
let's just say 2 hosts
running IPv4.
Let's just put 3 hosts on here.
Say 2 laptops and a router.
We're going to put them all 3 on
the same exact Ethernet broadcast
domain, the same Ethernet segment.
Okay, so let's give some IPv4
number to these 3 hosts.
Now, we know that because these
3 hosts are on the exact same
network domain part of their
IP address and binary
from left to right
has to represent the group or the
network they're a part of.
So let's say I give them this,
actually I have to make this pretty
small here to fit this in.
So, let's say this guy here is--
and I'm going to go ahead and
expand this so you can see
a little bit better.
So 1, 0, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15,
16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28.
All right, I'm not going to count
all up but let's just assume that
that's 32-bits.
I think I'm pretty close there.
And then we'll put one more
address on this guy right here.
I'll do that up at the top
so we have room.
Okay, so in binary these are the
32-bit IP address I've given to
each of these hosts.
Now, if we were looking at these
addresses from the original
implementation of IP back
in the late 1960s, early 1970s,
the IP code or software that was
running on all 3 of these devices
would interpret these addresses
the exact same way.
It would say the first 8 bits
represent our network.
That's not 8 bits right there.
1, 2, 3, 4, 5, 6, 7, 8.
There we go.
1, 2, 3, 4, 5, 6, 7, 8.
So the original implementation
of IP would have said this is
the name of our broadcast domain,
10010010.
That is our network.
All of these other bits
are unique patterns,
host bits, for each of our hosts.
Now I said here that the problem
with this is if I take 8 bits,
that's the very first pattern
I can come up with.
Well we know that's reserved.
No network can be the
all 0s network.
Then we have a whole bunch
of combinations.
The last pattern in binary
I can come up with is that.
We know that's also reserved.
So everything in between here
is 254 combinations.
So if I'm limiting myself to the
original implementation,
here is one combination
I've just used, 10010010
which leaves me 253 networks
which are remaining,
and that's not very many networks,
not very many broadcast domains.
Now with classful,
if I go into the operating system
on all 3 of these devices,
and I change the IP code
in a little bit and I say,
okay, you are now classful devices,
look at your IP address in a
classful way.
Now instead of just assuming
that the first 8 bits
represent the network,
they don't make that assumption.
See if I get rid of this box here
if it'll let me. There we go.
Now instead they do something
else first.
All these 3 devices independently
take a look at the first few bits,
and as classful devices
they say, oh okay, well the first
2 bits that we have are 10,
so that tells me that now my
network is the first half
of this address,
the first 16 bits.
So 1234, 1234, 1, 2, 3, 4.
1, 2, 3, 4. Right there.
So that is the network address,
the first 16 bits.
Now, how does that give
us more networks?
Well let's focus here just for a
moment on the first 8 bits because
remember we, as humans,
read this address in
4 dotted decimal numbers.
So what is the first byte?
1, 2, 3, 4. 1, 2, 3, 4.
So that's the first byte
right there.
Let's go ahead and translate that,
first of all,
to a dotted decimal number.
So we've got the 128-bit,
the 16-bit, which is 144 plus 2,
so this is the 146 network if I did
my math correctly.
Now, in the original days where the
networks was just the first byte,
the first 8 bits,
that means only this broadcast
domain could start with 146.
There were no other networks
available out there that could
start with 146.
This number was reserved
for this wire,
this broadcast domain.
But now with classful addressing,
now that we're saying the first
2 bytes represent the network,
that means one wire could be
146.0.anything.
We could have another wire,
another broadcast domain
that was 146.1.anything.
Another wire that's 146.2.anything,
on and on and on,
all the way up to 146.255.anything.
So that means just for this
single number of 146
we have 256 combinations
of networks.
This one right here -
I'm not sure what this is - this
is 146.-- let's see here,
let's go ahead and add up
the second octet.
This is 192 plus 8, that's 204.
So everybody on this particular
wire recognizes that their group
number - their network number -
is 146.204.
So now with classful addressing,
because I'm able to look at more
bits of this 32-bit address,
that gives me a
lot more combinations.
So with Class B right here
- we know that Class B
starts out with 128.
Well, just with 128 I could have
a wire that's 128.0,
another wire that's 128.1.
I've got 256 combinations of 128,
another 256 combinations of
networks that begin with 129.
Another 256 combinations of 130,
all the way up to 256 combinations
of 191.
That's what gives us
in the Class B space,
over 65,000 unique networks
because we have so many
more bits available to us.
And for this to work,
the system that it's running on
the laptop, the PC, the mainframe
has to be able to look at this
address in a classful way.
The code has to tell it,
the IP code,
the software developer has
to write the code in
such a way that says, look,
don't make any assumptions
about your address, instead,
look at the first few bits.
And whatever the bit pattern
is in the first few bits,
that will tell you of
your 32 bit number,
how much of it belongs
to your group, your network,
your broadcast domain.
And that's what gave us thousands
and thousands and thousands of
more networks that were available
than when all we had was just our
first byte and we couldn't go
beyond our first byte.
So that's why classful addresses
gave us that ability to scale
beyond a much larger
addressing space.
[music]