configuring a solaris 11 dns client

Upload: bryan-bowman

Post on 18-Oct-2015

19 views

Category:

Documents


0 download

DESCRIPTION

h

TRANSCRIPT

  • 5/28/2018 Configuring a Solaris 11 DNS Client

    1/3

    Author: Tim Wort

    Conf iguring a DN S c lie nt a n d /et c/ns s w it c h. c onf in S ol a r i s 1 1 .

    If the svc:/network/dns/client:defaultservice has never been configured on the system you can

    copy a existing /etc/resolv.conffile and run the following command:

    root@solaris:~# nscfg import dns/client

    to add the /etc/resolv.confsettings to thesvc:/network/dns/client:defaultservice, then

    refresh and restart the service, or reboot.

    root@solaris:~# svcadm refresh dns/clientroot@solaris:~# svcadm restart dns/client

    To configure the svc:/system/name-service/switch:default copy a existing

    /etc/nsswitch.conffile and run the following command:

    root@solaris:~# nscfg import name-service/switch

    Then refresh and restart the service, or reboot.

    To modify the resolv.conffile or the nsswitch.conffile on a system that the services are currently

    configured, modify the files and use the -foption to the nscfgcommand:

    root@solaris:~# nscfg import -f dns/client

    Conf iguring a DN S c lie nt a nd /et c/ns s w it c h. c onf m a nu a l ly in S ol a r i s 1 1 .

    In Solaris 11 the /etc/resolv.conf is automatically populated by the

    svc:/network/dns/client service and manual edits will be lost when the

    svc:/network/dns/client service is started or restarted.

    To set values for the /etc/resolv.conf administrators must set properties in the

    svc:/network/dns/client service.

    A listing of the default /etc/resolv.conf for my Solaris 11 instance:

    tim@solaris:~$ cat /etc/resolv.conf

    ## Copyright (c) !"" racle and/or its affiliates. %ll rights reserved.### &%'*+*,%*-&,&0&1"# 2%,+3+: 430 35* *+*,%*- , 0 -%%.# - + *-3 430 35*. *-30 2355 6* 50.# 0ee resolv.conf(7) for details.

    nameserver 10.0.0.1

  • 5/28/2018 Configuring a Solaris 11 DNS Client

    2/3

    ow use the svccfg to modify the svc:/network/dns/client service:

    tim@solaris:~$ svccfg -s dns/clientsvc:/network/dns/client8 listprop configconfig applicationconfig/val9e&a9thoriation astring solaris.smf.val9e.name;service.dns.client

    config/nameserver net_address 10.0.0.1

    !odify the config/nameserver property and list the results:

    svc:/network/dns/client8 setprop config/nameserver = (1!.1".1.1 $.!.!.! ...%svc:/network/dns/client8 listprop configconfig applicationconfig/val9e&a9thoriation astring solaris.smf.val9e.name;service.dns.clientconfig/nameserver net_address 1!.1".1.1 $.!.!.! ...

    Add the config/search and config/domain properties and list the results:

    svc:/network/dns/client8 setprop config/search = timwort.orgsvc:/network/dns/client8 setprop config/domain = timwort.orgsvc:/network/dns/client8 listprop configconfig applicationconfig/val9e&a9thoriation astring solaris.smf.val9e.name;service.dns.clientconfig/nameserver net&address "

  • 5/28/2018 Configuring a Solaris 11 DNS Client

    3/3

    Similarly the /etc/nsswitch.conf file has been deprecated and the configuration of the name

    service switch is preformed by setting service properties in the svc:/system/nameservice/

    switch service.

    "or bac#ward compatibility the /etc/nsswitch.conf file is

    regenerated when the svc:/system/name;service/switch service is started or restarted.

    In the following the svccfg command is used to configured the defaults for all databases in the name

    service switch service, then individual databases $hosts and ipnodes% are reset to add a dns

    search:

    tim@solaris:~$ svccfg -s name-service/switchsvc:/system/name;service/switch8 setprop config/defalt = filessvc:/system/name;service/switch8 setprop config/host = )files dns)svc:/system/name;service/switch8 setprop config/ipnode = astring: )files dns)svc:/system/name;service/switch8 e&ittim@solaris:~$ svcadm refresh name-service/switchtim@solaris:~$ svcadm restart name-service/switch

    ow examine the /etc/nsswitch.conf to confirm it wor#ed:

    tim@solaris:~$more /etc/nsswitch.conf## Copyright (c) "