The following procedure describes 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 is capable of generating a secure key.
Before You Begin
If you are connecting to a home wireless network, make sure that you have configured your router and have generated a WEP key. Follow the router manufacturer's documentation for generating and saving the key configuration.
# dladm create-secobj -c wep keyname
where keyname represents the name you want to give to the key.
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 5–byte or 13–byte string, in ASCII or hexadecimal format for the key value.
# dladm show-secobj OBJECT CLASS keyname wep
where keyname is the name of the secure object.
# dladm connect-wifi -e network -k keyname interface
# dladm show-wifi LINK STATUS ESSID SEC STRENGTH MODE SPEED net0 connected wifi-1 wep good g 11Mb
In the previous output, the wep value that is located under the SEC column indicates that the WEP encryption for the connection is in place.
Followed the router manufacturer's documentation and created the WEP key.
Saved the key so that you can use it to create the secure object on your system.
A secure object is created as follows:
# dladm create-secobj -c wep mykey provide value for mykey: ***** confirm value for mkey: *****
When you supply the WEP key that is generated by the router, asterisks mask the value that you type.
The following command establishes an encrypted connection to the WiFi network citinet by using the secure object mykey.
# dladm show-secobj OBJECT CLASS mykey wep # dladm connect-wifi -e citinet -k mykey net0
The following command verifies that you are connected to the citinet wireless network through a WEP encryption.
# dladm show-wifi LINK STATUS ESSID SEC STRENGTH MODE SPEED net0 connected citinet wep good g 36Mb