<chapter id="fwawf"><title>Administering Network Interfaces
(Tasks)</title><highlights><para>This chapter describes interface configuration
for the Solaris Express, Developer Edition 2/07 release:</para><itemizedlist><listitem><para><olink targetptr="fpdih" remap="internal">Interface Administration (Task Map)</olink></para>
</listitem><listitem><para><olink targetptr="fpcwh" remap="internal">Basics for Administering Physical
Interfaces</olink></para>
</listitem><listitem><para><olink targetptr="fpcso" remap="internal">Administering Individual Network
Interfaces</olink></para>
</listitem><listitem><para><olink targetptr="fpjve" remap="internal">Administering Virtual Local Area
Networks</olink></para>
</listitem><listitem><para><olink targetptr="fpjvl" remap="internal">Administering Link Aggregations</olink></para>
</listitem><listitem><para><olink targetptr="gduew" remap="internal">Configuring
and Communicating Over WiFi Interfaces</olink></para>
</listitem>
</itemizedlist>
</highlights><sect1 id="fpdih"><title>Interface Administration (Task Map)</title><informaltable frame="all"><tgroup cols="3" colsep="0" rowsep="0"><colspec colwidth="33*"/><colspec colwidth="33*"/><colspec colwidth="33*"/><thead><row rowsep="1"><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>Check the status of interfaces on a system.</para>
</entry><entry><para>List all interfaces on the system and check which interfaces are already
plumbed.</para>
</entry><entry><para><olink targetptr="fpdik" remap="internal">How to Obtain Interface Status</olink></para>
</entry>
</row><row><entry><para>Add a single interface after system installation.</para>
</entry><entry><para>Change a system to a multihomed host or router by configuring another
interface.</para>
</entry><entry><para><olink targetptr="fpdcn" remap="internal">How to Configure a Physical Interface After
System Installation</olink></para>
</entry>
</row><row><entry><para>SPARC: Check that the MAC address of an interface is unique.</para>
</entry><entry><para>Ensure that the interface is configured with its factory-installed MAC
address, rather than the system MAC address (SPARC only).</para>
</entry><entry><para><olink targetptr="eyprp" remap="internal">How to Ensure That the MAC Address of an Interface
Is Unique</olink></para>
</entry>
</row><row><entry><para>Plan for a virtual local area network (VLAN).</para>
</entry><entry><para>Perform required planning tasks prior to creating a VLAN.</para>
</entry><entry><para><olink targetptr="fumzp" remap="internal">How to Plan for VLAN Configuration</olink></para>
</entry>
</row><row><entry><para>Configure a VLAN.</para>
</entry><entry><para>Create and modify VLANs on your network.</para>
</entry><entry><para><olink targetptr="fpden" remap="internal">How to Configure a VLAN</olink></para>
</entry>
</row><row><entry><para>Plan for aggregations.</para>
</entry><entry><para>Design your aggregation and perform required planning tasks prior to
configuring aggregations.</para>
</entry><entry><para><olink targetptr="fpjvl" remap="internal">Administering Link Aggregations</olink></para>
</entry>
</row><row><entry><para>Configure an aggregation.</para>
</entry><entry><para>Perform various tasks related to link aggregations.</para>
</entry><entry><para><olink targetptr="gafxi" remap="internal">How to Create a Link Aggregation</olink></para>
</entry>
</row><row><entry><para>Plan for and configure an IPMP group.</para>
</entry><entry><para>Configure failover and failback for interfaces that are members of an
IPMP group.</para>
</entry><entry><para><olink targetptr="emyil" remap="internal">How to Plan for an IPMP Group</olink></para><para><olink targetptr="emqul" remap="internal">How to Configure an IPMP Group With Multiple
Interfaces</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect1><sect1 id="fpcwh"><title>Basics for Administering Physical Interfaces</title><para><emphasis>Network interfaces</emphasis> provide the connection
between a system and a network. A Solaris OS-based system can have two types
of interfaces, physical and logical. <emphasis>Physical interfaces</emphasis> consist
of a software driver and a connector into which you connect network media,
such as an Ethernet cable. Physical interfaces can be grouped for administrative
or availability purposes. <emphasis>Logical interfaces</emphasis> are configured
onto existing physical interfaces, usually for adding addresses and creating
tunnel endpoints on the physical interfaces.</para><note><para>Logical network interfaces are described in the tasks where they
are used: IPv6 tasks, IPMP tasks, DHCP tasks, and others.</para>
</note><para>Most computer systems have at least one physical interface that
is <emphasis>built-in</emphasis> by the manufacturer on the main system board.
Some systems can also have more than one built-in interface. </para><para>In addition to built-in interfaces, you can add separately purchased
interfaces to a system. A separately purchased interface is known as a <emphasis>network interface card</emphasis> (NIC). You physically install a NIC according
to the manufacturer's instructions. </para><note><para>NICs are also referred to as <emphasis>network adapters</emphasis>.</para>
</note><para>During system installation, the Solaris installation program detects
any  interfaces that are physically installed and displays each interface's
name. You must configure at least one interface from the list of interfaces.
The first interface to be configured during installation becomes the <emphasis>primary
network interface</emphasis>. The IP address of the primary network interface
is associated with the configured host name of the system, which is stored
in the <filename>/etc/nodename</filename> file. However, you can configure
any additional interfaces during installation or later. </para><sect2 id="fpjyb"><title>Network Interface Names</title><para>Each physical interface is identified by a unique device name. Device
names have the following syntax:</para><screen><emphasis>&lt;driver-name>&lt;instance-number></emphasis></screen><para>Driver names on Solaris systems could include <command>ce</command>, <command>hme</command>, <command>bge</command>, <command>e1000g</command> and many
other driver names. The variable <emphasis>instance-number</emphasis> can
have a value from zero to <emphasis>n</emphasis>, depending on how many interfaces
of that driver type are installed on the system. </para><para>For example, consider a 100BASE-TX Fast Ethernet interface, which is
often used as the primary network interface on both host systems and server
systems. Some typical driver names for this interface are <command>eri</command>, <command>qfe</command>, and <command>hme</command>. When used as the primary network
interface, the Fast Ethernet interface has a device name such as <command>eri0</command> or <command>qfe0</command>.</para><para>NICs such as <command>eri</command> and <command>hme</command> have
only one interface. However, many brands of NICs have multiple interfaces.
For example, the Quad Fast Ethernet (<command>qfe</command>) card has four
interfaces, <command>qfe0</command> through <command>qfe3</command>. </para>
</sect2><sect2 id="ftzig"><title>Plumbing an Interface</title><para>An interface must be <emphasis>plumbed</emphasis> before it can pass
traffic between the system and the network. The plumbing process involves
associating an interface with a device name. Then, streams are set up so that
the interface can be used by the IP protocol. Both physical interfaces and
logical interfaces must be plumbed. Interfaces are plumbed either as part
of the boot sequence or explicitly, with the appropriate syntax of the <command>ifconfig</command> command.</para><para>When you configure an interface during installation, the interface is
automatically plumbed. If you decide during installation not to configure
the additional interfaces on the system, those interfaces are not plumbed.</para>
</sect2><sect2 id="gaugz"><title>Solaris OS Interface Types</title><para>The Solaris
OS supports the following two types of interfaces:</para><itemizedlist><listitem><para><emphasis role="strong">Legacy interfaces</emphasis> &ndash;
These interfaces are DLPI interfaces and GLDv2 interfaces. Some legacy interface
types are <command>eri</command>, <command>qfe</command>, and <command>ce</command>.
When you check interface status with the <command>dladm show-link</command> command,
these interfaces are reported as &ldquo;legacy.&rdquo;</para>
</listitem><listitem><para><emphasis role="strong">Non-VLAN interfaces</emphasis> &ndash;
These interfaces are GLDv3 interfaces. </para><note><para>Currently GLDv3 is supported on the following interface types: <command>bge</command>, <command>xge</command>, and <command>e1000g</command>.</para>
</note>
</listitem>
</itemizedlist>
</sect2>
</sect1><sect1 id="fpcso"><title>Administering Individual Network Interfaces</title><para>After Solaris installation, you might configure or administer interfaces
on a system for the following purposes:</para><itemizedlist><listitem><para>To upgrade the system to become a multihomed host. For more
information, refer to <olink targetptr="ipconfig-22a" remap="internal">Configuring Multihomed
Hosts</olink>.</para>
</listitem><listitem><para>To change a host to a router. For instructions on configuring
routers, refer to <olink targetptr="ipconfig-116" remap="internal">Configuring an IPv4 Router</olink>.</para>
</listitem><listitem><para>To configure interfaces as part of a VLAN. For more information,
refer to <olink targetptr="fpjve" remap="internal">Administering Virtual Local Area Networks</olink>.</para>
</listitem><listitem><para>To configure interfaces as members of an aggregation. For
more information, refer to <olink targetptr="fpjvl" remap="internal">Administering Link Aggregations</olink>.</para>
</listitem><listitem><para>To add an interface to an IPMP group. For instructions on
configuring an IPMP group, refer to <olink targetptr="deploynetmult-57" remap="internal">Configuring
IPMP Groups</olink></para>
</listitem>
</itemizedlist><para>This section contains information about configuring individual network
interfaces.
Refer to the following sections for information about configuring interfaces
into one of the following groupings:</para><itemizedlist><listitem><para>For configuring interfaces into a VLAN, refer to <olink targetptr="fpjve" remap="internal">Administering Virtual Local Area Networks</olink>.</para>
</listitem><listitem><para>For configuring interfaces into an aggregation, refer to <olink targetptr="fpjvl" remap="internal">Administering Link Aggregations</olink>.</para>
</listitem><listitem><para>For configuring interfaces as members of IPMP groups, refer
to <olink targetptr="deploynetmult-57" remap="internal">Configuring IPMP Groups</olink>.</para>
</listitem>
</itemizedlist><task id="fpdik"><title>How to Obtain Interface Status</title><tasksummary><para>This procedure
explains how to determine which interfaces are currently available on a system
and their status. This procedure also shows which interfaces are currently
plumbed.</para>
</tasksummary><procedure><step><para>On the system with the interfaces to be configured, assume the
Primary Administrator role or become superuser.</para><para>The Primary Administrator
role includes the Primary Administrator profile. To create the role and assign
the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Determine which interfaces are currently installed on your system.</para><screen># <userinput>dladm show-link</userinput></screen><para>This step uses the <command>dladm</command> command, which is
explained in detail in the <command>dladm</command>(1M) man page. This command
reports on all the interface drivers that it finds, regardless of whether
the interfaces are currently configured. </para>
</step><step><para>Determine which interfaces on the system are currently plumbed.</para><screen># <userinput>ifconfig -a</userinput></screen><para>The <command>ifconfig</command> command has many additional functions,
including plumbing an interface. For more information, refer to the <olink targetdoc="refman1m" targetptr="ifconfig-1m" remap="external"><citerefentry><refentrytitle>ifconfig</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page.</para>
</step>
</procedure><example id="ftyxm"><title>Obtaining the Status of an Interface with the <command>dladm</command> command</title><para>The next example shows the status display of the <command>dladm</command> command.</para><screen># <userinput>dladm show-link</userinput>

