JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Administration: Network Interfaces and Network Virtualization     Oracle Solaris 11 Express 11/10
search filter icon
search icon

Document Information

Preface

Part I Network Auto-Magic

1.  Introduction to NWAM

2.  NWAM Configuration and Administration (Overview)

3.  NWAM Profile Configuration (Tasks)

Creating Profiles

Creating Profiles in Command-Line Mode

Interactively Creating Profiles

Creating a User-Defined NCP

Creating NCUs for a User-Defined NCP

How to Interactively Create a User-Defined NCP

Creating a Location Profile

How to Interactively Create a Location Profile

Creating an ENM Profile

Creating WLANs

Removing Profiles

Setting and Changing Property Values of a Profile

Querying the System for Profile Information

Listing All of the Profiles on a System

Listing All Property Values for a Specific Profile

Obtaining Values of a Specific Property

How to Interactively Obtain a Single Property Value

Interactively Viewing and Changing Property Values by Using the walkprop Subcommand

Exporting and Restoring a Profile Configuration

Restoring a Profile

Managing the NWAM Service Through SMF

How to Switch From Autoconfiguration Mode to Traditional Networking Mode

How to Switch From Traditional Networking Mode to Autoconfiguration Mode

4.  NWAM Profile Administration (Tasks)

5.  About the NWAM Graphical User Interface

Part II Administering Single Interfaces

6.  Overview of the Networking Stack

7.  Datalink Configuration and Administration

8.  Configuring an IP Interface

9.  Configuring Wireless Interface Communications on Oracle Solaris

Part III Administering Interface Groups

10.  Administering Bridges

11.  Administering Link Aggregations

12.  Administering VLANs

13.  Introducing IPMP

14.  Administering IPMP

Part IV  Network Virtualization and Resource Management

15.  Introducing Network Virtualization and Resource Control (Overview)

16.  Planning for Network Virtualization and Resource Control

17.  Configuring Virtual Networks (Tasks)

18.  Using Link Protection in Virtualized Environments

19.  Managing Network Resources

20.  Monitoring Network Traffic and Resource Usage

Glossary

Index

Querying the System for Profile Information

The nwamcfg command can be used with the list subcommand to list all of the profiles, property-value pairs, and resources that exist at the current or specified scope. Use the list subcommand to query the system for general information about all profiles or to retrieve specific information about a particular profile. The list subcommand can be used in either interactive mode or command-line mode.

If you need to obtain information about profiles and their current state, use the nwamadm command with the list subcommand. For more information, see Displaying the Current State of a Profile.

Listing All of the Profiles on a System

The nwamcfg list command lists all of the system-defined and user-defined profiles on a system. Note that using the list subcommand without any options displays all of the top-level profiles that are on a system. The command does not list the state of each profile. To display a list of the profiles and their state (online or offline), use the nwamadm list command.

To list all of the top level profiles on a system, type the following command:

$ nwamcfg list
NCPs:
        Automatic
        User
Locations:
        Automatic
        NoNet
        home
        office
ENMs:
        myvpn
        testenm
WLANs:
        workwifi
        coffeeshop
        homewifi

In this example, the following profiles are listed:


Note - Only user-defined profiles can be created, modified, or removed.


Listing All Property Values for a Specific Profile

Use the nwamcfg command with the list subcommand to list all of the property values for a specified profile.

The syntax for the list subcommand is as follows:

$ nwamcfg list [ object-type [ class ] object-name ] 

Example 3-10 Listing All of the Property Values of an NCU

For example, to list all of the properties for an IP NCU in the User NCP, you would type the following command:

$ nwamcfg select "ncp User; list ncu ip eg1000g"
NCU:e1000g0
        type                    interface
        class                   ip
        parent                  "User"
        enabled                 true
        ipv4-addrsrc            dhcp
        ipv6-addrsrc            dhcp,autoconf
        ip-version              ipv4

Example 3-11 Listing All of the Property Values of an ENM

In the following example, all of the properties for an ENM named myenm are listed.

$ list enm myenm
ENM:myenm
activation-mode manual
enabled         true
start           "/usr/local/bin/myenm start"
stop            "/bin/alt_stop"

In this example, the output of the list subcommand displays the following information:

Obtaining Values of a Specific Property

You can use the nwamcfg command with the get subcommand to obtain a specific value for a given property. This subcommand can be used in either interactive mode or command-line mode.

The syntax for the get subcommand is as follows:

nwamcfg get [ -V ] prop-name

If the -V option is used, only the property value is displayed, as shown here:

nwamcfg:ncp:User:ncu:e1000g0> get -V activation-mode
manual

Otherwise, both the property and its value are displayed. For example:

nwamcfg:ncp:User:ncu:e1000g0> get activation-mode
activation-mode        manual

