Skip Navigation Links | |
Exit Print View | |
Oracle Solaris Administration: Network Interfaces and Network Virtualization Oracle Solaris 11 Information Library |
1. Overview of the Networking Stack
Network Configuration in This Oracle Solaris Release
The Network Stack in Oracle Solaris
Network Devices and Datalink Names
Administration of Other Link Types
3. NWAM Configuration and Administration (Overview)
4. NWAM Profile Configuration (Tasks)
5. NWAM Profile Administration (Tasks)
6. About the NWAM Graphical User Interface
Part II Datalink and Interface Configuration
7. Using Datalink and Interface Configuration Commands on Profiles
8. Datalink Configuration and Administration
Configuration of Datalinks (Tasks)
How to Display Information About Physical Attributes of Datalinks
Overview of Datalink Properties
Setting Datalink Properties With the dladm Command
How to Enable Support for Jumbo Frames
How to Change Link Speed Parameters
How to Obtain Status Information About Datalink Properties
How to Set the e1000g Driver to Use Direct Memory Access Binding
How to Manually Set the Interrupt Rate
Additional Configuration Tasks on Datalinks
How to Replace a Network Interface Card With Dynamic Reconfiguration
Configuring STREAMS Modules on Datalinks
How to Set STREAMS Modules on Datalinks
How to Obtain autopush Link Property Settings
How to Remove autopush Link Property Settings
9. Configuring an IP Interface
10. Configuring Wireless Interface Communications on Oracle Solaris
12. Administering Link Aggregations
16. Exchanging Network Connectivity Information With LLDP
Part III Network Virtualization and Resource Management
17. Introducing Network Virtualization and Resource Control (Overview)
18. Planning for Network Virtualization and Resource Control
19. Configuring Virtual Networks (Tasks)
20. Using Link Protection in Virtualized Environments
21. Managing Network Resources
After the full implementation of the GLDv3 driver configuration framework, the dladm command has acquired expanded capabilities over time. The framework enhances configuration of NIC drivers as follows:
Only a single command interface, the dladm command, is needed to configure network driver properties.
A uniform syntax is used regardless of the properties: dladm subcommand properties datalink.
Use of the dladm command applies to both public and private properties of the driver.
Using the dladm command on a specific driver does not disrupt network connections of other NICs of similar types. Thus, you can configure datalink properties dynamically.
Datalink configuration settings are stored in a dladm repository and persist even after you reboot the system.
To avail of the advantages previously listed when you configure datalinks, you should use dladm as the configuration tool instead of the customary tools in previous releases, such as the ndd command.
To administer datalinks, you use the following dladm subcommands:
dladm rename-link changes the name of a datalink.
dladm show-link displays existing datalinks in the system.
dladm show-phys displays physical attributes of datalinks.
dladm delete-phys deletes a datalink.
dladm show-linkprop displays the properties that are associated with the datalink.
dladm set-linkprop sets specified datalink properties.
dladm reset-linkprop restores properties to their default settings.
dladm show-ether displays Ethernet parameter settings of a datalink.
The dladm command is also used to perform other types of link administration, such as the following:
Configuring bridges. See Chapter 11, Administering Bridges
Configuring link aggregations. See Chapter 12, Administering Link Aggregations
Configuring VLANs. See Chapter 13, Administering VLANs
Configuring tunnels. See Chapter 6, Configuring IP Tunnels, in Oracle Solaris Administration: IP Services.
For more information about the commands, see the dladm(1M) man page.
The following procedures show how to use the dladm command to configure datalinks. In most cases, datalink configuration is a part of the configuration of an IP interface over that link. Thus, where applicable, the procedures include IP interface configuration steps with the ipadm command. However, IP interface configuration and the ipadm command are discussed in further detail in Chapter 9, Configuring an IP Interface.
Use this procedure if you want to change a datalink name to a customized name. For example, some of the datalinks in upgraded system might have retained legacy hardware-based names and you want to change these names to generic ones.
Before You Begin
Make sure that you have studied and prepared for other steps you need to perform on associated configurations that might be affected by the change of link names. For more information, see Link Names in Upgraded Systems.
For more information, see How to Obtain Administrative Rights in Oracle Solaris Administration: Security Services.
# ipadm delete-ip interface
# dladm rename-link old-linkname new-linkname
Refers to the current name of the datalink. By default, the link name is hardware-based, such as bge0.
Refers to any name that you want to assign to the datalink. For rules for assigning link names, refer to Rules for Valid Link Names. See also Link Names in Upgraded Systems for further information about renaming datalinks.
If you do not want the new link name to persist across a system reboot, then use the -t option immediately after the subcommand. The option renames a link temporarily. The original link name reverts when the system is rebooted.
Note - You can use dladm rename-link to transfer link configurations from one datalink to another. For an example, see How to Replace a Network Interface Card With Dynamic Reconfiguration. When you rename a link for this purpose, make sure that the link that is inheriting the configuration does not have any prior existing configurations. Otherwise, the transfer fails.
Example 8-1 Changing the System's Primary Network Interface
The following example shows how you can switch the primary network interface on your system to a second NIC by renaming datalinks. The system's primary network interface is net0, the generic name of the datalink on e1000g0. This primary network interface will be switched from using e1000g0 as the underlying interface to nge0. You can use this example as part of the procedure to create a new boot environment.
# dladm show-phys LINK MEDIA STATE SPEED DUPLEX DEVICE net0 Ethernet up 1000 full e1000g0 net1 Ethernet up 1000 full nge0 # dladm rename-link net0 oldnet0 # dladm rename-link net1 net0 # dladm show-phys LINK MEDIA STATE SPEED DUPLEX DEVICE oldnet0 Ethernet up 1000 full e1000g0 net0 Ethernet up 1000 full nge0
This procedure lists the steps to display information about the physical attributes of a system's datalinks.
For more information, see How to Obtain Administrative Rights in Oracle Solaris Administration: Security Services.
# dladm show-phys
You can use the -P with this command to also display flag status of each link. A datalink becomes unavailable if its associated hardware has been removed. Without the -P option, the command displays only available datalinks.
To view the /devices path of the datalinks, use the -v option.
Example 8-2 Displaying Available Datalinks
In the following example, the -P option includes the FLAGS column where unavailable links are indicated. The r flag for the datalink net0 indicates the hardware that is associated with the link (nge) has been removed.
# dladm show-phys LINK MEDIA STATE SPEED DUPLEX DEVICE net0 Ethernet up 100Mb full e1000g0 net1 Infiniband down 0Mb -- ibd0 net3 Ethernet up 100Mb full bge0 net4 Ethernet -- 0Mb -- nge0
The following example shows the links and their physical locations that are displayed when you use the -L option.
# 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
This procedure displays the status of available links.
For more information, see How to Obtain Administrative Rights in Oracle Solaris Administration: Security Services.
# dladm show-link
Example 8-3 Displaying Available Links
The following example shows persistent and available links on the system.
# dladm show-link -P LINK CLASS BRIDGE OVER net0 phys -- -- net1 phys -- -- net2 phys -- --
The -P option also displays any existing persistent but unavailable links. A persistent link becomes unavailable if the link is temporarily deleted. A link also becomes unavailable if the associated hardware has been removed.
This procedure deletes link configurations that are associated with NICs. If you detach a NIC without intending to replace it, then you can delete the link configuration that is associated with that NIC. After you complete this procedure, the link name can be reused.
For more information, see How to Obtain Administrative Rights in Oracle Solaris Administration: Security Services.
To include information about removed hardware, use the -P option.
# dladm show-phys
# dladm delete-phys link
Example 8-4 Deleting a Datalink
In the following example, the r flag for net2 indicates that the link's associated hardware (e1000g0) has been removed. Therefore, you can also remove the link net2 and then reassign the name to a new datalink.
# dladm show-phys -P LINK DEVICE MEDIA FLAGS net0 nge0 Ethernet ----- net1 bge0 Ethernet ----- net2 e1000g0 Ethernet r---- # dladm delete-phys net2