Slax Ndiswrapper on a Static Ip



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 likely 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 likely 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:off/any
..........Mode: Frequency:2.437Ghz Access Point:00:00:00:00:00:00
..........Bit Rate:54Mb/s Tx-Power:14 dBm
..........Rts thr:2347 B Fragment thr:2346 B
..........Encryption 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.You will notice that the ESSID says "off/any" and the field in Mode is missing here, if they aren't missing
for you don't worry it shouldn't matter. The first thing we need to do is set the mode.

iwconfig wlan0 mode Managed
Ok it won't show a response here but it should have set the wifi mode. I'm doing this before setting the essid because I want to be sure the mode is compatible with
the routers mode.

iwconfig wlan0 essid linksys
Here I'm setting the ESSID to match my routers. Of course unless you are using a linksys router your ESSID will be different. Now as long as you typed the ESSID
right(Meaning got the correct one) then we should be ready to move on to 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

As you can see here you have no IP yet, but before we go and set your IP we should first give your system the addresses to some DNS servers. Otherwise you won't
be able use domains Like Google.com etc...
Goto the file > /etc/resolv.conf
If it doesn't look something like this.

nameserver 68.87.64.196
nameserver 68.87.66.196
search some.domain.net

Then it will have to be made to look like that. These Ip's are really domain name Ip's so you can use those, also you could use 204.127.202.19 , 216.148.227.204
Those are the only DNS servers I can think of off the top of my head there are many others that you can put in. If it already looks somewhat like that when you
check it(Different Ip's/search value) then don't worry just leave it. Now we can move on to setting your IP, mask etc..

ifconfig wlan0 192.168.1.95 broadcast 192.168.1.255 netmask 255.255.255.0
This one is a longer explanation, because I'm issuing three commands on one line. The truth is its just easier this way although a bit longer to type. Ok now
the 192.168.1.95 is setting your local network ip. Your IP convention may be different like 10.0.0.1. Your main concern will be to avoid Ip conflicts on the network
meaning making sure two computers on the same network don't have the same ip. I did this by using an IP the routers dhcp doesn't assign to other computers in this
case the linksys router assigns Ip's from 192.168.1.100 to 192.168.1.150 so the one I'm using is fine. The "broadcast 192.168.1.255" is to set your Bcast address
normally its the top IP on the set like here, but you should check your router to find out. Last but not least is "netmask 255.255.255.0" here I'm setting my network mask
I won't take the time to explain what the netmask is because that is simply beyond the scope of this guide. Basically 255.255.255.0 is the most common one used for home
networks which should work, but again you should check your router to be sure. Once this is setup you should be connected to your network! However your not on the net yet
you still have to set your gateway, but first turn on your settings with the next command.

ifconfig wlan0 up
This just ensures everything you just did is activated.

route add default gw 192.168.1.1
Here I'm setting the default gateway, this is basically your internet connection through the router. In most cases the gateway IP will be lowest ip in the set, as it is in this case
but as I've stated many times before check on your router to be sure. Now if your gateway address is set correctly the you should be up and ready to go =). If you want to you can also
set your wireless nick with "iwconfig wlan0 nick NICKNAME" but it shouldn't be needed.

Other Guides



Dhcp in Slax
Ad-Hoc network in Slax