|Skip Navigation Links|
|Exit Print View|
|Oracle Solaris Administration: Network Interfaces and Network Virtualization Oracle Solaris 11 Information Library|
The tools to use to customize profiles depend on the active profile. If the active profile is reactive such as Automatic, then you use the netcfg and netadm commands to configure and monitor the profile. If the active profile is fixed such as DefaultFixed, then you use the dladm and ipadm commands.
The dladm and ipadm commands are effective only on active profiles. Consequently, before you use these commands, you must make sure of the following:
Know which profile is active to ensure that you make changes to the correct target profile by using the appropriate commands.
Know whether the target profile is reactive or fixed to avoid causing unexpected configuration behaviors after using the commands. A reactive profile manages the network configuration differently from a fixed profile. Accordingly, the behavior of the two profiles also differs when changes are implemented.
Note - Using the -t option of the dladm and ipadm commands to create temporary settings can be effective only on a fixed profile. The option is not supported on reactive profiles.
Follow these two procedures to properly use the dladm and ipadm commands on profiles.
A system's network management mode is automatic if a reactive NCP such as Automatic is the active NCP in the system. Use this procedure to know the network management mode before performing any network configuration. The procedure ensures that you are using the correct commands to implement configuration on the appropriate profile.
# netadm list -x TYPE PROFILE STATE AUXILIARY STATE ncp Automatic online active ncu:phys net0 online interface/link is up ncu:ip net0 online interface/link is up ncu:phys net1 online interface/link is up ncu:ip net1 offline* waiting for IP address to be set ncp testcfg disabled disabled by administrator loc Automatic offline conditions for activation are unmet loc NoNet offline conditions for activation are unmet loc Lab online active loc User disabled disabled by administrator
The output provides two pieces of information:
The netadm list command is supported only if the network management mode is automatic. Therefore, the generation of a profile list indicates network management is in automatic mode. Otherwise, the netadm list command would have generated the following message to indicate that the DefaultFixed profile is active in the system instead.
netadm: DefaultFixed NCP is enabled; automatic network management is not available. 'netadm list' is only supported when automatic network management is active.
The profile list, if generated, also identifies which specific reactive NCP is enabled by means of that NCP's online status. In the sample output, the Automatic NCP is listed as the only existing reactive NCP. Other user-created NCPs would have been included in the list if these were also present in the system.
For example, the dladm and ipadm commands can only be used on the DefaulfFixed profile. However, the netcfg command can only be used on reactive profiles such as Automatic, where network management is in automatic mode.
If the profile whose properties you want to modify with your selected configuration tools is not active, proceed to the following step to enable the proper profile. Otherwise, you can begin using the tools to configure the network.
For example, you do not want network management to be in automatic mode, but prefer to use command lines such as dladm and ipadm to configure datalinks and interfaces manually. The output in Step 1 shows that the Automatic profile is enabled. To use command lines for network configuration, you must therefore enable the DefaultFixed profile.
# netadm enable -p ncp profile-name
# netadm enable -p ncp defaultfixed
You also use the same command syntax if network management is in automatic mode, and you want to use a different reactive NCP. From the sample output of Step 1, suppose that you want to activate the user-created NCP testcfg in place of Automatic. You will therefore type:
# netadm enable -p ncp testcfg
Caution - The command switches active profiles. When you switch active profiles, the existing network configuration is removed, and a new configuration is created. Any persistent changes that were implemented on a previously active NCP are excluded in the new active NCP.