Go to main content

Transitioning From Oracle® Solaris 10 to Oracle Solaris 11.3

Exit Print View

Updated: December 2018
 
 

Configuring the Network in Oracle Solaris 11

Refer to the following information when transitioning from the network configuration model that is used in Oracle Solaris 10 the model that is used in Oracle Solaris 11.

How the Network Is Configured During an Installation

    During an installation, the network is configured as follows:

  • For a GUI installation, the system-generated Automatic profile is activated on the system and the network is automatically configured, based on the current network conditions.

  • For a text installation, you must choose one of the following: Automatic, Manual, or None.

    • If you choose Automatic, the Automatic profile is activated on the system and the network is automatically configured upon reboot. See Managing Network Configuration in Reactive Mode.

    • If you choose Manual, the system's only fixed profile (DefaultFixed) is activated, and you are presented with a series of installation screens that enable you to manually configure network settings.

    • If you choose None, the DefaultFixed is activated on the system, but you do not provide network parameters during the installation. Thus, after a reboot, no network interface is plumbed or configured. Only the loopback IPv4 and IPv6 interfaces (lo0) are activated. You can create persistent network configuration after the installation. See Network Administration Task Comparison.

  • For an installation with AI, the network is configured according to the profile that you set up before the installation. If you did not specify any network settings prior to installing Oracle Solaris, the interactive sysconfig tool runs during the installation, enabling you to set network parameters for the system at that time. See Installing Oracle Solaris 11.3 Systems.

    The svc:/network/install:default SMF service has two property group types: ipv4_interface and ipv6_interface that enable you to configure multiple network interfaces during an installation with AI. You can create SC profiles that contain property groups with the type ipv4_interface and, or ipv6_interface. The existing install_ipv4_interface and install_ipv6_interface property groups for this service continue to be supported in this release. See Installing Oracle Solaris 11.3 Systems.

Because the commands that you use to manage network configuration depend on which network mode your system defaults to after an installation, make sure you know which network profile is currently active on your system by using the netadm list command prior to configuring the network. See Enabling and Disabling Profiles in Configuring and Managing Network Components in Oracle Solaris 11.3.

Network Administration Task Comparison

The following table compares Oracle Solaris 10 network administration tasks to Oracle Solaris 11 network administration tasks. For more information, see the dladm(1M) and ipadm(1M) man pages.

Table 10  Comparing Oracle Solaris 10 Network Administration With Oracle Solaris 11 Network Administration
Task Information
Oracle Solaris 10 Command or Method
Oracle Solaris 11 Command or Method
Datalink configuration
dladm
dladm
IP interface and IP address configuration
ifconfig
Edit /etc/hostname*
ipadm
DHCP server configuration
SMF service: svc:/network/dhcp-server: and default DHCP management commands: dhcpmgr, dhtadm, and pntadm
(Sun Legacy) SMF service: svc:/network/dhcp-server: SMF service and default DHCP management commands: dhcpmgr, dhtadm, and pntadm
(ISC) SMF services: svc:/network/dhcp/server:ipv4 svc:/network/dhcp/server:ipv6 svc:/network/dhcp/relay:ipv4 svc:/network/dhcp/relay:ipv6
Configuration files: /etc/inet/dhcpd4.conf /etc/inet/dhcpd6.conf
DHCP client configuration
ifconfig
Edit /etc/dhcp* and /etc/default/dhcpagent
ipadm
Edit /etc/default/dhcpagent
Name services switch configuration
SMF service: svc:/system/name-service/switch:default and /etc/nsswitch.conf
SMF service: svc:/system/name-service/switch:default. Modify with svccfg; view with svcprop -p config svc:/system/name-service/switch:default
System host name configuration
Edit /etc/nodename
hostname
TCP/IP host name configuration
Edit /etc/inet/hosts .
Edit /etc/inet/hosts
Network parameter administration (tunables)
ndd
ipadm
Wireless network configuration
wificonfig
dladm

Administering Datalink Configuration

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 assign different datalink names. See Chapter 2, Administering Datalink Configuration in Oracle Solaris in Configuring and Managing Network Components in Oracle Solaris 11.3.


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

Based on the criteria, Ethernet devices on a lower motherboard or IO board, host bridge, PCIe root complex, bus, device, and function are ranked ahead of the other devices. You can display the correspondence between link names, devices, and locations as follows:

# dladm show-phys -L
LINK         DEVICE        LOCATION
net0         e1000g0       MB
net1         e1000g1       MB
net2         e1000g2       MB
net3         e1000g3       MB
net4         ibp0          MB/RISER0/PCIE0/PORT1
net5         ibp1          MB/RISER0/PCIE0/PORT2
net6         eoib2         MB/RISER0/PCIE0/PORT1/cloud-nm2gw-2/1A-ETH-2
net7         eoib4         MB/RISER0/PCIE0/PORT2/cloud-nm2gw-2/1A-ETH-2

In Oracle Solaris 10, you can use the /etc/path_to_inst file 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.

See Chapter 2, Administering Datalink Configuration in Oracle Solaris in Configuring and Managing Network Components in Oracle Solaris 11.3.

Configuring IP Interfaces and Addresses

You use the ipadm command to configure IP interfaces and addresses in Oracle Solaris 11. For example, a static IPv4 interface is configured as follows:

# ipadm create-ip net0
# ipadm create-addr -T static -a local=203.0.113.7/24 net0
net0/v4

You can use the –T option to specify three address types: static, dhcp, and addrconf (for auto-configured IPv6 addresses). In the previous 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, as shown in the following example:

