System Administration Guide: Network Interfaces and Network Virtualization

ProcedureHow to Set Up an Encrypted WiFi Network Connection

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.

  1. Start the software for configuring the home router.

    Refer to the manufacturer's documentation for instructions. Router manufacturers typically offer an internal web site or a graphical user interface for router configuration.

  2. Generate the value for the WEP key.

    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.

  3. Apply and save the key configuration.

    Refer to the manufacturer's documentation for instructions.

  4. Assume the Primary Administrator role, or become superuser.

    The Primary Administrator role includes the Primary Administrator profile. To create the role and assign the role to a user, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.

  5. Create a secure object that contains the WEP key.

    Open a terminal window on the system and type the following:


    # dladm create-secobj -c wep keyname
    

    where keyname represents the name you want to give to the key.

  6. Supply the value for the WEP key to the secure object.

    The create-secobj subcommand then runs a script that requests the value for the key.


    provide value for keyname: 5 or 13 byte key
    confirm value for keyname: retype key
    

    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.

  7. View the contents of the key that you just created.


    # dladm show-secobj
    OBJECT               CLASS
    keyname                wep

    where keyname is the name for the secure object.

  8. Make an encrypted connection to the WiFi network.


    # dladm connect-wifi -e network -k keyname interface
    
  9. Verify that the connection is secure.


    # dladm show-wifi
    LINK       STATUS        ESSID         SEC     STRENGTH   MODE   SPEED
    ath0       connected     net1          wep     good       g      11Mb

    The wep value under the SEC heading indicates that WEP encryption is in place for the connection.


Example 3–3 Setting Up Encrypted WiFi Communications

This example assumes that you have already done the following:


# dladm create-secobj -c wep mykey
provide value for mykey: *****
confirm value for mkey: *****

When you supply the WEP key generated that is by the router, asterisks mask the value that you type.


# dladm show-secobj
OBJECT               CLASS
 mykey               wep
# dladm connect-wifi -e citinet -k mykey ath0

This command establishes an encrypted connection to the WiFi network citinet, using the secure object mykey.


# dladm show-wifi
LINK       STATUS        ESSID         SEC     STRENGTH   MODE   SPEED
ath0       connected     citinet       wep     good       g      36Mb

This output verifies that you are connected to citinet through WEP encryption.