If we have an IP-based system of identifying nodes on the Internet why is there a need for DNS?
Not only does DNS map human-readable names to IP addresses, it also decouples the client from specific details of the network endpoint it wants to connect to.
That allows providers of services to implement high availability systems and change implementation details without impacting their clients.
Absolutely it could! But you'd have a huge list of entries in
Seriously, though. "the internet" (the system of machines which deliver content to a user) would continue to work fine. "the web" (the collection of easy to find information transported over "the internet") would quickly break down because nobody (except the true geeks) would remember the IP Address to get to Google.
The difference between an IP and a DNS name is that the IP specifies the servers location, while the DNS name allows you to specify the service itself. The big win that you get by DNS isn't so much that an DNS name is easier to remember, but that you have an layer of abstraction between the service and its implementation. So the underlying implementation can change, the servers can move around without the user noticing it.
Could the Internet work without it? Not for long, as one of the first things to do would be to implement a DNS-like service to workaround all the trouble that a lack of DNS would produce. Without DNS hyperlinks to other webpages would for example break way to easily, so that the world wide web wouldn't be able to function properly.
In a sense DNS is a very basic form of a content addressesable network, in that you say what you want, but not how to get there. You say
www.google.com, because you know google does search, but you don't know where on the earth the server is located you end up taking to in the end, all that is abstracted away from you thanks to DNS.
Everyone here seems to be forgetting that without DNS, memorizing IP addresses isn't the only option. ARPANET didn't have DNS, and that's where the hosts file originated. From Wikipedia:
The ARPANET, the predecessor to the Internet, had no distributed host name database, such as the modern Domain Name System for retrieving a host's network node address by using the host's name. Each network node maintained its own map of the network nodes that it needed to know about and assigned them names that were memorable to the user. [...] The small size of the ARPANET made the use of hosts files practical [...] however, the maintenance of the hosts file became a larger burden on system administrators [... and] the centralized and monolithic nature of host files eventually necessitated the creation of the distributed Domain Name System.
There are some cases where "The internet" does not need DNS - for example, if you're exclusively using protocols which don't require DNS (Most peer-to-peer file sharing programs, for example).
Also some private internets have no need for DNS (but most use www to some extent, which usually means they do have it anyway).
Here is a good reason for keeping locators (IPs) and identifiers (domain names) separate: RFC 5887. If you merge two companies and need their networks to become one, you'd better hope their networks were configured using identifiers and not locators.
Yes, the Internet "works" without DNS. IP packets are routed based on IP addresses and subnet mask. The various routers between the source and destination do not care about human readable aliases.
However, for humans, "www.google.com" is a lot easier to remember than "126.96.36.199" for the same reason that "1600 Amphitheatre Parkway" is easier to remember than "37.423156,-122.084917". In both cases the same information is being conveyed, but also in both cases one is significantly easier to remember. For humans, anyway.
The internet itself, at a low level? Certainly - the entire point of an ip address, and the entire IP stack is to help route packets from one place to another with the help of other protocols, none of which rely on the domain name system.
On the other hand, the DNS system allows for a few nice things - firstly, that it allows for human friendly ways to find a host. Secondly, for protocols that are aware of DNS like HTTP, you can choose what content to send based on the intended destination (for example, virtualhosts), which allow for more efficient use of available resources, as well as make use of things like multicasting, geographical routing to nearer servers and other fancy things that make life easier.
Will the internet 'work' without DNS? Absolutely. Will it be an utter pain? Probably - and if DNS broke tommorrow, a lot of services on the internet would be broken.
No. The Stack Exchange network can't work without DNS.
To prove it, let's find out the IP of
$ host stackoverflow.com stackoverflow.com has address 188.8.131.52
Go to that in your browser and you will get an error page saying:
Couldn't find 184.108.40.206
The Q&A site 220.127.116.11 doesn't seem to exist…yet.
(I'm sorry I can't link to it, Stack Exchange won't let me input a link to an IP.
This is what you get if you go to a Stack Exchange site that doesn't exist, like
hsdkgujahr.stackexchange.com, except it says "The Q&A site
hsdkgujahr.stackexchange.com doesn't seem to exist…yet."
Now let's check the IP of
$ host superuser.com superuser.com has address 18.104.22.168
Notice that the IP addresses are exactly the same. In fact, if you do a DNS lookup for any Stack Exchange site, you get the same IP.
If a single IP is mapped to multiple websites, how does the server know which website?
The answer is that the HTTP header
Host is being sent to the server with the request, and it contains the fully qualified DNS name of the server.
So, without DNS, you can't get to your favorite Stack Exchange sites (or SourceForge project sites, they work the same way).