Lets say host A wants to send a packet to host B through R1(interface 1 then 2) and R2 (interface 3), so my questions is:
When the packet is forwarded inside R1 (from interface 1 to interface 2), ready to be sent to R2, does the pack's source MAC(A's MAC address) and destination MAC(interface 1's MAC address) get changed to interface 2's MAC address as new source address and interface 3(of R2) as new destination MAC address? If they do get changed, why router need to change source and destination MAC address?
Best Answer
A router with Ethernet (or Ethernet-like) interfaces needs to deal with MAC addresses because it needs to send and receive IP packets over those Ethernet interfaces and MAC addresses are a core part of Ethernet.
MAC addresses only have meaning within an Ethernet network.
Logically what happens at R1 is.
* Broadcast and multicast packets need more special handling, but that is outside the scope of this question.