I'm learning the Cisco CCNA material, and most of it is completely new to me. I'm currently learning about how source and destination IP addresses are defined in the IP packet header and the source and destination MAC addresses are defined in the frame header.
So I understand that the source/destination IP addresses stay the same in the packet during the packet's travel, but the frame is removed and then re-encapsulated with updated information at each hop.
The gateway address is an IP address though. So if a machine needs to contact an IP outside of the LAN, they use the gateway, but do they use the gateway IP as the destination IP? If so, how does the gateway know what the real destination IP address should be?
Thanks for any help.