Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer 1

up vote 1 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
add comment

Your Answer

 
discard

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.