Here is my understanding, when the packet is within subnet - only ARP or ARP cache comes into picture. Basically, the L2 is enough - we just need to match the device ADDRESS - i.e. MAC ADDRESS.

Now, when the packet is for other subnet - the device is look for its routing table, based on the rule the packet will be send to the gateway.

My question is when this happens - do the sender will change the ethernet frame destination MAC address to router MAC address? As the sender doesn't know anything about the destination MAC address. Is my understanding right. Once the router will receive( a router will receive the packet because its mac address matches) the packet, it will check the destination IP and based on the routing table - it will forward the packet to the appropriate gateway. Once the packet moves to the other gateway, will they change the source IP as the other gateway IP? If the other gateway is in the same subnet as of the destination subnet. They will simply use ARP or ARP CACHE -right. However,a router needs to track that the PACKET actually belongs to the other network - Is it a NAT - network address table that it will look for. Thus, the

1 Answer 1


You are mostly correct. As a packet gets forwarded from host to router, to (another) router, to host, the mac addresses change at each hop. But the IP addresses do not change -- they are the original destination and source IPs.

  • It makes sense on my understanding.
    – dexterous
    Commented Jan 10, 2015 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.