Published in


Ping — Packet Internet Groper

Pinging to google and not to Facebook…


The word ping is pretty standard be it in our periodic lives or in the techno world. PING stands for PACKET INTERNET GROPER is an idea of monitoring the connection between two systems.


Technically, ping is a computer network management system software or utility software used to test the network communication between the two devices. The classification of such systems may include any commonly used personal computer, switch, server, gateway, or router.

Here, bringing you a mind-boggling question. What decides that a system can ping to another system also why it cant ping to some other system?


A routing table is basically the decider of your ping behind the scenes. Every system exposed to the internet has a router, wherein come along the routing table. A router is a device that communicates between the internet and the devices in your home that connects to the internet. As its name implies, it “routes” traffic between the devices and the internet.

The routing table contains the rules which hold the decisive power of sending packets or to say ping the range of IP addresses.

The intriguing fact is that you have the ability to make changes in your routing table. These changes would hence aid you to connect or detach your system from certain specific IPs.

Wondering how?

So, the task here is to ping google and not Facebook. As we ken, by default every system has the capability to ping to both of them.

Firstly we ping to google and then Facebook to ensure you have network connectivity.

ping www.




Now the next step is to check the routing table and make changes to it. Check your routing table using the following command

route -n

I would be giving an insight into this table. In the first row, it's noticeable that under the destination column we have IP In comprehensive words, this is universal IP i.e. it says you can ping to any IP. Hence we are able to ping google as well as Facebook.

Next, we will delete the rule which allows us to ping anywhere and will add the rule which allows us to ping only to google.


As you can see we are not able to ping google anymore. It is required to add a rule to ping google.

route add -net netmask gw enp0s3

This rule once added allows us to ping to the systems that follow inside the IP range. And IP of goggle does whereas that of Facebook does not.

The synopsis of the task is that creating and deleting rules in the routing table is adjustable. The rules have the power of creating the packets or pinging to certain IP ranges. In addition, IP and the netmask are universal.

That’s it, hope you liked the article.

Don’t forget to follow The Lean Programmer Publication for more such articles, and subscribe to our newsletter




The biggest power in the world is to be able to give life to something, and guess what? Code gives you this ability! Here in this publication, we build stuff, we share knowledge in tech, and share our stories, feel free to join —

Recommended from Medium

How to Use Zoho CRM in 7 Easy Steps

Object Segmentation From Image

Google Summer of Code 2021 : A Probabilistic Perspective

We explored the ‘edge’ of the internet


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Divyanshu Sharma

Divyanshu Sharma

Are you reading ? Cause I am writing :)

More from Medium

Mundanthurai tiger reserve

You Need A COVID Contract

Leading Percussionist drums up 3 concerts for Inspired by Bragg.

a first step to MVVM