Ping — Packet Internet Groper
Pinging to google and not to Facebook…
PING ME UP
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?
The ROUTING TABLE
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.
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. google.com
Now the next step is to check the routing table and make changes to it. Check your routing table using the following command
I would be giving an insight into this table. In the first row, it's noticeable that under the destination column we have IP 0.0.0.0. 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 22.214.171.124 netmask 255.255.255.0 gw 192.168.43.156 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, 0.0.0.0 IP and the netmask 0.0.0.0 are universal.