Reputation: 142
This should be probably basic question regarding IP protocol. Let's say that some PC sends IP based packet to another remote PC, separated by several routers in between. AFAIK, sending PC should first direct packet toward it's previously configured gateway. But if it fills that gateway's address in "Destination address" field of IP header, then the address of receiving PC will be lost. Is there maybe some other field in IP header that specifies gateway, or is there some completely different approach to the matter, that I failed to recognize ?
Upvotes: 0
Views: 240
Reputation: 181
"Destination address" in IP header means the final destination host - it will be the remote PC (if there is no NAT routers between the source and destination). Sender puts the packet into Ethernet frame addressing it to the gateway MAC address. The gateway will get the packet from frame, process it and put into a new frame with MAC address of its output interface as source and MAC address of the next router as destination. IP addresses in the packet remain the same.
Upvotes: 1