To obtain a single value for the ip-version property of an NCU named myncu which is part of the User NCP, you would type the following command:

$ nwamcfg "select ncp User; select ncu ip myncu; get ip-version"

How to Interactively Obtain a Single Property Value

This procedure describes how to obtain a single property value by using the nwamcfg get command while in the nwamcfg interactive mode. In this particular procedure, some of the examples show how to obtain a single property value for an NCU in the User NCP. These examples are used for demonstration purposes only. The information that you provide when using this command would vary, depending on the profile and the property value that you attempt to retrieve.

If you want to view all of the property values for a profile, you can alternately use the walkprop subcommand. This subcommand walks you through all of the properties of a given profile, one at a time, enabling you to modify one or all of the profile's properties. For more information, see Interactively Viewing and Changing Property Values by Using the walkprop Subcommand .

  1. Initiate an nwamcfg interactive session.
    $ nwamcfg
    nwamcfg>
  2. Select the profile or configuration object that contains the property value that you want to obtain.
    nwamcfg> select object-type class object-name

    Note - The class parameter is applicable only if you are selecting an NCU. Also, the class parameter must be specified if both the phys and ip class NCU share the same name. However, if the NCU name is unique, the class parameter is not required.


    For example, to select the User NCP, you would type:

    nwamcfg> select user NCP

    In this example, selecting the User NCP moves the interactive session into the selected object's scope.

  3. (Optional) Display the components of the profile.
    nwamcfg:ncp:User> list
    NCUs:
            phys    e1000g0
            ip      e1000g0
  4. Select the object that contains the property value that you want to obtain.

    In the following example, the link (phys) NCU e1000g0 in the User NCP is selected:

    nwamcfg:ncp:User> select ncu phys e1000g0

    Selecting the NCU e1000g0 moves the interactive session to that object's scope and loads the current properties for the NCU from memory.

  5. Obtain the specified property value.
    nwamcfg:ncp:User:ncu:e1000g0> get property-value

    For example, to obtain the value of the activation-mode property, you would type:

    nwamcfg:ncp:User:ncu:e1000g0> get activation-mode
            activation-mode         manual
Next Steps

At this point, you can set a new value for the property by using the set subcommand, or you can exit the interactive session without making any changes. Note that if you modify a property value while in interactive mode, you must use the commit or exit subcommand to save your changes. For information about setting a property value in nwamcfg interactive mode, see Setting and Changing Property Values of a Profile.

Interactively Viewing and Changing Property Values by Using the walkprop Subcommand

The walkprop subcommand can be used interactively to view the properties of a profile. This subcommand “walks” you through a profile, one property at a time, displaying the name and current value for each property. An interactive command prompt is also displayed, that you can use to change the current value of the specified property. The delimiter for multi-valued properties is a comma (,). If an individual value for a given property contains a comma, it must be preceded it with a backslash (\). Commas within properties that only have a single value are not interpreted as delimiters and do not need to be preceded by a backslash.


Note - The walkprop subcommand is meaningful when used in interactive mode only.


Example 3-12 Viewing and Changing Property Values for a Specific Profile

In the following example, the activation-mode property for the location foo is viewed and then changed by using the walkprop subcommand. Note that when using the walkprop subcommand, you do not need to use the set subcommand to set the property value.

$ nwamcfg
nwamcfg> select loc foo
nwamcfg:loc:foo> list
LOC:foo
        enabled                         false
        nameservices                    dns
        dns-nameservice-configsrc       dhcp
        nameservices-config-file        "/etc/nsswitch.dns"
        conditions                      "system-domain is oracle.com"
        nfsv4-domain                    "domainl.oracle.com"
        activation-mode                 manual
nwamcfg:loc:foo> walkprop
activation-mode (manual) [manual|conditional-any|conditional-all]> conditional-all
conditions ("system-domain is oracle.com")> "system-domain is oracle.com"
nameservices (dns) [dns|files|nis|ldap]>
nameservices-config-file ("/etc/nsswitch.dns")>
dns-nameservice-configsrc (dhcp) [manual|dhcp]>
nfsv4-domain ("Central.oracle.com")>
ipfilter-config-file>
ipfilter-v6-config-file>
ipnat-config-file>
ippool-config-file>
ike-config-file>
ipsecpolicy-config-file>
nwamcfg:loc:foo> list
LOC:foo
        enabled                         false
        nameservices                    dns
        dns-nameservice-configsrc       dhcp
        nameservices-config-file        "/etc/nsswitch.dns"
        nfsv4-domain                    "domain.oracle.com"
        activation-mode                 conditional-all
        conditions                      "system-domain is oracle.com"
nwamcfg:loc:foo> commit
Committed changes
nwamcfg:loc:foo> end
nwamcfg> exit
Nothing to commit