Domain Name System File configuration for solaris

Source: Internet
Author: User
In practice, the domain name system file configuration of solaris-Linux Enterprise Application-Linux server application information. The following is a detailed description. I. Summary
Configuration of domain name system files for solaris, including/etc/nsswitch. conf, resolv. conf, and hosts

Enables the server to access (ping) the domain name.

Ii. Text
# Ping www.163.com
No answer from www.163.com

1. Configure the nsswitch. conf file, mainly the hosts item, as shown below:

# Vi/etc/nsswitch. conf
#
#/Etc/nsswitch. files:
#
# An example file that cocould be copied over to/etc/nsswitch. conf; it
# Does not use any naming service.
#
# "Hosts:" and "services:" in this file are used only if
#/Etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.

Passwd: files
Group: files
Hosts: files dns
Ipnodes: files
Networks: files
Protocols: files
Rpc: files
Ethers: files
Netmasks: files
Bootparams: files
Publickey: files

# At present there isn't a 'files' backend for netgroup; the system will
# Figure it out pretty quickly, and won't use netgroups at all.

Netgroup: files
Automount: files
Aliases: files
Services: files
Sendmailvars: files
Printers: user files

Auth_attr: files
Prof_attr: files
Project: files

Hosts: files dns

/* Here the configuration instructions should first use files and then use dns. For the files configuration, see/etc/hosts. For the dns configuration, see/etc/resolv. conf */

2. Configure the hosts file
Configure local domain name resolution for hosts.

# Vi/etc/hosts
#
# Internet host table
#

127.0.0.1 localhost
218.25.254.24 loghost
192.168.4.102 ora-vp

3. Configure the resolv. conf file
/Etc/resolv. conf configure the remote domain name resolution server. The following 202.96.64.68 is the Domain Name Server.

# Vi/etc/resolv. conf
Nameserver 202.96.64.68

When the loghost is pinged, the system first searches for it in/etc/hosts, because nsswitch. the hosts entry in the conf file is configured and the corresponding address 218.25.254.24 is found. When you ping www.163.com, the system accesses resolv because the local hosts does not find a match. the Domain Name Server Resolution configured in conf.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.