Contained WithinFind More DocumentationFeatured Support Resources | Download this book in PDF (9688 KB)
dladm(1M)Name | Synopsis | Description | Examples | Attributes | See Also | Notes Name
Synopsisdladm show-link [-P] [-s [-i interval]] [[-p] -o field[,...]] [link] dladm rename-link [-R root-dir] link new-link dladm delete-phys phys-link dladm show-phys [-P] [-m] [[-p] -o field[,...]] [-H] [phys-link]
dladm create-aggr [-t] [-R root-dir] [-P policy] [-L mode]
[-T time] [-u address] -l ether-link1 [-l ether-link2...] aggr-link
dladm modify-aggr [-t] [-R root-dir] [-P policy] [-L mode]
[-T time] [-u address] aggr-link
dladm delete-aggr [-t] [-R root-dir] aggr-link
dladm add-aggr [-t] [-R root-dir] -l ether-link1 [-l ether-link2...]
aggr-link
dladm remove-aggr [-t] [-R root-dir] -l ether-link1 [-l ether-link2...]
aggr-link
dladm show-aggr [-PLx] [-s [-i interval]] [[-p] -o field[,...]]
[aggr-link]
dladm create-bridge [-P protect] [-R root-dir] [-p priority]
[-m max-age] [-h hello-time] [-d forward-delay] [-f force-protocol]
[-l link...] bridge-name
dladm modify-bridge [-P protect] [-R root-dir] [-p priority]
[-m max-age] [-h hello-time] [-d forward-delay] [-f force-protocol]
bridge-name
dladm delete-bridge [-R root-dir] bridge-name dladm add-bridge [-R root-dir] -l link [-l link...]bridge-name dladm remove-bridge [-R root-dir] -l link [-l link...] bridge-name
dladm show-bridge [-flt] [-s [-i interval]] [[-p] -o field,...]
[bridge-name]
dladm create-vlan [-ft] [-R root-dir] -l ether-link -v vid [vlan-link] dladm delete-vlan [-t] [-R root-dir] vlan-link dladm show-vlan [-P] [[-p] -o field[,...]] [vlan-link]
dladm scan-wifi [[-p] -o field[,...]] [wifi-link]
dladm connect-wifi [-e essid] [-i bssid] [-k key,...]
[-s none | wep | wpa ] [-a open | shared] [-b bss | ibss] [-c]
[-m a | b | g | n ] [-T time] [wifi-link]
dladm disconnect-wifi [-a] [wifi-link]
dladm show-wifi [[-p] -o field[,...]] [wifi-link]
dladm show-ether [-x] [[-p] -o field[,...]] [ether-link] dladm set-linkprop [-t] [-R root-dir] -p prop=value[,...] link dladm reset-linkprop [-t] [-R root-dir] [-p prop[,...]] link dladm show-linkprop [-P] [[-c] -o field[,...]] [-p prop[,...]] [link] dladm create-secobj [-t] [-R root-dir] [-f file] -c class secobj dladm delete-secobj [-t] [-R root-dir] secobj[,...] dladm show-secobj [-P] [[-p] -o field[,...]] [secobj,...]
dladm create-vnic [-t] -l link [-R root-dir] [-m value | auto |
{factory [-n slot-identifier]} | {vrrp -A {inet | inet6} -V vrid}
| {random [-r prefix]}] [-v vlan-id] [-p prop=value[,...]] vnic-link
dladm delete-vnic [-t] [-R root-dir] vnic-link
dladm show-vnic [-pP] [-s [-i interval]] [-o field[,...]]
[-l link] [vnic-link]
dladm create-etherstub [-t] [-R root-dir] etherstub dladm delete-etherstub [-t] [-R root-dir] etherstub dladm show-etherstub [etherstub]
dladm create-iptun [-t] [-R root-dir] -T type [-s tsrc] [-d tdst]
iptun-link
dladm modify-iptun [-t] [-R root-dir] [-s tsrc] [-d tdst] iptun-link
dladm delete-iptun [-t] [-R root-dir] iptun-link
dladm show-iptun [-P] [[-p] -o field[,...]] [iptun-link]
dladm show-usage [-a] -f filename [-p plotfile -F format] [-s time]
[-e time] [link]
Description
The dladm command is used to administer data-links. A data-link is represented in the system as a STREAMS DLPI (v2) interface which can be plumbed under protocol stacks such as TCP/IP. Each data-link relies on either a single network device or an aggregation of devices to send packets to or receive packets from a network. Each dladm subcommand operates on one of the following objects: OptionsEach dladm subcommand has its own set of options. However, many of the subcommands have the following as a common option: SUBCOMMANDSThe following subcommands are supported: Parseable Output FormatMany dladm subcommands have an option that displays output in a machine-parseable format. The output format is one or more lines of colon (:) delimited fields. The fields displayed are specific to the subcommand used and are listed under the entry for the -o option for a given subcommand. Output includes only those fields requested by means of the -o option, in the order requested. When you request multiple fields, any literal colon characters are escaped by a backslash (\) before being output. Similarly, literal backslash characters will also be escaped (\\). This escape format is parseable by using shell read(1) functions with the environment variable IFS=: (see EXAMPLES, below). Note that escaping is not done when you request only a single field. General Link PropertiesThe following general link properties are supported: Wifi Link PropertiesThe following WiFi link properties are supported. Note that the ability to set a given property to a given value depends on the driver and hardware. Ethernet Link PropertiesThe following MII Properties, as documented in ieee802.3(5), are supported in read-only mode: Each adv_ property (for example, adv_10fdx_cap) also has a read/write counterpart en_ property (for example, en_10fdx_cap) controlling parameters used at auto-negotiation. In the absence of Power Management, the adv* speed/duplex parameters provide the values that are both negotiated and currently effective in hardware. However, with Power Management enabled, the speed/duplex capabilities currently exposed in hardware might be a subset of the set of bits that were used in initial link parameter negotiation. Thus the MII adv_* parameters are marked read-only, with an additional set of en_* parameters for configuring speed and duplex properties at initial negotiation. Note that the adv_autoneg_cap does not have an en_autoneg_cap counterpart: the adv_autoneg_cap is a 0/1 switch that turns off/on autonegotiation itself, and therefore cannot be impacted by Power Management. In addition, the following Ethernet properties are reported: IP Tunnel Link PropertiesThe following IP tunnel link properties are supported. ExamplesExample 1 Configuring an AggregationTo configure a data-link over an aggregation of devices bge0 and bge1 with key 1, enter the following command:
Example 2 Connecting to a WiFi LinkTo connect to the most optimal available unsecured network on a system with a single WiFi link (as per the prioritization rules specified for connect-wifi), enter the following command:
Example 3 Creating a WiFi KeyTo interactively create the WEP key mykey, enter the following command:
Alternatively, to non-interactively create the WEP key mykey using the contents of a file:
Example 4 Connecting to a Specified Encrypted WiFi LinkTo use key mykey to connect to ESSID wlan on link ath0, enter the following command:
Example 5 Changing a Link PropertyTo set powermode to the value fast on link pcwl0, enter the following command:
Example 6 Connecting to a WPA-Protected WiFi LinkCreate a WPA key psk and enter the following command:
To then use key psk to connect to ESSID wlan on link ath0, enter the following command:
Example 7 Renaming a LinkTo rename the bge0 link to mgmt0, enter the following command:
Example 8 Replacing a Network CardConsider that the bge0 device, whose link was named mgmt0 as shown in the previous example, needs to be replaced with a ce0 device because of a hardware failure. The bge0 NIC is physically removed, and replaced with a new ce0 NIC. To associate the newly added ce0 device with the mgmt0 configuration previously associated with bge0, enter the following command:
Example 9 Removing a Network CardSuppose that in the previous example, the intent is not to replace the bge0 NIC with another NIC, but rather to remove and not replace the hardware. In that case, the mgmt0 datalink configuration is not slated to be associated with a different physical device as shown in the previous example, but needs to be deleted. Enter the following command to delete the datalink configuration associated with the mgmt0 datalink, whose physical hardware (bge0 in this case) has been removed:
Example 10 Using Parseable Output to Capture a Single FieldThe following assignment saves the MTU of link net0 to a variable named mtu.
Example 11 Using Parseable Output to Iterate over LinksThe following script displays the state of each link on the system.
Example 12 Configuring VNICsCreate two VNICs with names hello0 and test1 over a single physical link bge0:
Example 13 Configuring VNICs and Allocating Bandwidth and PriorityCreate two VNICs with names hello0 and test1 over a single physical link bge0 and make hello0 a high priority VNIC with a factory-assigned MAC address with a maximum bandwidth of 50 Mbps. Make test1 a low priority VNIC with a random MAC address and a maximum bandwidth of 100Mbps.
Example 14 Configuring a VNIC with a Factory MAC AddressFirst, list the available factory MAC addresses and choose one of them:
Create a VNIC named hello0 and use slot 1's address:
Example 15 Creating a VNIC with User-Specified MAC Address, Binding it to Set of ProcessorsCreate a VNIC with name hello0, with a user specified MAC address, and a processor binding 0, 1, 2, 3.
Example 16 Creating a Virtual Network Without a Physical NICFirst, create an etherstub with name stub1:
Create two VNICs with names hello0 and test1 on the etherstub. This operation implicitly creates a virtual switch connecting hello0 and test1.
Example 17 Showing Network UsageNetwork usage statistics can be stored using the extended accounting facility, acctadm(1M).
The saved historical data can be retrieved in summary form using the show-usage subcommand:
Example 18 Displaying Bridge InformationThe following commands use the show-bridge subcommand with no and various options.
Example 19 Creating an IPv4 TunnelThe following sequence of commands creates and then displays a persistent IPv4 tunnel link named mytunnel0 between 66.1.2.3 and 192.4.5.6:
A point-to-point IP interface can then be created over this tunnel link:
As with any other IP interface, configuration persistence for this IP interface is achieved by placing the desired ifconfig commands (in this case, the command for “10.1.0.1 10.1.0.2”) into /etc/hostname.mytunnel0. Example 20 Creating a 6to4 TunnelThe following command creates a 6to4 tunnel link. The IPv4 address of the 6to4 router is 75.10.11.12.
The following command plumbs an IPv6 interface on this tunnel:
Note that the system automatically configures the IPv6 address on the 6to4 IP interface. See ifconfig(1M) for a description of how IPv6 addresses are configured on 6to4 tunnel links. Example 21 Using Link ProtectionTo enable link protection:
To disable link protection:
To modify the allowed-ips list:
To display the resulting configuration:
AttributesSee attributes(5) for descriptions of the following attributes: /usr/sbin
/sbin
See Alsoacctadm(1M), autopush(1M), ifconfig(1M), ipsecconf(1M), ndd(1M), vrrpadm(1M), psrset(1M), wpad(1M), zonecfg(1M), attributes(5), ieee802.3(5), dlpi(7P) NotesThe preferred method of referring to an aggregation in the aggregation subcommands is by its link name. Referring to an aggregation by its integer key is supported for backward compatibility, but is not necessary. When creating an aggregation, if a key is specified instead of a link name, the aggregation's link name will be automatically generated by dladm as aggrkey. Name | Synopsis | Description | Examples | Attributes | See Also | Notes |
||||||||||||||||||||||||||||||||||||||||||||||||