Product SiteDocumentation Site

5.4. Using the command line interface

The following steps demonstrate how to configure a wireless connection in Fedora Documentation using the command-line interface (CLI) using the iwconfig command. This is an example only and demonstrates how simple wireless connections are configured in Fedora Documentation using the iwconfig command. Using NetworkManager is the recommended method to configure a wireless network, and knowing how to use iwconfig is usually not required.
  1. First make sure NetworkManager is not controlling the interface. Deselect the Controlled by NetworkManager option that is shown in the image available here: Section 5.3, “Using NetworkManager” at Step 4, then click OK and save changes.
  2. Reboot the machine to make sure NetworkManager is not controlling the interface.
iwconfig is a command-line utility that sets the parameters of a network interface that connects to a wireless network. Open a terminal and run su - and enter the root/administrative password to switch to the root user. Run iwconfig without any arguments to show which interface has wireless capabilities:
[scott@localhost ~]$ su -
Password: 
[root@localhost ~]# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

eth1      unassociated  Mode:Managed  Frequency=2.427 GHz  
          Access Point: Not-Associated   Bit Rate:0 kb/s   Tx-Power=20 dBm   
          Sensitivity=8/0  
          Retry limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

[root@localhost ~]#

Note that eth1 is a working wireless interface, and is currently not associated to any network.
The following output shows the use of iwconfig to connect to a simple wireless network with an ESSID of mynet with a WEP key of 16a12bd649ced7ce42ee3f383f:
[root@localhost ~]# iwconfig eth1 essid mynet key 16a12bd649ced7ce42ee3f383f
[root@localhost ~]# ifconfig eth1 up
[root@localhost ~]# dhclient eth1

Once these commands are entered, run iwconfig eth1 to show the connection details:
[root@localhost ~]# iwconfig eth1
eth1      IEEE 802.11g  ESSID:"mynet"  
          Mode:Managed  Frequency:2.427 GHz  Access Point: 00:1D:A2:88:A9:41
          Bit Rate:54 Mb/s   Tx-Power=20 dBm   Sensitivity=8/0  
          Retry limit:7   RTS thr:off   Fragment thr:off
          Encryption key:16A1-2BD6-49CE-D7CE-42EE-3F38-3F   Security mode:open
          Power Management:off
          Link Quality=84/100  Signal level=-43 dBm  Noise level=-85 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:7   Missed beacon:12