Help - Search - Members - Calendar
Full Version: Wireless Dsl Reinstall On Mandrake 9.1
Linuxhelp > Support > Technical Support
jeff_brown
Hi. I'm trying to reachieve the situation I had once already, so I haven't gotten stuck in most of the places that stopped me once.

I just reinstalled Mandrake Linux 9.1 from CD, sharing a hard drive with Windows. I'm trying to get internet connectivity. Below I've attached details gathered; here I'm going to try to sum them up.

I have a DLink DWL 520 wireless adapter on my computer, which works already when I'm using Windows. It connects to a DLink DI-624 router, which connects to a DSL phone modem.

I installed the madwifi driver, which required installing kernel-source from CD and then mucking around a bit (see below). I now load the three modules madwifi created every time I start linux. (I have instructions on how to automate that; I just don't want to yet.)

In this process I had to write a couple files: ifcfg-ath0 and resolv.conf. (The latter actually already existed, but had been empty.)

I do not have internet connectivity. I'm sure there's lots of reasons why; here are two demonstrations:
CODE
[root@localhost etc]# ifup ath0
Can't find a dhcp client
[root@localhost etc]# ping 192.168.0.1
connect: Network is unreachable

If I'm lucky, my problem will be obvious from the above. If not, here is a lot of diagnostic information, from Windows and Linux:

====================== ============= ======================
====================== How stuff is: ======================
====================== ============= ======================

---------------------- Windows says: ----------------------
CODE
Physical Address: 00-0D-88-8B-DD-FE
IP Address: 192.168.0.101
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.0.1
DHCP Server: 192.168.0.1
Lease Obtained: 4/8/2004 4:58:38 PM
Lease Expires: 4/15/2004 4:58:38 PM
DNS Server: 192.168.0.1
WINS Server:

---------------------- Linux says: ----------------------
I got data from more than one place, to say the least.

/var/log/messages
These data are from the very end of the file. There were a few more references to wlan, ath_hal, ath_pci and ath0 deeper into the file, but they looked redundant.
CODE
Apr  8 16:00:14 localhost kernel: wlan: 0.7.3.1 BETA
Apr  8 16:00:18 localhost kernel: ath_hal: 0.9.8.6
Apr  8 16:00:26 localhost kernel: ath_pci: 0.8.5.4 BETA
Apr  8 16:00:26 localhost kernel: ath0: mac 5.6 phy 4.1 5ghz radio 1.7 2ghz radio 2.3
Apr  8 16:00:26 localhost kernel: ath0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
Apr  8 16:00:26 localhost kernel: ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
Apr  8 16:00:26 localhost kernel: ath0: 802.11 address: 00:0d:88:8b:dd:fe
Apr  8 16:00:26 localhost kernel: ath0: Atheros 5212: mem=0xfbe00000, irq=11
Apr  8 16:00:26 localhost /etc/hotplug/net.agent: invoke ifup ath0
Apr  8 16:01:00 localhost CROND[3086]: (root) CMD (nice -n 19 run-parts /etc/cron.hourly)

dmesg
CODE
wlan: 0.7.3.1 BETA
ath_hal: 0.9.8.6
ath_pci: 0.8.5.4 BETA
ath0: mac 5.6 phy 4.1 5ghz radio 1.7 2ghz radio 2.3
ath0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
ath0: 802.11 address: 00:0d:88:8b:dd:fe
ath0: Atheros 5212: mem=0xfbe00000, irq=11

ifconfig ath0 up

This command returned nothing but a newline.


ifconfig
CODE
ath0      Link encap:Ethernet  HWaddr 00:0D:88:8B:DD:FE
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:126 errors:9 dropped:0 overruns:0 frame:9
         TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:199
         RX bytes:15248 (14.8 Kb)  TX bytes:597 (597.0 b)
         Interrupt:11 Memory:e5efd000-e5f0d000

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:730 errors:0 dropped:0 overruns:0 frame:0
         TX packets:730 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0
         RX bytes:47220 (46.1 Kb)  TX bytes:47220 (46.1 Kb)

iwconfig
CODE
lo        no wireless extensions.

ath0      IEEE 802.11  ESSID:"default"
         Mode:Managed  Frequency:2.437GHz  Access Point: 00:0D:88:88:1F:F1
         Bit Rate:36Mb/s   Tx-Power:off   Sensitivity=0/3
         Retry:off   RTS thr:off   Fragment thr:off
         Encryption key:off
         Power Management:off
         Link Quality:27/94  Signal level:-68 dBm  Noise level:-95 dBm
         Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
         Tx excessive retries:0  Invalid misc:0   Missed beacon:0

ifup ath0
CODE
Can't find a dhcp client

route -n
CODE
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo

route print
Included some instructional stuff that I've left out, and then this:
CODE
 List of possible address families (which support routing):
   inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25)
   netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP)
   x25 (CCITT X.25)


