Let's say there are two pc's and they are connected via. Router.
Here is the image that explain everything.
The pc1 has IP address - 188.8.131.52 and pc2 has IP address - 184.108.40.206. The router IP address is 220.127.116.11. When pc11 wants to communicate to pc2, then do they need to speak to router? In my opinion, when the destination and src ip address is in the same subnet - there will be an arp request to get the destination machine address. So, the router will not come into the picture. Do you agree with it? So, basically the ip address will be broadcasted to know the mac address. If the arp succeeds, then the destination is found and the communication can happen. On the other hand, if the destination ip address is in the other subnet then the router will come into the picture and will route the packet to the destination ip address. Then again the arp will be done to reach out the destination machine. Is my understanding correct?