ce0             type: legacy    mtu: 1500       device: ce0
ce1             type: legacy    mtu: 1500       device: ce1
bge0            type: non-vlan  mtu: 1500       device: bge0
bge1            type: non-vlan  mtu: 1500       device: bge1
bge2            type: non-vlan  mtu: 1500       device: bge2

 </screen><para>The output of <command>dladm show-link</command> indicates that four
interface drivers are available for the local host. Both the <command>ce</command> and
the <command>bge</command> interfaces can be configured for VLANs. However,
only the GLDV3 interfaces with a type of <literal>non-VLAN</literal> can be
used for link aggregations.</para><para>The next example shows the status display of the <command>ifconfig</command> <option>a</option> command.</para><screen width="100"># <userinput>ifconfig -a</userinput>

lo0: flags=2001000849 &lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
ce0: flags=1000843 &lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 192.168.84.253 netmask ffffff00 broadcast 192.168.84.255
        ether 0:3:ba:7:84:5e 
bge0: flags=1004843 &lt;UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index 2
        inet 10.8.57.39 netmask ffffff00 broadcast 10.8.57.255
        ether 0:3:ba:29:fc:cc </screen><para>The output of the <command>ifconfig -a</command> command displays statistics
for only two interfaces, <command>ce0</command> and <command>bge0</command>.
This output shows that only <command>ce0</command> and <command>bge0</command> have
been plumbed and are ready for use by network traffic. These interfaces can
be used in a VLAN. Because <command>bge0</command> has been plumbed, you can
no longer use this interface in an aggregation.</para>
</example>
</task><task id="fpdcn"><title>How to Configure a Physical Interface After System
Installation</title><tasksummary><para>Use the next procedure for configuring interfaces. </para>
</tasksummary><taskprerequisites><itemizedlist><listitem><para>Determine the IPv4 addresses that you want to use for the additional
interfaces.</para>
</listitem><listitem><para>Ensure that the physical interface to be configured has been
physically installed onto the system. For information about installing separately
purchased NIC hardware, refer to the manufacturer's instructions that accompany
the NIC.</para>
</listitem><listitem><para>If you have just installed the interface, perform a reconfiguration
boot before proceeding with the next task.</para>
</listitem>
</itemizedlist>
</taskprerequisites><procedure><step><para>On the system with the interfaces to be configured, assume the
Primary Administrator role or become superuser.</para><para>The Primary Administrator
role includes the Primary Administrator profile. To create the role and assign
the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Determine which interfaces are currently installed on the system.</para><screen># <userinput>dladm show-link</userinput></screen>
</step><step><para>Configure and plumb each interface.</para><screen># <userinput>ifconfig</userinput> <replaceable>interface</replaceable> <userinput>plumb up</userinput></screen><para>For example, for <command>qfe0</command> you would type:</para><screen># <userinput>ifconfig qfe0 plumb up</userinput></screen><note><para>Interfaces that are explicitly configured with the <command>ifconfig</command> command
do not persist across a reboot.</para>
</note>
</step><step><para>Assign an IPv4 address and netmask to the interface.</para><screen># <userinput>ifconfig</userinput> <replaceable>interface IPv4-address</replaceable> <userinput>netmask+</userinput><replaceable>netmask</replaceable></screen><para>For example, for <command>qfe0</command> you would type:</para><screen># <userinput>ifconfig qfe0 192.168.84.3 netmask + 255.255.255.0</userinput></screen><note><para>You can specify an IPv4 address in either traditional IPv4 notation
or CIDR notation.</para>
</note>
</step><step><para>Verify that the newly configured interfaces are plumbed and configured,
or &ldquo;<constant>UP</constant>.&rdquo;</para><screen># <userinput>ifconfig -a</userinput></screen><para>Check the status line for each interface that is displayed. Ensure that
the output contains an <constant>UP</constant> flag on the status line, for
example:</para><screen>qfe0: flags=1000843 &lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2</screen>
</step><step><para>(Optional) To make the interface configuration persist across
reboots, perform the following steps:</para><substeps><step><para>Create an <filename>/etc/hostname.</filename><replaceable>interface</replaceable> file
for each interface to be configured.</para><para>For example, to add a <literal>qfe0</literal> interface,
you would create the following file:</para><screen># <userinput>vi /etc/hostname.qfe0</userinput></screen>
</step><step><para>Edit the <filename>/etc/hostname.</filename><replaceable>interface</replaceable> file.</para><para>At a minimum, add the IPv4 address of the interface to the file.
You can use traditional IPv4 notation or CIDR notation to specify the IP address
of the interface. You can also add a netmask and other configuration information
to the file.</para><note><para>To add an IPv6 address to an interface, refer to <olink targetptr="ipv6-config-tasks-6" remap="internal">Modifying an IPv6 Interface Configuration
for Hosts and Servers</olink></para>
</note>
</step><step><para>Add entries for the new interfaces into the <filename>/etc/inet/hosts</filename> file.</para>
</step><step><para>Perform a reconfiguration boot.</para><screen># <userinput>reboot -- -r</userinput></screen>
</step><step><para>Verify that the interface you created in the <filename>/etc/hostname.</filename><replaceable>interface</replaceable> file has been configured.</para><screen># <userinput>ifconfig -a</userinput></screen><para>For examples, refer to <olink targetptr="fpdah" remap="internal">Example 6&ndash;2</olink>.</para>
</step>
</substeps>
</step>
</procedure><example id="fpdah"><title>Adding Persistent Interface Configurations</title><para>The example shows how to configure the interfaces <command>qfe0</command> and <command>qfe1</command> to a host. These interfaces remain persistent across reboots.</para><screen># <userinput>dladm show-link</userinput>
eri0             type: legacy    mtu: 1500       device: eri0
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
bge0             type: non-vlan  mtu: 1500       device: bge0

# <userinput>vi /etc/hostname.qfe0</userinput>
<userinput>192.168.84.3
netmask + 255.255.255.0</userinput>
# <userinput>vi /etc/hostname.qfe1
192.168.84.72
netmask + 255.255.255.0</userinput>
# <userinput>vi /etc/inet/hosts</userinput>
# Internet host table
#
127.0.0.1       localhost
10.0.0.14       myhost
<userinput>192.168.84.3       interface-2
192.168.84.72       interface-3</userinput></screen><para>At this point, you would reboot the system. </para><screen># <userinput>reboot -- -r</userinput></screen><para>After the system boots, you would then verify the interface configuration.</para><screen><userinput>ifconfig -a</userinput>
# ifconfig -a
lo0: flags=1000849 &lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
eri0: flags=1000843 &lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 10.0.0.14 netmask ff000000 broadcast 10.255.255.255
        ether 8:0:20:c1:8b:c3 
qfe0: flags=1000843 &lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 192.168.84.3 netmask ffffff00 broadcast 192.255.255.255
        ether 8:0:20:c8:f4:1d 
qfe1: flags=1000843 &lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4
        inet 192.168.84.72 netmask ffffff00 broadcast 10.255.255.255
        ether 8:0:20:c8:f4:1e </screen>
</example><taskrelated role="see-also"><itemizedlist><listitem><para>To configure an IPv6 address onto an interface, refer to <olink targetptr="ipv6-config-tasks-119" remap="internal">How to Enable an IPv6 Interface for the
Current Session</olink>.</para>
</listitem><listitem><para>To set up failover detection and failback for interfaces by
using IP Network Multipathing (IPMP), refer to <olink targetptr="deploynetmult-56" remap="internal">Chapter&nbsp;31, Administering IPMP (Tasks)</olink>.</para>
</listitem>
</itemizedlist>
</taskrelated>
</task><task id="fpcvg"><title>How to Remove a Physical Interface</title><tasksummary><para>Use this procedure for removing a physical interface. </para>
</tasksummary><procedure><step><para>On the system with the interface to be removed, assume the Primary
Administrator role or become superuser.</para><para>The Primary Administrator
role includes the Primary Administrator profile. To create the role and assign
the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Remove the physical interface.</para><screen># <userinput>ifconfig</userinput> <replaceable>interface</replaceable> <userinput>unplumb down</userinput> </screen><para>For example, to remove the interface <command>qfe1</command>, you would
type:</para><screen># <userinput>ifconfig qfe1 unplumb down</userinput></screen>
</step>
</procedure>
</task><task id="eyprp" arch="sparc"><title>How to Ensure That the MAC Address of
an Interface Is Unique</title><tasksummary><para>Use this procedure for configuring MAC addresses. </para><para>Some applications require every interface on a host to have a unique
MAC addresses. However, every SPARC based system has a system-wide MAC address,
which by default is used by all interfaces. Here are two situations where
you might want to configure the factory-installed MAC addresses for the interfaces
on a SPARC system.</para><itemizedlist><listitem><para>For link aggregations, you should use the factory-set MAC
addresses of the interfaces in the aggregation configuration. </para>
</listitem><listitem><para>For IPMP groups, each interface in the group must have a unique
MAC address. These interfaces must use their factory-installed MAC addresses.</para>
</listitem>
</itemizedlist><para>The EEPROM parameter <literal>local-mac-address?</literal> determines
whether all interfaces on a SPARC system use the system-wide MAC address or
their unique MAC address. The next procedure shows how to use the <command>eeprom</command> command to check the current value of <literal>local-mac-address?</literal> and
change it, if necessary.</para>
</tasksummary><procedure><step><para>On the system with the interfaces to be configured, assume the
Primary Administrator role or become superuser.</para><para>The Primary Administrator
role includes the Primary Administrator profile. To create the role and assign
the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Determine whether all interfaces on the system currently use the
system-wide MAC address.</para><screen># <userinput>eeprom local-mac-address?</userinput>
local-mac-address?=false</screen><para>In the example, the response to the <command>eeprom</command> command, <literal>local-mac-address?=false</literal>, indicates that all interfaces do use the
system-wide MAC address. The value of <literal>local-mac-address?=false</literal> must
 be changed to <literal>local-mac-address?=true</literal> before the interfaces
