Skip Navigation Links | |
Exit Print View | |
Introduction to Oracle Solaris 11 Networking Oracle Solaris 11.1 Information Library |
1. Networking on Oracle Solaris 11 Systems
Network Configuration Profiles
Reactive Network Configuration
Network Stack in Oracle Solaris
Previous Oracle Solaris Releases
From an administrative perspective, administrators create IP interfaces on top of datalinks. The datalink represents a link object in the second layer of the Open Systems Interconnection (OSI) model. The physical link is directly associated with a device and possesses a device name. The device name is essentially the device instance name, which contains the driver name and the device instance number. The instance number can have a value from zero to n-1, depending on how many NICs use that driver on the system.
For example, consider a Gigabit Ethernet card, which is often used as the primary NIC on both host systems and server systems. Some typical driver names for this NIC are bge and e1000g. When used as the primary NIC, the Gigabit Ethernet interface has a device name such as bge0 or e1000g0. Other driver names are nge, nxge, and so on.
In this Oracle Solaris release, the device instance name continues to depend on the underlying hardware. However, as a consequence of the separation between hardware and software layers, datalinks on top of these devices are not similarly bound. Thus these datalinks can be given names other than the device names on which they are configured.
In Oracle Solaris 11, datalinks are automatically provided with generic names by default. This name assignment uses the net# naming convention, where # is the instance number. This instance number increments for each device, for example, net0, net1, net2, and so on.
Generic or flexible link names provide advantages in network configuration, as shown in the following examples:
Within a single system, dynamic reconfiguration (DR) becomes easier. The network configuration for a given NIC can be inherited by a different NIC replacement.
Zone migration becomes less complicated with regards to network setup. The zone in the migrated system preserves its network configuration if the destination system's link shares the same name with the link that has been assigned to the zone prior to migration. Thus, no additional network configuration on the zone is required after the migration.
The generic naming scheme helps with the network configuration that is specified in the System Configuration (SC) manifest. The primary network datalink is generally named net0 for all systems. Thus, a generic SC manifest can be used for multiple systems that specify a configuration for net0.
Datalink administration also becomes flexible. You can further customize the name of datalinks, for example, to reflect a specific function that the datalink serves, as shown in Figure 1-2.
The following table illustrates the new correspondence between the hardware (NIC), the device instance, the link name, and the interface over the link. The names of the datalinks are automatically provided by the OS.
|
As the table indicates, while the device instance name remains hardware-based, the datalinks are renamed by the OS after it is installed.
To display the mapping between the datalinks with their generic names and the corresponding device instances, you use the dladm show-phys subcommand. For example:
# dladm show-phys LINK MEDIA STATE SPEED DUPLEX DEVICE net2 Ethernet up 1000 full bge2 net0 Ethernet up 1000 full e1000g0 net3 Ethernet up 1000 full nge3 net1 Ethernet up 1000 full e1000g1
In Oracle Solaris, the OS provides the generic names for all the datalinks based on specific criteria. All devices share the same prefix net. However, the instance numbers are assigned based on the following:
Physical network devices are ordered according to media type, where certain types have priority over others. The media types are ordered in descending priority as follows:
Ethernet
IP over IB (Infiniband devices)
Ethernet over IB
WiFi
After devices are grouped and sorted according to media types, these devices are further ordered based on their physical locations, where on-board devices are favored over peripheral devices.
Devices that have higher priority based on their media type and location are assigned lower instance numbers.
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.
To display the correspondences of link names, devices, and locations, use the dladm show-phys command, 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
Oracle Solaris uses the prefix net when assigning link names. However, any custom prefix can be used instead, such as eth. If you prefer, you can also disable the automatic assignment of neutral link names.
Caution - You must customize how generic link names are automatically assigned before you install Oracle Solaris. After installation, you cannot customize the default link names without removing existing configurations. |
To disable automatic link naming, or to customize the prefix of link names, set the following property in the System Configuration (SC) manifests. The SC manifests are used by the Automated Installer (AI) feature of Oracle Solaris.
<service name="network/datalink-management" version="1" type="service"> <instance name="default enabled="true"> <property_group name='linkname-policy' type='application'> <propval name='phys-prefix' type='astring' value='net'/> </property_group> </instance> </service
By default, the value for phys-prefix is set to net, as shown in bold.
To disable automatic naming, remove any value that is set for phys-prefix. If you disable automatic naming, then datalink names are based on their associated hardware drivers, such as bge0, e1000g0, and so on.
To use a prefix other than net, specify a new prefix as the value of phys-prefix, such as eth.
If the value that is provided to phys-prefix is invalid, then that value is ignored. The datalinks are then named according to their associated hardware drivers, such as bge0, e1000g0, and so on. For rules about valid link names, see Rules for Valid Link Names.
On systems where the Oracle Solaris 11 release is freshly installed, datalinks are automatically named net0 through netN-1, where N represents the total number of network devices.
On the contrary, if you upgrade from Oracle Solaris 11 Express, the datalinks retain their names that were established prior to the upgrade. These names are either be the default hardware-based names or customized names that the administrator assigned to the datalinks before the upgrade. Further, on these upgraded systems, new network devices that are subsequently added also retain the default hardware-based names rather than receive generic names. This behavior for upgraded systems ensures that no generic names assigned by the OS become mixed with other hardware-based names or customized names assigned by the administrator before the upgrade.
On any system with Oracle Solaris 11, both hardware-based names as well as OS-supplied link names can be replaced by other names that you prefer to use. Typically, the default link names that are assigned by the OS suffice for creating the system's network configuration. However, to change link names, note the important considerations discussed in the following sections.
If your system's links have hardware-based names, rename these links with at least generic names. If you retain the hardware-based names, confusion might arise later when these physical devices are removed or replaced.
For example, you retain the link name bge0 that is associated with the device bge0. All link configurations are performed by referring to the link name. Later, you might replace the NIC bge with the NIC e1000g. To reapply the former device's link configuration to the new NIC e1000g0, you would need to reassign the link name bge0 to e1000g0. The combination of a hardware-based link name bge0 with a different associated NIC e1000g0 can cause confusion. By using names that are not hardware-based, you can better distinguish the links from the associated devices.
Although replacing hardware-based link names is a best practice, you must still plan carefully before you rename links. Changing a device's link name does not automatically propagate the new name to all existing associated configurations. The following examples illustrate the risks when you change link names:
Some rules in an IP Filter configuration apply to specific links. When you change a link's name, the filter rules continue to refer to the link's original name. Consequently, these rules no longer behave as expected after you rename the link. You need to adjust the filter rules to apply to the link by using the new link name.
Consider the possibility of exporting network configuration information. As previously explained, by using the default net# names provided by the OS, you can migrate zones and easily export network configuration to another system. If the target system's network devices are named with generic names such as net0, net1, and so on, then the zone simply inherits the network configuration of the datalink whose name matches the datalink assigned to the zone.
Thus, as a general rule, do not rename datalinks randomly. When renaming datalinks, ensure that all of the link's associated configurations continue to apply after the link name is changed. Some of the configurations that might be affected by renaming links are as follows:
IP Filter rules
IP configurations that are specified in configuration files such as /etc/dhcp.*
Oracle Solaris 11 zones
autopush configuration
Note - No changes are required in the autopush configuration when you rename links. However, you must be aware of how the configuration works with the per-link autopush property after the link has been renamed. For more information, see Setting the STREAMS Module on Datalinks in Connecting Systems Using Fixed Network Configuration in Oracle Solaris 11.1 .
When you assign link names, observe the following rules:
Link names must consist of a string and a physical point of attachment (PPA) number.
The link name must abide by the following constraints:
Names ideally consist of between 3 to 8 characters. However, names can have a maximum of 16 characters.
Valid characters for names are alphanumeric (a–z, 0–9) and the underscore (_).
Caution - Do not use upper case letters on link names. |
Each datalink must have only one link name at one time.
Each datalink must have a unique link name within the system.
Note - As an added restriction, you cannot use lo0 as a flexible link name. This name is reserved to identify the IP loopback interface.
The function of the link within your network setup can be a useful reference when you assign link names. For example, netmgt0 can be a link that is dedicated to network management. Upstream2 can be the link that connects to the ISP. As a general rule to avoid confusion, do not assign names of known devices to your links.