Know your network data-links - dladm(1M) can help

Data-links in Solaris correspond to NICs, aggregations, or VLANs. The dladm(1M) command line tool provides an easy way to list them all, including some of their properties. dladm(1M) was introduced as part of Project Nemo in Solaris Nevada, Solaris 10 Update 1, and OpenSolaris.

There are two dladm subcommands that I want to cover here: the first is show-link, which shows the non-VLAN and VLAN data links, their MTU, and underlying device or aggregation. The second subcommand is show-dev, which shows the network devices present on the machine and their hardware state, such as link state, link speed, and duplex information.

The following example shows dladm in action on jurassic, a large server that hosts the home directories and email for the members of the OS development organization at Sun. Jurassic allows us to "eat our own dog food" by always running the latest Solaris development build in a production environment.


jurassic# dladm show-link
hme0            type: legacy    mtu: 1500       device: hme0
qfe0            type: legacy    mtu: 1500       device: qfe0
qfe1            type: legacy    mtu: 1500       device: qfe1
qfe2            type: legacy    mtu: 1500       device: qfe2
qfe3            type: legacy    mtu: 1500       device: qfe3
ce0             type: legacy    mtu: 1500       device: ce0
qfe16           type: legacy    mtu: 1500       device: qfe16
qfe17           type: legacy    mtu: 1500       device: qfe17
qfe18           type: legacy    mtu: 1500       device: qfe18
qfe19           type: legacy    mtu: 1500       device: qfe19
xge1            type: non-vlan  mtu: 1500       device: xge1
bge0            type: non-vlan  mtu: 1500       device: bge0
bge1            type: non-vlan  mtu: 1500       device: bge1
hme1            type: legacy    mtu: 1500       device: hme1
qfe8            type: legacy    mtu: 1500       device: qfe8
qfe9            type: legacy    mtu: 1500       device: qfe9
qfe10           type: legacy    mtu: 1500       device: qfe10
qfe11           type: legacy    mtu: 1500       device: qfe11
ce1             type: legacy    mtu: 1500       device: ce1
bge2            type: non-vlan  mtu: 1500       device: bge2
bge3            type: non-vlan  mtu: 1500       device: bge3
qfe20           type: legacy    mtu: 1500       device: qfe20
qfe21           type: legacy    mtu: 1500       device: qfe21
qfe22           type: legacy    mtu: 1500       device: qfe22
qfe23           type: legacy    mtu: 1500       device: qfe23
aggr1           type: non-vlan  mtu: 1500       aggregation: key 1
aggr226001      type: vlan 226  mtu: 1500       aggregation: key 1
aggr224001      type: vlan 224  mtu: 1500       aggregation: key 1
aggr108001      type: vlan 108  mtu: 1500       aggregation: key 1
aggr68001       type: vlan 68   mtu: 1500       aggregation: key 1
aggr58001       type: vlan 58   mtu: 1500       aggregation: key 1
aggr106001      type: vlan 106  mtu: 1500       aggregation: key 1
aggr56001       type: vlan 56   mtu: 1500       aggregation: key 1
aggr104001      type: vlan 104  mtu: 1500       aggregation: key 1
aggr228001      type: vlan 228  mtu: 1500       aggregation: key 1
aggr2           type: non-vlan  mtu: 1500       aggregation: key 2
aggr226002      type: vlan 226  mtu: 1500       aggregation: key 2
aggr224002      type: vlan 224  mtu: 1500       aggregation: key 2
aggr108002      type: vlan 108  mtu: 1500       aggregation: key 2
aggr68002       type: vlan 68   mtu: 1500       aggregation: key 2
aggr58002       type: vlan 58   mtu: 1500       aggregation: key 2
aggr106002      type: vlan 106  mtu: 1500       aggregation: key 2
aggr56002       type: vlan 56   mtu: 1500       aggregation: key 2
aggr104002      type: vlan 104  mtu: 1500       aggregation: key 2
aggr228002      type: vlan 228  mtu: 1500       aggregation: key 2

From the example above, you can see that jurassic has a bunch of data-link corresponding to devices of various kinds, some of which are combined to form two aggregations, on top of which nine VLANs are defined. To further improve high-availability, these VLANs are grouped to form nine IPMP groups spanning two separate physical switches. IPMP groups are not yet listed by dladm show-link but will be after the IPMP reachitecture completes.

show-dev is a related dladm(1M) subcommand which lists only physical NICs along with their physical link state. The following shows dladm show-dev in action on jurassic.


jurassic# dladm show-dev
hme0            link: unknown   speed: 0     Mbps       duplex: unknown
qfe0            link: unknown   speed: 0     Mbps       duplex: unknown
qfe1            link: unknown   speed: 0     Mbps       duplex: unknown
qfe2            link: unknown   speed: 0     Mbps       duplex: unknown
qfe3            link: unknown   speed: 0     Mbps       duplex: unknown
ce0             link: unknown   speed: 1000  Mbps       duplex: full
qfe16           link: unknown   speed: 0     Mbps       duplex: unknown
qfe17           link: unknown   speed: 0     Mbps       duplex: unknown
qfe18           link: unknown   speed: 0     Mbps       duplex: unknown
qfe19           link: unknown   speed: 0     Mbps       duplex: unknown
xge1            link: unknown   speed: 10000 Mbps       duplex: full
bge0            link: up        speed: 1000  Mbps       duplex: full
bge1            link: up        speed: 1000  Mbps       duplex: full
hme1            link: unknown   speed: 0     Mbps       duplex: unknown
qfe8            link: unknown   speed: 0     Mbps       duplex: unknown
qfe9            link: unknown   speed: 0     Mbps       duplex: unknown
qfe10           link: unknown   speed: 0     Mbps       duplex: unknown
qfe11           link: unknown   speed: 0     Mbps       duplex: unknown
ce1             link: unknown   speed: 1000  Mbps       duplex: full
bge2            link: up        speed: 1000  Mbps       duplex: full
bge3            link: up        speed: 1000  Mbps       duplex: full
qfe20           link: unknown   speed: 0     Mbps       duplex: unknown
qfe21           link: unknown   speed: 0     Mbps       duplex: unknown
qfe22           link: unknown   speed: 0     Mbps       duplex: unknown
qfe23           link: unknown   speed: 0     Mbps       duplex: unknown

So there you have it, dladm away! Also check out the dladm(1M) man page for a full description of these subcommands and more.

Technorati Tag:
Technorati Tag:

Comments:

Post a Comment:
Comments are closed for this entry.
About

ndroux

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today