Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 2 down vote accepted

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.

share|improve this answer
Thanks for your quick answer! – mouche Jul 6 '10 at 20:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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