Article title: detailed explanation: Linux Wireless Network commands. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Iwconfig
Iwconfig is one of the user-layer configuration tools for Linux Wireless Extensions (LWE. LWE is a tool for wireless network configuration in Linux, including kernel support, user-layer configuration tool, and driver interface support. At present, many wireless network cards support LWE, and mainstream Linux versions, such as Redhat Linux and Ubuntu Linux, have already brought this configuration tool.
Usage: iwconfig interface [essid {NN | on | off}]
[Nwid {NN | on | off}]
[Mode {managed | ad-hoc | ......}
[Freq N. NNNN [k | M | G]
[Channel N]
[Ap {N | off | auto}]
[Sens N]
[Nick N]
[Rate {N | auto | fixed}]
[Rts {N | auto | fixed | off}]
[Frag {N | auto | fixed | off}]
[Enc {NNNN-NNNN | off}]
[Power {period N | timeout N}]
[Retry {limit N | lifetime N}]
[Txpower N {mW | dBm}]
[Commit]
Note: iwconfig is the most important tool for LWE. you can configure most parameters of the wireless network card.
Parameters:
Essid: Set the ESSID (Extension Service Set ID) of the wireless network adapter ). ESSID is used to distinguish different wireless networks. Normally, only wireless sites with the same ESSID can communicate with each other unless you want to listen to the wireless network. The following parameter is an ESSID string enclosed by double quotation marks, or any/on/off. if The ESSID string contains any/no/off, add "--".
Example:
# Iwconfig eth0 essid any allows any ESSID, that is, the hybrid mode
# Iwconfig eth0 essid "My Network" set ESSID to "My Network"
# Iwconfig eth0 essid -- "ANY" set ESSID to "ANY"
Nwid: Network ID, used only for the wireless Network card of the pre-802.11, 802.11 Nic uses ESSID and MAC address of AP to replace nwid, now basically do not need to set.
Example:
# Iwconfig eth0 nwid AB34
# Iwconfig eth0 nwid off
Nick: Nickname. this parameter must be set for some NICs, but is not used for the 802.11 protocol stack and MAC.
Example:
# Iwconfig eth0 nickname "My Linux Node"
Mode: Set the working mode of the wireless network card. it can be
Ad-hoc: point-to-point wireless network without AP
Managed: a network composed of multiple APS, which allows wireless devices to roam.
Master: sets the wireless network card as an AP
Repeater: set as a wireless network relay device to forward network packets.
Secondary: set as the backup AP/Repeater
Monitor: listening mode
Auto: The working mode is automatically selected by the wireless network adapter.
Example:
# Iwconfig eth0 mode Managed
# Iwconfig eth0 mode Ad-Hoc
Freq/channel: set the frequency or channel of the wireless network adapter. a parameter smaller than 1000 is considered as a channel, and a parameter greater than 10000 is considered as a frequency. The frequency unit is Hz. the numbers can be appended with k, M, and G to change the order of magnitude. for example, the 2.4G. channel starts from 1. You can use the lwlist tool to view the frequency and channel supported by the wireless network card. The off/auto parameter indicates the automatic selection frequency of the wireless network.
Note: In Managed mode, the AP indicates the working frequency of the wireless network adapter. Therefore, the parameters set in this mode are ignored. In Ad-hoc mode, only the specified frequency is used for the initial wireless network. If an existing Ad-hoc network is added, the configured frequency parameter is ignored.
Example:
# Iwconfig eth0 freq2422000000
# Iwconfig eth0 freq 2.422G
# Iwconfig eth0 channel 3
# Iwconfig eth0 channel auto
Ap: connect to the specified AP or wireless network. the following parameters can be the MAC address of the AP or the identifier of iwlist scan. If it is Ad-hoc, it is connected to an existing Ad-hoc network. Use the off parameter to enable the wireless network adapter to enter the automatic mode without changing the connected AP. Any/auto parameter. the wireless network card automatically selects the best AP.
Note: if the wireless signal is low to a certain extent, the wireless network will automatically select the AP mode.
Example:
# Iwconfig eth0 ap 00: 60: 1D: 01: 23: 45
# Iwconfig eth0 ap any
# Iwconfig eth0 ap off
Rate/bit: if the wireless network card supports multiple rates, you can use this command to set the working rate. A parameter smaller than 1000 is defined by a specific wireless network card driver. it is generally the index value of the transmission rate. if it is greater than 1000, the speed is measured in bps. k, M, and, G to specify the order of magnitude. The auto parameter allows the wireless network adapter to automatically select the rate fixed parameter so that the wireless network adapter does not use the automatic rate mode.
Example:
# Iwconfig eth0 rate 11 M
# Iwconfig eth0 rate auto
# Iwconfig eth0 rate 5.5 M auto // automatically select the rate below 5 MB
Txpower: if the wireless network card supports multiple transmit power settings, use this parameter to set the transmit unit to dBm. if it is specified as W (MW), only the conversion formula is as follows:
DBm = 30 + log (W ). The on/off parameter can be used to enable or disable the Transmitting Unit. auto and fixed specify whether the transmitting power is automatically selected for the wireless device.
Example:
# Iwconfig eth0 txpower 15
# Iwconfig eth0 txpower 30 mW
# Iwconfig eth0 txpower auto
# Iwconfig eth0 txpower off
Sens: set the lower limit of the receiver sensitivity. under this lower limit, the wireless network adapter determines that the wireless network signal is too bad. different network adapters will take different measures, some modern wireless NICs will automatically select a new AP. the positive parameter is raw data, which is directly transmitted to the Wireless NIC driver for processing. this is generally considered as a percentage. A negative value indicates the dBm value.
Example:
# Iwconfig eth0 sens-80
# Iwconfig eth0 sens 2
Retry: Set the retransmission mechanism of the wireless network adapter. Limit 'value' specifies the maximum number of retransmissions. lifetime 'value' specifies the maximum retry time, in seconds. you can use m and u to specify the unit in milliseconds and microseconds. If the wireless network adapter supports automatic mode, you can add min and max before limit and lifetime to specify the upper and lower limits.
Example:
# Iwconfig eth0 retry 16
# Iwconfig eth0 retry lifetime 300 m
# Iwconfig eth0 retry min limit 8
Rts: specifies the RTS/CTS handshake mode. Using the RTS/CTS handshake will increase the overhead, but performance can be improved if there are hidden wireless nodes or many wireless nodes in the wireless network.
[1] [2] Next page