# ipadm delete-addr net0/v4
# ipadm create-addr -T static -a local=203.0.113.7/24 net0
net0/v4

See Chapter 3, Configuring and Administering IP Interfaces and Addresses in Oracle Solaris in Configuring and Managing Network Components in Oracle Solaris 11.3 and ipadm(1M).

Configuring Persistent Routes

Because the /etc/defaultrouter file is deprecated in Oracle Solaris 11, you can no longer manage routes (default or otherwise) by using this file. Using the route command is the only way that you can manually add a route to a system. To make the changes persist across reboots, use the –p option with the route command.

# route -p add default ip-address

For example, you would add a route to network 203.0.113.0, which has its gateway as the border router, as follows:

# route -p add -net 203.0.113.0/24 -gateway 203.0.113.150
add net 203.0.113.0: gateway 203.0.113.150

View routes that were created by the using the previous command as follows:

# route -p show

Also, note that after an installation, you can no longer determine a system's default route by checking the /etc/defaultrouter file. To display the currently active routes on a system, use the netstat command with the following options:

# netstat -rn

See the netstat(1M) and route(1M) man pages.

For instructions, see Creating Persistent (Static) Routes in Configuring and Managing Network Components in Oracle Solaris 11.3.

Configuring Naming and Directory Services

In this release, the SMF repository is the primary repository for all naming services configuration. The previous behavior of modifying a particular file to manage naming services configuration no longer applies. For information about the naming services that have migrated to SMF, see Figure 12, Table 12, SMF Service to Legacy File Mapping.

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. If necessary, you can use the nscfg command to import or export legacy name service configuration files into or out of the SMF repository. When a valid SMF configuration and corresponding Fault Management Resource Identifier (FMRI) is supplied, the nscfg command regenerates legacy naming service configuration files, for example, nsswitch.conf, resolv.conf, nscd.conf, into their legacy locations. See Importing Naming Services Configuration in Configuring and Managing Network Components in Oracle Solaris 11.3 and nscfg(1M).


Note -  The persistent configuration of naming services through SMF applies to the fixed network configuration mode only and only when the DefaultFixed profile is active on the system. If you are using the reactive mode and the Automatic or another reactive profile is active on the system, you configure naming services in a Location profile by using the netcfg command and not through SMF. See Creating Locations in Configuring and Managing Network Components in Oracle Solaris 11.3.

The following example shows how you would configure the Domain Name Service (DNS) by using the svccfg command. After you set the various properties, you must enable and refresh the SMF service.

# svccfg -s dns/client setprop config/nameserver=net_address: 192.0.2.1
# svccfg -s dns/client setprop config/domain = astring: "foohost.org"
# svccfg -s name-service/switch setprop config/host = astring: "files dns"
# svcadm refresh name-service/switch
# svcadm refresh dns/client

You can also configure naming and directory SMF service properties interactively. See Configuring a DNS Client in Configuring and Managing Network Components in Oracle Solaris 11.3.

See Chapter 4, Administering Naming and Directory Services on an Oracle Solaris Client in Configuring and Managing Network Components in Oracle Solaris 11.3.

Administering DHCP

Setting a System's Host Name

The primary interface's TCP/IP host name is a distinct entity from the system host name that you set with the hostname command. Although not required by Oracle Solaris, the same name is normally used for both. Some network applications depend on this convention.

Permanently set a system's host name as follows:

# hostname name-of-host

Initially, the hostname value is stored in config/nodename, but this value is overridden if the system is configured by DHCP, in which case, DHCP provides the hostname value. If you use the hostname command, then the hostname is the value that is specified in the config/nodename file. If you set a system's identity by using the hostname command, this setting cannot be overridden by DHCP until you execute the hostname command with the –D option. The corresponding SMF properties and the associated SMF service are also automatically updated when you use the hostname command. See the hostname(1) man page.

Managing Network Configuration in Reactive Mode

When you are using the reactive network configuration mode, the system handles network connectivity and network configuration based on the current network conditions. The reactive mode uses different profiles to specify the various parameters that define a system's network configuration. These profiles are automatically enabled on the system in response to changes in network conditions. Or, you can manually enable profiles on a system, as needed.

Reactive network configuration is most suitable for notebook PCs and in situations where cables are regularly plugged or unplugged, cards are added or removed, etc. Assuming your site has a DHCP server that can provide IP addresses and name service information, reactive network configuration provides out-of-box functionality for automatic network configuration of a system that does not require manual configuration. For a detailed overview of profile-based network configuration, see About Profile-Based Network Configuration in Configuring and Managing Network Components in Oracle Solaris 11.3.

For the reactive network configuration mode, you use the netcfg command to configure system-specific network configuration (datalinks and IP interfaces and addresses), as well as system-wide network configuration, for example, naming services. There is a second command, netadm, that you use to administering profiles on a system. These commands create network configuration that is applied to both the active and non-active profiles on the system.

For related tasks, see Chapter 6, Administering Profile-Based Network Configuration in Oracle Solaris in Configuring and Managing Network Components in Oracle Solaris 11.3.

You can also manage network configuration from the desktop by using the network administration GUI (formerly NWAM). This tool is similar to using the netcfg and netadm commands for managing reactive network configuration. In situations where network conditions change, you will want to activate the system-defined Automatic NCP or a user-defined reactive NCP. See Administering Network Configuration From the Desktop in Configuring and Managing Network Components in Oracle Solaris 11.3.