How do ping packets get to the ping utility in a NATed network?

Discussion in 'Network+' started by Antonio9000, Nov 18, 2022.

  1. Antonio9000

    Antonio9000 New Member

    I did this test from two PCs at home that are connected to a typical SOHO router, so the router is doing Network Address Translation.

    I pinged successfully an IP address from the two computers:

    My doubt is, if ICMP doesn’t use port numbers, as it is only layer 3, how can the router send the replies to my computers?

    My understanding of NAT is that the port numbers help the router identify the computer that initiated the Ping.

    Any insights much appreciated.
  2. sheepluv

    sheepluv Byte Poster

    Yes from what I know of ip masq/nat, the router gives the internal network device (PC1 or PC2) a port number to remember and rewrite its IP address when it tx/rx packets with its public IP address. ICMP uses a different protocol number in the 'IP type' field, so its seen as an ICMP packet.
    Certifications: CCNA | HND | 70-646

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.