🤔 Ping Google But Not Facebook ❓❓

Hello Connections..!!

I Am Again Here With My New Task In The Field Of Networking

I am glad to tell you , you will definitely learn something new from this article 🔥🔥🔥

If you read the main heading {🤔 Ping Google But Not Facebook ❓❓ } is it really happens or not {mazzak chal rha h kya 😅 }

But in this Blog or Article I will show you how to ping google but not facebook

In this article you will learn lot’s of new & interesting concepts

So guys let’s start with hands on practicle!!

prerequisite for this task :- O.S {Rhel8} , network connectivity and attached to bridge adapter as shown in screenshot

Here i am using Rhel8 as a O.S ,and my network is attached to Bridged Adapter .

Task Description

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

open your terminal and run the command mentioned below

route -n

{route -n → command is use to check the routing table and every computers , routing tables decides where their packets can go or till what range it will goes.}

Then according to the requirement connect the google by using below mention command

ping www.google.com
google is pinging

Here Google ip is →

Now connect with facebook for this use below mention command

ping www.facebook.com
facebook is pinging

Here Facebook ip is →

Still now you can see that we are able to connect both google as well as facebook .

But our requirement is connect to google but not able to connect with facebook.

for this you will see the picture where I run the command route -n

here see the first row where Destination and Genmask is and in my case Gateway is this rule is present by default in every system this is known as default gateway. Because of it we are able to connect all the ip present in the world .

and if you want to connect with google then delete this bydefault gateway .

use below mention command

route del -net
delete bydefault gateway rule.

Run again below mentioned command and you will see that default gateway rule is deleted and observed google as well as facebook is not able to connected .

route -n
ping www.google.com
ping www.facebook.com

And now the Right and core concept about netmask ,gateway and genmask play big roll or come in picture.

Our requirement is connect with google for this use below mentioned command

route add -net netmask   gw

Here in my case google ip is which will be coming under

again run route -n

Our routing table is updated and google range comes under the 1st row of our routing table

now check google is pingable or not use below mentioned command

ping www.google.com

Ohh yesss one part is completed u have able to connect with google

Now check Facebook is ping or not !!

for this use below mentioned command

ping www.facebook.com

Facebook is not reachable.

and if you want to ping Facebook then use below mentioned command

In my case Facebook ip is → and it will comes under the .

route add -net netmask   gw enp0s3 

now if u run www.facebook.com then u see Facebook is pingable.

🔥🔥 Now our requirement is successfully done !!

🤩So guys it will give you some high level idea about networking concept !!

I tried to explain as much as possible. Hope You learned Something from here. Feel free to check out my LinkedIn profile and obviously feel free to comment and give feedback also .

LINKEDIN PROFILE LINK :- https://www.linkedin.com/in/jatin-lodhi-9230571a7/