Skip Navigation Links | |
Exit Print View | |
Transitioning From Oracle Solaris 10 to Oracle Solaris 11.1 Oracle Solaris 11.1 Information Library |
1. Transitioning From Oracle Solaris 10 to an Oracle Solaris 11 Release (Overview)
2. Transitioning to an Oracle Solaris 11 Installation Method
6. Managing Software and Boot Environments
7. Managing Network Configuration
Network Configuration Feature Changes
How the Network Is Configured in Oracle Solaris
How the Network Is Configured During an Installation
Network Configuration Commands
Managing Network Configuration in Fixed Mode
Displaying and Configuring Datalinks in Fixed Mode
Configuring IP Interfaces and Addresses in Fixed Mode
Configuring Naming Services in Fixed Mode
resolv.conf Error-Checking Capabilities
Temporarily Resetting SMF Naming Services
Importing Naming Services Configuration
Managing Network Configuration in Reactive Mode
Configuring Naming Services in Reactive Mode
Configuring LDAP in Reactive Mode
Creating Persistent Routes (Fixed and Reactive)
Configuring IPMP in Oracle Solaris 11
Managing Network Configuration From the Desktop
Network Configuration and Administration Commands (Quick Reference)
8. Managing System Configuration
10. Managing Oracle Solaris Releases in a Virtual Environment
If you are managing the network in fixed mode, the active NCP is DefaultFixed. This profile is system-defined and is the only fixed profile on the system. Oracle Solaris does not support the use of multiple fixed profiles. The properties of the DefaultFixed NCP reflect the persistent configuration for the system while this NCP is active.
Note - Starting with Oracle Solaris 11.1, you can use fixed networking commands to configure reactive profiles that are currently active.
Using fixed network configuration enables you to have full control of all network configuration information. If the DefaultFixed NCP is active, you make explicit changes to network configuration by using the dladm and ipadm commands. Conversely, with reactive network configuration, the network is automatically configured, as a direct result of changes in the current network conditions. If you are using reactive networking, the netcfg command is used to create and manage reactive profiles that specify network configuration parameters. See Managing Network Configuration in Reactive Mode.
When configuring the network in fixed mode, note the following additional information:
Persistent network configuration is now managed through SMF, not by editing the following files:
/etc/defaultdomain
/etc/dhcp.*
/etc/hostname.*
/etc/hostname.ip*.tun*
/etc/nodename
/etc/nsswitch.conf
Note - The /etc/nsswitch.conf file is still referenced in this release, but you do not directly edit the file to make configuration changes. See Configuring Naming Services in Fixed Mode.
For more information about setting a system's host name, see System Configuration Changes and Migration of System Configuration to SMF.
During an installation, the system undergoes a one time upgrade to convert any existing /etc network configuration files to their respective ipadm and dladm configurations. The dladm command is used to configure datalinks. The ipadm command is used to configure IP interfaces. The ipadm command provides almost equivalent functionality to the ifconfig command. The ipadm command also replaces the ndd command. To compare ifconfig and ndd command options with the ipadm command, see Appendix A, Comparison Map: ifconfig and ipadm Commands, in Connecting Systems Using Fixed Network Configuration in Oracle Solaris 11.1 and Appendix B, Comparison Map: ndd and ipadm Commands, in Connecting Systems Using Fixed Network Configuration in Oracle Solaris 11.1.
Network virtualization features are also configured and managed by using the dladm and ipadm commands. Objects that are in the link layer (Layer 2) of the network stack, for example, virtual local area networks (VLANs), tunnels, link aggregations, and the newer virtual NICs (VNICs), are configured by using the dladm command. Interfaces that are on the IP layer (Layer 3) are configured by using the ipadm command. See Chapter 2, Creating and Administering Virtual Networks in Oracle Solaris, in Using Virtual Networks in Oracle Solaris 11.1 and Chapter 6, Configuring IP Tunnels, in Configuring and Administering Oracle Solaris 11.1 Networks.
For additional information about setting network properties, see Chapter 5, Internet Protocol Suite Tunable Parameters, in Oracle Solaris 11.1 Tunable Parameters Reference Manual.
When you perform a fresh installation, all datalinks are automatically assigned generic names by using the net0, net1, and netN naming convention, depending on the total number of network devices on a system. After the installation, you can use different datalink names. See Chapter 3, Working With Datalinks, in Connecting Systems Using Fixed Network Configuration in Oracle Solaris 11.1.
Note - During an upgrade, link names that were used previously are retained.
Display information about the datalinks on a system, as follows:
# dladm show-phys LINK MEDIA STATE SPEED DUPLEX DEVICE net2 Ethernet up 10000 full hxge0 net3 Ethernet up 10000 full hxge1 net4 Ethernet up 10 full usbecm0 net0 Ethernet up 1000 full igb0 net1 Ethernet up 1000 full igb1 net9 Ethernet unknown 0 half e1000g0 net5 Ethernet unknown 0 half e1000g1 net10 Ethernet unknown 0 half e1000g2 net11 Ethernet unknown 0 half e1000g3
Note - In Oracle Solaris 10, the /etc/path_to_inst file can be used to store information about physical and virtual network devices. In Oracle Solaris 11, this file does not contain link names for physical network interfaces. To display this information, use the dladm show-phys command, as shown in the previous example.
Display a datalink name, its device name, and its location in this manner:
# dladm show-phys -L net0 LINK DEVICE LOC net0 e1000g0 IOBD
Rename a datalink, as follows:
If an IP interface is configured over the datalink, first remove that interface:
# ipadm delete-ip interface
Then, change the link's current name:
# dladm rename-link old-linkname new-linkname
where old-linkname refers to the current name of the datalink and new-linkname refers to any name that you want to assign to the datalink. For more information, see Chapter 3, Working With Datalinks, in Connecting Systems Using Fixed Network Configuration in Oracle Solaris 11.1 and Chapter 1, Overview of Fixed Network Configuration, in Connecting Systems Using Fixed Network Configuration in Oracle Solaris 11.1.
Example 7-3 Displaying a System's MAC Addresses
Display the MAC addresses of the physical links in a system, as follows:
# dladm show-phys -m
This command is similar to using the ifconfig command.
Display the MAC addresses of all of the links in a system, physical and non-physical, as follows:
# dladm show-linkprop -p mac-address
The ipadm command is used to manually configure IP interfaces and addresses. For example, a static IPv4 interface is configured as follows:
# ipadm create-ip net0 # ipadm create-addr -T static -a local=10.9.8.7/24 net0 net0/v4
The -T option can be used to specify three address types: static, dhcp, and addrconf (for auto-configured IPv6 addresses). In this example, the system is configured with a static IPv4 address. You can use the same syntax to specify a static IPv6 address. However, static IPv6 addresses require that a link-local IPv6 address be configured prior to creating any static IPv6 addresses. This configuration is accomplished by creating an IPv6 addrconf address before creating the static IPv6 address:
# ipadm create-ip net0 # ipadm create-addr -T addrconf net0 net0/v6 # ipadm create-addr -T static -a local=ec0:a:99:18:209:3dff:fe00:4b8c/64 net0 net0/v6a
Configure an interface with DHCP, as follows:
# ipadm create-ip net0 # ipadm create-addr -T dhcp net0 net0/v6a
Use the addrconf argument with the -T option to specify an automatically generated IPv6 address:
# ipadm create-ip net0 # ipadm create-addr -T addrconf net0 net0/v6
If you wanted to change the IP address that was provided for the net0 interface in the previous example, you would need to first remove the interface and then re-add it. For example:
# ipadm delete-addr net0/v4 # ipadm create-addr -T static -a local=10.7.8.9/24 net0 net0/v4
See also Chapter 2, Configuring a System for the Network, in Connecting Systems Using Fixed Network Configuration in Oracle Solaris 11.1 and ipadm(1M).
The SMF repository is the primary repository for all naming services configuration. The previous behavior, where you modified a configuration file to configure naming services no longer works. These services must be enabled or refreshed for any changes to take affect.
Note - If no network configuration exists, naming services default to files only behavior, rather than nis files. The svc:/system/name-service/cache SMF service should be enabled at all times.
The following table describes the naming service configuration that has migrated to SMF.
Table 7-1 SMF Service to Legacy File Mapping
|
Example 7-4 Configuring Naming Services by Using SMF
The following example shows how to configure DNS by using SMF commands.
# svccfg svc:> select dns/client svc:/network/dns/client> setprop config/search = astring: \ ("us.company.com" "eu.company.com" "companya.com" "companyb.com" "company.com" ) svc:/network/dns/client> setprop config/nameserver = net_address: \ ( 10.2.201.12 10.2.201.30 ) svc:/network/dns/client> select dns/client:default svc:/network/dns/client:default> refresh svc:/network/dns/client:default> validate svc:/network/dns/client:default> select name-service/switch svc:/system/name-service/switch> setprop config/host = astring: "files dns" svc:/system/name-service/switch> select system/name-service/switch:default svc:/system/name-service/switch:default> refresh svc:/system/name-service/switch:default> validate svc:/system/name-service/switch:default> # svcadm enable dns/client # svcadm refresh name-service/switch # grep host /etc/nsswitch.conf hosts: files dns # cat /etc/resolv.conf # # copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. # # # _AUTOGENERATED_FROM_SMF_V1_ # # WARNING: THIS FILE GENERATED FROM SMF DATA. # DO NOT EDIT THIS FILE. EDITS WILL BE LOST. # See resolv.conf(4) for details. search us.company.com eu.company.com companya.com companyb.com company.com nameserver 10.2.201.12 nameserver 10.2.201.30 . . .
Example 7-5 Setting Multiple NIS Servers by Using SMF
The following example shows how to set multiple NIS servers.
# svccfg -s nis/domain setprop config/ypservers = host: "(1.2.3.4 5.6.7.8)"
Note that there is space between 1.2.3.4 and 5.6.7.8.
Example 7-6 Setting Multiple DNS Options by Using SMF
The following example shows how to set multiple /etc/resolv.conf options.
# svccg svc:> select /network/dns/client svc:/network/dns/client> setprop config/options = "ndots:2 retrans:3 retry:1" svc:/network/dns/client> listprop config/options config/options astring ndots:2 retrans:3 retry:1 # svcadm refresh dns/client # grep options /etc/resolv.conf options ndots:2 retrans:3 retry:1 svc:/network/dns/client> exit
Prior to the naming services migration to SMF, errors in the resolv.conf file configuration were processed silently and went undetected without producing any warnings. As a result, the resolv.conf file did not behave according to how it was configured. In Oracle Solaris 11, some basic error checking is performed through the use of SMF templates so that error conditions are properly reported. Note that other SMF services also all have some rudimentary error-checking capabilities. However, the resolv.conf error reporting is the most prominent, due to the absence of error reporting in libresolv2. See resolv.conf(4).
Reset the configuration properties of an SMF naming service back to the files only mode, as follows:
# /usr/sbin/nscfg unconfig name-service/switch # svcadm refresh name-service/switch
Note - Refresh the name-service switch SMF service for the changes to take affect.
The nscfg unconfig command resets the SMF configuration only. The sysconfig command executes the appropriate SMF services, as well as resets SMF and on disk legacy files and services to their original state.
The nscfg command transfers legacy file configuration for the name-service switch components into the SMF repository. The command imports the legacy file, converting and pushing the configuration to SMF. For example:
# /usr/sbin/nscfg import -f FMRI
The command that is used in the following example is the simplest way to populate the DNS configuration with information from the resolv.conf file. In this example, the nscfg command reads the information in the /etc/resolv.conf file, converts it, then stores the information in the svc:/network/dns/client SMF service.
# /usr/sbin/nscfg import -f dns/client
If your system is running in files only mode, and no naming services have been configured or enabled, use the nscfg command to manually configure the system, as shown here:
# vi /etc/resolv.conf # /usr/sbin/nscfg import -f dns/client # cp /etc/nsswitch.dns /etc/nsswitch.conf # /usr/sbin/nscfg import -f name-service/switch # svcadm enable dns/client # svcadm refresh name-service/switch
For more information, see nscfg(1M).
When you change a system's naming service, you need to modify the name service switch information accordingly.
# nscfg import -f svc:/system/name-service/switch:default
# svcadm refresh name-service/switch
The easiest way to set up LDAP is to enable the DefaultFixed NCP and perform fixed network configuration. Then, if you want to use an LDAP proxy or LDAP self modes and some form of security credentials, run the ldapclient command to complete the LDAP setup. See ldapclient(1M).