In addition to performing basic datalink configuration, you can also use the dladm command to set datalink properties and customize them according to the requirements of your network.
The following three dladm subcommands are used to administer datalink properties:
Displays the properties of a datalink and its current values. If you do not use the –p property option, then all of the properties of the datalink are displayed. If you do not specify a datalink, then all of the properties of all of the datalinks are displayed.
Assigns a value to a datalink's property.
Resets a specific property of a datalink to its default value.
Datalink properties that you can customize depend on the properties a specific NIC driver supports.
Datalink properties that are configurable by using the dladm command fall into one of two categories:
Public properties – These properties can be applied to any driver of the given media type such as link speed, auto-negotiation for Ethernet, or the maximum transmission unit (MTU) size that can be applied to all datalink drivers.
Private properties – These properties are particular to a certain subset of NIC drivers for a given media type. These properties can be specific to that subset because they are closely related either to the hardware that is associated with the driver or to the details of the driver implementation itself, such as debugging-related tunables.
Link properties typically have default values. However, certain networking scenarios might require that you to change specific property values. For example, a NIC might be communicating with an old switch that does not properly perform auto-negotiation. Or, a switch might have been configured to support Jumbo frames. Or, driver specific properties that regulate packet transmission or packet reception might need to be modified for the specific driver.
MTU defines the size of the largest packet that a protocol can transmit from the system. By default, most NIC drivers define the MTU size to 1500. However, if Jumbo frames are traversing the network, the default value is insufficient. Support for Jumbo frames requires the MTU size to be at least 9000.
Change the default value of the MTU size as follows:
# dladm set-linkprop -p mtu=new-size datalink
After changing the MTU size, you can reconfigure an IP interface over the datalink.
The following example shows how to enable support for Jumbo frames. This example assumes that you have already removed any existing IP interface configuration over the datalink.
# dladm show-linkprop -p mtu net1 LINK PROPERTY PERM VALUE EFFECTIVE DEFAULT POSSIBLE net1 mtu rw 1500 1500 1500 1500 # dladm set-linkprop -p mtu=9000 net1 # dladm show-link net1 LINK CLASS MTU STATE BRIDGE OVER web1 phys 9000 up -- --
Most network setups consist of a combination of systems that have varying speed capabilities. Each system advertises speed capabilities to other systems on the network that informs how each system transmits and receives network traffic.
The following paired datalink properties regulate the speed capabilities that are advertised by a system:
Each link speed capability is referred to by a pair of properties: the advertised speed (adv_*_cap) and the enabled advertised speed (en_*_cap). Further, datalink speed information is also provided for both full-duplex and half-duplex capabilities, as designated by *fdx* and *hdx* in the property names. The advertised speed property is a read-only property that indicates whether the specific datalink speed is advertised. You determine whether a specific datalink speed is advertised by setting the corresponding en_*_cap property.
By default, all of the speed and duplex capabilities of a datalink are advertised. However, cases might exist where a new system is communicating with an older system and auto-negotiation is disabled or unsupported. To enable communication between these two systems, the advertised speed between an older system and a newer system might need to be changed to a lower value. The Gigabit capabilities of the system might need to be switched off and only the slower speed capabilities are advertised. In this case, you would type the following command to switch off the advertisement of the Gigabit capabilities for both the full-duplex capability and the half-duplex capability:
# dladm set-linkprop -p en_1000fdx_cap=0 datalink # dladm set-linkprop -p en_1000hdx_cap=0 datalink
To display the new values of these properties, use the dladm show-linkprop command as follows:
# dladm show-linkprop -p adv_10gfdx_cap datalink # dladm show-linkprop -p adv_1000hdx_cap datalink
Normally, the values of a given enabled speed property and the corresponding advertised property are identical. However, if a NIC supports some advanced features such as Power Management, those features might set limits on the bits that are actually advertised between the host and its link partner. For example, with Power Management, the settings of the adv_*_cap properties might only be a subset of the settings of the en_*_cap properties.
You can set up to eight STREAMS modules to be pushed onto the stream when the datalink is opened. These modules are typically used by third-party networking software such as virtual private networks (VPNs) and firewalls. Documentation about such networking software is provided by the software vendor.
There is a separate autopush command that you can use to push modules onto the datalink's stream on a per-driver basis. This command uses a configuration file that is set up for each driver and which informs the command the modules to push. However, the driver is always bound to the NIC. If the datalink's underlying NIC is removed, then the link's autopush property information is lost as well.
Therefore, using the dladm command for this purpose is more preferable than using the autopush command. If both per-driver and per-link types of autopush configuration exist for a specific datalink, the per-link information that is set with the dladm set-linkprop command is used, and the per-driver information is ignored.
To push modules to the STREAMS when the datalink is opened, use the same dladm set-linkprop command to specify modules for the autopush property. For example, you would push the vpnmod and bufmod modules on top of the link net0 as follows:
# dladm set-linkprop -p autopush=vpnmod.bufmod net0
To obtain information about datalink properties, you can use either of the following commands:
dladm show-linkprop –p property datalink
dladm show-ether datalink
To display a complete list of datalink properties, type the command without specifying a property, as shown in the following example:
# dladm show-linkprop net1 LINK PROPERTY PERM VALUE EFFECTIVE DEFAULT POSSIBLE net1 speed r- 0 0 0 -- net1 autopush rw -- -- -- -- net1 zone rw -- -- -- -- net1 duplex r- unknown unknown unknown half,full net1 state r- up up up up,down net1 adv_autoneg_cap -- -- -- 0 1,0 net1 mtu rw 1500 1500 1500 1500 net1 flowctrl -- -- -- no no,tx,rx,bi, pfc,auto net1 adv_10gfdx_cap r- -- -- 0 1,0 net1 en_10gfdx_cap -- -- -- 0 1,0 net1 adv_1000fdx_cap r- -- -- 0 1,0 net1 en_1000fdx_cap -- -- -- 0 1,0 net1 adv_1000hdx_cap r- -- -- 0 1,0 net1 en_1000hdx_cap -- -- -- 0 1,0 net1 adv_100fdx_cap r- -- -- 0 1,0 net1 en_100fdx_cap -- -- -- 0 1,0 net1 adv_100hdx_cap r- -- -- 0 1,0 net1 en_100hdx_cap -- -- -- 0 1,0 net1 adv_10fdx_cap r- -- -- 0 1,0 net1 en_10fdx_cap -- -- -- 0 1,0 net1 adv_10hdx_cap r- -- -- 0 1,0 net1 en_10hdx_cap -- -- -- 0 1,0 net1 maxbw rw -- -- -- -- net1 cpus rw -- -- -- --
If you do not specify any options with the dladm show-ether command, only the current Ethernet property values for the datalink are displayed. To obtain information beyond what is provided by default, use the –x option, as shown in the following example:
# dladm show-ether -x net1 LINK PTYPE STATE AUTO SPEED-DUPLEX PAUSE net1 current up yes 1G-f both -- capable -- yes 1G-fh,100M-fh,10M-fh both -- adv -- yes 100M-fh,10M-fh both -- peeradv -- yes 100M-f,10M-f both
With the –x option, the command also displays the built-in capabilities of the specified link, as well as the capabilities that are currently advertised between the host and the link partner.
The following information is displayed in this example:
For the Ethernet device's current state, the link is up and functioning at 1 Gigabits per second at full duplex. Its auto-negotiation capability is enabled and has bidirectional flow control, in which both the host and link partner can send and receive pause frames. This information is displayed in the first row of the output.
Subsequent rows of the example's output display information about datalink speed capabilities, actual datalink speeds that are advertised, as well as information from the peer system as follows:
The capabilities of the Ethernet device are listed. The negotiation type can be set to automatic. In addition, the device can support speeds of 1 Gigabits per second, 100 megabits per second, and 10 megabits per second, at both full and half duplex. Likewise, pause frames can be received or sent in both directions between host and link partner.
The capabilities of net1 are advertised as follows: autonegotiation, speed-duplex, and flow control of pause frames.
Similarly, net1's link or peer partner advertises the following capabilities: autonegotiation, speed-duplex, and flow control of pause frames.