Identifying Other Computers Hosts and DNS

Each time you use a name to identify a computer, such as when browsing the Web or using an e-mail address, the computer name must be translated into an IP address. To resolve names to IP addresses, Linux goes through a search order (usually based on the contents of three files in /etc: resolv.conf, nsswitch.conf, and host.conf). By default, it checks hostnames you add yourself (which end up in the /etc/hosts file), hosts available via NIS, and host names available via DNS.

Again, for RHEL and Fedora systems, you can use the Network Configuration window to add:

■ Hostnames — You might do this to identify hosts on your LAN that are not configured on a DNS server.

■ DNS search path — By adding domain names to a search path (such as, you can browse to a site by its host name (such as jukebox), and have Linux search the domains you added to the search path to find the host you are looking for (such as

■ DNS name servers — A DNS server can resolve addresses for the domains it serves and contact other DNS servers to get addresses for all other DNS domains.

I r - r '-". '[ If you are configuring a DNS server, you can use that server to centrally store names MMK^Ksfi&^Stifll ancj |p addresses for your LAN. This saves you the trouble of updating every computer's /etc/hosts file every time you add or change a computer on your LAN.

To add hostnames, IP addresses, search paths, and DNS servers in Fedora, do the following:

1. Start the Network Configuration. As root user from a Terminal window, type system-config-network or from the top panel, click System O Administration O Network. The Network Configuration window appears.

2. Click the Hosts tab. A list of IP addresses, hostnames, and aliases appears.

3. Click New. An Add/Edit Hosts Entry pop-up window appears.

4. Type in the IP address number, hostname, and, optionally, the host alias.

6. Repeat this process until you have added every computer on your LAN that cannot be reached by DNS.

7. Click the DNS tab.

8. Type the IP address of the computers that serve as your Primary and Secondary DNS servers. (You get these IP addresses from your ISP or, if you created your own DNS server, you can enter that server's IP address.)

9. Type the name of the domain (probably the name of your local domain) to be searched for host names into the DNS Search Path box.

10. Click File O Save to save the changes.

11. Click File O Quit to exit.

Now, when you use programs such as ftp, ssh, or other TCP/IP utilities, you can use any hostname that is identified on your local computer, exists in your search path domain, or can be resolved from the public Internet DNS servers. (Strictly speaking, you don't have to set up your /etc/hosts file. You could use IP addresses as arguments to TCP/IP commands. But names are easier to work with.)

Was this article helpful?

0 0
Digital Cameras For Beginners

Digital Cameras For Beginners

Although we usually tend to think of the digital camera as the best thing since sliced bread, there are both pros and cons with its use. Nothing is available on the market that does not have both a good and a bad side, but the key is to weigh the good against the bad in order to come up with the best of both worlds.

Get My Free Ebook

Post a comment