-2

It appears that the destination MAC address is added for routing purposes. But what is the purpose of including a source MAC address in a packet?

2 Answers2

1

One purpose, besides telling the destination host where to send the reply, is i.e. in switches. They use the source address to identify the address of the system on a specific port. Next time they see that address as the destination, they know where to send the packet. Otherwise, the packet would need to be sent to all ports, making the switch perform not much better than a simple hub.

PMF
  • 14,535
  • 3
  • 23
  • 49
  • Why can't switch keeps mapping of what IP connected to what port. The way it keeps mapping of Mac address to port. and then send a packet for specific IP on the specific port. – Ankush G Aug 27 '20 at 09:05
  • Because not all packets that are sent around on ethernet networks are IP packets. IP sits on top of the MAC address layer. – PMF Sep 09 '20 at 09:01
0

One use of source MAC addresses is for switches to discover which port a MAC address is connected to.

Barmar
  • 741,623
  • 53
  • 500
  • 612