Skip Navigation Links | |
Exit Print View | |
![]() |
Oracle Solaris Administration: Network Interfaces and Network Virtualization Oracle Solaris 11 Information Library |
1. Overview of the Networking Stack
Network Configuration in This Oracle Solaris Release
The Network Stack in Oracle Solaris
Network Devices and Datalink Names
Administration of Other Link Types
3. NWAM Configuration and Administration (Overview)
4. NWAM Profile Configuration (Tasks)
Creating Profiles in Command-Line Mode
Interactively Creating Profiles
How to Interactively Create an NCP
How to Interactively Create a Location 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 User-Defined Profile
Managing Network Configuration
How to Switch From Automatic Network Configuration Mode to Manual Network Configuration Mode
How to Switch From Manual Network Configuration Mode to Automatic Network Configuration Mode
5. NWAM Profile Administration (Tasks)
6. About the NWAM Graphical User Interface
Part II Datalink and Interface Configuration
7. Using Datalink and Interface Configuration Commands on Profiles
8. Datalink Configuration and Administration
9. Configuring an IP Interface
10. Configuring Wireless Interface Communications on Oracle Solaris
12. Administering Link Aggregations
16. Exchanging Network Connectivity Information With LLDP
Part III Network Virtualization and Resource Management
17. Introducing Network Virtualization and Resource Control (Overview)
18. Planning for Network Virtualization and Resource Control
19. Configuring Virtual Networks (Tasks)
20. Using Link Protection in Virtualized Environments
21. Managing Network Resources
Property values for new and existing user-defined profiles are set 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.
The syntax for the set subcommand is as follows:
netcfg set prop-name=value1[,value2...]
If you need to retrieve a specific property value, use the netcfg get command. For more information, see Obtaining Values of a Specific Property.
Example 4-9 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 must 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.
Multiple values can be set for a given property from the command line 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"
Example 4-10 Interactively Setting Property Values for a Profile
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 that 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, as shown in the following example:
$ netcfg netcfg> select ncp User netcfg:ncp:User> select ncu ip iwk0 netcfg:ncp:User:ncu:iwk0> set ipv4-default-route = 129.174.7.366
In the following example, the ipfilter-config-file property of the location foo is set:
$ netcfg netcfg> list NCPs: Automatic User Locations: Automatic NoNet foo netcfg> select loc foo netcfg:loc:foo> list LOC:foo activation-mode manual enabled false nameservices dns dns-nameservice-configsrc dhcp nameservices-config-file "/etc/nsswitch.dns" netcfg:loc:foo> set ipfilter-config-file=/path/to/ipf-file netcfg:loc:foo> list LOC:foo activation-mode manual enabled false nameservices dns dns-nameservice-configsrc dhcp nameservices-config-file "/etc/nsswitch.dns" ipfilter-config-file "/path/to/ipf-file" netcfg:loc:foo> end Committed changes netcfg> exit Nothing to commit $
In the following example, the link-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 link-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 link-mtu 5000 netcfg:ncp:User:ncu:net0> commit Committed changes netcfg:ncp:User:ncu:net0> exit Nothing to commit $