Create a Setup so that you can ping google but not able to ping Facebook from same system.

Shobhit Singh Pal
2 min readJan 24, 2021

--

Ping full form is Packet InterNet Groper. It is command-line utility virtually available on any operating system used to check network communication between two systems/devices. Ping operates on ICMP (Internet Message Protocol). The ICMP protocol is a network layer protocol used by network devices to diagnose the network connection issues.

Pinging to Google and Facebook

The 142.250.77.68 and 69.171.250.35 are the IPs of Google and Facebook respectively.

Ping command before making ICMP echo request to specified ip checks in the route table for the rule. These rules generally contain the route to the IPs.

Here is route table

With the first rule ping command comes to know for any destination or ip in the internet world the route or gateway is 192.168.42.129.This destination can be www.google.com or www.facebook.com or any url in the world.

The second rule is for private ip range so it can never be route for google and facebook websites.

Deleting the first rule in the route table

Trying to ping Google and Facebook

The network is unreachable is the ICMP message as the system does know the route for www.google.com and www.facebook.com.

Created rule to ping to Google

142.250.0.0 is the range in which www.google.com ip 142.250.77.68 comes. /16 is the netmask and 192.168.42.128 is the gateway.

Pinging to Google

Unable to ping to Facebook

So that’s way, how ping can be useful in checking the network connectivity.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Shobhit Singh Pal
Shobhit Singh Pal

No responses yet

Write a response