You can use below procedure to configure host as DNS client. In this example you already have DNS server
- Modify your /etc/nsswitch.conf file to include DNS. For instance, you can copy from /etc/nsswitch.dnsroot@solaris-sunray # cp /etc/nsswitch.dns /etc/nsswitch.conf
- Modify your /etc/resolv.conf to include IP address of your DNS server. In this example, your DNS server IP address is 172.16.20.249root@solaris-sunray # vi /etc/resolv.conf
nameserver 172.16.20.249
domain sun.com
search sun.com
- Make sure that your DNS client service is running.root@solaris-sunray # svcadm enable svc:/network/dns/client:default
- Set your client domain name.
sun.com
# domainname sun.com
- Test your DNS client configuration. Look IP address of server pool.ntp.orgroot@solaris-sunray # nslookup pool.ntp.orgServer: 172.16.20.249Address: 172.16.20.249#53Non-authoritative answer:Name: pool.ntp.orgAddress: 202.134.6.170Name: pool.ntp.orgAddress: 152.118.24.8root@solaris-sunray # dig pool.ntp.org; <<>> DiG 9.3.4-P1 <<>> pool.ntp.org;; global options: printcmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1371;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 9, ADDITIONAL: 12;; QUESTION SECTION:;pool.ntp.org. IN A;; ANSWER SECTION:pool.ntp.org. 270 IN A 152.118.24.8pool.ntp.org. 270 IN A 202.134.6.170;; AUTHORITY SECTION:pool.ntp.org. 3122 IN NS d.ntpns.org.pool.ntp.org. 3122 IN NS e.ntpns.org.pool.ntp.org. 3122 IN NS f.ntpns.org.pool.ntp.org. 3122 IN NS g.ntpns.org.pool.ntp.org. 3122 IN NS h.ntpns.org.pool.ntp.org. 3122 IN NS i.ntpns.org.pool.ntp.org. 3122 IN NS a.ntpns.org.pool.ntp.org. 3122 IN NS b.ntpns.org.pool.ntp.org. 3122 IN NS c.ntpns.org.;; ADDITIONAL SECTION:a.ntpns.org. 16553 IN A 207.171.17.42b.ntpns.org. 6723 IN A 207.171.7.84c.ntpns.org. 16553 IN A 212.200.82.148d.ntpns.org. 16553 IN A 94.23.191.112e.ntpns.org. 16553 IN A 70.85.157.108f.ntpns.org. 16553 IN A 202.191.108.134g.ntpns.org. 16553 IN A 78.153.203.28h.ntpns.org. 16553 IN A 64.142.113.8h.ntpns.org. 16553 IN A 85.214.25.217h.ntpns.org. 16553 IN A 212.12.50.229i.ntpns.org. 16553 IN A 141.89.226.53i.ntpns.org. 16553 IN AAAA 2001:638:807:201:215:5dff:fee2:700c;; Query time: 261 msec;; SERVER: 172.16.20.249#53(172.16.20.249);; WHEN: Thu Nov 11 16:09:54 2010;; MSG SIZE rcvd: 416
No comments:
Post a Comment