can become members of an IPMP group. You should also change <literal>local-mac-address?=false</literal> to <literal>local-mac-address?=true</literal> for aggregations.</para>
</step><step><para>If necessary, change the value of  <literal>local-mac-address?</literal> as
follows:</para><screen># <userinput>eeprom local-mac-address?=true</userinput></screen><para>When you reboot the system, the interfaces with factory-installed MAC
addresses now use these factory settings, rather than the system-wide MAC
address. Interfaces without factory-set MAC addresses continue to use the
system-wide MAC address.</para>
</step><step><para>Check the MAC addresses of all the interfaces on the system.</para><para>Look for cases where multiple interfaces have the same MAC address.
In this example, all interfaces use the system-wide MAC address <literal>8:0:20:0:0:1</literal>.</para><screen><userinput>ifconfig -a</userinput>
lo0: flags=1000849 &lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
     inet 127.0.0.1 netmask ff000000 
hme0: flags=1004843 &lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
     inet 10.0.0.112 netmask ffffff80 broadcast 10.0.0.127
     ether 8:0:20:0:0:1
ce0: flags=1004843 &lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
     inet 10.0.0.114 netmask ffffff80 broadcast 10.0.0.127
     ether 8:0:20:0:0:1
ce1: flags=1004843 &lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
     inet 10.0.0.118 netmask ffffff80 broadcast 10.0.0.127
     ether 8:0:20:0:0:1</screen><note><para>Continue to the next step only if more than one network interface
still has the same MAC address. Otherwise, go on to the final step.</para>
</note>
</step><step><para>If necessary, manually configure the remaining interfaces so that
all interfaces have unique MAC address.</para><para>Specify a unique MAC address
in the <filename>/etc/hostname.</filename><replaceable>interface</replaceable> file
for the particular interface. </para><screen># <userinput>vi /etc/hostname.eri0</userinput>
myhost
12:34:56:7:8:9</screen><note><para>To prevent any risk of manually configured MAC addresses conflicting
with other MAC addresses on your network, you must always configure <emphasis>locally
administered</emphasis> MAC addresses, as defined by the IEEE 802.3 standard.</para>
</note><para>In the example in Step 4, you would need to configure <literal>ce0</literal> and <literal>ce1</literal> with  locally administered MAC addresses.  For example, to reconfigure <literal>ce1</literal>  with the locally administered MAC address <literal>06:05:04:03:02</literal>,
you would add the following line to <filename>/etc/hostname.ce1</filename>: </para><screen><userinput>ether 06:05:04:03:02</userinput> </screen><para>You also can use the <literal>ifconfig ether</literal> command to configure
an interface's MAC address for the current session. However, any changes made
directly with <command>ifconfig</command> are not preserved across reboots.
Refer to the <olink targetdoc="refman1m" targetptr="ifconfig-1m" remap="external"><citerefentry><refentrytitle>ifconfig</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page for details.</para>
</step><step><para>Reboot the system.</para>
</step>
</procedure>
</task>
</sect1><sect1 id="fpjve"><title>Administering Virtual Local Area Networks</title><para>A <emphasis>virtual local area network (VLAN)</emphasis> is a subdivision
of a local area network at the data link layer of the TCP/IP protocol stack.
You can create VLANs for local area networks that use switch technology. By
dividing groups of users into VLANs, you can improve network administration
and security for the entire local network. You can also assign interfaces
on the same system to different VLANs.</para><para>Consider dividing your local network into VLANs if you need to do the
following:</para><itemizedlist><listitem><para>Create a logical division of workgroups.</para><para>For example,
suppose all hosts on a floor of a building are connected on one switched-based
local network. You could create a separate VLAN for each workgroup on the
floor.</para>
</listitem><listitem><para>Enforce differing security policies for the workgroups.</para><para>For example, the security needs of a Finance department and an Information
Technologies department are quite different. If systems for both departments
share the same local network, you could create a separate VLAN for each department.
Then, you could enforce the appropriate security policy on a per-VLAN basis.</para>
</listitem><listitem><para>Split workgroups into manageable broadcast domains.</para><para>The
use of VLANs reduces the size of broadcast domains and improves network efficiency.</para>
</listitem>
</itemizedlist><sect2 id="fumvy"><title>Overview of VLAN Topology</title><para>Switched LAN technology enables you to organize the systems on a local
network into VLANs. Before you can divide a local network into VLANs, you
must obtain switches that support VLAN technology. You can configure all ports
on a switch to serve a single VLAN or multiple VLANs, depending on the VLAN
topology design. Each switch manufacturer has different procedures for configuring
the ports of a switch.</para><para><olink targetptr="gatoo" remap="internal">Figure 6&ndash;1</olink> shows a local area
network that has the subnet address <literal>192.168.84.0</literal>. This
LAN is subdivided into three VLANs, Red, Yellow, and blue.</para><figure id="gatoo"><title>Local Area Network With Three VLANs</title><mediaobject><imageobject><imagedata entityref="VLAN-top"/>
</imageobject><textobject><simpara>The surrounding context describes the figure's content.</simpara>
</textobject>
</mediaobject>
</figure><para>Connectivity on LAN <literal>192.168.84.0</literal> is handled by Switches
1 and 2. Systems of the Information Technologies workgroup are assigned to
the Blue VLAN. The Human Resources workgroup's systems are on the Yellow VLAN.
The Red VLAN contains systems in the Accounting workgroup. </para><sect3 id="fumva"><title>VLAN Tags and Physical Points of Attachment</title><para>Each VLAN in a local area network is identified by a VLAN tag, or <emphasis>VLAN ID (VID)</emphasis>. The VID is assigned during VLAN configuration. The
VID is a 12-bit identifier between 1 and 4094 that provides a unique identity
for each VLAN. In <olink targetptr="gatoo" remap="internal">Figure 6&ndash;1</olink>, the Blue
VLAN has the VID 123, the Yellow VLAN has the VID 456, and the Red VLAN has
the VID 789. </para><para>When you configure switches to support VLANs, you need to assign a VID
to each port. The VID on the port must be the same as the VID assigned to
the interface that connects to the port, as shown in the following figure.</para><figure id="gatol"><title>Switch Configuration for a Network with VLANs</title><mediaobject><imageobject><imagedata entityref="VLAN-config-switch"/>
</imageobject><textobject><simpara>The surrounding context describes the figure's content.</simpara>
</textobject>
</mediaobject>
</figure><para>In this figure, the primary network interfaces of three hosts connect
into Switch 1. Host A is a member of the Blue VLAN. Therefore, Host A's interface
is configured with the VID 123. This interface connects to Port 1 on Switch
1, which is then configured with the VID 123. Host B is a member of the Yellow
VLAN, with the VID 456. Host B's interface connects to Port 5 on Switch 1,
which is configured with the VID 456, and so on.</para><para>During VLAN configuration, you have to specify the <emphasis>physical
point of attachment</emphasis>, or <emphasis>PPA</emphasis>, of the VLAN.
You obtain the PPA value by using this formula:</para><screen><replaceable>driver-name</replaceable> + VID * 1000 + <replaceable>device-instance</replaceable></screen><para>Note that the <replaceable>device-instance</replaceable> number must
be less than 1000.</para><para>For example, you would create the following PPA for a <command>ce1</command> interface
to be configured as part of VLAN 456:</para><screen>ce + 456 * 1000 + 1= ce456001</screen>
</sect3>
</sect2><sect2 id="fumzn"><title>Planning for VLANs on a Network</title><para>Use the next procedure for planning for VLANs on your network. </para><task id="fumzp"><title>How to Plan for VLAN Configuration</title><procedure><step><para>Examine the local network topology and determine where subdivision
into VLANs is appropriate.</para><para>For a basic example of such a topology,
refer to <olink targetptr="gatoo" remap="internal">Figure 6&ndash;1</olink>.</para>
</step><step><para>Create a numbering scheme for the VIDs and assign a VID to each
VLAN.</para><note><para>A VLAN numbering scheme might already exist on the network. If
so, you must create VIDs within the existing VLAN numbering framework.</para>
</note>
</step><step><para>On each system, determine which interfaces should be members of
a particular VLAN.</para><substeps><step><para>Find out which interfaces are configured on a host.</para><screen># <userinput>dladm show-link</userinput></screen>
</step><step><para>Identify which VID should be associated with each data link on
the system.</para>
</step><step><para>Create PPAs for each interface to be configured with a VLAN.</para>
</step>
</substeps><para>All interfaces on a system do not necessarily have to be configured
on the same VLAN.</para>
</step><step><para>Check the connections of the interfaces to the network's switches.</para><para>Note the VID of each interface and the switch port where each interface
is connected.</para>
</step><step><para>Configure each port of the switch with the same VID as the interface
to which it is connected.</para><para>Refer to the switch manufacturer's documentation
for configuration instructions.</para>
</step>
</procedure>
</task>
</sect2><sect2 id="fpdga"><title>Configuring VLANs</title><para>The Solaris OS now supports VLANs on the following interface types:</para><itemizedlist><listitem><para><command>ce</command></para>
</listitem><listitem><para><command>bge</command></para>
</listitem><listitem><para><command>xge</command></para>
</listitem><listitem><para><command>e1000g</command></para>
</listitem>
</itemizedlist><para>Of the legacy interface types, only the <command>ce</command> interface
can become a member of a VLAN. You can configure interfaces of different types
in the same VLAN. For information about the interface types that are supported
by the Solaris OS, refer to <olink targetptr="gaugz" remap="internal">Solaris OS Interface
Types</olink>.</para><task id="fpden"><title>How to Configure a VLAN</title><procedure><step><para>Assume the Primary Administrator role, or become superuser.</para><para>The Primary Administrator role includes the Primary Administrator profile.
To create the role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Determine the types of interfaces in use on your system.</para><screen># <userinput>dladm show-link</userinput></screen><para>The output shows the available interface types:</para><screen>ce0             type: legacy    mtu: 1500       device: ce0
ce1             type: legacy    mtu: 1500       device: ce1
bge0            type: non-vlan  mtu: 1500       device: bge0
bge1            type: non-vlan  mtu: 1500       device: bge1
bge2            type: non-vlan  mtu: 1500       device: bge2</screen>
</step><step performance="required" id="fpdak"><para>Configure an interface as part
of a VLAN. </para><screen># <userinput>ifconfig</userinput> <replaceable>interface-PPA</replaceable> <userinput>plumb <replaceable>IP-address</replaceable> up</userinput></screen><para>For example, you would use the following command to configure the interface <command>ce1</command> with a new IP address <literal>10.0.0.2</literal> into a VLAN
with the VID 123:</para><screen># <userinput>ifconfig ce123001 plumb 10.0.0.2 up</userinput></screen>
</step><step performance="required"><para>(Optional) To make the VLAN settings persist
across reboots, create a <filename>hostname.</filename><replaceable>interface-PPA</replaceable> file for each interface that is configured as part of a VLAN. </para><screen># <userinput>cat hostname.</userinput><replaceable>interface-PPA</replaceable>
<replaceable>IPv4-address</replaceable></screen>
</step><step performance="required"><para>On the switch, set VLAN tagging and VLAN
ports to correspond with the VLANs that you have set up on the system. </para>
</step>
</procedure><example id="gamkn"><title>Configuring a VLAN</title><para>This example shows how to configure devices <literal>bge1</literal> and <literal>bge2</literal> into a VLAN with the VID 123.</para><screen width="100"># <userinput>dladm show-link</userinput>
ce0             type: legacy    mtu: 1500       device: ce0
ce1             type: legacy    mtu: 1500       device: ce1
bge0            type: non-vlan  mtu: 1500       device: bge0
bge1            type: non-vlan  mtu: 1500       device: bge1
bge2            type: non-vlan  mtu: 1500       device: bge2
# <userinput>ifconfig bge123001 plumb 10.0.0.1 up</userinput>
# <userinput>ifconfig bge123002 plumb 10.0.0.2 up</userinput> 
# <userinput>cat hostname.bge123001
  10.0.0.1</userinput>
