Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Everything Joe says is correct.</p> <p>Having just finished teaching this to a class myself. Let me put this in the terms I used in that class.</p> <p>Your question says you have two hosts on two subnets. Let's call the remote host, a server and your local host, well let's stick with local host.</p> <p>You local host has an IP address, a subnet mask and a default gateway.</p> <p>When you ping the server, your local host uses it's IP address and subnet mask to see if the address being pinged is local or remote. In this case, your server's remote. Knowing this, it knows it has to send the ping to the default gateway. To do that, it has to arp for the default gateway's address. This leaves the entry in the arp table for your default gateway and it's mac address.</p> <p>You're correct in thinking that the packet that then leaves your local host to your server has the mac address of the default gateway, but the IP address of the server, but this doesn't effect what's in the arp table.</p> <p>Remember, an arp packet asks "Who has?" and provides an IP address. In the network you've described, your default gateway will only respond for it's own IP, not all the IP addresses it can route to.</p> <p>Now I could really confuse you here by telling you about the network configurations where this would work differently, but I don't think that would be helpful.</p> <p>However it's worth knowing that there are times in the real world when you find things don't work this way. (I'm looking at you NAT and proxy arp).</p> <p>I'm not sure this is any clearer than what Joe wrote, but sometimes just hearing a few different explanations help things to click.</p> <p>Hope this helps,</p> <p>Alex</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload