In a network with a layer 2 switch between the devices and the router, are the packets MAC addresses set to that of the port on the switch that they are connected to? and if so, how does the switch know to forward the packet to the MAC address of the router?

1 Answer 1


Layer 2 switches are also called transparent bridges (OK, a long time ago), which means they do not modify the frame. They examine the destination MAC address and forward it based on their forwarding table. It is up to the sender to determine the destination MAC address.

  • Which means if it were in a LAN and the data had to go through a router, the destination MAC address would be the routers? (which would be in the switches forwarding table)
    – l30n1d45
    Commented Apr 3, 2015 at 19:01
  • Correct. Another way to think about it is the L2 addresses change every time you cross a L3 hop (a router, for instance). The IP addresses do not change.
    – Ron Trunk
    Commented Apr 3, 2015 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.