From one IP to send a packet to another?

5dfc95c8bd1b5047381492.jpeg

With IP A need to send a packet to IP B, if known
IP A, IP B, MAC A, IP R


Please answer these questions, but I do not really understand
  1. How to watch on the same network are A and B?
  2. How to know the router MAC R?
  3. How the Router knows to send the packet if we know only IP B?
April 3rd 20 at 18:48
3 answers
April 3rd 20 at 18:50
April 3rd 20 at 18:52
1) A and B are on different networks, this is indicated by the fact that they are in different vlnach.
2) do not quite understand the question. who owns R ?
3) sends arp request(" who here has ip address B")
April 3rd 20 at 18:54
1. Apply bitwise "And" to the subnet mask and IP A, and the subnet mask and IP B; compare the result. If the result is the same - A and B on the same network.
2. To send the broadcast ARP request with the appropriate question.
3. It you only know the IP B, and router is known for its routing table, which he guided with such issues.

Find more questions by tags Network routing