Options

How does a packet get back?

twistfingertwistfinger Member Posts: 3 ■□□□□□□□□□
I'm studying for CCENT right now and I'm seeing that when a packet leaves the router to go into the cloud, the source MAC address is replaced with the router MAC and the source IP (local address) is also stripped. So how does a return packed (such as an ACK) know how to get back to that original source MAC address and local IP address? Where does that information get tied to the returning traffic?

Thanks.

Comments

  • Options
    KrunchiKrunchi Member Posts: 237
    With your scenario the router on the gateway of your network strips it out but keeps a record for later use and replaces it with it's own when the packet reaches it's destination that router knows the path that the packet took and sends it back the same way. As soon as the gateway router receives the packet on the return trip it has the information stored and stripes it out and adds the local address back so it's sent to the original sender.

    As for ACK going outside of a subnet I'm not to sure about it is beyond my scope but ACK is used mostly in a DHCP environment within a local network and I don't think it goes outside of your gateway networking is my weak point but I think that's right?
    Certifications: A+,Net+,MCTS-620,640,642,643,659,MCITP-622,623,646,647,MCSE-246
  • Options
    m3zillam3zilla Member Posts: 172
    The original ip address is stored in a nat translation table, which maps the local ip to the NAT ip. The MAC address is resolved via an ARP.

    So, in your example, when the return packet comes back to the router, it'll look in its translation table and see a mapping for the local IP. it'll then consult its routing table to see where to send the packet next. If the local ip is on a directly connected interface, or it's local network, it will arp for the mac address of the local host if it doesn't already have it in the arp cache.

    P.S @Krunchi, ACKs are the mechanism that allows TCP to be "reliable", and is used in every TCP transmission (http, sql, smtp, etc)
  • Options
    KrunchiKrunchi Member Posts: 237
    Told you networking is my weak point icon_redface.gif been stuck in the MS world doing zero networking at work and studying. CCNA is in my future though can't wait seems fun.
    Certifications: A+,Net+,MCTS-620,640,642,643,659,MCITP-622,623,646,647,MCSE-246
  • Options
    Darthn3ssDarthn3ss Member Posts: 1,096
    As a packet traverses the network, the layer two headers/trailers are stripped at each hop, but the layer headers data stays the same.

    When a packet arrives at a router, it looks at the destination IP and determines where to (if at all) forward it. The router will replace the layer 2 source address with the address of the outgoing interface, and the destination address with the next hop's address. Same thing on the way back.

    If i'm wrong please slap me :D
    Fantastic. The project manager is inspired.

    In Progress: 70-640, 70-685
Sign In or Register to comment.