# <userinput>cat hostname.bge123002
  10.0.0.2</userinput>
# <userinput>ifconfig -a</userinput>

lo0: flags=2001000849 &lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> 
     mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
bge123001: flags=201000803 &lt;UP,BROADCAST,MULTICAST,IPv4,CoS> mtu 1500 index 2
        inet 10.0.0.1 netmask ff000000 broadcast 10.255.255.255
        ether 0:3:ba:7:84:5e 
bge123002: flags=201000803 &lt;UP,BROADCAST,MULTICAST,IPv4,CoS> mtu 1500 index 3
        inet 10.0.0.2 netmask ff000000 broadcast 10.255.255.255
        ether 0:3:ba:7:84:5e 
ce0: flags=1000843 &lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4
        inet 192.168.84.253 netmask ffffff00 broadcast 192.168.84.255
        ether 0:3:ba:7:84:5e 
# <userinput>dladm show-link</userinput>
ce0             type: legacy    mtu: 1500       device: ce0
ce1             type: legacy    mtu: 1500       device: ce1
bge0            type: non-vlan  mtu: 1500       device: bge0
bge1            type: non-vlan  mtu: 1500       device: bge1
bge2            type: non-vlan  mtu: 1500       device: bge2
bge123001       type: vlan 123  mtu: 1500       device: bge1
bge123002       type: vlan 123  mtu: 1500       device: bge2</screen>
</example>
</task>
</sect2>
</sect1><sect1 id="fpjvl"><title>Administering Link Aggregations</title><para>The Solaris OS supports the organization
of network interfaces into link aggregations. A <emphasis>link aggregation</emphasis> consists
of several interfaces on a system that are configured together as a single,
logical unit. Link aggregation, also referred to as <emphasis>trunking</emphasis>,
is defined in the <ulink remap="" url="www.ieee802.org/3/index.html" type="text_url">IEEE 802.3ad Link Aggregation Standard</ulink>. </para><para>The IEEE 802.3ad Link Aggregation Standard provides a method to combine
the capacity of multiple full-duplex Ethernet links into a single logical
link. This link aggregation group is then treated as though it were, in fact,
a single link. </para><para>The following are features of link aggregations:</para><itemizedlist><listitem><para><emphasis role="strong">Increased bandwidth</emphasis> &ndash;
The capacity of multiple links is combined into one logical link.</para>
</listitem><listitem><para><emphasis role="strong">Automatic failover/failback</emphasis> &ndash;
Traffic from a failed link is failed over to working links in the aggregation.</para>
</listitem><listitem><para><emphasis role="strong">Load balancing</emphasis> &ndash;
Both inbound and outbound traffic is distributed according to user selected
load balancing policies, such as source and destination MAC or IP addresses.</para>
</listitem><listitem><para><emphasis role="strong">Support for redundancy</emphasis> &ndash;
Two systems can be configured with parallel aggregations.</para>
</listitem><listitem><para><emphasis role="strong">Improved administration</emphasis> &ndash;
All interfaces are administered as a single unit.</para>
</listitem><listitem><para><emphasis role="strong">Less drain on the network address
pool</emphasis> &ndash; The entire aggregation is assigned one IP address.</para>
</listitem>
</itemizedlist><sect2 id="gafjy"><title>Link Aggregation Basics</title><para>The basic link aggregation topology involves a single aggregation that
is composed of a set of physical interfaces. You might use the basic link
aggregation in the following situations:</para><itemizedlist><listitem><para>For systems that run an application with distributed heavy
traffic, you can dedicate an aggregation to that application's traffic.</para>
</listitem><listitem><para>For sites with limited IP address space that nevertheless
require large amounts of bandwidth, you need only one IP address for a large
aggregation of interfaces. </para>
</listitem><listitem><para>For sites that need to hide the existence of internal interfaces,
the IP address of the aggregation hides its interfaces from external applications.</para>
</listitem>
</itemizedlist><para><olink targetptr="gatnz" remap="internal">Figure 6&ndash;3</olink> shows an aggregation
for a server that hosts a popular web site. The site requires increased bandwidth
for query traffic between Internet customers and the site's database server.
For security purposes, the existence of the individual interfaces on the server
must be hidden from external applications. The solution is the aggregation <literal>aggr1</literal> with the IP address <literal>192.168.50.32</literal>. This
aggregation consists of three interfaces,<command>bge0&ndash;2</command>.
These interfaces are dedicated to sending out traffic in response to customer
queries. The outgoing address on packet traffic from all the interfaces is
the IP address of <literal>aggr1</literal>, <literal>192.168.50.32</literal>.</para><figure id="gatnz"><title>Basic Link Aggregation Topology</title><mediaobject><imageobject><imagedata entityref="virtualLinkAg"/>
</imageobject><textobject><simpara>The figure shows a block for the link aggr1. Three physical
interfaces, bge0&ndash;bge2, descend from the link block.</simpara>
</textobject>
</mediaobject>
</figure><para><olink targetptr="gatog" remap="internal">Figure 6&ndash;4</olink> depicts a local
network with two systems, each of which has an aggregation configured. The
two systems are connected by a switch. If you need to run an aggregation through
a switch, that switch must support aggregation technology. This type of configuration
is particularly useful for high availability and redundant systems.</para><para>In the figure, System A has an aggregation that consists of two interfaces, <command>bge0</command> and <command>bge1</command>. These interfaces are connected
to the switch through aggregated ports. System B has an aggregation of four
interfaces, <command>e1000g0</command> through<command>e100g3</command>. These
interfaces are also connected to aggregated ports on the switch.</para><figure id="gatog"><title>Aggregation Topology With Switch</title><mediaobject><imageobject><imagedata entityref="backToBackLinkAg"/>
</imageobject><textobject><simpara>The figure is explained in the preceding context.</simpara>
</textobject>
</mediaobject>
</figure>
</sect2><sect2 id="gafjl"><title>Back-to-Back Link Aggregations</title><para>The back-to-back link aggregation topology involves two separate systems
that are cabled directly to each other, as shown in the following figure.
The systems run parallel aggregations. </para><figure id="gazxe"><title>Basic Back-to-Back Aggregation Topology</title><mediaobject><imageobject><imagedata entityref="BasicB2bAg"/>
</imageobject><textobject><simpara>The figure is explained in the following context.</simpara>
</textobject>
</mediaobject>
</figure><para>In this example, device <command>bge0</command> on System A is directly
linked to <command>bge0</command> on System B, and so on. In this way, Systems
A and B can support redundancy and high availability, as well as high-speed
communications between both servers. Each server also has interface <command>ce0</command> configured
for traffic flow with the local network.</para><para>The most common application for back-to-back aggregations is mirrored
database servers. Both servers need to be updated together and therefore require
significant bandwidth, high-speed traffic flow, and reliability. Data centers
are the most common users of back-to-back link aggregations.</para>
</sect2><sect2 id="gafwr"><title>Policies and Load Balancing</title><para>If you plan to use a link aggregation, consider defining a policy for
outgoing traffic. This policy specifies how you want packets to be distributed
across the available links of an aggregation, thus establishing load balancing.
The following are the possible layer specifiers and their significance for
the aggregation policy:</para><itemizedlist><listitem><para><emphasis role="strong">L2</emphasis> - Determines the outgoing
link by hashing the MAC (L2) header of each packet</para>
</listitem><listitem><para><emphasis role="strong">L3</emphasis> - Determines the outgoing
link by hashing the IP (L3) header of each packet</para>
</listitem><listitem><para><emphasis role="strong">L4</emphasis> - Determines the outgoing
link by hashing the TCP, UDP, or other ULP (L4) header of each packet</para>
</listitem>
</itemizedlist><para>Any combination of these policies is also valid. The default policy
is L4. For more information, refer to the <command>dladm</command>(1M) man
page.</para>
</sect2><sect2 id="gaiam"><title>Aggregation Mode and Switches</title><para>If your aggregation topology involves connection through a switch, you
must note whether the switch supports <emphasis>link aggregation control protocol
(LACP)</emphasis>. If the switch supports LACP, you must configure LACP for
the switch and the aggregation. However, you can define one of the following <emphasis>modes</emphasis> in which LACP is to operate:</para><itemizedlist><listitem><para><emphasis role="strong">Off mode</emphasis> &ndash; The default
mode for aggregations. LACP packets, which are called <emphasis>LACPDUs</emphasis> are
not generated.</para>
</listitem><listitem><para><emphasis role="strong">Active mode</emphasis> &ndash; The
system generates <literal>LACPDU</literal>s at regular intervals, which you
can specify.</para>
</listitem><listitem><para><emphasis role="strong">Passive mode</emphasis> &ndash; The
system generates an <literal>LACPDU</literal> only when it receives an <literal>LACPDU</literal> from the switch. When both the aggregation and the switch are configured
in passive mode, they cannot exchange <literal>LACPDU</literal>s.</para>
</listitem>
</itemizedlist><para>See the <command>dladm</command>(1M) man page and the switch manufacturer's
documentation for syntax information.</para>
</sect2><sect2 id="gafij"><title>Requirements for Aggregations</title><para>Your aggregation configuration is bound by the following requirements:</para><itemizedlist><listitem><para>You must use the <command>dladm</command> command to configure
aggregations. </para>
</listitem><listitem><para>An interface that has been plumbed cannot become a member
of an aggregation.</para>
</listitem><listitem><para>Interfaces must be of the GLDv3 type: <literal>xge</literal>, <literal>e1000g</literal>, and <command>bge</command>. </para>
</listitem><listitem><para>All interfaces in the aggregation must run at the same speed
and in full duplex mode.</para>
</listitem><listitem><para>You must set the value for MAC addresses to &ldquo;true&rdquo;
in the EEPROM parameter <literal>local-mac-address?</literal> For instructions,
refer to <olink targetptr="eyprp" remap="internal">How to Ensure That the MAC Address of an
Interface Is Unique</olink>.</para>
</listitem><listitem><para>&ldquo;Legacy&rdquo; <emphasis>data link provider interfaces
(DLPI )</emphasis>, such as the <command>ce</command> interface do not support
Solaris link aggregations. Instead, you must configure aggregations for legacy
devices by using Sun Trunking. You cannot configure aggregations for legacy
devices by using the <command>dladm</command> command. For more information
about Sun Trunking, refer to the <citetitle>Sun Trunking 1.3 Installation
and User's Guide.</citetitle></para>
</listitem>
</itemizedlist>
</sect2><task id="gafxi"><title>How to Create a Link Aggregation</title><taskprerequisites><note><para>Link aggregation only works on full-duplex, point-to-point links
that operate at identical speeds. Make sure that the interfaces in your aggregation
conform to this requirement.</para>
</note><para>If you are using a switch in your aggregation topology, make sure that
you have done the following on the switch:</para><itemizedlist><listitem><para>Configured the ports to be used as an aggregation</para>
</listitem><listitem><para>If the switch supports LACP, configured LACP in either active
mode or passive mode</para>
</listitem>
</itemizedlist>
</taskprerequisites><procedure><step><para>Assume the Primary Administrator role, or become superuser.</para><para>The Primary Administrator role includes the Primary Administrator profile.
To create the role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Determine which interfaces are currently installed on your system.</para><screen># <userinput>dladm show-link</userinput></screen>
</step><step><para>Determine which interfaces have been plumbed.</para><screen># <userinput>ifconfig -a</userinput></screen>
</step><step><para>Create an aggregation.</para><screen># <userinput>dladm create-aggr -d <replaceable>interface</replaceable> <replaceable>key</replaceable></userinput></screen><variablelist><varlistentry><term><replaceable>interface</replaceable></term><listitem><para>Represents the device name of the interface to become part
of the aggregation.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>key</replaceable></term><listitem><para>Is the number that identifies the aggregation. The lowest
key number is 1. Zeroes are not allowed as keys.</para>
</listitem>
</varlistentry>
</variablelist><para>For example:</para><screen># <userinput>dladm create-aggr -d bge0 -d bge1 1</userinput></screen>
</step><step><para>Configure and plumb the newly created aggregation.</para><screen># <userinput>ifconfig aggr</userinput><replaceable>key</replaceable> <userinput>plumb</userinput> <replaceable>IP-address</replaceable> <userinput>up</userinput></screen><para>For example:</para><screen># <userinput>ifconfig aggr1  plumb 192.168.84.14 up</userinput></screen>
</step><step><para>Check the status of the aggregation you just created.</para><screen># <userinput>dladm show-aggr</userinput></screen><para>You receive the following output:</para><screen width="100">key: 1 (0x0001) policy: L4      address: 0:3:ba:7:84:5e (auto)
           device   address           speed         duplex  link    state
           bge0     0:3:ba:7:84:5e    1000  Mbps    full    up      attached
           bge1     0:3:ba:7:84:5e    0     Mbps    unknown down    standby</screen><para>The output shows that an aggregation with the key of 1 and a policy
