Router Packet Forwarding – How Does a Router Know Which Switch to Send a Packet?

macrouterswitch

Supposing we have a router (Internet box for example) with 2 switch connected on it.

We have a machine A on switch 1 and a machine B on switch 2.

The router wants to transmit a packet to machine A on switch 1. ARP is already resolved, so the packet will contain machine A destination MAC addresse.

How does a router know which switch to send this packet?

Best Answer

Each router interface will be in a different network. The router will use the interface for the destination network, so the switch connected to the interface with the destination network will get the frame for the destination host. The router will look in its ARP cache or use ARP for the interface with the destination host.