Differences between version 6 and revision by previous author of WirelessSetupNotes.
Other diffs: Previous Major Revision, Previous Revision, or view the Annotated Edit History
| Newer page: | version 6 | Last edited on Monday, January 17, 2005 10:04:39 am | by JohnMcPherson | Revert |
| Older page: | version 2 | Last edited on Thursday, September 23, 2004 12:34:41 am | by MattBrown | Revert |
@@ -1,13 +1,19 @@
!!! Notes on Setting Up Wireless Networks in Linux
This page details how you can setup a wireless connection under linux, and hopefully some tips and tricks that you can use to simplify the task.
-There are several methods you can use to configure a wireless interface in a linux computer, often these a distribution specific. This page takes the approach of showing you how to manually setup a link at the command line before delving in to distribution specific details. While this page is written with 802.11b it should be generic enough to help with other wireless technologies such as 802.11g as well.
+There are several methods you can use to configure a wireless interface in a linux computer, often these a distribution specific. This page takes the approach of showing you how to manually setup a link at the command line before delving in to distribution specific details. While this page is written with 802.11b in mind
it should be generic enough to help with other wireless technologies such as 802.11g as well.
The structure of this page is a number of steps that should be executed in order, at the end of each step is a ''Troubleshooting'' section that should help you to fix any problems that you encountered. Do not proceed to the next step unless you are sure you have completed all the preceding steps correctly!
+
+
!! Verify Environment
-First we need to check that there is a wireless card in your computer to. To get a list of all wireless interfaces in the machine use the ''iwconfig'' command, in
the example shown below we can see that this particular computer has a single wireless interface called ''eth2''. The rest of the output provides details of the current configuration of the wireless interface. Ignore that for now, we'll deal with it later - the important thing here is that you have a wireless interface installed and ready to go.
+First we need to check that there is a wireless card in your computer to. To get a list of all wireless interfaces in the machine use the ''iwconfig'' command. In Debian
, this command is part of the package called __wireless-tools__.
+In
the example shown below we can see that this particular computer has a single wireless interface called ''eth2''. The rest of the output provides details of the current configuration of the wireless interface. Ignore that for now, we'll deal with it later - the important thing here is that you have a wireless interface installed and ready to go.
+
+Other common names for a wireless interface include "wlan0" or "ath0" (the latter for wireless cards using the Atheron/madwifi driver). If the output of ''iwconfig'' shows something other than 'eth2', make the appropriate substitution in the rest of the following commands.
+
<verbatim>
xenon:~# iwconfig
lo no wireless extensions.
@@ -25,16 +31,50 @@
Tx excessive retries:6 Invalid misc:0 Missed beacon:0
</verbatim>
!Troubleshooting
-If ''iwconfig'' does not show any wireless interfaces in your computer you have a problem! Steps to fix it
+If ''iwconfig'' does not show any wireless interfaces in your computer you have a problem! Steps to fix it:
* Check that you do actually have a wireless card installed
-* Check that you have the appropriate modules (driver) for your card compiled, see WirelessChipsets for more information on this
-* Check that PCMCIA is correctly configured if you are using a miniPCI card
-* If still stuck, google, or try the wlug mailing list
.
+* Check that you have the appropriate modules (driver) for your card compiled and successfully loaded
, see WirelessChipsets for more information on this
+* Check that [
PCMCIA]
is correctly configured if you are using a miniPCI card
+* If still stuck, try
google, or try emailing
the WlugMailingList
.
+* As with most system settings commands, you must su(1) to the root user for the command to have permissions to query hardware devices.
+
+
+
+!! Check Network Availability
+
+You can check if your card can see any access points at all by issuing the command __<tt>iwlist eth2 ap</tt>__ (or whatever interface your wireless is on if not 'eth2').
+
+<verbatim>
+# iwlist eth2 ap
+eth2 Peers/Access-Points in range:
+ 00:11:2F:61:49:2B : Quality=/94 Signal level=-95dBm Noise leve=-95dBm
+</verbatim>
+This shows the [MAC] address of any remote wireless access points (or peers if in AdHoc mode?).
+
+Apparently the "__<tt>iwlist ... ap</tt>__" command is obsolete, and the
+better command is "__<tt>iwlist ''eth2'' scanning</tt>__", which gives its output in the different format.
+
+!Troubleshooting
+If your wireless card can't find anything to connect to, you won't get
+very far.
+* Check that you are not too far away from the equipment
+* Check that there is no interference (running microwave ovens, cordless phones operating on the same frequency, ...)
+
+
+
!! Determine Wireless Settings
-At this step we need to determine the parameters of our wireless. The biggest question here is the mode of the link. If you are connecting to an Access-Point then you will ned to configure your interface in ''Managed'' mode, otherwise for connecting two or more computers directly to each other you will need to use ''Ad-Hoc'' mode. The following steps will provide an example of each mode. The other three peices
of information that you need are ''Channel'', ''ESSID'' and ''Network''. ''Channel'' specifices the Physical frequency that your wireless card transmits and receives on. ''ESSID'' can be thought of as a Network Name and is used to allow multiple logically seperate wireless networks to operate on the same channel.
''Network'' is the IP settings that you will use to communicate with the other end of the link. All four of these parameters (Mode, Channel, ESSID and Network) need to be agreed on between the two ends of the link for it to function correctly. The values that the remainder of this example will use for these parameters are shown below.
+At this step we need to determine the parameters of our wireless. The biggest question here is the mode of the link. If you are connecting to an Access-Point then you will ned to configure your interface in ''Managed'' mode, otherwise for connecting two or more computers directly to each other you will need to use ''Ad-Hoc'' mode. The following steps will provide an example of each mode. The other three pieces
of information that you need are ''Channel'', ''ESSID'' and ''Network''.
+
+
''Channel'' specifices the Physical frequency that your wireless card transmits and receives on. Often the channel will be determined automatically between wireless equipment.
+
+
''ESSID'' can be thought of as a Network Name and is used to allow multiple logically seperate wireless networks to operate on the same channel --- you can't connect to an AccessPoint unless you are both using the same ESSID!
+
+
''Network'' is the IP settings that you will use to communicate with the other end of the link.
+
+
All four of these parameters (Mode, Channel, ESSID and Network) need to be agreed on between the two ends of the link for it to function correctly. The values that the remainder of this example will use for these parameters are shown below.
!Managed Mode
* Mode: Managed
* Channel: 6
@@ -45,8 +85,10 @@
* Mode: Ad-Hoc
* Channel: 6
* ESSID: wlug-test
* Network: 10.10.10.0/24, this computer will be 10.10.10.1, Remote Computer will be 10.10.10.254
+
+
!! Setup Wireless
This step configures the wireless settings shown in the previous section.
@@ -73,8 +115,9 @@
iwconfig eth2 mode Ad-Hoc
iwconfig eth2 essid "wlug-test"
iwconfig eth2 channel 6
</verbatim>
+
If you did everything correctly you should now be able to get output similar to below, the important settings are ESSID, Mode and Frequency.
<verbatim>
xenon:~# iwconfig eth2
eth2 IEEE 802.11-DS ESSID:"wlug-test" Nickname:"test"
@@ -93,12 +136,16 @@
! Troubleshooting
If you don't get output similar to above you could try the following
* Bring the interface up (some cards don't update their config until the interface is brought up) eg. ifconfig eth2 up, then try iwconfig again
* Check dmesg, syslog, etc for any error messages printed
-* If still stuck, google, or try the wlug mailing list
.
+* Check that the ESSID and/or any security settings match up between the clients and AccessPoint.
+
* If still stuck, google, or try the WlugMailingList
.
+
+
!! Setup IP
-This is a pretty generic step and isn't actually related to Wireless in any way, it's the same as bringing up any interface at all!
+This is a pretty generic step and isn't actually related to Wireless in any way, it's the same as bringing up any interface at all! You can either manually assign network settings, or use [DHCP] (if the AccessPoint is also a DHCP server).
+
!Managed Mode, Ad-Hoc Mode
<verbatim>
ifconfig eth2 10.10.10.1 netmask 255.255.255.0 broadcast 10.10.10.255 up
@@ -135,7 +182,34 @@
* Check for any error messages in dmesg, syslog, etc
* If still stuck, google, or try the wlug mailing list.
!! Done
-At this point you are done and successfully have a wireless interface up and running in linux! Now
on to how to configure it in
your distribution
....
+At this point you are done and successfully have a wireless interface up and running in linux!
+
+Also see WirelessNetworkSecurityNotes for tips
on making sure
your network
+is secure from any random person wandering past with a wireless laptop
...
+
+
+!!! Distro-specific Notes
+
+!! Debian Sarge ( + Ubuntu?)
+In /etc/network/interfaces, include the following stanzas:
+
+<verbatim>
+# for devices managed by hotplug
. This assumes you have
+# NET_AGENT_POLICY=hotplug
+# in /etc/default/hotplug, which is the default.
+mapping hotplug
+ script echo
+
+# replace eth2 with whatever interface your wireless card gets called
+# and obviously replace 'MY_SSID' appropriately for your wireless network
+iface eth2 inet dhcp
+ pre-up iwconfig eth2 essid ''MY_SSID''
+# if you are using WEP and need to specify an appropriate 13 char key,
+# comment out the above line and uncomment the following line:
+# pre-up iwconfig eth2 essid ''MY_SSID' key s:abcdefghijklm
+</verbatim>
+
+
----
CategoryWireless, CategoryNotes
