JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Connecting Systems Using Reactive Network Configuration in Oracle Solaris 11.1     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  Reactive Network Configuration (Overview)

2.  Creating and Configuring Reactive Network Profiles (Tasks)

Configuring Profiles by Using the netcfg Command

netcfg Interactive Mode

netcfg Command-Line Mode

netcfg Command-File Mode

netcfg and netadm Subcommands

netcfg Subcommands

netadm Subcommands

Creating User-Defined Profiles

Creating an NCP

Creating NCUs for an NCP

How to Interactively Create an NCP With NCUs

Creating a Location Profile

How to Interactively Create a Location Profile

Creating an ENM Profile

How to Interactively Create an ENM Profile

Creating a Known WLAN Profile

How to Interactively Create a Known WLAN Profile

Setting and Changing Property Values for a Profile

How to Interactively Set Property Values

Listing Profile Configuration Information on a System

Listing All of the Profile Configuration Information on a System

Listing All Property Values for a Specific Profile

Obtaining the Value of a Specific Property

How to Interactively Obtain a Single Property Value

Viewing and Changing Property Values by Using the walkprop Subcommand

Enabling and Disabling Profiles

3.  Administering Your Reactive Network Configuration (Tasks)

4.  Using the Network Administration Graphical User Interface

Index

Setting and Changing Property Values for a Profile

Property values for new and existing user-defined profiles are set or modified by using the netcfg command with the set subcommand. This subcommand can be used in interactive mode or in command-line mode. If a property value is set or changed in command-line mode, the change is immediately committed to persistent storage.


Note - You can modify the DefaultFixed location by directly changing the relevant SMF properties or by using the tools provided by a given subsystem, such as nscfg. The property changes are directly saved in the SMF repository and are propagated to the network repository only when the DefaultFixed location is disabled. You can view the modified DefaultFixed location properties by using the netcfg command that accesses the network repository, only when the DefaultFixed location is disabled. The property values stored in the SMF repository are the authoritative values when the DefaultFixed location is active.


The syntax for the set subcommand is as follows:

$ netcfg set prop-name=value1[,value2...]

For information about the netcfg subcommands, see netcfg Subcommands.

If you need to retrieve a specific property value, use the netcfg get command. For more information, see Obtaining the Value of a Specific Property.

Example 2-6 Setting Property Values in netcfg Command-Line Mode

If you are using the netcfg command to set a property value in command-line mode, multiple subcommands can be typed on the command-line.

For example, to set the mtu property for a link NCU named net1, you would type the following command:

$ netcfg "select ncp User; select ncu phys net1; set mtu=1492"

In this example, the select subcommand is used to select the top-level profile, then again to select the NCU that contains the mtu property value that is modified.

From the command-line, multiple values can be set for a given property at the same time. When setting multiple values, each value must be separated by a comma (,). If individual values for a specified property also contain a comma, the comma that is part of the property value must be preceded by a backslash (\). Commas within properties that only have a single value are not interpreted as delimiters and therefore do not need to be preceded by a backslash.

In the following example, the ip-version property value for the NCU, myncu, in the NCP User is set:

$ netcfg "select ncp User; select ncu ip myncu; set ip-version=ipv4,ipv6"

How to Interactively Set Property Values

When interactively setting property values, you must first select a profile at the current scope, which moves the interactive session into that profile's scope. From this scope, you can select the object whose property you want to modify. The selected profile is then loaded into memory from persistent storage. At this scope, you can modify the profile or its properties.

The following procedure describes how to set property values by taking an example to set the ipfilter-config-file property of the location test-loc.

  1. Initiate an netcfg interactive session.
    $ netcfg
    netcfg>
  2. (Optional) List the profiles.
    netcfg> list
    NCPs:
       DefaultFixed
       Automatic
       User
    Locations:
       Automatic
       NoNet
       test-loc
       DefaultFixed
  3. Select the profile or configuration object that needs to be set.
    netcfg> select loc test-loc
  4. (Optional) List the configuration information of the selected profile.
    netcfg:loc:test-loc> list
    LOC:test-loc
       activation-mode              manual
       enabled                      false
       nameservices                 dns
       dns-nameservice-configsrc    dhcp
       nameservices-config-file     "/etc/nsswitch.dns"
  5. Set the property value.
    netcfg:loc:test-loc> set ipfilter-config-file = /path/to/ipf-file
  6. (Optional) List the configuration information to verify the setting.
    netcfg:loc:test-loc> list
    LOC:test-loc
       activation-mode              manual
       enabled                      false
       nameservices                 dns
       dns-nameservice-configsrc    dhcp
       nameservices-config-file     "/etc/nsswitch.dns"
       ipfilter-config-file         "/path/to/ipf-file"
  7. End the session.
    netcfg:loc:test-loc> end
    Committed changes

    The end subcommand saves the change and ends the session.

  8. Exit the interactive session.
    netcfg> exit

Example 2-7 Interactively Setting Property Values for a Profile

$ netcfg
netcfg> select ncp User
netcfg:ncp:User> select ncu ip iwk0
netcfg:ncp:User:ncu:iwk0> set ipv4-default-route = 172.24.1.1

In the above example, the ipv4-default-route property of the NCP User is set. For more information about configuring an IPv4 router, see Configuring an IPv4 Router in Configuring and Administering Oracle Solaris 11.1 Networks.

In the following example, the mtu property of the NCU net0 in the NCP User is modified interactively:

$ netcfg
netcfg> select ncp User
netcfg:ncp:User> select ncu phys net0
netcfg:ncp:User:ncu:net0> list
NCU:net0
   type                link
   class               phys
   parent              "User"
   enabled             true
   activation-mode     prioritized
   priority-mode       exclusive
   priority-group      1
netcfg:ncp:User:ncu:net0> set mtu = 5000
netcfg:ncp:User:ncu:net0> list
NCU:net0
   type                link
   class               phys
   parent              "User"
   enabled             true
   activation-mode     prioritized
   priority-mode       exclusive
   priority-group      1
   mtu            5000
netcfg:ncp:User:ncu:net0> commit
Committed changes
netcfg:ncp:User:ncu:net0> exit
$