Specifications

82 Chapter 6 Setting Network Preferences
Managing Preference Files and the Configuration Daemon
The sets of configuration information a user creates at different locations, whether in
System Preferences or through the command line, are stored in the preference.plist file
located in /Library/Preferences/SystemConfiguration/.
Network configuration is handled by configd, the configuration daemon. configd
reads the network configuration and stores it with the current state of the computer’s
networking information.
Storage is in the form of key-value pairs. The key is a description of what is being
stored, and the value is the value of the information being stored.
You can view the values stored by configd at run time and monitor them using the
scutil tool. This can be especially valuable when you are debugging your network
configuration from the command line.
Invoked with no options, scutil provides a command-line interface to the data that is
maintained by configd. For a list of commands you can use with scutil, enter help at
the scutil prompt.
To start a scutil session (interactive mode):
$ scutil
> open
This opens a session with configd. After the session is open, you can list all keys in the
data store for configd:
> list
Each item on the list is a piece of information stored by configd, sorted by type. Setup
indicates information that has been read from a configuration file. State indicates
information that represents the state of the computer. File indicates stored information
as of the last time the configuration file was updated.
To view data in the keys, use scutil. First you get the data; then you show the data. For
example:
> get State:/Network/Interface/en0/IPv4
> d.show
scutil
stores the information from the get command in a local dictionary variable
called d. You can also watch or monitor a variable so that if its state changes scutil
alerts you.
To quit the
scutil session, enter quit at the prompt.
> quit