Say I wish to ship a body to an internet server, and as an instance this internet server is in a really distant IP outdoors my native community e.g. a Google server. I initially ship the body to my router. My router decapsulates the body, reads the vacation spot IP deal with from the L3 knowledge and thru its routing desk, finds the a subsequent hop router. The router then re-encapsulates the packet right into a body.
These two solutions, How does a router know the vacation spot mac?, https://superuser.com/a/702854
, recommend the following hop router is discovered via checking the routing desk for routers on its native community, however how does the router decide the following hop router if the server is abroad?
Now, it’s attainable that the following hop deal with just isn’t on a community that your router is related to. So your router seems in its route desk to search out the path to the next-hop deal with. That route will even have a subsequent hop deal with (we’ll name it NH2). NH2 will likely be on a typical subnet, so your router will ARP for the MAC of NH2.
This reply appears promising, however I do not get how the routing desk can simply have a path to a subsequent hop router that is not on its community. “NH2 will likely be on a typical subnet”, how will you not be on the identical community with a subsequent hop router, however have a path to a subsequent hop router on a typical subnet?
Moreover, how do you get the MAC deal with of the following hop router? The router does an ARP to get the MAC deal with of the following hop router to fill the vacation spot MAC deal with for when the router re-encapsulates the packet, however I discover it tough to consider that the router will ship an ARP request to all 250 different gadgets positioned throughout the subnet each time to get the MAC deal with of the following hop router, particularly should you’re sending a packet to an IP deal with as distant as one other nation.