Go to main content

Configuring and Managing Network Components in Oracle® Solaris 11.4

Exit Print View

Updated: February 2022
 
 

Administering Datalink Properties

The dladm command is the main command for administering datalinks and their properties.

Displaying General Information About Datalinks

When used without any options, the dladm command displays general information about the system's different classes of datalinks. In the following example, aside from physical links, link aggregation (aggr0) information is also listed, including its underlying physical links.

$ dladm
LINK        CLASS     MTU     STATE     OVER
net0        phys      1500    unknown   --
net1        phys      1500    up        --
net2        phys      1500    unknown   --
net3        phys      1500    unknown   --
net4        phys      1500    up        --
aggr0       aggr      1500    up        net1,net4

See Managing Network Datalinks in Oracle Solaris 11.4 and Managing Network Virtualization and Network Resources in Oracle Solaris 11.4 for further details.

Displaying a System's Datalinks

You use the dladm show-link command to display both the physical and virtual datalinks on a system. A system has as many datalinks as there are installed NICs. You can use various options with this command to customize the information that is displayed.

When used with no additional options or arguments, the dladm show-link command displays the following information:

$ dladm show-link
LINK                CLASS     MTU    STATE    OVER
net1                phys      1500   down     --
net3                phys      1500   unknown  --
net0                phys      1500   up       --
net2                phys      1500   unknown  --
net11               phys      1500   up       --
net5                phys      1500   up       --
net6                phys      1500   up       --

Under the STATE column, a datalink's status can be up, down, or unknown.

Use the –P option to display persistent configuration information about datalinks. Based on the information that is provided by this command, you can proceed with further network configuration. For example, you can determine the number of NICs on the system, and you can select which datalink to use, over which you can configure IP interfaces. The information that is displayed is similar to the following:

$ dladm show-link -P
LINK        CLASS     OVER
net0        phys      --
net1        phys      --
net2        phys      --

Displaying the Physical Attributes of Datalinks

Use the dladm show-phys command to obtain information about the system's datalinks in relation to the physical NICs with which they are associated. Used without any options, the command displays the following information:

$ dladm show-phys
LINK        MEDIA          STATE     SPEED     DUPLEX     DEVICE
net0        Ethernet       up        100Mb     full       e1000g0
net1        Ethernet       down      0Mb       --         nge0
net2        Ethernet       up        100Mb     full       bge0
net3        InfiniBand     --        0Mb       --         ibd0

    The previous output displays the following information:

  • The corresponding physical NIC of each datalink. For example, net0 is the datalink name of the NIC e1000g0.

  • The state of each physical link state helps you identify whether the physical device has connectivity with the external network, if the cable is plugged in and the state of the port on the other end of the cable is up.

The –L option displays the physical location for each datalink. A datalink's instance number corresponds to its location.

$ dladm show-phys -L
LINK     DEVICE     LOCATION
net0     bge0       MB
net2     ibp0       MB/RISER0/PCIE0/PORT1
net3     ibp1       MB/RISER0/PCIE0/PORT2
net4     eoib2      MB/RISER0/PCIE0/PORT1/cloud-nm2gw-2/1A-ETH-2

Use the –m option to display the MAC addresses of the physical links in a system:

$ dladm show-phys -m
LINK                SLOT     ADDRESS            INUSE CLIENT
net0                primary  0:11:22:a9:ee:66   yes   net0

This command is similar to using the ifconfig command in previous releases.

Display the MAC addresses of the physical and non-physical links in a system as follows:

$ dladm show-linkprop -p mac-address
LINK     PROPERTY        PERM VALUE        EFFECTIVE    DEFAULT   POSSIBLE
net0     mac-address     rw   0:11:22:a9:ee:66 0:11:22:a9:ee:66 0:11:22:a9:ee:66
--

Deleting a Datalink

Use the dladm delete-phys command to remove a datalink from the system.

Deleting a datalink is only loosely connected to the removal of a physical NIC. For example, if a physical NIC is removed from the system, the datalink configuration that is associated with that NIC remains because the software layer is not bound to the hardware layer. Thus you can still use the datalink configuration on a different underlying physical NIC by assigning the same name to the other NIC's associated link.

If you detach a NIC without replacing it, and you no longer need its datalink configuration, then you can delete the datalink by running the following command:

$ dladm delete-phys datalink

Tip  - To confirm whether a datalink's NIC had been removed, use the dladm show-phys –P command. The output provides this information under the FLAGS column, where the r flag indicates whether the physical device that is associated with a physical link has been removed.

Obtaining Runtime Statistics for Datalinks

Use the dlstat command to obtain runtime datalink statistics for all types of datalinks. When used with no additional options, the dlstat displays statistical information about all of the datalinks that are on the system, as shown in the following output:

$ dlstat
LINK    IPKTS   RBYTES    OPKTS   OBYTES
net0   58.00K    9.52M    5.61K    1.91M

See Chapter 8, Monitoring Network Traffic and Resource Usage in Managing Network Virtualization and Network Resources in Oracle Solaris 11.4 and the dlstat(8) man page.