A switch has some intelligence and operates on layer 2 of the OSI model. In this lesson, I’ll demonstrate how a switch learns MAC addresses. Let me show you an example of three computers connected to a switch:
There’s a switch in the middle and we have 3 computers. All computers have a MAC address but I’ve simplified them. Our switch has a MAC address table and it will learn where all the MAC addresses are in the network. Let’s send something from H1 to H2:
H1 is going to send some data meant for H2, thus it will create an Ethernet frame which has a source MAC address (AAA) and a destination MAC address (BBB). Our switch has a MAC address table and here’s what will happen:
This is a separate process that doesn’t have anything to do with the switch. The computers use ARP. You can read about it here:
https://networklessons.com/cisco/ccna-routing-switching-icnd1-100-105/arp-address-resolution-protocol-explained/
Hello Rene,
As you described a switch as pretty “dumb” box, I would like to ask, if the sentence in brackets “(except the one it came from)” could be added to the second thing, in your explanation.
Then Your explanation could look like this:
The switch is a pretty “dumb” box…it only cares about a couple of things:
– When it receives an Ethernet frame, and it didn’t see the source MAC address before, it is stored in the mac address table.
... Continue reading in our forum– If the destination MAC address is known, it forwards it out of the correct interface (except the one it came from).
– If th
Rene,
You stated in a earlier post the following:
The switch is a pretty “dumb” box…it only cares about a couple of things:
When it receives an ethernet frame and it didn’t see the source MAC address before, it is stored in the mac address table.
If the destination MAC address is known, it forwards it out of the correct interface.
If the destination MAC address is unknown, it is flooded on all ports (except the one where it came from).
If the destination MAC address is a broadcast, it is flooded on all ports (except the one it came from).
Here is an explanation
... Continue reading in our forumHello Mohammad
Yes, all switches have a MAC address. How this MAC address is implemented depends on the vendor. Some switches have the same MAC address on all ports. Cisco switches have a different MAC address on each port and one main MAC address that refers to the switch itself. These MAC addresses are only used for traffic that is destined to or generated from the switch itself. For traffic from one PC to another for example, these MAC addresses don’t play any role.
Some specific uses for the MAC addresses of switches include:
* terminating traffic to a
... Continue reading in our forumHi Rosna,
Any device that has an IP address needs ARP. After all, if it wants to send an IP packet with a destination IP address, it has to figure out what the layer two MAC address is.
On a layer two switch, you still might want to configure an IP address. Here are some reasons:
- To manage it remotely through telnet or SSH.
- So it can send syslog messages to an external server.
- So you can use SNMP to monitor the switch.
It is possible that a switch is the initiator of the ARP process. For example, perhaps you just rebooted it and it wants to send syslog in
... Continue reading in our forum