Slax Ndiswrapper with DHCP



This is just a basic set of instructions on how to use the ndiswrapper under Slax.
I'll show what I have to do, and I will explain each step after so you'll know why I did it and its function.
BOLD text is what I typed.
Italics is the bash's response.

ndiswrapper -i lsbcmnds.inf
Installing lsbcmnds *its likly you will also get alot of text from pearl b*tching about this and that, but don't worry.

Ok here I am loading my windows diver into the ndiswrapper. In this case its a linksys driver called lsbcmnds.
Your driver name will likly vary but you get the picture. Please note what you want to load is NOT the DLL but the .inf files.
modprobe ndiswrapper

The only time you should see extra text here is if there is an error. Here I'm loading the ndiswrapper itself, it will act as the windows
driver so you can use your card.

*Please note on some cards you have to type "ifconfig wlan0 up" here.(My linksys card didn't, but a Dlink I tested did)

iwconfig
lo........no wireless extensions.
.
wlan0.....IEEE 802.11G ESSID:"linksys"
..........Mode:Managed Frequency:2.437Ghz Access Point:CENSORED
..........Bit Rate:11Mb/s Tx-Power:14 dBm
..........Rts thr:2347 B Fragment thr:2346 B
..........Encyption key:off
..........Link Quality:100/100 Signal level:-30 dBm Noise level:-256 dBm
..........Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
..........Tx excessive retries:0 Invalid misc:75 Missed beacon:0


First off if you only see the lo part then it failed, and you should go back and try again with a different driver. If wlan0 has a different number at the
end or is eth0 etc... don't worry its not a problem. If the ESSID part is missing then you will have to set it yourself, you can do this by typing
"iwconfig wlan0 essid any" I use the word "any" here because that often works, if it doesn't you will have to find out what your routers ESSID is and
use that instead. You may also have to set your mode like so "iwconfig wlan0 mode Managed" If you have to add these then you should also enter
"ifconfig wlan0 up" to activate it.Once this shows the ESSID properly and mode of course you should be ready to move onto the next step.

ifconfig
lo........Link encap:Local Loopback
..........inet addr:127.0.0.1 Mask:255.0.0.0
..........UP LOOPBACK RUNNING MTU:16436 Metric:1
..........Rx Packets:0 errors:0 dropped:0 overruns:0 frame:0
..........Tx Packets:0 errors:0 dropped:0 overruns:0 carrier:0
..........collisions:0 txqueuelen:0
..........RX bytes:0 (0.0 b) Tx bytes:0 (0.0 b)

wlan0.....Link encap:Ethernet HWaddr: CENSORED
..........BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
..........Rx Packets:0 errors:0 dropped:0 overruns:0 frame:0
..........Tx Packets:0 errors:0 dropped:0 overruns:0 carrier:0
..........collisions:0 txqueuelen:0
..........RX bytes:0 (0.0 b) Tx bytes:0 (0.0 b)
..........Memory:a800000-a801fff

This is basicly what it should look like if it didn't already settup your IP. What this is; is all your network information the lo is your loopback addr
thats why if you go to the IP 127.0.0.1 it leads to your computer, even in windows. Now as you can see the wlan0 doesn't have an IP(the "inet addr:" is IP)
set. This should be easy to fix, as I will show you in the next step. Please note even if it already shows the IP you still shouldn't skip the next step.

dhcpcd -G 192.168.1.1 wlan0
Again if it works it shouldn't show anything. What this does is ask your router for an IP,Mask,Broadcast addr, and DNS servers. Basicly everything you need to
browse the web etc... Now the "192.168.1.1" is the gateway on my router(It is on many routers) but it may be different on yours. If it is you will need to cheak
your router/router manual to find what your gateway is.
Now to check and see if it worked.

ifconfig
lo........Link encap:Local Loopback
..........inet addr:127.0.0.1 Mask:255.0.0.0
..........UP LOOPBACK RUNNING MTU:16436 Metric:1
..........Rx Packets:0 errors:0 dropped:0 overruns:0 frame:0
..........Tx Packets:0 errors:0 dropped:0 overruns:0 carrier:0
..........collisions:0 txqueuelen:0
..........RX bytes:0 (0.0 b) Tx bytes:0 (0.0 b)

wlan0.....Link encap:Ethernet HWaddr: CENSORED
..........inet addr:192.168.1.103 Bcast:192.168.1.255 Mask:255.255.255.0
..........UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
..........Rx Packets:122 errors:0 dropped:0 overruns:0 frame:0
..........Tx Packets:9 errors:0 dropped:0 overruns:0 carrier:0
..........collisions:0 txqueuelen:1000
..........RX bytes:18660 (18.2 Kb) Tx bytes:3701 (3.6 Kb)
..........Memory:a800000-a801fff

The line I highlighted is what your looking for. If you have followed the instructions and you see this chances are your good to go =) Its likly that Slax will do most
of this for you(Basicly every thing past the modprobe ndiswrapper) but if it doesn't then this should help. Oh yes and typing ifconfig this last time isn't needed
its just to make sure it worked.

There is one extra you may want to consider. "iwconfig wlan0 nick NICKNAME" This would set your network nickname some routers will treat this like a
a local domain name, but don't count on it. Either way its still just handy, although unneeded.

Other Guides



Static IP in Slax
Ad-Hoc network in Slax