of L4 was created. Note that the interfaces are known by the MAC address <literal>0:3:ba:7:84:5e</literal>, which is the system MAC address.</para>
</step><step><para>(Optional) Make the IP configuration of the link aggregation persist
across reboots.</para><substeps><step><para>For link aggregations with IPv4 addresses, create an <filename>/etc/hostname.aggr.</filename><replaceable>key</replaceable> file. For IPv6&ndash;based link
aggregations, create an <filename>/etc/hostname6.aggr.</filename><replaceable>key</replaceable> file. </para>
</step><step><para>Enter the IPv4 or IPv6 address of the link aggregation into the
file.</para><para>For example, you would create the following file for the
aggregation that is created in this procedure:</para><screen># <userinput>vi /etc/hostname.aggr1</userinput>
<userinput>192.168.84.14</userinput></screen>
</step><step><para>Perform a reconfiguration boot.</para><screen># <userinput>reboot -- -r</userinput></screen>
</step><step><para>Verify that the link aggregation configuration you entered in
the <filename>/etc/hostname.aggr</filename><replaceable>key</replaceable> file
has been configured.</para><screen># <userinput>ifconfig -a</userinput>
.
.
aggr1: flags=1000843 &lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 192.168.84.14 netmask ff000000 broadcast 192.255.255.</screen>
</step>
</substeps>
</step>
</procedure><example id="galii"><title>Creating a Link Aggregation</title><para>This example shows the commands that are used to create a link aggregation
with two devices, <command>bge0</command> and <command>bge1</command>, and
the resulting output.</para><screen width="100"># <userinput>dladm show-link</userinput>
ce0             type: legacy    mtu: 1500       device: ce0
ce1             type: legacy    mtu: 1500       device: ce1
bge0            type: non-vlan  mtu: 1500       device: bge0
bge1            type: non-vlan  mtu: 1500       device: bge1
bge2            type: non-vlan  mtu: 1500       device: bge2
# <userinput>ifconfig -a</userinput>
lo0: flags=2001000849 &lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
ce0: flags=1000843 &lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 192.168.84.253 netmask ffffff00 broadcast 192.168.84.255
        ether 0:3:ba:7:84:5e 
# <userinput>dladm create-aggr -d bge0 -d bge1 1</userinput>
# <userinput>ifconfig aggr1 plumb 192.168.84.14 up</userinput>
# <userinput>dladm show-aggr</userinput>
key: 1 (0x0001) policy: L4      address: 0:3:ba:7:84:5e (auto)
     device   address           speed         duplex  link    state
     bge0     0:3:ba:7:84:5e    1000  Mbps    full    up      attached
     bge1     0:3:ba:7:84:5e    0     Mbps    unknown down    standby

# <userinput>ifconfig -a</userinput>
lo0: flags=2001000849 &lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
ce0: flags=1000843 &lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 192.168.84.253 netmask ffffff00 broadcast 192.168.84.255
        ether 0:3:ba:7:84:5e 
aggr1: flags=1000843 &lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 192.168.84.14 netmask ff000000 broadcast 192.255.255.255
        ether 0:3:ba:7:84:5e </screen><para>Note that the two interfaces that were used for the aggregation were
