How does a ping to a public IP work in my same AS?



Pinging a public IP address is a commonly used network diagnostic tool used to test the reachability of a host on the Internet. It is used to measure the round trip time (RTT) for packets sent from one device to another. When pinging an IP address, the ping utility sends an ICMP (Internet Control Message Protocol) echo request packet to the destination and waits for an ICMP reply. If the destination responds with an ICMP echo reply packet, then the ping was successful.

Pinging an IP address from the same network is fairly straight forward, as the host is already part of the same network. The ping utility will send the ICMP echo request packet to the destination, which will then respond with an ICMP echo reply packet. The round trip time (RTT) for the ping will be determined by the latency of the network connection between the two hosts.

Pinging an IP address from a different network can be more complicated, as the source and destination are on different networks and must communicate via the Internet. In this case, the ICMP echo request packet will have to be routed through multiple networks before reaching the destination. The RTT for the ping will be determined by the latency of all of the networks that the packet travels through. Additionally, the packet will be subject to any firewalls or access control lists that may filter out the ICMP traffic.

When pinging a public IP address, it is important to remember that the IP address may not be part of your local network. Instead, it may be part of a different network that is connected to the Internet. In this case, the ICMP echo request packet will have to be routed through the Internet before reaching the destination.

In order to ensure that the ping request reaches the destination and is not blocked by any intervening networks, it is important to configure the source router with a static route to the destination network. This will enable the router to forward the ICMP echo request packet to the destination network and ensure that the ping request is successful.

When pinging a public IP address, it is also important to consider that the destination may have a firewall configured to block the ICMP traffic. If the destination network has a firewall, it is important to configure the source router to send the ICMP packets to the destination via a different port number. This will ensure that the firewall will not block the ICMP traffic and the ping request will be successful.

Pinging a public IP address is a useful diagnostic tool for testing the reachability of a host on the Internet. When pinging a public IP address, it is important to consider the latency of all of the networks that the packet will travel through, as well as any firewalls or access control lists that may filter out the ICMP traffic. Additionally, it is important to configure the source router with a static route to the destination network and to send the ICMP packets to the destination via a different port number if the destination has a firewall. Following these steps will ensure that the ping request is successful.

Inquire Now

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Find your next full or part-time role here

ScaleDesk can either help you find your next full time gig or a part time side gig where you can create extra income!

Onboard with us once
Skip HR screening and go to the final interview with with only your resume and a video interview you never have to redo
Get paid electronically every month for the hours you work
We will be your reference even if you work for us once

IT Teams: Use ScaleDesk to augment your team

Schedule Demo