2

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?

2

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.

2
  • 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 Apr 3 '15 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 Apr 3 '15 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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