not previously plumbed by <command>ifconfig</command>.</para>
</example>
</task><task id="gafxe"><title>How to Modify an Aggregation</title><tasksummary><para>This procedure shows how to make the following changes to an aggregation
definition:</para><itemizedlist><listitem><para>Modifying the policy for the aggregation</para>
</listitem><listitem><para>Changing the mode for the aggregation</para>
</listitem><listitem><para>Removing an interface from the aggregation</para>
</listitem>
</itemizedlist>
</tasksummary><procedure><step><para>Assume the Primary Administrator role, or become superuser.</para><para>The Primary Administrator role includes the Primary Administrator profile.
To create the role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Modify the aggregation to change the policy.</para><screen># <userinput>dladm modify-aggr -P</userinput><replaceable>policy key</replaceable>   </screen><variablelist><varlistentry><term><replaceable>policy</replaceable></term><listitem><para>Represents one or more of the policies L2, L3, and L4, as
explained in <olink targetptr="gafwr" remap="internal">Policies and Load Balancing</olink>. </para>
</listitem>
</varlistentry><varlistentry><term><replaceable>key</replaceable></term><listitem><para>Is a number that identifies the aggregation. The lowest key
number is 1. Zeroes are not allowed as keys.</para>
</listitem>
</varlistentry>
</variablelist>
</step><step><para>If LACP is running on the switch to which the devices in the aggregation
are attached, modify the aggregation to support LACP.</para><para>If the switch runs LACP in passive mode, be sure
to configure active mode for your aggregation.</para><screen># <userinput>dladm modify-aggr -l</userinput> <replaceable>LACP mode</replaceable> <userinput>-t</userinput> <replaceable>timer-value key</replaceable></screen><variablelist><varlistentry><term><option>l</option> <replaceable>LACP mode</replaceable></term><listitem><para>Indicates the LACP mode in which the aggregation is to run.
The values are <literal>active</literal>, <literal>passive</literal>, and <literal>off</literal>.</para>
</listitem>
</varlistentry><varlistentry><term><option>t</option> <replaceable>timer-value</replaceable></term><listitem><para>Indicates the LACP timer value, either <literal>short</literal> or <literal>long</literal>.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>key</replaceable></term><listitem><para> Is a number that identifies the aggregation. The lowest key
number is 1. Zeroes are not allowed as keys.</para>
</listitem>
</varlistentry>
</variablelist>
</step>
</procedure><example id="galre"><title>Modifying a Link Aggregation</title><para>This example shows how to modify the policy of aggregation <literal>aggr1</literal> to
L2 and then turn on active LACP mode.</para><screen width="100"># <userinput>dladm modify-aggr -P L2 1</userinput>
# <userinput>dladm modify-aggr -l active -t short 1</userinput>
# <userinput>dladm show-aggr</userinput>
key: 1 (0x0001) policy: L2      address: 0:3:ba:7:84:5e (auto)
     device   address           speed         duplex  link    state
     bge0     0:3:ba:7:84:5e    1000  Mbps    full    up      attached
     bge1     0:3:ba:7:84:5e    0     Mbps    unknown down    standby</screen>
</example>
</task><task id="gaxdg"><title>How to Remove an Interface From an Aggregation</title><procedure><step><para>Assume the Primary Administrator role, or become superuser.</para><para>The Primary Administrator role includes the Primary Administrator profile.
To create the role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Remove an interface from the aggregation.</para><screen># <userinput>dladm remove-aggr -d</userinput> <replaceable>interface</replaceable></screen>
</step>
</procedure><example id="galsm"><title>Removing Interfaces From an Aggregation</title><para>This example shows how to remove the interfaces of the aggregation <literal>aggr1</literal>.</para><screen width="100"># <userinput>dladm show-aggr</userinput>
key: 1 (0x0001) policy: L2      address: 0:3:ba:7:84:5e (auto)
     device   address           speed         duplex  link    state
     bge0     0:3:ba:7:84:5e    1000  Mbps    full    up      attached
     bge1     0:3:ba:7:84:5e    0     Mbps    unknown down    standby
# <userinput>dladm remove-aggr -d bge1 1</userinput>
# <userinput>dladm show-aggr</userinput>
key: 1 (0x0001) policy: L2      address: 0:3:ba:7:84:5e (auto)
     device    address           speed         duplex  link    state
     bge0      0:3:ba:7:84:5e    1000  Mbps    full    up      attached
          </screen>
</example>
</task><task id="galsb"><title>How to Delete an Aggregation</title><procedure><step><para>Assume the Primary Administrator role, or become superuser.</para><para>The Primary Administrator role includes the Primary Administrator profile.
To create the role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Delete the aggregation.</para><screen># <userinput>dladm remove-aggr</userinput> <replaceable>key</replaceable></screen><variablelist><varlistentry><term><replaceable>key</replaceable></term><listitem><para>Is a number that identifies the aggregation. The lowest key
number is 1. Zeroes are not allowed as keys.</para>
</listitem>
</varlistentry>
</variablelist>
</step>
</procedure><example id="gaxed"><title>How to Delete an Aggregation</title><para>This example shows how to remove the aggregation <literal>aggr1</literal>.</para><screen width="100"># <userinput>dladm show-aggr</userinput>
key: 1 (0x0001) policy: L2      address: 0:3:ba:7:84:5e (auto)
     device   address           speed     duplex  link    state
          # <userinput>dladm remove-aggr -d bge0 1</userinput></screen>
</example>
</task>
</sect1><sect1 id="gduew"><title>Configuring and Communicating Over WiFi Interfaces</title><para>The  IEEE 802.11 specifications define wireless communications for local area
networks. These specifications and the networks they describe are referred
to collectively as <emphasis>WiFi</emphasis>, a term that is trademarked by
the Wi-Fi Alliance trade group. WiFi networks are reasonably easy to configure
by both providers and prospective clients. Therefore, they are increasingly
popular and in
common use throughout the world. WiFi networks use the same radio wave technology
as cellular phones, televisions, and radios. </para><para>The Solaris OS contains features that enable you to configure a system
as a WiFi client. This section explains how to use the WiFi connectivity options
of the <command>dladm</command> command to connect a laptop or home computer
to a local WiFi network. </para><note><para>The Solaris OS does not contain features for configuring WiFi  servers or access
points.</para>
</note><sect2 id="gdyyz"><title>Finding a WiFi Network</title><para>WiFi networks
typically come in three varieties:</para><itemizedlist><listitem><para>Commercially available WiFi networks</para>
</listitem><listitem><para>Municipal WiFi networks</para>
</listitem><listitem><para>Private
WiFi networks</para>
</listitem>
</itemizedlist><para>A location that is served by WiFi is referred to as a <emphasis>hot spot</emphasis>. Each hot spot includes an access point. The <emphasis>access point</emphasis> is
a router with a &ldquo;wired&rdquo; connection to the Internet, for example, Ethernet
or DSL. The Internet connection is usually through a wireless Internet service
provider (WISP) or traditional ISP.</para><sect3 id="gdzin"><title>Commercial WiFi Networks</title><para>Many hotels and cafes offer wireless Internet connections as a service
to their customers with laptop computers. These commercial hot spots have
access points within their facilities. The access points are routers with
wired connections to a WISP that serves commercial locations. Typical WISPs include independent
providers and cellular phone companies. </para><para>You can use a laptop that runs the Solaris OS to connect to a WiFi network that is offered
by a hotel or other commercial hot spot. Ask for instructions at the hot spot
for connecting to the WiFi network. Typically, the connection process involves supplying
a key to a browser that you launch upon login. You might have to pay a fee
to the hotel or WISP in order to use the network.</para><para>Commercial locations that are Internet hot spots usually advertise
this capability to their patrons. You can also find lists of wireless hot
spots from various web sites, for example, <ulink remap="" url="http://www.wi-fihotspotlist.com" type="text_url">Wi-FiHotSpotList.com</ulink>.</para>
</sect3><sect3 id="gdzhq"><title>Municipal WiFi Networks</title><para>Cities throughout the world,
cities have constructed free municipal WiFi networks, which their citizens
can access from systems in their homes. Municipal WiFi uses radio transmitters on telephone
poles or other outdoor locations to form a &ldquo;mesh&rdquo; over the area that the network
serves. These transmitters are the access points to the municipal WiFi network. If your area
is served by a municipal WiFi network, your home might be included in the network's mesh. </para><para>Access to municipal WiFi is usually free. You can access the municipal network from a properly
equipped laptop or personal computer that runs the Solaris OS. You do not
need a home router to access the municipal network from your system. However,
configuring a home router is recommended for areas where the signal from the
municipal network is weak. Home routers are also recommended if you require
secure connections over the WiFi network. For more information, see <olink targetptr="gdxqy" remap="internal">WiFi
Networks and Security</olink>.</para>
</sect3><sect3 id="gdzil"><title>Private WiFi Networks</title><para>Because WiFi networks
are relatively easy to configure, companies and universities use private WiFi networks with access
limited to employees or students. Private WiFi networks typically require you
to supply a key when you connect or run a secure VPN after you connect. You
need a properly equipped laptop or PC that runs the Solaris OS and permission
to use the security features in order to connect to the private network.</para>
</sect3>
</sect2><sect2 id="gduei"><title>Planning for WiFi Communications</title><para>Before you can connect your system to a WiFi network, complete the following instructions.</para><task id="gdzhd"><title>How to Prepare a System for WiFi Communications</title><taskprerequisites><para>The following preparations assumes that your system is a laptop
or personal computer that runs the Solaris Express, Developer Edition 2/07 release.</para>
</taskprerequisites><procedure><step><para>Equip your system with a supported WiFi interface.</para><para>Your system must have a WiFi card that is supported by
Solaris. For the Solaris Express, Developer Edition 2/07, you can use WiFi cards that support most
Atheros chip sets. For a list of currently supported drivers and chip sets, , refer to <ulink remap="" url="http://opensolaris.org/os/community/laptop/wireless" type="text_url">Wireless Networking for OpenSolaris</ulink>.</para><para>If the interface is
not already present on the system, follow the manufacturer's instructions for installing
the interface card. You configure the interface software during the procedure <olink targetptr="gdwra" remap="internal">How to Connect to a WiFi Network</olink>.</para>
</step><step><para>Locate your system in a place that is served by a WiFi network, either commercial,
municipal, or private.</para><para>Your system must be near the access point
for the network, which is normally not a consideration for a commercial or
private network hot spot. However, if you plan to use a free municipal network,
your location must be near the transmitter access point.</para>
</step><step><para>(Optional) Set up a wireless router to serve as an additional
access point.</para><para>Set up your own router if no WiFi network is available at
your location. For example, if you have a DSL line, connect the wireless router
to the DSL router. Then the wireless router becomes the access point for your
wireless devices. </para>
</step>
</procedure>
</task>
</sect2><task id="gdwra"><title>How to Connect to a WiFi Network</title><taskprerequisites><para>The following procedure assumes that you have followed the instructions
in <olink targetptr="gdzhd" remap="internal">How to Prepare a System for WiFi Communications</olink>.</para>
</taskprerequisites><procedure><step><para>Assume the Primary Administrator
role, or become superuser.</para><para>The Primary Administrator role includes
the Primary Administrator profile. To create the role and assign the role
to a user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Check for available links.</para><screen># <userinput>dladm show-link</userinput>
ath0             type: non-vlan  mtu: 1500       device: ath0
e1000g           type: non-vlan  mtu: 1500       device: e1000g</screen><para>In this example, the output indicates that two links are available.
The <literal>ath0</literal> link supports WiFi communications using the Solaris Express, Developer Edition 2/07 software.
The <literal>e1000g</literal> link is for attaching the system to a wired
network.</para>
</step><step><para>Configure the WiFi interface.</para><para>Use the following steps to configure the interface:</para><itemizedlist><listitem><para>Plumb the link that supports WiFi:</para><screen># <userinput>ifconfig ath0 plumb</userinput></screen>
</listitem><listitem><para>Verify that the link has been plumbed:</para><screen remap="wide"># <userinput>ifconfig -a</userinput>

