Understanding Linux name resolution
In Chapter 11, Setting Up Network Services, we’ll have a discussion on setting up a DNS server for local name resolution for your network. But before we get to that, it’s also important to understand how Linux resolves names in the first place. Most of you are probably aware of the concept of a Domain Name System (DNS), which matches human-understandable domain names to IP addresses. This makes browsing your network (as well as the internet) much easier. However, a DNS isn’t always the first thing that your Linux server will use when resolving names.
For more information on the order in which Ubuntu Server checks resources to resolve names, feel free to take a look at the /etc/nsswitch.conf
file. There’s a line in this file that begins with the word hosts
. Here is the output of the relevant line from the file on my server:
hosts: files mdns4_minimal [NOTFOUND=return] dns mymachines
In this case,...