When it comes to layer 2 forwarding, we are going to rely on MAC addresses.
And specifically, we're going to look at a MAC address as it comes into our
switch here.
And we're going to pay attention to the destination MAC address.
And the idea with a switch, especially when we compare it to layer 1 hubs,
is that we want to intelligently forward it out a single interface.
And so, yeah, we might have to flood a packet out if needed,
but if we can send it out a single interface, then that would be ideal. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
but if we can send it out a single interface, then that would be ideal.
And so, what we're going to do is we're going to check the CAM table.
And this CAM table is going to contain the very important MAC to interface m
appings,
meaning that I can check this destination MAC.
And maybe it's something like 0.1.2.
And it is an extremely abbreviated MAC address here, and this maps to gig 0/0.
And so, because I have this mapping, I can now look at this destination MAC, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And so, because I have this mapping, I can now look at this destination MAC,
say, okay, well, in order to get it to its destination,
I'm going to forward it out gig 0/0 and send it over there.
Naturally, if we don't have an entry, then we are still going to have to flood
that frame
out all of the interfaces in order to get it to its destination.
And hopefully, at some point, we do learn the MAC address.
Layer 2, from a control plane perspective, we don't dynamically share MAC
addresses everywhere. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
addresses everywhere.
Instead, we use the concept of flood and learn.
And again, we start with flooding, and we hope that we eventually learn the MAC
address
maybe when return traffic comes through.
And so, that's probably the extent of our CCNA level studies
when we were initially diving into the world of radigant switching.
We probably stopped there understanding these two important concepts will get
us a long way,
as far as, again, that level of study.
But now we're going to go a little bit deeper.
We need to know, for example, what is this cam table? WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
We need to know, for example, what is this cam table?
What is cam and why are we using it here?
In order to understand what content addressable memory is, which is what cam
stands for,
we need to start off by taking a look at what we might consider to be a little
bit more of a
normal memory situation.
When we're looking at memory lookups, our standard DRAM type of lookups,
or maybe running on a PC or a laptop, we might be using something like DDR
memory.
But either way, the concept of memory typically involves providing an index WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
But either way, the concept of memory typically involves providing an index
and exchanging an index for a value.
What this essentially equates to is, you can almost think of it as forming a
spreadsheet,
where we have a bunch of cells of information, and in each one of these cells,
we have data.
And that data is stored with a reference ID here that is the index.
So it's data at a specific index. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So it's data at a specific index.
So every one of these cells, if we want to keep calling them, that is going to
have an index.
So again, think of it from a spreadsheet perspective, it would be like saying,
"Hey, what's at A1?"
And we look at A1, we've provided the index, and we're going to get some value
out of that.
That is how a lot of our memory works.
It's how PC store information in memory.
We're taking data, we're putting it into a spot in the memory table.
We're going to remember what that index is, or released report back to the WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
We're going to remember what that index is, or released report back to the
application
that's storing that data, the index, and then this is how we come back and say,
"Okay, I need that value back computer CPU.
Please give it to me. Here's the index."
So that's how standard memory works, and it's important to recognize that it's
based on the idea
that I know where the value is.
And because of that, the index must be known.
So now let's talk about a different type of memory, which is that content-add WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
So now let's talk about a different type of memory, which is that content-add
ressable memory.
So content-addressable memory, or CAM, is still going to store information,
but it's going to be referenced in a different way.
We are going to reference it by content rather than by index.
So the idea here is rather than performing this operation, I provide an index
and get a value,
I'm going to provide content up front, and I'm still going to get a value back, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
I'm going to provide content up front, and I'm still going to get a value back,
but in this case it's going to be a different value.
We can probably already see how this ties well into this paradigm here,
where I provided a MAC address that would be the content, and I get a value
back,
I'm getting an interface back.
And that's exactly what it is.
We're providing something up front and getting a different value back.
So in the world of programming, this is sort of like a two-dimensional array.
We've ever used that, or the concept of key value pairs, which we might WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
We've ever used that, or the concept of key value pairs, which we might
experience a little bit more,
especially as we continue to go through Encore, and we think about scripting,
such as with JSON dictionaries, for example, these kinds of things.
We don't have experience with programming, that's perfectly fine,
but this is the same concept where I'm not necessarily putting things in a
specific order.
There is no order to the information that's stored inside of CAM, whereas up
here we do have an order.
We do have index values assigned to all of these different data points, WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
We do have index values assigned to all of these different data points,
and so it's structured in a way that I can provide an index and get value back,
whereas with CAM that's not really what we're doing here.
So we're providing content.
This content has a few limitations to what we can provide and what we're trying
to match against.
First of all, this is a binary operation, meaning that I can only match zeros
and ones.
Well, Jeff, what else do we match in the world of networking and with computers WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Well, Jeff, what else do we match in the world of networking and with computers
?
Isn't it always zeros and ones?
I don't hold that thought because we're going to find that there is a non-
binary content addressable memory
called a ternary CAM, or a T-cam, coming up, and we'll take a look at that
momentarily.
So from just staying within the context of CAM, though, we're matching zeros or
ones,
and it must be an exact match.
In other words, we're not using the concept of masks here. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
In other words, we're not using the concept of masks here.
Ever noticed that MAC addresses, and we don't use masks with that?
We don't have that concept.
We're not searching against multiple MAC addresses at a time.
Instead, we're looking for an exact match.
I have an exact destination Mac showing up on the switch, and yeah, we're not
really organizing our networks
by MAC address subnets.
If we're going to think of it that way instead, this specific MAC address is
out this interface
and this specific MAC address is out this interface, and that works well from a WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
and this specific MAC address is out this interface, and that works well from a
layer 2 perspective
because scaling-wise, we're not usually talking about more than a few hundred
hosts in a given broadcast domain.
But think about it from a network perspective.
If I had to have exact entries in my routing table, for every single IP address
that's out there
wouldn't work very well.
And so that's where layer 2 and layer 3 are structured very different.
And once again, why content addressable memory really does fit the layer 2 WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
And once again, why content addressable memory really does fit the layer 2
paradigm.
So from a switch operation perspective, we think about how exactly we're going
to use CAM and perform layer 2 lookups.
And there's a few things to keep in mind.
So first of all, once again, our content here is going to be MAC addresses, so
we know that we map MAC addresses to interfaces.
And so when I want to look up what to do with a packet, I submit the MAC
address and I get the interface back. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
address and I get the interface back.
Once again, content is the MAC address and the interface is going to be the
value that gets returned.
Furthermore, we're going to create a table like this per VLAN.
Now this is important because if we think about it, we just said that this is a
binary match, it must be exact,
and I can only submit my content and get a single value back.
Meaning I can't submit my content and get a VLAN ID back, nor can I submit WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
Meaning I can't submit my content and get a VLAN ID back, nor can I submit
content with a VLAN ID to get the value back,
which is most likely how that would work.
Instead, we will just simply have a different table per VLAN.
It isn't a third component.
Now next, remember how we learn MAC addresses.
Remember, we are going to perform MAC address learning.
So learning MACs, when we see those MAC addresses show up, that is how we're
going to populate the CAM table. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
going to populate the CAM table.
And lastly, if we have no entry, then this is going to result in flooding.
So some of this is going to be review just from a CCNA perspective.
We should understand the basic operation of layer two switch, but as we kind of
tie all of this together,
and now understand a little bit better of what CAM is and why we use it,
and how exactly it works well for layer two, but might not work well for layer
three lookups and such,
and now we start to see all of this come together. WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000
and now we start to see all of this come together.