lo0: flags=2001000849&lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
e1000g: flags=2001004802&lt;BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,CoS> mtu 1500 index 2
        inet 0.0.0.0 netmask 0
        ether 0:e:6:4:8:1
ath0: flags=201000803&lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 3
        inet 0.0.0.0 netmask ff000000
        ether 0:b:6:e:f:18</screen>
</listitem>
</itemizedlist>
</step><step><para>Check for available networks.</para><screen># <userinput>dladm scan-wifi</userinput>
 LINK       ESSID         BSSID/IBSSID       SEC     STRENGTH   MODE   SPEED
 ath0       net1         00:0e:38:49:01:d0  none     good       g      54Mb
 ath0       net2         00:0e:38:49:02:f0  none     very weak  g      54Mb
 ath0       net3         00:0d:ed:a5:47:e0  none     very good  g      54Mb
 </screen><para>The example output
of the <literal>scan-wifi</literal> command displays information about the
available WiFi networks at the current location. The information in the output
includes:</para><variablelist><varlistentry><term><literal>LINK</literal></term><listitem><para>Link
name to be used in the WiFi connection.</para>
</listitem>
</varlistentry><varlistentry><term><literal>ESSID</literal></term><listitem><para>Extended Service Set ID. The <literal>ESSID</literal> is the name
of the WiFi network,
such as <literal>net1</literal>, <literal>net2</literal>, and <literal>net3</literal> in
the example output.</para>
</listitem>
</varlistentry><varlistentry><term><literal>BSSID/IBSSID</literal></term><listitem><para>Basic Service Set ID, the unique identifier for a particular <literal>ESSID</literal>. The <literal>BSSID</literal>  is
the 48-bit MAC address of the nearby access point that serves the network
with a particular <literal>ESSID</literal>.  </para>
</listitem>
</varlistentry><varlistentry><term><literal>SEC</literal></term><listitem><para>Type
of security that is needed to access the network. The values are <literal>none</literal> or <literal>WEP</literal>. For information about WEP, refer to <olink targetptr="gdxqy" remap="internal">WiFi Networks and Security</olink>.</para>
</listitem>
</varlistentry><varlistentry><term><literal>STRENGTH</literal></term><listitem><para>Strength
of the radio signals from the WiFi networks that
are available at your location.</para>
</listitem>
</varlistentry><varlistentry><term><literal>MODE</literal></term><listitem><para>Version
of the 802 .11 protocol that is run by the network. The modes are a, b, or g, or these modes in combination.</para>
</listitem>
</varlistentry><varlistentry><term><literal>SPEED</literal></term><listitem><para>Speed in megabits per second of the
particular network.</para>
</listitem>
</varlistentry>
</variablelist>
</step><step><para>Connect to a WiFi network.</para><para>Do either of the following:</para><itemizedlist><listitem><para>Connect to the unsecured WiFi network with the strongest signal.</para><screen># <userinput>dladm connect-wifi</userinput></screen>
</listitem><listitem><para>Connect to an unsecured network by specifying its <literal>ESSID</literal>.</para><screen># <userinput>dladm connect-wifi -e</userinput> <replaceable>ESSID</replaceable></screen><para>The <command>connect-wifi</command> subcommand of <command>dladm</command> has
several more options for connecting to a WiFi network. For complete details,
refer to the <olink targetdoc="refman" targetptr="dladm-1m" remap="external"><citerefentry><refentrytitle>dladm</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page.</para>
</listitem>
</itemizedlist>
</step><step><para>Configure an IP address
for the interface.</para><para>Do either of the following:</para><itemizedlist><listitem><para>Obtain an IP address from a DHCP server.</para><screen># <userinput>ifconfig</userinput> <emphasis>interface</emphasis> <userinput>dhcp start</userinput></screen><para>If the WiFi network does not support DHCP, you receive the following
message:</para><screen>ifconfig: <replaceable>interface</replaceable>: interface does not exist or cannot be managed using DHCP</screen>
</listitem><listitem><para>Configure a static IP address:</para><para>Use this option
if you have a dedicated IP address for the system.</para><screen># <userinput>ifconfig</userinput> <emphasis>interface IP-address/CIDR-mask | netmask</emphasis></screen>
</listitem>
</itemizedlist>
</step><step><para>Check the status of the WiFi network to which the system is connected.</para><screen># <userinput>dladm show-wifi</userinput>
LINK       STATUS        ESSID         SEC     STRENGTH   MODE   SPEED
ath0       connected     net3         none    very good   g      36Mb</screen><para>In this example,
the output indicates that the system is now connected to the <literal>net3</literal> network.
The earlier <literal>scan-wifi</literal> output indicated that <literal>net3</literal> had
the strongest signal among the available networks. The <command>dladm show-wifi</command> command
automatically chooses the WiFi network with strongest signal, unless you directly
specify a different network.</para>
</step><step><para>Access the
Internet through the WiFi network.</para><para>Do either of the following,
depending on the network to which the system is connected:</para><itemizedlist><listitem><para>If the access point offers free service, you can now run a
browser or an application of your choice.</para>
</listitem><listitem><para>If the access point is in a commercial hot spot that requires
a fee, follow the instructions provided at the current location. Typically,
you run a browser, supply a key, and give credit card information to the network
provider.</para>
</listitem>
</itemizedlist>
</step><step><para>Conclude the session.</para><para>Do one of the following:</para><itemizedlist><listitem><para>Terminate the WiFi session but leave the system running.</para><screen># <userinput>dladm disconnect-wifi</userinput> </screen>
</listitem><listitem><para>Terminate a particular WiFi session when more than one session
is currently running.</para><screen># <userinput>dladm disconnect-wifi</userinput> <replaceable>link</replaceable></screen><para>where <replaceable>link</replaceable> represents the interface that
was used for the session.</para>
</listitem><listitem><para>Cleanly shut down the system while the WiFi session is running.</para><screen># <userinput>shutdown -g0 -i5</userinput></screen><para>You do not need to explicitly disconnect the WiFi session prior to turning
off the system through the <command>shutdown</command> command.</para>
</listitem>
</itemizedlist>
</step>
</procedure><example id="gdwrx"><title>Connecting to a Specific WiFi Network</title><para>The following example shows a typical scenario that you might
encounter when using a laptop that runs the Solaris Express, Developer Edition 2/07 release in
an Internet coffee house. </para><para>Learn whether a WiFi link is available.</para><screen># <userinput>dladm show-wifi</userinput>
ath0             type: non-vlan    mtu: 1500         device: ath0</screen><para>The <literal>ath0</literal> link is installed on the laptop. Configure
the <literal>ath0</literal> interface, and verify that it is up.</para><screen># <userinput>ifconfig ath0 plumb</userinput>
# <userinput>ifconfig -a</userinput>
lo0: flags=2001000849&lt;LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
ath0: flags=201000803&lt;BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 3
        inet 0.0.0.0 netmask ff000000
        ether 0:b:6b:4e:8f:18</screen><para>Display the available WiFi links at your location.</para><screen># <userinput>dladm scan-wifi</userinput>
 LINK       ESSID         BSSID/IBSSID       SEC     STRENGTH   MODE   SPEED
 ath0       net1         00:0e:38:49:01:d0  none     weak       g      54Mb
 ath0       net2         00:0e:38:49:02:f0  none     very weak  g      54Mb
 ath0       net3         00:0d:ed:a5:47:e0  wep      very good  g      54Mb
 ath0       citinet      00:40:96:2a:56:b5  none     good       b      11Mb</screen><para>The output indicates that <literal>net3</literal> has the best signal. <literal>net3</literal> requires a key, for which the provider for the coffee house
charges a fee. <literal>citinet</literal> is a free network provided by the
local town.</para><para>Connect to the <literal>citinet</literal> network.</para><screen># <userinput>dladm connect-wifi -e citinet</userinput></screen><para>The <option>e</option> option of <command>connect-wifi</command> takes
the <literal>ESSID</literal> of the preferred WiFi network as its argument.
The argument in this command is <literal>citinet</literal>, the <literal>ESSID</literal> of
the free local network. The <command>dladm connect-wifi</command> command
offers several options for connecting to the WiFi network. For more information,
refer to the <olink targetdoc="refman" targetptr="dladm-1m" remap="external"><citerefentry><refentrytitle>dladm</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page.</para><para>Configure an IP address for the WiFi interface.</para><screen remap="wide"># <userinput>ifconfig ath0 10.192.16.3/24 up</userinput>
# <userinput>ifconfig -a</userinput>
lo0: flags=2001000849&lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
e1000g0: flags=201004843&lt;UP,,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,CoS> mtu 1500 index 3
        inet 129.146.69.34 netmask fffffe00 broadcast 129.146.69.255
        ether 0:e:7b:b5:64:a4
