in what situation would a layer 2 switch have an ip address configured This is a topic that many people are looking for. bluevelvetrestaurant.com is a channel providing useful information about learning, life, digital marketing and online courses …. it will help you have an overview and solid multi-faceted knowledge . Today, bluevelvetrestaurant.com would like to introduce to you How L2 Switches Use MAC Addresses. Following along are instructions in the video below:
“The cool results of our time. Together in this video is that in the future. Future. So he comes up to us and says hey can you tell me about 2.
Switching. The answer that we ll have is absolutely yes. So let s use this as the backdrop for this discussion. This is the icon that represents a network switch a layer 2 switch specifically and this switch has 5 ports.
Now some switches have hundreds and hundreds of ports in this example. We re just going to start with 5 1. 2. 3.
4. 5. And then each of those pork. These are little rj45 connectors.
That s the name of that typical ethernet connector that we use to connect to ethernet networks. And we have a cable that goes to computer to another one that goes to the internal server pc. Three on port 4 to the printer report. 5 to a router and then that router has additional connections out to other networks represented by this cloud right here.
And when a switch first powers up it does not yet know what the layer 2. Ethernet dress s of computer 2 or the internal server or any of these devices. Because it s just been powered up. But one of the cool things about a layer 2 switches.
It likes to learn and a good question might be well keith. What does this layer 2 switch like to learn well. It likes to memorize source. Mac.
Addresses that means. If computer..
2. Sends data into the network. And as part of that it includes its source mac address. Which is this bad boy right.
Here. The switch is gonna say based on that frame enough data that just was received on this port. Port. Number 1.
Because the source address was this one ending in seven 7 eight 8 nine 9. I m gonna remember that this little game that layer 2 switches like to play. And it ll go something like this. It says this mac address and i ll just put the one ending in seven 7 eight 8.
Nine nine for brevity is reachable out of port number one because i just saw a frame come in on that port. And the source. Mac. Address was ending in seven 7 eight.
8 nine. 9. So every time. A frame enters into the switch a frame of data.
The switch is going to add that to a little table. It has a memory to remember. Where that mac address lives. Which port that mattress lives off of let s do it.
One more time for this server. The server. Has a mac address ending. In 6.
3. 2. 2. And so in this server.
Sends. At least one frame into the network on this port. The switch. Says.
Oh goody that mac address ending in six seven eight three. Two two is reachable off of port number two because i just saw frame that came in on port. Number two. And it had this mac address with six seven eight three two two as the source and that process would continue as pc3 and the printer and the router or any other network devices send a single frame of data into the switch.
The switch is going to add that to its what s called a mac address table now one of the questions that might come up as a result of this extra work the switch is doing is why why does the switch want to memorize. Which mac. Addresses are reachable off of each port. And that s because a layer to switch has the ability to make intelligent forwarding decisions based on knowing where the layer 2 addresses are and what ports.
It can use to reach them for example. If this printer send a packet into the network and at layer 2. It was destined for the mac address of computer to that sending in seven 7 eight. 8 nine.
9. The switch says oh goody goody goody. I know exactly where that layer to address is and it will forward it on its backplane over to that port and then deliver it out that port in this case. Port number one and the benefit is the switch.
Didn t have to afford that out ports 2 or 3 or 5 or any other ports. Except for the port. Where it knew that layer 2 mac address. Lived so layer 2 switches that make forwarding decisions.
Based on mac. Addresses layer 2..
Addresses are referred to are commonly known as layer 2 devices. So here at layer 2. The data link layer that s a very common device that we re gonna have is a layer 2 switch. That s making those forwarding decisions.
Based on those mac addresses. And also a common way to refer to the data. At layer. 2.
Is refer to it as a frame. So in the world. Most people call the stuff. That s coursing through the networks packets.
But if we want to be literal and more granular. We could as we focus on the layer 2 information call that information refer to it as a frame of data. So let s imagine that this switch has learned all. The mac addresses off all the ports port number 3.
Port number 4 port number. 5. With whatever the respective mac addresses were that it learned from those network interface cards that were setting frames in on those ports. And so for most traffic traffic is can be switched at layer two by the layer to switch only to the ports that need to receive that data now there s a couple of exceptions where the switch when it receives a frame of data is going to forward it everywhere.
Let s imagine that this router is sending in a frame of data into the network and let s imagine that it s a broadcast. So it s a layer two broadcast and a layer two broadcast is twelve f s which corresponds in the background to 48 ones. It s a reserved address that simply means everybody needs to see this frame of data and so when the switch receives a broadcast the switch is going to forward that frame to every other port in that local area network. Because it could be an arp request or something else that every other port potentially may need to see another situation that can arise.
Is referred to as an unknown unicast. Now. A unicast frame. Means this frame is intended for one specific mac address.
However. What if the switch has not yet learned..
Which port that mac address lives on so in that case. Where it receives a frame. That s going to a mac address. Where it has no clue where that is it s going to go ahead and flood that frame meaning forward that frame to every other port on that local area network.
So that hopefully it ll get to its intended recipient. So my intention for this nugget is to have us learn three basic things number one that a layer 2 switch dynamically learns mac addresses and what ports are associated with by looking at the source mac address on every frame. That comes into the switch. Secondly armed with that information.
The switch. If it. Receives a frame going to mac. Address.
X. Or mac. Address. Y.
And it knows. Where that. Port. Is it can forward.
It directly to that port and leave all the other ports alone not bother anybody else and the third thing. I want to share with you is that a layer 2 switches. One of the most common ways for connecting and grouping devices. Together on wired networks.
Today so i hope this has been informative for you ” ..
Thank you for watching all the articles on the topic How L2 Switches Use MAC Addresses. All shares of bluevelvetrestaurant.com are very good. We hope you are satisfied with the article. For any questions, please leave a comment below. Hopefully you guys support our website even more.