Consider a lan network with a switch. Assume the switch has the mac addresses of all the devices in it's newtork. If the source computer sends the data to the destination computer through a switch, then when the data reaches the switch , the destination computer get's powered off due to some problem, Now how the switch will handle the data and how it sends the error message back to the sender or how it deals with the data.

1 Answer 1


Depending on the exact implementation of the forwarding logic in a switch, the most likely scenario is this:

  • If the switch has already begun to transmit the frame over the failing link, the frame gets deleted from the port's queue (possibly after a short grace period to allow for quick link recovery). It is lost.
  • If the link fails before the frame has been queued to the destination port indicated by the destination MAC and that MAC got erased from the switch's source address table (routinely upon link down), the destination MAC is unknown and accordingly, the frame get flooded out to all switch ports but the one it was received from.

how it sends the error message back to the sender

In no case does a switch send back an error message to a sender. There are no provisionings for that, and there is no protocol like ICMP on the data link layer.

Each frame is either sent out of the port associated with its destination MAC (that the switch thinks the destination is located on) or, with an unknown destination MAC, it is flooded to all ports but the source port.

Each way, the frame leaves the switch in one way or other and that's it.

  • Really Thanks. ! I've some other basic networking doubts. If in a ring topology, how do we know if data gets lost during the transmission during destination?
    – Allan
    Sep 1, 2021 at 11:18
  • @Allan Please post a new question as such - make sure to include sufficient context.
    – Zac67
    Sep 1, 2021 at 11:54

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.