How does a switch learn MAC Addresses

Hello Pancratius

For all communications between network hosts, it is necessary to go down the protocol stack (whether OSI or TCP/IP) which means you need to have the source and destination MACs, the source and destination IPs and the source and destination TCP/UDP ports in all headers of the respective PDUs (Protocol Data Units).

Now a note on terminology, the generic name for the entity at each layer of the stack is called a Protocol Data Unit or PDU. However, the specific names for each layer are:

  • Datalink layer: Ethernet frame
  • Network layer: IP packet
  • Transport layer: TCP segment or UDP datagram depending upon the protocol used.

When I refer to a frame, I am specifically referring to the entity on the Datalink layer, that is the Ethernet frame. In the notes I created, I used the names as described above. So when I refer to a frame, I’m only referring to the Ethernet frame. Does that make sense?

I hope this has been helpful!