From the course: Cisco Certified Network Associate (CCNA) v1.1 (200-301) Cert Prep

Switches

(bright music) - [Instructor] Possibly the most common type of network infrastructure device we have is an ethernet switch. We see these in wiring closets often times in large buildings. We've got wires running from different offices to this centralized wiring closet, where the wires are then connected into an ethernet switch. And an ethernet switch is going to make frame forwarding decisions based on destination MAC address information, not IP address information like a router does. But destination MAC address information, M-A-C. That stands for Media Access Control address. And a MAC address is a 48-bit address and it's burned into a network interface card by the device manufacturer. And the switch is going to be looking at frames as they're flowing through the switch. And that switch is going to learn off of which ports, which MAC addresses live. And as a result, it's going to construct a MAC address table. And with this MAC address table, the switch is going to be able to intelligently forward subsequent frames for those learned MAC addresses. As an example, let's say that laptop one wants to communicate with the printer. Well, right now, the switch has just been powered on. It has not learned to any MAC addresses. And the frame coming in from laptop one is going to be sent everywhere because the switch does not know where the all C's MAC address, the MAC address of the printer lives. But did you notice when that frame came in from laptop one, it was coming from a source IP address of all A's that's laptop one's MAC address. So the switch learned something, it made an entry which says the All A's MAC address lives off of interface gigabit one. And then in an attempt to get to the all C's MAC address, the switch does what is called flooding. Flooding is where we send a frame out of all ports other than the port on which that frame was received. And that's in an attempt to make sure that the intended recipient gets the frame, And laptop two and server one on screen, they get the frame, they look at it and say, "oh, that's not for me." And they discard it. The printer receives the frame and realizes, "Oh yeah, this is for me." And when the printer communicates back to laptop one, that frame is going to have a destination MAC address of all As. And the switch now knows where that lives. So when the frame comes in from the printer, it is not going to be flooded everywhere because the Switch knows the all A's MAC address lives off of interface gigabit one. And as that frame comes in from that all C's MAC address of the printer, the switch says, "Oh, the all C's MAC address that lives off of gig three," and it adds that to its MAC address table. And now that the switch knows where the all C's MAC address lives, subsequent frames from laptop one to the printer are not going to be flooded. They're going to be sent directly down to the printer. Let's consider another example. Laptop two wants to communicate with server one. When Laptop two sends the frame into the switch, the switch does not know where server one lives. It has not yet learned the all D's MAC address. So what is the switch going to do? That's right, it's going to flood it. It's going to send a copy of that frame out of all ports other than the port on which it was received, which is Interface gig two. And when that frame comes into the switch, in addition to the switch flooding it out, the switch just learned where Laptop two lives, the all B's MAC address, it makes an entry into its MAC address table saying the all B's MAC address that's off of gig two. And when server one responded to Laptop two and that frame came into the switch, the switch learned where the all D's MAC address lives. It lives off of gig four. So now we have fully populated our MAC address table. If any of these devices were to send a frame to one of the other devices, there would be no flooding involved, because the switch knows where everyone lives. And a question I typically get at this point is, "Why did that frame from laptop two get flooded out of switch one, doesn't switch one already know who lives on gig one and gig three?" And here's the answer. It's possible that we could have multiple MAC addresses appearing off of a single port. For example, let's say that we got rid of laptop one and replaced it with Switch two and connected to Switch two, we had laptops three, four, and five. Well, once switch one's MAC address table fully populates, notice that the MAC addresses for laptops three and four and five, they all appear off of interface gig one on switch one. That's the reason Switch one flooded out that frame from laptop two, even though it knew that the all a MAC address lived off of gig one, it realized that other MAC addresses might also live off of gig one. And as a real world reference, here's an example of a Cisco switch. This is a Cisco Business 350 series switch, and Cisco has a wide variety of switch types available and many of them will accept a copper ethernet cable. Some might also have the option of accepting fiber optic cables. But the main thing I want you to know about an ethernet switch at this point is that it's going to make frame forwarding decisions based on destination MAC addresses.

Contents