Skip to main content

Solaris10 UNIX: How to Configure DNS Client / name server

How do you set DNS namserver under Sun Solaris UNIX system?

The resolver is a set of routines in the C library that provide access to the Internet Domain Name System (DNS). The resolver configuration file contains information that is read by the resolver routines the first time they are invoked by a process. The file is designed to be human readable and contains a list of keywords with values that provide various types of resolver information.
Internet address (in dot notation) of a name server that the resolver should query. Up to MAXNS (currently 3, see ) name servers may be listed, one per keyword. If there are multiple servers, the resolver library queries them in the order listed. To configure Solaris nameserver edit or modify /etc/resolv.conf file.

DNS Client Setup

First Create the file called /etc/resolv.conf - which includes the primary and secondary DNS server IP address for Solaris system, it can be your own DNS server or your ISPs DNS server:
# touch /etc/resolv.conf
Open /etc/resolv.conf using vi text editor:
# vi /etc/resolv.conf
Add the following lines to it:
search google.com
nameserver 8.8.8.8
nameserver 8.8.4.4
Where,
  • nameserver IP : It is IP of first DNS server
  • search google.com : Default domain name to search. For example, if you type command nslookup www, it will search it as www.google.com
2) Enable the name resolving using DNS as follows:
# cp /etc/nsswitch.dns /etc/nsswitch.conf
3) Test new name server by running the nslookup command as follows:
# nslookup google.com
OR
# /usr/sfw/sbin/nslookup google.com
Output:
Server:         8.8.8.8
Address:        8.8.8.8#53

Non-authoritative answer:
Name:   google.com
Address: 173.194.36.32
Name:   google.com
Address: 173.194.36.40
Name:   google.com
Address: 173.194.36.41
Name:   google.com
Address: 173.194.36.46
Name:   google.com
Address: 173.194.36.33
Name:   google.com
Address: 173.194.36.34
Name:   google.com
Address: 173.194.36.38
Name:   google.com
Address: 173.194.36.36
Name:   google.com
Address: 173.194.36.39
Name:   google.com
Address: 173.194.36.35
Name:   google.com
Address: 173.194.36.37


Comments

Popular posts from this blog

INSTALL CISCO VPN CLIENT ON WINDOWS 10 (32 & 64 BIT). FIX REASON 442

This article shows how correctly install Cisco VPN Client (32 & 64 bit) on Windows 10 (32 & 64 bit) using simple steps, overcome the ‘ This app can’t run on this PC ’ installation error , plus fix the Reason 442: Failed to enable Virtual Adapter error message . The article applies to New Windows 10 installations or Upgrades from earlier Windows versions and all versions before or after Windows 10 build 1511 .  To simplify the article, we’ve broken it into the following two sections: How to Install Cisco VPN client on Windows 10 (clean installation or upgrade from previous Windows), including Windows 10 build prior or after build 1511 . How to Fix Reason 442: Failed to enable Virtual Adapter on Windows 10 Figure 1. The Cisco VPN Client Reason 442: Failed to enable Virtual Adapter error on Windows 10 HOW TO INSTALL CISCO VPN CLIENT ON WINDOWS 10 (NEW INSTALLATIONS OR O/S UPGRADES) The instructions below are for new or clean Windows 10 inst...

How to create a Hirens Boot CD 15.2 USB Disk

Hiren’s BootCD (HBCD) is a bootable CD that contains a set of tools that can help users to fix their computer if their system fails to boot. More specifically, HBCD contains hardware diagnostic programs, partition tools, data recovery utilities, antivirus tools and many other tools to fix your computer problems.  I write this article because I use Hiren’s BootCD frequently to troubleshoot computer problems, specially when a computer doesn’t boot anymore due to a virus attack or due to a corrupted file system. In this article you will find instructions on how to put Hiren’s BootCD on a USB flash drive (stick) in order to troubleshoot computer problems in the future.

Internet Connection Sharing has been disabled by the Network Administrator. (Solved)

Problem: Logged in to computer with domain account has administrator privileges, and wanted to share my computer’s wifi to my mobile phone. When open the network sharing dialog, the dialog says: Internet Connection Sharing has been disabled by the Network Administrator.