mirror of
git://slackware.nl/current.git
synced 2024-12-27 09:59:16 +01:00
75a4a592e5
Mon Apr 25 13:37:00 UTC 2011 Slackware 13.37 x86_64 stable is released! Thanks to everyone who pitched in on this release: the Slackware team, the folks producing upstream code, and linuxquestions.org for providing a great forum for collaboration and testing. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. As always, thanks to the Slackware community for testing, suggestions, and feedback. :-) Have fun!
208 lines
8.6 KiB
HTML
208 lines
8.6 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy, see www.w3.org" />
|
|
<title>Wireless</title>
|
|
<meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.7" />
|
|
<link rel="HOME" title="Slackware Linux Essentials" href="index.html" />
|
|
<link rel="UP" title="Network Configuration" href="network-configuration.html" />
|
|
<link rel="PREVIOUS" title="PPP" href="network-configuration-ppp.html" />
|
|
<link rel="NEXT" title="Network File Systems" href="network-configuration-nfs.html" />
|
|
<link rel="STYLESHEET" type="text/css" href="docbook.css" />
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
</head>
|
|
<body class="SECT1" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#840084"
|
|
alink="#0000FF">
|
|
<div class="NAVHEADER">
|
|
<table summary="Header navigation table" width="100%" border="0" cellpadding="0"
|
|
cellspacing="0">
|
|
<tr>
|
|
<th colspan="3" align="center">Slackware Linux Essentials</th>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td width="10%" align="left" valign="bottom"><a href="network-configuration-ppp.html"
|
|
accesskey="P">Prev</a></td>
|
|
<td width="80%" align="center" valign="bottom">Chapter 5 Network Configuration</td>
|
|
<td width="10%" align="right" valign="bottom"><a href="network-configuration-nfs.html"
|
|
accesskey="N">Next</a></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<hr align="LEFT" width="100%" />
|
|
</div>
|
|
|
|
<div class="SECT1">
|
|
<h1 class="SECT1"><a id="NETWORK-CONFIGURATION-WIRELESS"
|
|
name="NETWORK-CONFIGURATION-WIRELESS">5.5 Wireless</a></h1>
|
|
|
|
<p>Wireless networking is still a relatively new thing in the world of computers, yet is
|
|
quickly catching on as more people begin to purchase laptops and want networking on the
|
|
go, without having to fool with some old twisted pair cable. This trend doesn't appear to
|
|
be slowing down. Unfortunately, wireless networking isn't yet as strongly supported in
|
|
Linux as traditional wired networking.</p>
|
|
|
|
<p>There are three basic steps to configuring an 802.11 wireless Ethernet card:</p>
|
|
|
|
<ol type="1">
|
|
<li>
|
|
<p>Hardware support for the wireless card</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Configure the card to connect to a wireless access point</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Configure the network</p>
|
|
</li>
|
|
</ol>
|
|
|
|
<div class="SECT2">
|
|
<h2 class="SECT2"><a id="AEN2033" name="AEN2033">5.5.1 Hardware Support</a></h2>
|
|
|
|
<p>Hardware support for a wireless card is provided through the kernel, either with a
|
|
module or built in to the kernel. Generally, most newer Ethernet cards are provided
|
|
through kernel modules, so you'll want to determine the appropriate kernel module and
|
|
load it through <tt class="FILENAME">/etc/rc.d/rc.modules</tt>. <tt
|
|
class="COMMAND">netconfig</tt> may not detect your wireless card, so you'll probably need
|
|
to determine the card yourself. See <a
|
|
href="http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/"
|
|
target="_top">http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/</a> for more
|
|
information on kernel drivers for various wireless cards.</p>
|
|
</div>
|
|
|
|
<div class="SECT2">
|
|
<h2 class="SECT2"><a id="AEN2044" name="AEN2044">5.5.2 Configure the Wireless
|
|
Settings</a></h2>
|
|
|
|
<p>The vast majority of this work is done by <tt class="COMMAND">iwconfig</tt>, so as
|
|
always read the man page for <tt class="COMMAND">iwconfig</tt> if you need more
|
|
information.</p>
|
|
|
|
<p>First, you'll want to configure your wireless access point. Wireless access points
|
|
vary quite a bit in their terminology, and how to configure them, so you may need to
|
|
adjust a bit to accommodate your hardware. In general, you'll need at least the following
|
|
information:</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<p>The domain ID, or name of the network (called the ESSID by <tt
|
|
class="COMMAND">iwconfig</tt>)</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>The channel the WAP uses</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>The encryption settings, including any keys used (preferably in hexadecimal)</p>
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="WARNING">
|
|
<table class="WARNING" width="100%" border="0">
|
|
<tr>
|
|
<td width="25" align="CENTER" valign="TOP"><img src="./imagelib/admon/warning.png"
|
|
hspace="5" alt="Warning" /></td>
|
|
<td align="LEFT" valign="TOP">
|
|
<p>A NOTE ABOUT WEP. WEP is quit flawed, but it's much better than nothing. If you wish a
|
|
greater degree of security on your wireless network, you should investigate VPNs or
|
|
IPSec, both of which are beyond the scope of this document. You might also configure your
|
|
WAP not to advertise its domain ID/ ESSID. A thorough discussion of wireless policy is
|
|
beyond the scope of this section, but a quick Google search will turn up more than you
|
|
ever wanted to know.</p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<p>Once you've gathered the above information, and assuming you've used <tt
|
|
class="COMMAND">modprobe</tt> to load the appropriate kernel driver, you can edit <tt
|
|
class="FILENAME">rc.wireless.conf</tt> and add your settings. The <tt
|
|
class="FILENAME">rc.wireless.conf</tt> file is a bit untidy. The least effort is to
|
|
modify the generic section with your ESSID and KEY, and CHANNEL if required by your card.
|
|
(Try not setting CHANNEL, and if it works, great; if not, set the CHANNEL as
|
|
appropriate.) If you're daring, you can modify the file so that only the necessary
|
|
variables are set. The variable names in <tt class="FILENAME">rc.wireless.conf</tt>
|
|
correspond to the <tt class="COMMAND">iwconfig</tt> parameters, and are read by <tt
|
|
class="FILENAME">rc.wireless</tt> and used in the appropriate <tt
|
|
class="COMMAND">iwconfig</tt> commands.</p>
|
|
|
|
<p>If you have your key in hexadecimal, that's ideal, since you can be fairly confident
|
|
that your WAP and <tt class="COMMAND">iwconfig</tt> will agree on the key. If you only
|
|
have a string, you can't be sure how your WAP will translate that into a hexadecimal key,
|
|
so some guesswork may be needed (or get your WAP's key in hex).</p>
|
|
|
|
<p>Once you've modified <tt class="FILENAME">rc.wireless.conf</tt>, run <tt
|
|
class="FILENAME">rc.wireless</tt> as <tt class="USERNAME">root</tt>, then run <tt
|
|
class="FILENAME">rc.inet1</tt>, again as <tt class="USERNAME">root</tt>. You can test
|
|
your wireless networking with standard testing tools such as <tt
|
|
class="COMMAND">ping</tt>, along with <tt class="COMMAND">iwconfig</tt>. If you have a
|
|
wired interface you may wish to use <tt class="COMMAND">ifconfig</tt> to turn those
|
|
interfaces off while you test your wireless networking to ensure there's no interference.
|
|
You may also want to test your changes through a reboot.</p>
|
|
|
|
<p>Now that you've seen how to edit <tt class="FILENAME">/etc/rc.d/rc.wireless</tt> for
|
|
you default network, let's take a closer look at iwconfig and see how it all works. This
|
|
will teach you the quick and dirty way of setting up wifi for those times when you find
|
|
yourself at an Internet cafe, coffee shop, or any other wifi hot spot and wish to get
|
|
online.</p>
|
|
|
|
<p>The first step is to tell your wireless NIC what network to join. Make sure you
|
|
replace “<tt class="FILENAME">eth0</tt>” with whatever network interface your
|
|
wireless card uses and change “<var class="REPLACEABLE">mynetwork</var>” to
|
|
the essid you wish to use. Yes, we know you're smarter than that. Next you'll have to
|
|
specify the encryption key (if any) used on your wireless network. Finally specify the
|
|
channel to use (if needed).</p>
|
|
|
|
<table border="0" bgcolor="#E0E0E0" width="100%">
|
|
<tr>
|
|
<td>
|
|
<pre class="SCREEN">
|
|
<samp class="PROMPT">#</samp> <kbd class="USERINPUT">iwconfig eth0 essid "<var
|
|
class="REPLACEABLE">mynetwork</var>"</kbd>
|
|
<samp class="PROMPT">#</samp> <kbd class="USERINPUT">iwconfig eth0 key <var
|
|
class="REPLACEABLE">XXXXXXXXXXXXXXXXXXXXXXXXXXX</var></kbd>
|
|
<samp class="PROMPT">#</samp> <kbd class="USERINPUT">iwconfig eth0 channel n</kbd>
|
|
</pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p>That should be all on the wireless end of things.</p>
|
|
</div>
|
|
|
|
<div class="SECT2">
|
|
<h2 class="SECT2"><a id="AEN2101" name="AEN2101">5.5.3 Configure the Network</a></h2>
|
|
|
|
<p>This is done in the exact same way as wired networks. Simply refer to earlier sections
|
|
of this chapter.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="NAVFOOTER">
|
|
<hr align="LEFT" width="100%" />
|
|
<table summary="Footer navigation table" width="100%" border="0" cellpadding="0"
|
|
cellspacing="0">
|
|
<tr>
|
|
<td width="33%" align="left" valign="top"><a href="network-configuration-ppp.html"
|
|
accesskey="P">Prev</a></td>
|
|
<td width="34%" align="center" valign="top"><a href="index.html"
|
|
accesskey="H">Home</a></td>
|
|
<td width="33%" align="right" valign="top"><a href="network-configuration-nfs.html"
|
|
accesskey="N">Next</a></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td width="33%" align="left" valign="top">PPP</td>
|
|
<td width="34%" align="center" valign="top"><a href="network-configuration.html"
|
|
accesskey="U">Up</a></td>
|
|
<td width="33%" align="right" valign="top">Network File Systems</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
|