Before You Begin
Ensure that your role has the appropriate rights profile to perform this procedure. See Using Rights Profiles to Perform Network Configuration.
$ dladm show-phys LINK MEDIA STATE SPEED DUPLEX DEVICE net0 Ethernet up 1500 full e1000g0 net1 WiFi down 1500 full ath0
The output indicates that two links are available. net0 over the device e1000g0, which supports wired communications and net1 over the device ath0, which enables you to connect to a wireless network.
$ ipadm create-ip net1
$ ipadm show-if IFNAME CLASS STATE ACTIVE OVER lo0 loopback ok yes -- net1 ip ok yes --
$ dladm scan-wifi LINK ESSID BSSID/IBSSID SEC STRENGTH MODE SPEED net1 ofc 00:0e:38:49:01:d0 none good g 54Mb net1 home 00:0e:38:49:02:f0 none very weak g 54Mb net1 linksys 00:0d:ed:a5:47:e0 none very good g 54Mb
The scan-wifi command displays information about the available WiFi networks at the current location. The output includes the following information:
Link name to be used in the WiFi connection.
Type of security that is required to access the wireless network. The values are none and WPA. For more information, see Establishing Secure WiFi Communications.
Refers to the strength of the radio signals from the WiFi networks that are available at your location.
Version of the 802.11 protocol that is run by the network. The modes are a, b, and g, or any combination of these modes.
Refers to the speed (in megabits per second) of the particular network.
$ dladm connect-wifi [-e ESSID]
If a connection is established, a Known WLAN is created. See Administering Known WLANs for more details about Known WLANs.
$ dladm show-wifi LINK STATUS ESSID SEC STRENGTH MODE SPEED net1 connected ofc none very good g 36Mb
The previous output indicates that the system is connected to the ofc network. The scan-wifi output from Step 3Step 4 of this procedure indicated that ofc had the strongest signal of the available networks. The dladm connect-wifi command automatically chooses the WiFi network with the strongest signal, unless you explicitly specify a different wireless network.
$ ipadm create-addr -T dhcp interface
$ ipadm create-addr -a address interface
Use this option if you have a dedicated IP address for the system.
The following example combines the different steps that you can take to connect your Oracle Solaris system to a wireless network. The example also shows how you can force the system to connect to a specific and preferred wireless network instead of allowing the OS to randomly select the wireless network. In the following example, assume that the static IP address 203.0.113.3/24 is assigned for use on the system.
$ dladm show-phys LINK MEDIA STATE SPEED DUPLEX DEVICE net0 Ethernet up 1500 full e1000g0 net1 Wifi down 1500 full ath0 $ ipadm create-ip net1 $ ipadm show-if net1 IFNAME CLASS STATE ACTIVE OVER net1 ip ok yes -- $ dladm scan-wifi LINK ESSID BSSID/IBSSID SEC STRENGTH MODE SPEED net1 wifi-a 00:0e:38:49:01:d0 none weak g 54Mb net1 wifi-b 00:0e:38:49:02:f0 none very weak g 54Mb net1 ofc 00:0d:ed:a5:47:e0 none very good g 54Mb net1 mynet 00:40:96:2a:56:b5 none good b 11Mb $ dladm connect-wifi -e mynet $ dladm show-wifi LINK STATUS ESSID SEC STRENGTH MODE SPEED net1 connected mynet none good g 11Mb $ ipadm create-addr -a 203.0.113.3/24 net0 ipadm: net1/v4 $ ipadm show-addr net0 ADDROBJ TYPE STATE ADDR net1/v4 static ok 203.0.113.3/24
Launch a browser or another application to commence your work over the WiFi network.
Terminate the session but leave the system running.
$ dladm disconnect-wifi $ dladm show-wifi LINK STATUS ESSID SEC STRENGTH MODE SPEED net1 disconnected -- -- -- -- --
The output of the show-wifi command verifies that you have disconnected the net1 link from the WiFi network.