|Skip Navigation Links|
|Exit Print View|
|Oracle Solaris Administration: Network Interfaces and Network Virtualization Oracle Solaris 11 Information Library|
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, and is composed of the driver name and the device instance number. The instance number can have a value from zero to n, 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, datalinks on top of these devices are not similarly bound and can be given meaningful names. For example, the administrator can assign the datalink on top of device instance e1000g0 the name itops0. In this Oracle Solaris release, datalinks by default are provided with generic names. To display the mapping between the datalinks with their generic names and the corresponding device instances, you use the dladm sho-phys subcommand.
When you install this Oracle Solaris release on a system for the first time, Oracle Solaris automatically provides generic link names for all the system's physical network devices. This name assignment uses the net# naming convention, where the # 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 becomes easier. The network configuration that is set 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 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 have been renamed by the OS after it is installed.
In Oracle Solaris, generic names are automatically assigned to 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:
IP over IB (Infiniband devices)
Ethernet over IB
After devices are grouped and sorted according to media types, these devices are further ordered based on their physical locations, where onboard 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 ioboard, hostbridge, PCIe rootcomplex, 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 tearing down existing configurations.
To disable automatic link naming, or to customize the prefix of link names, set the following property in the System Configuration manifests that are used by the Automated Install (AI) program.
<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 emphasis.
To disable automatic naming, remove any value that is set for phys-prefix. If you disable automatic naming, then datalink names will be based on their associated hardware drivers, such as bge0, e1000g0, and so on.
To use a different 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 will be ignored. The datalinks will be 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.
In systems where this Oracle Solaris release is freshly installed, datalinks are automatically named net0 through netN-1, where N represents the total number of network devices.
The case is not true if you upgrade from Oracle Solaris 11 Express. On such upgraded systems, the datalinks retain their names prior to the upgrade. These names would 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 neutral names. This behavior for upgraded systems ensures that no neutral names that are assigned by the OS become mixed with other hardware-based names or customize names assigned by the administrator before the upgrade.
In any system with this Oracle Solaris release, 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, if you select 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 of the links, confusion might arise in later situations where 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.
While replacing hardware-based link names is recommended, you must still plan carefully before you rename links. Changing the 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 export network configuration to another system easily. If the target system's network devices are named with generic names such as net0, net1, and others, 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
Note - No changes are required in the autopush configuration when you rename links. However, you must be aware of how the configuration would work with the per-link autopush property after the link has been renamed. For more information, see How to Set STREAMS Modules on Datalinks.
When you assign link names, observe the following rules:
Link names consist of a string and a physical point of attachment (PPA) number.
The name must abide by the following constraints:
Names 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.