Administrators create IP interfaces on top of datalinks. Each datalink represents a link object in the second layer of the Open Systems Interconnection (OSI) model. Datalinks can represent many different L2 entities such as physical network devices (termed physical links), aggregations of physical datalinks, virtual network interface cards (VNICs), etc.
Link names are either assigned when the associated link object is automatically created, or you can explicitly assign link names when you create the datalinks. Physical links (those that are associated with physical network devices) are created automatically when devices are added or when an Oracle Solaris system first boots after an installation. In this Oracle Solaris release, the naming of physical datalinks is no longer tied to the underlying hardware that is associated with the network device. By default, datalinks are assigned names that are prefixed by net and suffixed by a number that reflects the physical location of the datalink in the system. For example, the first onboard network device e1000g0 would be assigned the name net0, while the next e1000g1 device would be assigned the name net1, and so on. You can assign arbitrary names to datalinks that you explicitly create, for example, link aggregations. Also, you can explicitly rename the default-assigned netN name of a datalink, if desired.
Generic or flexible link names provide the following advantages for network configuration:
Within a single system, dynamic reconfiguration (DR) becomes easier. The network configuration for a given NIC can be inherited by a different NIC replacement.
The network setup for zones migration becomes less complicated. The zone in the migrated system preserves its network configuration if the destination system's link shares the same name with the link that is assigned to the zone prior to migration. Thus, no additional network configuration for the zone is required after the migration.
The generic naming convention makes network configuration that is specified in the System Configuration (SC) manifest used during an installation less complicated. Because the primary network datalink is generically named net0 for all systems, you can use a generic SC manifest for multiple systems that specify a configuration for net0.
Datalink administration also becomes flexible. You can further customize the names of datalinks, for example, to reflect a specific function that the datalink serves.
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 indicated in this table, while the device instance name remains hardware-based, the datalinks are renamed by the OS after the installation.
To display the mapping between datalinks, their generic names, and the corresponding device instances, use the dladm show-phys command as follows:
# 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
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
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 a priority based on their media type and location are assigned lower instance numbers.
On SPARC based systems, the netN names are assigned to match the netN device aliases that are used in the OpenBoot PROM (OBP). On x86 based systems, SMBIOS data (where available) is used to identify onboard Ethernet devices and assign them to net0, net1, and so on. In addition to (or absent from) these sources of information, devices on a lower motherboard or IO board, host bridge, PCIe root complex, bus, device, and function are ranked ahead of other devices and assigned lower net instances than those on higher motherboards, host bridges, etc.
Oracle Solaris also supports the generic naming of devices for iSCSI-booted systems. You can assign generic names to devices on Oracle Solaris systems that use an iSCSI target as a boot disk. Note that upgrading a system that previously used device-based naming does not automatically migrate existing devices to the generic naming convention. This behavior is intentional, as it prevents any existing configuration from becoming invalid.
To display the correspondences between link names, devices, and locations, use the dladm show-phys command with the –L option 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
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. |
Oracle Solaris uses the prefix net when assigning link names. However, you can use any custom prefix that you prefer, such as eth. You can also disable the automatic assignment of generic link names.
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 the phys-prefix property is set to net, as shown in bold in the previous output.
To disable automatic naming, set the value for the phys-prefix property to an empty string, for example:
<propval name='phys-prefix' type='astring' value=''/>
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 for the phys-prefix property 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 freshly installed systems, datalinks are automatically named net0 through netN-1, where N represents the total number of network devices.
On the contrary, if you upgrade from another Oracle Solaris 11 release, the datalinks retain their names that were established prior to the upgrade. These names are either 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.
You can replace both hardware-based names as well as OS-supplied link names with other names that you prefer to use. Typically, the default link names that OS assigns suffice for creating the system's network configuration. However, consider the following information before making changes to link names.
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 by using the ipadm command
Oracle Solaris 11 zones
autopush configuration
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 31 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.
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.