Manual Wireless Configuration with iwconfig in Ubuntu

Manual Wireless Configuration with iwconfig in Ubuntu

NetworkManager will automatically detect and configure your wireless connections, as will KNetworkManager. However, you can manually configure your connections with wireless tools such as Network Manager Editor and iwconfig. Wireless configuration makes use of the same set of wireless extensions in the Ubuntu main repository, wireless-tools package.

The wireless-tools package is a set of network configuration and reporting tools for wireless devices installed on a Linux system. They are currently supported and developed as part of the Linux Wireless Extension and Wireless Tools project, an open source project maintained by Hewlett-Packard.

As mentioned, you can configure wireless connections manually using the Network Manager Editor (Applications | Internet | Network Manager Editor). This provides a simple interface for standard configurations.

Wireless Tools offer the following command line configuration and reporting tools that you can enter in a command line interface such as terminal window:

Tool      Description
iwconfig Sets the wireless configuration options basic to most wireless devices
iwlist Displays current status information of a device
iwspy Sets the list of IP addresses in a wireless network and checks the quality of
their connections
iwpriv Accesses configuration options specific to a particular device

The iwconfig command works similar to ifconfig, configuring a network connection.
It is the tool used by network-admin to configure a wireless card. Alternatively, you can run
iwconfig directly on a command line, specifying certain parameters. Added parameters let
you set wireless-specific features such as the network name (nwid), the frequency or channel
the card uses (freq or channel), and the bit rate for transmissions (rate).

See the iwconfig man page for a complete listing of accepted parameters.

For example, to set the channel used for the wireless device installed as the first Ethernet device, you would use the following, setting the channel to 2:

iwconfig eth0 channel 2

You can also use iwconfig to display statistics for your wireless devices, just as ifconfig does. Enter the iwconfig command with no arguments or with the name of the device. Information such as the name, frequency, sensitivity, and bit rate is listed.

The iwpriv command works in conjunction with iwconfig, allowing you set options specific to a particular kind of wireless device. With iwpriv, you can also turn on roaming or select the port to use. You use the private-command parameter to enter the devicespecific options. The following example turns roaming on:

iwpriv eth0 roam on

To display the quality, signal, and noise levels for your connections, use the iwspy command with just the device name:

iwspy eth0

To obtain more detailed information about your wireless device, such as all the frequencies or channels available, use the iwlist tool. Using the device name with a particular parameter, you can obtain specific information about a device, including the frequency, access points, rate,
power features, retry limits, and encryption keys used.

Parameter      Description
essid Sets the wireless configuration options basic to most wireless devices
freq Displays current status information of a device
channel Sets the list of IP addresses in a wireless network and checks the quality of
their connections
nwid or domain Accesses configuration options specific to a particular device
mode The operating mode used for the device, such as Ad Hoc, Managed, or Auto:
Ad Hoc = one cell with no access point; Managed = network with several
access points and supports roaming; Master = the node is an access point;
Repeater = node forwards packets to other nodes; Secondary = backup
master or repeater; Monitor = only receives packets
sens The sensitivity: the lowest signal level at which data can be received
key or enc The encryption key used
frag Cuts packets into smaller fragments to increase better transmission
bit or rate Speed at which bits are transmitted; the auto option automatically falls back
to lower rates for noisy channels
ap Specifies a specific access point
power Power management for wakeup and sleep operations

你可能感兴趣的:(Manual Wireless Configuration with iwconfig in Ubuntu)