To configure a host to use a name server, use this procedure.
- Create an /etc/resolv.conf file by
running the following command:
- On the first line of the /etc/resolv.conf file,
type the word domain followed by the full name
of the domain that this host is in. For example:
domain abc.aus.century.com
- On any blank line below the
domain
line,
type the word nameserver, followed by at least
one space, followed by the dotted decimal Internet address of the
name server that this host is to use (the name server must serve the
domain indicated by the domain
statement). You
can have up to 3 name server entries. For example, your /etc/resolv.conf file
might contain the entries:
nameserver 192.9.201.1
nameserver 192.9.201.2
The system queries the name
servers in the order listed.
search domainname_list
Alternatively,
the search keyword could be used to specify the order in which the
resolver will query the domain list. In this case, domainname_list
values
are abc.aus.century.com
and aus.century.com
.
The domainname_list
can have a maximum of 1024 character
strings, each separated by a space.
- Assuming the name server is operational, you can test the
communication between the host and the name server by typing the following
command:
Use
the name of a host that should be resolved by the name server to see
if the process is working. The output you receive should appear similar
to the following:
brown.abc.aus.century.com is 129.35.145.95
Other configuration tasks are shown in the following table.
Table 1. Configuring a host to use name server tasks
Task |
SMIT fast path |
Command or file |
Create an /etc/resolv.conf File |
smit stnamerslv2 |
create and edit /etc/resolv.conf1 |
List All the Name Servers Used by a Host |
smit lsnamerslv |
view /etc/resolv.conf |
Add a Name Server |
smit mknamerslv |
edit /etc/resolv.conf2 |
Remove a Name Server |
smit rmnamerslv |
edit /etc/resolv.conf |
Start/Restart Using Domain Name Resolution |
smit stnamerslv |
|
Stop Using Domain Name Resolution |
smit spnamerslv |
|
Change/Show the Domain |
smit mkdomain |
edit /etc/resolv.conf |
Remove the Domain |
smit rmdomain |
edit /etc/resolv.conf |