How one System can Communicate with Google, but not with Facebook!!

With the help of Routing,Gateways ,Netmask or Genmask Concepts in Networking World we can do this Task.

A Routing Table is a set of rules, often viewed in table format, that is used to determine where data packets traveling over an Internet Protocol (IP) network will be directed.To Create the Network Packets over any specified Destination we have to entry that Destination Into Routing Tables.All IP-enabled devices, including routers and switches, use Routing Tables for Connectivity.

A gateway is a node (router) which is the Internet Service Provider that gives you access to the entire Internet.Ex.If we are getting internet connectivity from android hotspot then that device act as router for us.

A Netmask is a 32-bit “mask” used to divide an IP address into subnets and specify the network’s available hosts. In a netmask, two bits are always automatically assigned. For example, in 255.255.225.0, “0” is the assigned network address. In 255.255.255.255, “255” is the assigned broadcast address. The 0 and 255 are always assigned which cannot be used for connectivity.

route -n
route del -net 0.0.0.0 
nslookup www.google.com
route add -net <ip>  netmask <netmask> gw <gateway> <network_card>

--

--

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