Neil Jones wrote:
> On Knoppix, I have tried the commands that were listed for
> the "net" prefix, starting with the obvious ones first. I have
> also tried the iwconfig command to assign the IP address for
> wlan0. None of these commands worked for me.
iwconfig is for setting wireless parameters of the link level,
not the IP address.
> Are there any kernel options that will start up the wlan0
> interface?
No. It's all configured in userspace.
> My DSL router uses the SSID and WPA keys, therefore
> it needs to authenticate with the router before it can get a
> DHCP address.
To use WPA you need wpa_supplicant. It comes with all major Linux
distributions.
Here's a quick guide, for how to do it completely manually:
Linux doesn't mandate a specific naming convention for network
interfaces, driver writers can choose anything they want. So
first find out which your wireless interfaces are, by simply
typing iwconfig on a root shell.
On my laptop (narfi) this gives:
iwconfig
lo no wireless extensions.
sit0 no wireless extensions.
eth0 no wireless extensions.
wmaster0 no wireless extensions.
wlan0 IEEE 802.11abgn ESSID:""
Mode:Managed Frequency:2.437 GHz Access Point: Not-Associated
Tx-Power=15 dBm
Retry min limit:7 RTS thr

ff Fragment thr

ff
Encryption key

ff
Power Management

ff
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
pan0 no wireless extensions.
Not surprising the interface "wlan0" is a wireless interface.
If there's no interface showing up with wireless extensions, then you
* don't have the driver loaded
or
* your installtion misses the firmware files
or
* your wireless hardware is not (yet) supported by Linux
If you were about to connect to a public, unprotected access point,
you would use iwconfig to setup the interface e.g.:
iwconfig wlan0 ssid "HotSpot" enc off
To use WPA you must configure your wpa_supplicant. You can either do
this by using its GUI "wpa_gui" - this is quite self explanatory, I
don't think I've to explain that one, wpa_supplicant must be started
before starting wpa_gui though.
Or you're creating the file /etc/wpa_supplicant/wpa_supplicant.conf
by hand. Use this template:
--- BEGIN /etc/wpa_supplicant/wpa_supplicant.conf ---
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
network={
ssid="..." # your SSID
proto=WPA2 WPA
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="..." # put your WPA password here
}
--- END ---
You can then start wpa_supplicant on the wireless interface:
/sbin/wpa_supplicant -Dwext -c/etc/wpa_supplicant/wpa_supplicant.conf -B -iwlan0 -P/var/run/wpa_supplicant-wlan0.pid
wpa_supplicant will background. To see what's going on start wpa_cli.
Once the connection is made you can configure the address of your interface.
In case of DHCP it's easy as, depending on which of dhcpcd or dhclient are
installed.
dhcpcd wlan0
or
dhclient wlan0
For static IP configuration use
ip addr add $ADDRESS/$NETBITS dev wlan0
ip route add default via $ROUTER dev wlan0
rm /etc/resolv.conf.new
for NS in $NAMESERVERS ; do echo "nameserver $NS" >> /etc/resolv.conf.new ; done
mv /etc/resolv.conf.new /etc/resolv.conf
e.g.
ip addr add 192.168.1.123/24 dev wlan0
ip route add default via 192.168.1.254 dev wlan0
rm /etc/resolv.conf.new
for NS in 192.168.1.253 192.168.1.252 ; do echo "nameserver $NS" >> /etc/resolv.conf.new ; done
mv /etc/resolv.conf.new /etc/resolv.conf
Of course all major distributions provide you with a convenient
configuration interface abstracting away all those gory details,
however this is specific to each distribution.
Just RTFM of the distribution you use.
Wolfgang