Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
elearning:workbooks:lpic:21:450:l106 [2022/10/12 08:59] – admin | elearning:workbooks:lpic:21:450:l106 [2022/11/01 07:27] (Version actuelle) – admin | ||
---|---|---|---|
Ligne 5: | Ligne 5: | ||
Dernière mise-à-jour : ~~LASTMOD~~ | Dernière mise-à-jour : ~~LASTMOD~~ | ||
- | ======Topic | + | ======Topic |
- | * **Topic | + | * **Topic |
* Configuration du Réseau sous Debian 6 | * Configuration du Réseau sous Debian 6 | ||
* Configuration de TCP/IP | * Configuration de TCP/IP | ||
Ligne 191: | Ligne 191: | ||
* PKI | * PKI | ||
* Certificats X509 | * Certificats X509 | ||
+ | * Annexe 4 - La Commande iw | ||
=====Configuration de TCP/IP sous Debian 6===== | =====Configuration de TCP/IP sous Debian 6===== | ||
Ligne 4322: | Ligne 4323: | ||
===Utilisation=== | ===Utilisation=== | ||
- | Dans l' | + | Dans l' |
< | < | ||
Ligne 6573: | Ligne 6574: | ||
{{: | {{: | ||
+ | |||
+ | =====Annexe 4 - La Commande iw===== | ||
+ | |||
+ | La commande **iw** permet de gérer le wifi : | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | Connected to 00: | ||
+ | SSID: TP-Link_BEF5_5G | ||
+ | freq: 5220 | ||
+ | RX: 3323698885 bytes (7423914 packets) | ||
+ | TX: 1238020520 bytes (5751871 packets) | ||
+ | signal: -30 dBm | ||
+ | rx bitrate: 433.3 MBit/s VHT-MCS 9 80MHz short GI VHT-NSS 1 | ||
+ | tx bitrate: 433.3 MBit/s VHT-MCS 9 80MHz short GI VHT-NSS 1 | ||
+ | |||
+ | bss flags: | ||
+ | dtim period: 1 | ||
+ | beacon int: 100 | ||
+ | root@debian11: | ||
+ | wlo1 IEEE 802.11 | ||
+ | Mode: | ||
+ | Bit Rate=433.3 Mb/s | ||
+ | Retry short limit: | ||
+ | Encryption key:off | ||
+ | Power Management: | ||
+ | Link Quality=70/ | ||
+ | Rx invalid nwid: | ||
+ | Tx excessive retries: | ||
+ | </ | ||
+ | |||
+ | Les options de cette commande sont : | ||
+ | |||
+ | < | ||
+ | root@debian11: | ||
+ | Usage: | ||
+ | Options: | ||
+ | --debug | ||
+ | --version | ||
+ | Commands: | ||
+ | dev < | ||
+ | Stop AP functionality | ||
+ | |||
+ | |||
+ | dev < | ||
+ | < | ||
+ | |||
+ | |||
+ | phy < | ||
+ | Show coalesce status. | ||
+ | |||
+ | phy < | ||
+ | Disable coalesce. | ||
+ | |||
+ | phy < | ||
+ | Enable coalesce with given configuration. | ||
+ | The configuration file contains coalesce rules: | ||
+ | delay=< | ||
+ | condition=< | ||
+ | patterns=< | ||
+ | delay=< | ||
+ | condition=< | ||
+ | patterns=< | ||
+ | ... | ||
+ | delay: maximum coalescing delay in msec. | ||
+ | condition: 1/0 i.e. 'not match'/' | ||
+ | patterns: each pattern is given as a bytestring with ' | ||
+ | places where any byte may be present, e.g. 00: | ||
+ | match 00: | ||
+ | pattern should be separated by ' | ||
+ | match ' | ||
+ | |||
+ | |||
+ | dev < | ||
+ | Authenticate with the given network. | ||
+ | |||
+ | |||
+ | dev < | ||
+ | Join the network with the given SSID (and frequency, BSSID). | ||
+ | With -w, wait for the connect to finish or fail. | ||
+ | |||
+ | dev < | ||
+ | Disconnect from the current network. | ||
+ | |||
+ | dev < | ||
+ | Set connection quality monitor RSSI threshold. | ||
+ | |||
+ | |||
+ | event [-t|-r] [-f] | ||
+ | Monitor events from the kernel. | ||
+ | -t - print timestamp | ||
+ | -r - print relative timestamp | ||
+ | -f - print full frame for auth/assoc etc. | ||
+ | |||
+ | dev < | ||
+ | Start an FTM responder. Needs a running ap interface | ||
+ | |||
+ | |||
+ | dev < | ||
+ | Get FTM responder statistics. | ||
+ | |||
+ | |||
+ | phy < | ||
+ | |||
+ | |||
+ | phy < | ||
+ | |||
+ | |||
+ | phy < | ||
+ | |||
+ | |||
+ | phy < | ||
+ | |||
+ | |||
+ | dev < | ||
+ | Join the IBSS cell with the given SSID, if it doesn' | ||
+ | it on the given frequency. When fixed frequency is requested, don't | ||
+ | join/create a cell on a different frequency. When a fixed BSSID is | ||
+ | requested use that BSSID and do not adopt another cell's BSSID even | ||
+ | if it has higher TSF and the same SSID. If an IBSS is created, create | ||
+ | it with the specified basic-rates, | ||
+ | |||
+ | dev < | ||
+ | Leave the current IBSS cell. | ||
+ | |||
+ | features | ||
+ | |||
+ | |||
+ | commands | ||
+ | list all known commands and their decimal & hex value | ||
+ | |||
+ | phy | ||
+ | list | ||
+ | List all wireless devices and their capabilities. | ||
+ | |||
+ | phy < | ||
+ | Show capabilities for the specified wireless device. | ||
+ | |||
+ | dev < | ||
+ | dev < | ||
+ | dev < | ||
+ | Switch the operating channel by sending a channel switch announcement (CSA). | ||
+ | |||
+ | dev | ||
+ | List all network interfaces for wireless hardware. | ||
+ | |||
+ | dev < | ||
+ | Show information for this interface. | ||
+ | |||
+ | dev < | ||
+ | Remove this virtual interface | ||
+ | |||
+ | dev < | ||
+ | phy < | ||
+ | Add a new virtual interface with the given configuration. | ||
+ | Valid interface types are: managed, ibss, monitor, mesh, wds. | ||
+ | |||
+ | The flags are only used for monitor interfaces, valid flags are: | ||
+ | none: no special flags | ||
+ | fcsfail: | ||
+ | control: | ||
+ | otherbss: show frames from other BSSes | ||
+ | cook: use cooked mode | ||
+ | active: | ||
+ | mumimo-groupid < | ||
+ | mumimo-follow-mac < | ||
+ | |||
+ | The mesh_id is used only for mesh mode. | ||
+ | |||
+ | help [command] | ||
+ | Print usage for all or a specific command, e.g. | ||
+ | "help wowlan" | ||
+ | |||
+ | dev < | ||
+ | Print information about the current link, if any. | ||
+ | |||
+ | dev < | ||
+ | Send an FTM request to the targets supplied in the config file. | ||
+ | Each line in the file represents a target, with the following format: | ||
+ | < | ||
+ | |||
+ | dev < | ||
+ | Leave a mesh. | ||
+ | |||
+ | dev < | ||
+ | Join a mesh with the given mesh ID with frequency, basic-rates, | ||
+ | mcast-rate and mesh parameters. Basic-rates are applied only if | ||
+ | frequency is provided. | ||
+ | |||
+ | dev < | ||
+ | Register for receiving certain mgmt frames and print them. | ||
+ | Frames are selected by their type and pattern containing | ||
+ | the first several bytes of the frame that should match. | ||
+ | |||
+ | Example: iw dev wlan0 mgmt dump frame 40 00 frame 40 01:02 count 10 | ||
+ | |||
+ | |||
+ | dev < | ||
+ | List known mesh paths. | ||
+ | |||
+ | dev < | ||
+ | Set an existing mesh path's next hop. | ||
+ | |||
+ | dev < | ||
+ | Create a new mesh path (instead of relying on automatic discovery). | ||
+ | |||
+ | dev < | ||
+ | Remove the mesh path to the given node. | ||
+ | |||
+ | dev < | ||
+ | Get information on mesh path to the given node. | ||
+ | |||
+ | dev < | ||
+ | Inject ethernet frame to given peer overriding the next hop | ||
+ | lookup from mpath table. | ||
+ | .Example: iw dev wlan0 mpath probe xx: | ||
+ | |||
+ | |||
+ | dev < | ||
+ | List known mesh proxy paths. | ||
+ | |||
+ | dev < | ||
+ | Get information on mesh proxy path to the given node. | ||
+ | |||
+ | wdev <idx> nan add_func type < | ||
+ | |||
+ | |||
+ | wdev <idx> nan rm_func cookie < | ||
+ | |||
+ | |||
+ | wdev <idx> nan config [pref < | ||
+ | |||
+ | |||
+ | wdev <idx> nan stop | ||
+ | |||
+ | |||
+ | wdev <idx> nan start pref < | ||
+ | |||
+ | |||
+ | dev < | ||
+ | Leave the OCB mode network. | ||
+ | |||
+ | dev < | ||
+ | Join the OCB mode network. | ||
+ | |||
+ | dev < | ||
+ | Leave operating channel and go to the given channel for a while. | ||
+ | |||
+ | wdev <idx> p2p stop | ||
+ | |||
+ | |||
+ | wdev <idx> p2p start | ||
+ | |||
+ | |||
+ | dev < | ||
+ | dev < | ||
+ | dev < | ||
+ | dev < | ||
+ | dev < | ||
+ | dev < | ||
+ | Start or trigger a channel availability check (CAC) looking to look for | ||
+ | radars on the given channel. | ||
+ | |||
+ | phy < | ||
+ | Show available channels. | ||
+ | |||
+ | reg reload | ||
+ | Reload the kernel' | ||
+ | |||
+ | phy < | ||
+ | Print out the devices' | ||
+ | |||
+ | reg get | ||
+ | Print out the kernel' | ||
+ | |||
+ | reg set <ISO/IEC 3166-1 alpha2> | ||
+ | Notify the kernel about the current regulatory domain. | ||
+ | |||
+ | dev < | ||
+ | |||
+ | |||
+ | dev < | ||
+ | Scan on the given frequencies and probe for the given SSIDs | ||
+ | (or wildcard if not given) unless passive scanning is requested. | ||
+ | If -u is specified print unknown data in the scan results. | ||
+ | Specified (vendor) IEs must be well-formed. | ||
+ | |||
+ | dev < | ||
+ | Stop an ongoing scheduled scan. | ||
+ | |||
+ | dev < | ||
+ | Start a scheduled scan at the specified interval on the given frequencies | ||
+ | with probing for the given SSIDs (or wildcard if not given) unless passive | ||
+ | scanning is requested. | ||
+ | will be returned. | ||
+ | |||
+ | dev < | ||
+ | Abort ongoing scan | ||
+ | |||
+ | dev < | ||
+ | Trigger a scan on the given frequencies with probing for the given | ||
+ | SSIDs (or wildcard if not given) unless passive scanning is requested. | ||
+ | Duration(in TUs), if specified, will be used to set dwell times. | ||
+ | |||
+ | |||
+ | dev < | ||
+ | Dump the current scan results. If -u is specified, print unknown | ||
+ | data in scan results. | ||
+ | |||
+ | dev < | ||
+ | Sets up the specified rate masks. | ||
+ | Not passing any arguments would clear the existing mask (if any). | ||
+ | |||
+ | dev < | ||
+ | Setup per-node TID specific configuration for TIDs selected by bitmask. | ||
+ | If MAC address is not specified, then supplied TID configuration | ||
+ | applied to all the peers. | ||
+ | Examples: | ||
+ | $ iw dev wlan0 set tidconf tids 0x1 ampdu off | ||
+ | $ iw dev wlan0 set tidconf tids 0x5 ampdu off amsdu off rtscts on | ||
+ | $ iw dev wlan0 set tidconf tids 0x3 override ampdu on noack on rtscts on | ||
+ | $ iw dev wlan0 set tidconf peer xx: | ||
+ | $ iw dev wlan0 set tidconf peer xx: | ||
+ | $ iw dev wlan0 set tidconf peer xx: | ||
+ | |||
+ | |||
+ | dev < | ||
+ | Set the multicast bitrate. | ||
+ | |||
+ | dev < | ||
+ | Set interface WDS peer. | ||
+ | |||
+ | dev < | ||
+ | Set the NoAck map for the TIDs. (0x0009 = BE, 0x0006 = BK, 0x0030 = VI, 0x00C0 = VO) | ||
+ | |||
+ | dev < | ||
+ | Set interface 4addr (WDS) mode. | ||
+ | |||
+ | dev < | ||
+ | Set interface type/mode. | ||
+ | Valid interface types are: managed, ibss, monitor, mesh, wds. | ||
+ | |||
+ | dev < | ||
+ | dev < | ||
+ | Set monitor flags. Valid flags are: | ||
+ | none: no special flags | ||
+ | fcsfail: | ||
+ | control: | ||
+ | otherbss: show frames from other BSSes | ||
+ | cook: use cooked mode | ||
+ | active: | ||
+ | mumimo-groupid < | ||
+ | mumimo-follow-mac < | ||
+ | |||
+ | dev < | ||
+ | Set mesh parameter (run command without any to see available ones). | ||
+ | |||
+ | phy < | ||
+ | Set TXQ parameters. The limit and memory_limit are global queue limits | ||
+ | for the whole phy. The quantum is the DRR scheduler quantum setting. | ||
+ | Valid values: 1 - 2**32 | ||
+ | |||
+ | phy < | ||
+ | Set a bitmap of allowed antennas to use for TX and RX. | ||
+ | The driver may reject antenna configurations it cannot support. | ||
+ | |||
+ | dev < | ||
+ | Specify transmit power level and setting type. | ||
+ | |||
+ | phy < | ||
+ | Specify transmit power level and setting type. | ||
+ | |||
+ | phy < | ||
+ | Enable ACK timeout estimation algorithm (dynack) or set appropriate | ||
+ | coverage class for given link distance in meters. | ||
+ | To disable dynack set valid value for coverage class. | ||
+ | Valid values: 0 - 114750 | ||
+ | |||
+ | phy < | ||
+ | Set coverage class (1 for every 3 usec of air propagation time). | ||
+ | Valid values: 0 - 255. | ||
+ | |||
+ | phy < | ||
+ | Put this wireless device into a different network namespace: | ||
+ | < | ||
+ | < | ||
+ | or by absolute path (man ip-netns) | ||
+ | |||
+ | |||
+ | phy < | ||
+ | Set retry limit. | ||
+ | |||
+ | phy < | ||
+ | Set rts threshold. | ||
+ | |||
+ | phy < | ||
+ | Set fragmentation threshold. | ||
+ | |||
+ | dev < | ||
+ | phy < | ||
+ | dev < | ||
+ | dev < | ||
+ | phy < | ||
+ | phy < | ||
+ | Set frequency/ | ||
+ | configuration. | ||
+ | |||
+ | phy < | ||
+ | Rename this wireless device. | ||
+ | |||
+ | dev < | ||
+ | Set power save state to on or off. | ||
+ | |||
+ | dev < | ||
+ | Retrieve mesh parameter (run command without any to see available ones). | ||
+ | |||
+ | phy < | ||
+ | Get TXQ parameters. | ||
+ | |||
+ | dev < | ||
+ | Retrieve power save state. | ||
+ | |||
+ | dev < | ||
+ | List all stations known, e.g. the AP on managed interfaces | ||
+ | |||
+ | dev < | ||
+ | Set Tx power for this station. | ||
+ | |||
+ | dev < | ||
+ | Set airtime weight for this station. | ||
+ | |||
+ | dev < | ||
+ | Set link-specific mesh power mode for this station | ||
+ | |||
+ | dev < | ||
+ | Set an AP VLAN for this station. | ||
+ | |||
+ | dev < | ||
+ | Set mesh peer link action for this station (peer). | ||
+ | |||
+ | dev < | ||
+ | Remove the given station entry (use with caution!) | ||
+ | Example subtype values: 0xA (disassociation), | ||
+ | |||
+ | dev < | ||
+ | Get information for a specific station. | ||
+ | |||
+ | dev < | ||
+ | List all gathered channel survey data | ||
+ | |||
+ | dev < | ||
+ | |||
+ | |||
+ | dev < | ||
+ | |||
+ | |||
+ | dev < | ||
+ | |||
+ | |||
+ | phy < | ||
+ | Show WoWLAN status. | ||
+ | |||
+ | phy < | ||
+ | Disable WoWLAN. | ||
+ | |||
+ | phy < | ||
+ | Enable WoWLAN with the given triggers. | ||
+ | Each pattern is given as a bytestring with ' | ||
+ | may be present, e.g. 00: | ||
+ | 00: | ||
+ | Offset and pattern should be separated by ' | ||
+ | |||
+ | The TCP configuration file contains: | ||
+ | source=ip[: | ||
+ | dest=ip: | ||
+ | data=< | ||
+ | data.interval=seconds | ||
+ | [wake=< | ||
+ | [data.seq=len, | ||
+ | [data.tok=len, | ||
+ | |||
+ | Net-detect configuration example: | ||
+ | iw phy0 wowlan enable net-detect interval 5000 delay 30 freqs 2412 2422 matches ssid foo ssid bar | ||
+ | |||
+ | |||
+ | Commands that use the netdev (' | ||
+ | ' | ||
+ | |||
+ | You can omit the ' | ||
+ | e.g. "iw wlan0 info" or "iw phy0 info". (Don't when scripting.) | ||
+ | |||
+ | Do NOT screenscrape this tool, we don't consider its output stable. | ||
+ | </ | ||
----- | ----- | ||
Copyright © 2022 Hugh Norris. | Copyright © 2022 Hugh Norris. |