Search code examples
linuxnetwork-programmingsshpinglan

Why i can't ping to any address using a static ip?


We are provided with LAN inside our hostel, ip address starts from 172.... But few of days ago we start getting ip address of something like 192.... and internet stops working. We are told to fill static ip in setting( by seniors) in order to use internet. We did it ,internet starts working but i don't know why after that i am not able to ping anything like wheneer i type ping 8.8.8.8 it goes into loop, there is a server inside our college with address glug.nith.ac.in whenever i try to ping that with the given name like ping glug.nith.ac.in it says

ping: glug.nith.ac.in: Name or service not known

whenever i try to ping that server with its ip address like 172...__ it again goes into loop. SSH too not working. Why so ? And what's going arround with network in layman term?


Solution

  • ping: glug.nith.ac.in: Name or service not known

    is because your DNS Server is not reachable from your system. So the website you are accessing cannot be mapped into an IP address. IP address helps you to make calls to the website servers and load the response contents. Since its not reachable, you are getting Name or service not known error.

    192...

    This always is the local network IP address assigned to you when you are connected to a WIFI Router or other routers in LAN(Local Area Network). If these routers doesn't have any incoming internet connections, then they create their own subnet and your system will be a part of this subnet. You wont have access to the internet in most of the cases.

    172...

    Now this could be your IP address allowed to access the internet according to DHCP server (the server that maintains the IP address allocations and Internet accesses). Hence you are able to access the Internet.

    I tried my best to keep it simple though there are lot many concepts involved here. I would recommend you to go through Data communications and networking by Behrouz A. Forouzanif are interested to know more. Hope this helps. :)