Strategies for Network Administration in Oracle® Solaris 11.2

Exit Print View

Updated: September 2014
 
 

Configure Naming Services Through SMF

Because the SMF repository is the primary repository for all naming services configuration in Oracle Solaris 11, the previous method of modifying a configuration file to configure naming services no longer works. If you make changes to any of these services, for example, svc:/system/name-service/switch, svc:/network/dns/client, or svc:/system/name-service/cache, you must enable and refresh the service for the changes to take effect.


Note -  If no network configuration exists, naming services default to files only behavior, rather than nis files. Note also that the svc:/system/name-service/cache SMF service should be enabled at all times.

    The following configuration tasks are described:

  • Configure DNS.

  • Set multiple DNS options.

  • Set multiple NIS servers.

Example 2-5  Configuring DNS Through SMF

The following example shows how to configure the Domain Name Service (DNS) by using SMF commands. The DNS configuration on a system provides the ability to look up IP addresses by host name and host names by IP address. As shown in this example, you can set DNS properties from the command line, or you can set the same properties interactively. See Configuring a DNS Client in Configuring and Administering Network Components in Oracle Solaris 11.2 for an example. After you set the various properties, you must enable and refresh the SMF service for the changes to take effect.

# svccfg -s dns/client setprop config/nameserver=net_address: 192.168.1.1
# svccfg -s dns/client setprop config/domain = astring: "myhost.org"
# svccfg -s name-service/switch setprop config/host = astring: "files dns"
# svcadm refresh name-service/switch
# svcadm refresh dns/client
Example 2-6  Configuring Multiple DNS Options Through SMF

One network configuration task that you might need to perform is to set DNS options for a system. The following example shows how to set multiple /etc/resolv.conf options simultaneously.

# svccg
svc:> select /network/dns/client
svc:/network/dns/client> setprop config/options = "ndots:2 retrans:3 retry:1"
svc:/network/dns/client> listprop config/options
config/options astring     ndots:2 retrans:3 retry:1

# svcadm refresh dns/client
# grep options /etc/resolv.conf
options ndots:2 retrans:3 retry:1
Example 2-7  Configuring Multiple NIS Servers Through SMF

The following example shows how to set multiple NIS servers simultaneously.

# svccfg -s nis/domain setprop config/ypservers = host: (1.2.3.4 5.6.7.8)(Note the space between 1.2.3.4 and 5.6.7.8)