🤔 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 → 172.217.160.196

Now connect with facebook for this use below mention command

ping www.facebook.com
facebook is pinging

Here Facebook ip is → 157.240.16.35

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 0.0.0.0 and in my case Gateway is 192.168.43.1 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 0.0.0.0
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 172.217.160.0 netmask 255.255.255.0   gw 192.168.43.1

Here in my case google ip is 172.217.160.196 which will be coming under 172.217.160.0/range

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 → 157.240.16.35 and it will comes under the 157.240.16.0/24 .

route add -net 157.240.16.0 netmask 255.255.255.0   gw 192.168.43.1 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/

THANKS FOR EVERYONE TO READ THIS ARTICLE !!🤗

--

--

--

I am an IT Enthusiast, who is passionate about exploring/learn all the latest technologies from research perspective.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Janet v1.1 REPL Sandbox Bypass

Liquidity Tutorials — Hands-on Series — Part 1

Free hackathon vote tabulation using Google Forms & Kotlin

Software Development (done right) is Boring

ML PROJECT WITH HANDWRITTEN DIGITS MNIST DATSET

NUMBER PLATE DETECTION IN VEHICLES

Blogging and spaghetti sauce

How do you pronounce tuple?

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
Jatin Lodhi

Jatin Lodhi

I am an IT Enthusiast, who is passionate about exploring/learn all the latest technologies from research perspective.

More from Medium

Med3.0 — How can blockchain technology change the face of modern healthcare?

Switching from Spotify to Tidal & Plex

Sheathing and House Wrap

Week 9 GFT NASCAR AI Driver Rankings: William Byron Holds P1 after Bristol Dirt Race