ath0: flags=201004843&lt;UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,CoS> mtu 1500 index 4
        inet 10.192.16.3 netmask ffffff00 broadcast 10.255.255.255
        ether 0:b:6b:4e:8f:18</screen><para>This example assumes that you have the static IP address <literal>10.192.16.3/24</literal> configured on your laptop.</para><screen># <userinput>dladm show-wifi</userinput>
LINK       STATUS        ESSID         SEC     STRENGTH   MODE   SPEED
ath0       connected     citinet       none    good       g      11Mb</screen><para>The output indicates that the laptop is now connected to network <literal>citinet</literal>.</para><screen># <userinput>firefox</userinput></screen><para>The home page for the Firefox browser displays.</para><para>Run a browser or other application to commence your work over the WiFi
network.</para><screen># <userinput>dladm disconnect-wifi</userinput>
# <userinput>dladm show-wifi</userinput>
LINK       STATUS        ESSID         SEC     STRENGTH   MODE   SPEED
ath0       disconnected   --            --       --       --       --</screen><para>The output of <command>show-wifi</command> verifies that you have disconnected
the <literal>ath0</literal> link from the WiFi network.</para>
</example>
</task><task id="gdwrw"><title>How
to Monitor the WiFi Link</title><tasksummary><para>This procedure shows how to monitor the status of a WiFi link
through standard networking tools, and change link properties through the <command>linkprop</command> subcommand.</para>
</tasksummary><procedure><step><para>Assume the Primary Administrator role, or become superuser.</para><para>The Primary Administrator role includes the Primary Administrator profile.
To create the role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Connect to the WiFi network, as described in <olink targetptr="gdwra" remap="internal">How to Connect to a WiFi Network</olink>.</para>
</step><step><para>View the properties of the link.</para><para>Use the following
syntax:</para><screen># <userinput>dladm show-linkprop</userinput> <replaceable>interface</replaceable></screen><para>For example, you would use the following syntax to show the status of
the connection established over the <literal>ath0</literal> link:</para><screen># <userinput>dladm show-linkprop ath0</userinput>
PROPERTY        VALUE           DEFAULT         POSSIBLE
channel         5               --              -- 
powermode       off             off             off,fast,max
radio           ?               on              on,off 
speed           36               --              1,2,5.5,6,9,11,12,18,24,36,48,54</screen>
</step><step><para>Set a fixed speed for the link.</para><caution><para>The Solaris OS automatically chooses the optimal speed for
the WiFi connection. Modifying the initial speed of the link might cause reduced
performance or prevent the establishment of certain WiFi connections.</para>
</caution><para>You can modify the link speed to one of the possible values for speed
that is listed in the <literal>show-linkprop</literal> output.</para><screen># <userinput>dladm set-linkprop -p speed=</userinput><replaceable>value link</replaceable></screen>
</step><step><para>Check the packet flow over the link.</para><screen># <userinput>netstat -I ath0 -i 5</userinput>
   input   ath0      output       input  (Total)    output
packets errs  packets errs  colls  packets errs  packets errs  colls
317     0     106     0     0      2905    0     571     0     0
14      0     0       0     0      20      0     0       0     0
7       0     0       0     0      16      0     1       0     0
5       0     0       0     0      9       0     0       0     0
304     0     10      0     0      631     0     316     0     0
338     0     9       0     0      722     0     381     0     0
294     0     7       0     0      670     0     371     0     0
306     0     5       0     0      649     0     338     0     0
289     0     5       0     0      597     0     301     0     0</screen>
</step>
</procedure><example id="gdygw"><title>Set the Speed of a Link</title><para>This example shows how to set the speed of a link after you have
connected to a WiFi network</para><screen># <userinput>dladm show-linkprop -p speed ath0</userinput>
PROPERTY        VALUE           DEFAULT         POSSIBLE
speed           24               --              1,2,5,6,9,11,12,18,24,36,48,54
# <userinput>dladm set-linkprop -p speed=36 ath0</userinput>

# <userinput>dladm show-linkprop -p speed ath0</userinput>
PROPERTY        VALUE           DEFAULT         POSSIBLE
speed           36               --              1,2,5,6,9,11,12,18,24,36,48,54</screen>
</example>
</task><sect2 id="gdxqy"><title>WiFi Networks and Security</title><para>Radio wave technology makes WiFi networks readily available and
often freely accessible to users in many locations. As a result, connecting
to a WiFi network can be an insecure undertaking. However, certain types of
WiFi connections are more secure:</para><itemizedlist><listitem><para>Connecting to a private, restricted-access WiFi network</para><para>Private networks, such as internal networks established by corporations
or universities, restrict access to their networks to users who can provide
the correct security challenge. Potential users must supply a key during the
connection sequence or log in to the network through a secure VPN.</para>
</listitem><listitem><para>Encrypting your connection to the WiFi network</para><para>You
can encrypt communications between your system and a WiFi network by using
a secure key. Your access point to the WiFi network must be a router in your
home or office with a secure key-generating feature. Your system and the router
establish and then share the key before creating the secure connection.</para>
</listitem>
</itemizedlist><para>The <command>dladm</command> command can use a Wired Equivalent Privacy
(WEP) key for encrypting connections through the access point. The WEP protocol
is defined in IEEE 802.11 specifications for wireless connections. For complete
details on the WEP-related options of the <command>dladm</command> command,
refer to the <olink targetdoc="refman" targetptr="dladm-1m" remap="external"><citerefentry><refentrytitle>dladm</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page.</para><task id="gdwjm"><title>How to Set Up an Encrypted WiFi Network Connection</title><tasksummary><para> The next procedure shows how to set up secure communications
between a system and a router in the home. Many wireless and wired routers
for the home have an encryption feature that can generate a secure key. This
procedure assumes that you use such a router and have its documentation available.
The procedure also assumes that your system is already plugged into the router.</para>
</tasksummary><procedure><step><para>Start the software for configuring the home router.</para><para>Refer
to the manufacturer's documentation for instructions. Router manufacturers
typically offer an internal web site or a graphical user interface for router
configuration.</para>
</step><step><para>Generate the value for the WEP key.</para><para>Follow the manufacturer's instructions for creating a secure key
for the router. The router configuration GUI might ask you to supply a passphrase
of your choice for the key. The software then uses the passphrase to generate
a hexadecimal string, typically 5 bytes or 13 bytes in length. This string
becomes the value to be used for the WEP key.</para>
</step><step><para>Apply and save the key configuration.</para><para>Refer to the
manufacturer's documentation for instructions.</para>
</step><step><para>Assume the Primary Administrator role, or become superuser.</para><para>The Primary Administrator role includes the Primary Administrator profile.
To create the role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Create a secure object that contains the WEP key.</para><para>Open
a terminal window on the system and type the following:</para><screen># <userinput>dladm create-secobj -c wep</userinput> <replaceable>keyname</replaceable></screen><para>where <replaceable>keyname</replaceable> represents the name you want
to give to the key.</para>
</step><step><para>Supply the value for the WEP key to the secure object.</para><para>The <command>create-secobj</command> subcommand then runs a script that requests the value
for the key. </para><screen>provide value for <replaceable>keyname</replaceable>: <replaceable>5 or 13 byte key</replaceable>
confirm value for <replaceable>keyname</replaceable>: <replaceable>retype key</replaceable></screen><para>This value is the key that was generated by the router. The script accepts
either a five byte or thirteen byte string, in ASCII or in hexadecimal for
the key value.</para>
</step><step><para>View the contents of the key that you just created.</para><screen># <userinput>dladm show-secobj</userinput>
OBJECT               CLASS
<replaceable>keyname</replaceable>                wep</screen><para>where <replaceable>keyname</replaceable> is the name for the secure
object.</para>
</step><step><para>Make an encrypted connection to the WiFi network.</para><screen># <userinput>dladm connect-wifi -e</userinput> <replaceable>network</replaceable> -k <replaceable>keyname interface</replaceable></screen>
</step><step><para>Verify that the connection is secure.</para><screen># <userinput>dladm show-wifi</userinput>
LINK       STATUS        ESSID         SEC     STRENGTH   MODE   SPEED
ath0       connected     net1          wep     good       g      11Mb</screen><para>The <literal>wep</literal> value under the <literal>SEC</literal> heading
indicates that WEP encryption is in place for the connection.</para>
</step>
</procedure><example id="gdygb"><title>Setting Up Encrypted WiFi Communications</title><para>This example assumes that you have already done the following:</para><itemizedlist><listitem><para>Connected your system to a home router that can create a WEP
key</para>
</listitem><listitem><para>Followed the router manufacturer's documentation and created
the WEP key</para>
</listitem><listitem><para>Saved the key so that you can use it to create the secure
object on your system</para>
</listitem>
</itemizedlist><screen># <userinput>dladm create-secobj -c wep mykey</userinput>
provide value for mykey: *****
confirm value for mkey: *****</screen><para>When you supply the WEP key generated that is by the router, asterisks
mask the value that you type.</para><screen># <userinput>dladm show-secobj</userinput>
OBJECT               CLASS
 mykey               wep
# <userinput>dladm connect-wifi -e citinet -k mykey ath0</userinput></screen><para>This command establishes an encrypted connection to the WiFi network <literal>citinet,</literal> using the secure object <literal>mykey</literal>.</para><screen># <userinput>dladm show-wifi</userinput>
LINK       STATUS        ESSID         SEC     STRENGTH   MODE   SPEED
ath0       connected     citinet       wep     good       g      36Mb</screen><para>This output verifies that you are connected to <literal>citinet</literal> through
WEP encryption.</para>
</example>
</task>
</sect2>
</sect1>
</chapter>