6185
Comment: Formatting. Add speed note to troubleshooting section.
|
6194
converted to 1.6 markup
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
||<tablestyle="width: 100%;" style="border: 0px hidden">~-[:DebianWiki/EditorGuide#translation:Translation(s)]: none-~||<style="text-align: right;border: 0px hidden"> (!) [:/Discussion:Discussion]|| | ||<tablestyle="width: 100%;" style="border: 0px hidden">~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: none-~||<style="text-align: right;border: 0px hidden"> (!) [[/Discussion|Discussion]]|| |
Line 7: | Line 7: |
[[TableOfContents(2)]] | <<TableOfContents(2)>> |
Line 9: | Line 9: |
A [wiki:WikiPedia:Ad-hoc_network wireless ad-hoc network] - also known as Independent Basic Service Set (IBSS) - consists of local wireless devices (nodes) discovering each other and forming a network, each able to forward data for other nodes. An access point is not required for managing this communication. | A [[WikiPedia:Ad-hoc_network|wireless ad-hoc network]] - also known as Independent Basic Service Set (IBSS) - consists of local wireless devices (nodes) discovering each other and forming a network, each able to forward data for other nodes. An access point is not required for managing this communication. |
Line 38: | Line 38: |
{i} [:WiFi/ath_pci:MadWifi] users: You are required to provide driver-specific options ({{{madwifi-base}}}, {{{madwifi-mode}}}), in order to recreate the VAP in ad-hoc mode: | {i} [[WiFi/ath_pci|MadWifi]] users: You are required to provide driver-specific options ({{{madwifi-base}}}, {{{madwifi-mode}}}), in order to recreate the VAP in ad-hoc mode: |
Line 81: | Line 81: |
For general {{{/etc/network/interfaces}}} information, see the [http://manpages.debian.net/man/5/interfaces interfaces(5)] man page. | For general {{{/etc/network/interfaces}}} information, see the [[http://manpages.debian.net/man/5/interfaces|interfaces(5)]] man page. |
Line 92: | Line 92: |
{i} [:WiFi/ath_pci:MadWifi] users: You need to destroy the existing station VAP and create a new one in ad-hoc mode: | {i} [[WiFi/ath_pci|MadWifi]] users: You need to destroy the existing station VAP and create a new one in ad-hoc mode: |
Line 139: | Line 139: |
* [:DebianEtch:Etch] users: The rt2x00 "next-generation" drivers (["rt2400pci"], [:WiFi/rt2500:rt2500pci], ["rt2500usb"], ["rt61pci"], [:WiFi/rt73:rt73usb]) supplied in the ["EtchAndAHalf"] (2.6.24) kernel may not support ad-hoc operation. Install a 2.6.26 kernel from [:Backports:Debian Backports] to provide updated drivers. | * [[DebianEtch|Etch]] users: The rt2x00 "next-generation" drivers ([[rt2400pci]], [[WiFi/rt2500|rt2500pci]], [[rt2500usb]], [[rt61pci]], [[WiFi/rt73|rt73usb]]) supplied in the [[EtchAndAHalf]] (2.6.24) kernel may not support ad-hoc operation. Install a 2.6.26 kernel from [[Backports|Debian Backports]] to provide updated drivers. |
Line 144: | Line 144: |
* ["WiFi/HowToUse"] * ["WiFi"] * [http://hostap.epitest.fi/] | DebPkg:hostapd is a daemon to turn a computer into an access point. |
* [[WiFi/HowToUse]] * [[WiFi]] * [[http://hostap.epitest.fi/]] | DebPkg:hostapd is a daemon to turn a computer into an access point. |
WiFi Ad-hoc Network
This page describes how to establish a decentralized WiFi network.
A wireless ad-hoc network - also known as Independent Basic Service Set (IBSS) - consists of local wireless devices (nodes) discovering each other and forming a network, each able to forward data for other nodes. An access point is not required for managing this communication.
In the following examples, two wireless LAN clients will be configured as ad-hoc network nodes with static IP addressing. Before continuing, install the wireless-tools package.
Debian Method
On each node, open /etc/network/interfaces in a text editor:
$ su # sensible-editor /etc/network/interfaces
- Define stanzas for each node's wireless interface, setting the network SSID and the device's operating mode to ad-hoc:
Node A
auto wlan0 iface wlan0 inet static address 192.168.1.1 netmask 255.255.255.0 wireless-channel 1 wireless-essid MYNETWORK wireless-mode ad-hoc
Node B
auto wlan0 iface wlan0 inet static address 192.168.1.2 netmask 255.255.255.0 wireless-channel 1 wireless-essid MYNETWORK wireless-mode ad-hoc
MadWifi users: You are required to provide driver-specific options (madwifi-base, madwifi-mode), in order to recreate the VAP in ad-hoc mode:
auto ath0 iface ath0 inet static address 192.168.1.1 netmask 255.255.255.0 wireless-channel 1 wireless-essid MYNETWORK madwifi-base wifi0 madwifi-mode ad-hoc
- Save the file and exit the editor.
Raise the interface on each node:
# ifup wlan0
Scan for ad-hoc cells in range (necessary for some drivers to trigger IBSS scanning):
# iwlist wlan0 scan wlan0 Scan completed : Cell 01 - Address: 02:0F:B5:4F:74:ED ESSID:"MYNETWORK" Mode:Ad-Hoc Frequency:2.412 GHz (Channel 1) Quality=42/70 Signal level=-53 dBm Noise level=-95 dBm Encryption key:off Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s 48 Mb/s; 54 Mb/s Extra:bcn_int=100
To test, ping node A from node B:
you@nodeB$ ping 192.168.1.1 PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data. 64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.073 ms 64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.061 ms 64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.062 ms 64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=0.063 ms --- 192.168.1.1 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3001ms rtt min/avg/max/mdev = 0.061/0.064/0.073/0.010 ms
For general /etc/network/interfaces information, see the interfaces(5) man page.
Manual Method
On each node, bring the wireless interface down, change the device's operating mode and SSID, then raise the interface:
$ su # ifconfig wlan0 down # iwconfig wlan0 channel 1 # iwconfig wlan0 essid MYNETWORK # iwconfig wlan0 mode ad-hoc # ifconfig wlan0 up
MadWifi users: You need to destroy the existing station VAP and create a new one in ad-hoc mode:
$ su # wlanconfig ath0 destroy # wlanconfig ath0 create wlandev wifi0 wlanmode adhoc # iwconfig ath0 channel 1 # iwconfig ath0 essid MYNETWORK # ifconfig ath0 up
Scan for ad-hoc cells in range (necessary for some drivers to trigger IBSS scanning):
iwlist wlan0 scan wlan0 Scan completed : Cell 01 - Address: 02:0F:B5:4F:74:ED ESSID:"MYNETWORK" Mode:Ad-Hoc Frequency:2.412 GHz (Channel 1) Quality=42/70 Signal level=-53 dBm Noise level=-95 dBm Encryption key:off Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s 48 Mb/s; 54 Mb/s Extra:bcn_int=100
- On each node, assign an IP address to the wireless interface:
Node A
# ifconfig wlan0 192.168.1.1 netmask 255.255.255.0
Node B
# ifconfig wlan0 192.168.1.2 netmask 255.255.255.0
To test, ping node A from node B:
you@nodeB$ ping 192.168.1.1 PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data. 64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.073 ms 64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.061 ms 64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.062 ms 64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=0.063 ms --- 192.168.1.1 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3001ms rtt min/avg/max/mdev = 0.061/0.064/0.073/0.010 ms
Troubleshooting
Etch users: The rt2x00 "next-generation" drivers (rt2400pci, rt2500pci, rt2500usb, rt61pci, rt73usb) supplied in the EtchAndAHalf (2.6.24) kernel may not support ad-hoc operation. Install a 2.6.26 kernel from Debian Backports to provide updated drivers.
- The default operating frequency/channel (2.412 GHz: channel 1) is frequently congested. Try using a different channel in the event of station association difficulties.
- Wireless LAN devices compliant with IEEE 802.11 specifications will only support a maximum bit rate of 11 Mbit/s.
See Also
http://hostap.epitest.fi/ | hostapd is a daemon to turn a computer into an access point.