ifconfig ra0 up
iwconfig ra0 essid <name of the essid>
ifconfig ra0 <ip you want>
route add default gw <ip of the gateway>
echo "nameserver <ip of the dns try the same as gateway>" > /etc/resolv.conf
echo "nameserver <ip of the alternative dns it's not necessary>" >> /etc/resolv.conf
and check with
host Google
once you get a reply u r done
that's it for open
for wep just add
iwconfig ra0 key < the key of the AP>
you can try also the automatic way with wicd





