Routing

Expand all | Collapse all

ping from private ip to public ip

Jump to Best Answer
  • 1.  ping from private ip to public ip

    Posted 04-20-2018 00:22

    R1 ------ R2 ----- R3

    R1 static default route point to R2 as next-hop

     

    From R1, I ping R2 OK (direct link); and R2 ping R3 is OK.  But, from R1 ping to R3 is failed.  and i monitor R3, there is income packet, but, no out going packet.

     

    I search from internet, it said R3 should also need route to R1, because ping server need a return path back to ping client.  And my R3 have no known route back to R1.  So, it seems R1 ping R3 fail is normal.

     

    But, then the Question is...... in normal situation, i can ping from my home's or office's PC, which is behind the router from ISP, and have no public IP address.   how can i ping from there to google, yahoo...

     

     



  • 2.  RE: ping from private ip to public ip
    Best Answer

     
    Posted 04-20-2018 03:29

    In your home network you have a firewall that is performing NAT (network address translation) when it leaves the local network out to the internet sharing the public ip address on the external interface with the devices behind the firewall.

     



  • 3.  RE: ping from private ip to public ip

    Posted 04-22-2018 20:07

    thanks for your reply.

     

    then, in my example, how to config R2 to make R1 ping R3. ( i see R1 as my home pc, R2 is my home router, R3 is internet/ISP).



  • 4.  RE: ping from private ip to public ip

     
    Posted 04-23-2018 02:47

    R2 needs source nat configured to translate R1 addresses to the interface address facing R3.

     

    SRX

    https://kb.juniper.net/library/CUSTOMERSERVICE/technotes/Junos_NAT_Examples.pdf

     

    MX

    https://www.juniper.net/documentation/en_US/junos/topics/example/nat-inline.html

     



  • 5.  RE: ping from private ip to public ip

    Posted 04-23-2018 20:52

    thanks, very useful information.