2

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.

mouche
  • 133
  • 5

1 Answers1

2

If a packet is destined for a some other network your computer will use the address resolution protocol to locate the ethernet address of the gateway/router. The destination IP address in packet will be the true destination, the destination IP is typically not changed. The destination of the Ethernet frame will be the default gateway. This is why the frame must be removed at between each router. Each router must readdress the packet for that network link to get the packet to the next hop.

The Overview and IPv4-plus-Ethernet section of the ARP entry in wikipedia provides a good explanation.

Zoredache
  • 130,897
  • 41
  • 276
  • 420