====================== =========== ======================
====================== What I did: ======================
====================== =========== ======================

CODE
[root@localhost linux]# urpmi kernel-source

CODE
[root@localhost linux]# cp Makefile Makefile.jbk

then I modified the original Makefile, deleting the word "custom" from the end of line 4, so that the last three letters are "mdk".
CODE
[root@localhost linux]#  "make mrproper"

CODE
[root@localhost linux]# cp .config .config.jbk
[root@localhost linux]# cp /boot/config-2.4.21-0.13mdk .config

The old .config file looked identical to the one replacing it, but I made a backup just in case.
CODE
[root@localhost linux]# make oldconfig
[root@localhost linux]# make dep

Then I changed directories and installed the wifi driver:
CODE
[root@localhost madwifi]# make clean
[root@localhost madwifi]# make
[root@localhost madwifi]# make install
[root@localhost madwifi]# modprobe wlan
[root@localhost madwifi]# modprobe ath_hal
[root@localhost madwifi]# modprobe ath_pci

----------------------------------------------------------------------
------------------------ PROGRESS REPORT: ----------------------------
----------------------------------------------------------------------
By this point, I am done installing the kernel-source and the madwifi drivers. I did a few more things ...

CODE
[root@localhost madwifi]# urpmi libiw wireless-tools


------------------------ STRANGE ----------------------------
At this point, I need to create a config file for ath0, named ifcfg-ath0.
Last time I put it where "ifcfg-eth0" is, but according to Konqueror I have no such file now


Anyway, I find a file called ifcfg-lo, and I figure that's close enough, so I create ifcfg-ath0 in the same place.
CODE
[root@localhost networking]# kwrite ifcfg-ath0 &

I put the following in the new file, /etc/sysconfig/networking/ifcfg-ath0:
CODE
DEVICE=ath0
#
#
BOOTPROTO=dhcp
ONBOOT=yes
#
TYPE=Wireless

I also create a link to ifcfg-ath0 from inside /etc/sysconfig/network-scripts/, because there was a corresponding link for ifcfg-lo
CODE
[root@localhost etc]# ifup ath0
Can't find a dhcp client

CODE
[root@localhost etc]# cp resolv.conf resolv.conf.jbk
[root@localhost etc]# kwrite resolv.conf &

It used to be an empty file. All I did was add this line:
nameserver 192.168.0.1

------------------------ STRANGE ----------------------------
A month ago when I was doing this, resolv.conf did not start out empty.


The last thing I ran was this:
CODE
[root@localhost etc]# ping 192.168.0.1
connect: Network is unreachable
hughesjr
You are connecting, just not getting an IP address....
--------------------------------------------
A better ifcfg-ath0 would be:

CODE
STARTMODE=hotplug
DEVICE=ath0
BOOTPROTO=dhcp
ONBOOT=yes
WIRELESS=yes
WIRELESS_MODE=Managed
WIRELESS_ESSID=default
WIRELESS_RATE=54M
WIRELESS_IWPRIV=mode 3


Let's see if it is iptables .... (the kernel firewall).

Do:

/etc/init.d/iptables stop

then do:

/etc/init.d/network restart

Of that works, the firewall was the problem.
-------------------------------------
To fix the IPTABLES firewall to allow DHCP:

Adding these lines in /etc/sysconfig/iptables should allow you to properly connect to the dhcp server (your router):

-A INPUT -p tcp -s 192.168.0.1/255.255.255.0 -j ACCEPT
-A INPUT -p udp -s 192.168.0.1/255.255.255.0 -j ACCEPT

(you may need to use a different CHAIN than INPUT ... the other rules may have -A something-INPUT ... if they do, use that instead of -A INPUT ... they should go after all the other INPUT lines, except before any INPUT lines that have -j REJECT in the line)

Once you adjust the rules, try:

/etc/init.d/iptables restart
if that works then restart the network and see if it works as well:

/etc/init.d/network restart

-----------------------------------------------------
Or if you want to disable iptables on this machine (since you have a hardware firewall) do:

chkconfig --del iptables
jeff_brown
I replaced ifcfg-ath0 as suggested. I believe I have no software firewall this time, because I'm pretty sure I didn't ask for a firewall upon reinstalling (I didn't even choose any of the "server" stuff), and my /etc/init.d contains nothing called "iptables".
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.