PDA

View Full Version : wireless problem w/HDD install...



shearroller
09-10-2004, 12:50 PM
Guys,

I posted this query yesterday on the LAPTOPS forum but over night thought I had better post it here on the Networking forum...

Here's the deal - I'm using a Gateway M500 laptop with an HDD installation of Knoppix v-3.6 and the 2.6.7 kernel. So far I have been successful with setting things up, including the wireless (Orinoco/Lucent). However, the wireless is the problem...

I have a small LAN laid out here in my home and I use a static IP on ALL of the systems on the LAN. When I configured the networking here in Knoppix v-3.6 I DID set it to use a static IP. All was well until I rebooted - when I checked the IP after a reboot, it shows it using a DHCP defined IP and NOT the statically set IP I defined.

OK, now for my observations...

On bootups I can see a line saying that /etc/network/ifstate is being 'cleaned'. All lines displayed afterwards that deal with the networking says that the NIC/WiFi (eth2) is no configured and so it fails to load the config I had setup. I have looked in /var/log for a log containing the text displayed during bootups to no avail. And since I'm barely above a novice, I don't understand all that is being said in the displayed text.

Now for my temporary fix...

After login, I open konsole, run 'vi /etc/network/ifstate' and add 'eth2=eth2'. Next, I run 'ifdown eth2' to take the wireless down, then I run 'ifup eth2' to bring the wireless back up. Doing this will always use my original configuration which uses the static IP.

After I do this, all is well once again - until I reboot! Then '/etc/network/ifstate' will be 'cleaned' once more and the wireless will revert back to using DHCP.

Guys, any suggestions on how to correct this? It would be nice to have it reboot and still be using the static IP...

Thanks...

P.S. I did find a post suggesting that the NIC's config info be added to the /etc/init.d/networking script, I tried this with the exact same results...

shah
09-10-2004, 01:02 PM
A well known problem/bug. Read this post:
http://www.knoppix.net/forum/viewtopic.php?t=12926&highlight=network

shearroller
09-10-2004, 02:26 PM
Shah

Thanks for the info - but it took me nowhere! I followed your instructions on your refererence post to the letter but the wireless (eth2) is still brought up in DHCP mode - I need it to be in STATIC mode.

FYI - Knoppix says that I have three networking devices, eth0 is the firewire, eth1 is the NIC (Realtek), and eth2 is the wireless (Orinoco/Lucent). I do not have eth0 or eth1 configured. I did at one time but Knoppix brought all three up on bootup, even tho' I use 'no' in the 'onboot = ' line of the config files for eth0 and eth1. You see, I use the wireless network device only.

I have a question for you shah, what would cause 'eth2=eth2' to be removed from /etc/network/ifstate on a boot up? Every time I boot up I see errors saying eth2 is not configured. On login I can add the line,as I stated in my original post. When I do add this line, ifup and ifdown commands begin to work. If I do not add 'eth2=eth2' to the /etc/network/ifstate script, ifup and ifdown will produce a 'device not configured' error message, the same message I see on boot ups. So I can't help but wonder if this script, /etc/network/ifstate, has some bearing on the problem?

This is all guess work on my part but I have to wonder, why is 'eth2=eth2' being removed from /etc/network/ifstate???

Mike

shah
09-11-2004, 02:43 AM
ifup and ipfdown is limited in their capabilities of configuring network interface. That's why we use ifconfig.

In some cases, the state maintained by ifup and ifdown in /etc/network/ifstate might be inconsistent with the actual state of the interfaces
It is crucial for you to edit your /etc/network/interfaces to set your eth to use static or dynamic ip because ifup read from this file. It is better to set everything in /etc/network/interfaces rather then using ifstate.

shearroller
09-11-2004, 01:12 PM
Shah,

Thanks for letting me know the value of /etc/network/ifstate. Here is the contents of my /etc/network/interfaces script:


<beginning of script>

# /etc/network/interfaces -- configuration file for ifup, ifdown
# The loopback interface
# automatically added when upgrading
auto lo eth2
iface lo inet loopback

iface eth2 inet static
address 192.168.1.210
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

<end of script>


As you can see, eth2 is already set to use a static IP.

Shah, I have another guess (the only word that applies here) - could Knoppix be looking for a hardwired connection for it's networking device, and not finding one, goes off on a bender and thus gets the network devices configs confused? eth0 and eth1 are NOT configured and things got worse when they were configured...

Another thing, I have enabled syslogd but I cannot find the boot up screen dump! I have looked in /var/log/kern.log, syslog, lastlog, messages, lastlog, faillog, dmesg, etc, etc, etc and still haven't been able to find the boot up error messgaes. I went through them again yesterday and search for any 'failed', 'error' etc and came up with empty as far as the NICs are concerned, and yet I can see 'device not configured' concerning the wireless (eth2).

Shah, I have been chasing this little problem since v-3.4 and still haven't figured it out. Since I'm barely above a noobee, I don't think I ever will. But I will keep on trying to figure it out with the help of people like you. Thanks again...

Mike

shah
09-11-2004, 02:50 PM
eth0 and eth1 will always detected by knoppix, that's the way knoppix are, especially when you did a knoppix or beginners hdd install style.
The heart of knoppix is it's hardware detection script ( knoppix-autoconfig ). Eventhough eth0 and eth1 is detected, it will not become a problem because it will "backgrounding" that device if it hasn't been set. Unlike other "big name" distro, it will take several minutes to figure out why this device hasn't been set.

There is a small problem in knoppix-autoconfigure, it tends to reset what you have set in your /../interfaces everytime it boots. Actually I'm not using knoppix but kanotix. Kanotix seem has clear out this problem.
What I did to overcome this problem is to edit /etc/init.d/knoppix-autoconfig.

Your /etc/network/interfaces looks fine.
What you need to do is edit /etc/init.d/knoppix-autoconfig:

[b]search and comment out line that reads: pump -i $DEVICE >/dev/null 2>&1 &
and add line : /etc/init.d/networking restart
ex:
broadcasting for IP.${NORMAL}"
trap 2 3 11
#pump -i $DEVICE >/dev/null 2>&1 &
/etc/init.d/networking restart
trap "" 2 3 11
sleep 1
echo " ${BLUE}(Backgrounding)${NORMAL}"[b]

This way your network card will be reset and restart with the value in /../interfaces.
Reboot after you have done the above.
Good luck :D :D

shearroller
09-11-2004, 03:39 PM
Shah,

I tried this particul fix of your's early on but it did nothing for me. However, the knoppix-autoconfig that's in v-3.6 seems to be a little different than you depict. Here is the section in the knoppix-autoconfig used in v-3.6 you are aluding to:

<code>
# Fat-Client-Version: DHCP Broadcast for IP address
if checkbootparam "nodhcp"; then
echo " ${BLUE}Skipping DHCP broadcast/network detection as requested on boot commandline.${NORMAL}"
else
NETDEVICES="$(awk -F: '/eth.:|tr.:/{print $1}' /proc/net/dev 2>/dev/null)"
for DEVICE in $NETDEVICES
do
echo -n " ${GREEN}Network device ${MAGENTA}$DEVICE${GREEN} detected, DHCP broadcasting for IP.${NORMAL}"
trap 2 3 11
ifconfig $DEVICE up >/dev/null 2>&1 ; pump -i $DEVICE >/dev/null 2>&1 &
trap "" 2 3 11
sleep 1
echo " ${BLUE}(Backgrounding)${NORMAL}"
done
fi
<code>

The line you suggest to be rem'ed out is not written the same as you depict. However, the script knoppix-autoconfig.orig DOES have your line. My question now is do I rem out the complete line or just the part of it that is in bold. I tried the former to no avail. I'm not a programmer - I have seen the semi-colon (;) used as a rem character, in place of the hash (#) but I do not think it is used here as a rem character.

Shah, any other ideas will be tried. Hell, I even created my on script to be run a boot up to recreate ifstate - of course it didn't fix anything, just made it easier for me to take the wireless down (ifdown eth2) and back up (ifup eth2). When I do this, the wireless will THEN be using a static IP. May not be pretty but I no longer need to edit ifstate before being able to run these commands - I'm a lazy sort ;)

Thanks again!

Mike

shah
09-12-2004, 01:48 AM
Try commentedout : #ifconfig $DEVICE up >/dev/null 2>&1 ; pump -i $DEVICE >/dev/null 2>&1 &

or try create script like this:

#!/bin/sh
ifconfig eth0 down
ifconfig eth1 down
ifconfig eth2 down
/etc/init.d/networking stop
ifconfig eth2 up
/etc/init.d/networking start

**only add eth0 and eth1 if you don't want to use it.
name it to what ever you wan't ex: mynet.sh and save it in /etc/init.d
and run update-rc.d mynet.sh defaults so it can run on boot. To remove , run update-rc.d -f mynet.sh remove .

:D

shearroller
09-12-2004, 02:08 PM
Hello again Shah!

Well, I had some success with you second idea in your last post - your mynet.sh script. However, I did not have any luck with you commands used in bring up eth2. Shah, for some reason, the commands 'ifconfig eth2 down' and 'ifconfig eth2 up' have never really worked well for me. I know what you said about the /etc/network/ifstate use but it seems to be very important on this system. I have found the commands 'ifdown eth2' and 'ethup eth2' work much better in disabling and enabling eth2 - as long as the line 'eth2=eth2' is listed, of course.

Here is what I came up with for my version of your mynet.sh:

<beginning of code>
#!/bin/sh
ifconfig eth0 down
ifconfig eth1 down
ifconfig eth2 down
/etc/init.d/networking stop
#ifconfig eth2 up
/etc/init.d/networking start
ifdown eth2
ifup eth2
<end of code>

As you can see, I did try your command to bring up eth2 however, as I have stated, the 'ifconfig eth2 up/down' never really works. Yeah, the WiFi will come down and be brought up but will always fail to receive - transmitting is OK but receiving is nil.

While I now have eth2 running with a static IP upon login (with your help), there still remains a problem with the scripts that controls the NICs, especially the wireless-type NICs. I will keep looking into this, for sure. Gotta understand this...

FYI - the line 'ifdown eth2' - when I tried the script withOUT this line, a 'device already configured' error was produced during boot up. With this line, the error does not appear. To eliminate the error message is the only reason for it's use, as the script will do what I need without this line.

If you find out anything, anything at all, concerning this little problem, please, post it here - I will keep watching this thread.

Thanks for your help shah!

Mike

I failed to mention - during boot ups and shutdowns the 'device not configured' errors are displayed in reference to eth2 but the device is very definately working otherwise me posting this would really be an accomplishment!

Ciao!

shah
09-13-2004, 01:29 AM
How about this:

#!/bin/sh
ifdown eth0
ifdown eth1
ifdown eth2
/etc/c/init.d/networking stop
ifup eth2
/etc/init.d/networking start


On receiving issue, try check your gateway in /etc/network/interfaces. Could it be wrong. Should it be your AP ip?Another thing to check is your isp DNS. Check in /etc/resolv.conf.


FYI - the line 'ifdown eth2' - when I tried the script withOUT this line, a 'device already configured' error was produced during boot up. With this line, the error does not appear. To eliminate the error message is the only reason for it's use, as the script will do what I need without this line.

The reason is because networking has started, meaning your eth2 has been set, without ifdown eth2, you will try to set twice that eth2. You should set your eth2 (ifup) before networking start line.

:D :D

shearroller
09-13-2004, 11:59 AM
The DNS addresses are correct - that I'm sure of. But the Gateway address, I have been using the 192.168.1.1 address since I've been playing with the LAN. It is the router's/AP IP and was arrived at by trial and error. If it should be some other IP, please let me know!

I will give you new script a try when I have time. Until then, have a good day!

Thanks!

shearroller
09-13-2004, 07:18 PM
OK shah...I made the changes to the script. I put the 'ifdown/up' commands ahead of the 'network start' command but I got an 'ifdown eth2 - device not configured' error message on the subsequent reboot . And on login eth2 was using DHCP! However...

If all of this so far hasn't sounded a little crazy, what I'm about to say will - some boot ups eth2 will be using DHCP and other boot ups eth2 will be using a STATIC IP....and I cannot tell when it will be using what. Out of sheer curiousity, I rebooted the system 6 times and half the time DHCP was being used and the other half, of course, a static IP.

I'm having a hellava time trying to rap my brain around this. I think it's time for me to move on to another distro - naw, gotta figure it out, right?

Thanks!

shah
09-14-2004, 03:06 PM
#!/bin/sh
/etc/c/init.d/networking stop
/etc/init.d/networking start
ifconfig eth2 address 192.168.1.210 up


Make sure this script runs after knoppix-autoconfig....check on the /etc/rc5.d/Sxknoppix-autoconfig.
x = value for our script must be higher than knoppix-autoconfig.

shearroller
09-14-2004, 09:26 PM
Thanks again shah...I will try it over the next few days before rendering a opinion as I will be a little busy

FYI - I set the numerical value of /etc/init.d/mynet.sh to '21' - it was originally set to '20'...

shearroller
09-17-2004, 01:01 PM
OK - it's Friday morning and I have rebooted the system at least 10 times since our last posts and this is what I have settled on for my /etc/init.d/mynet.sh:

<begin code>
#!/bin/sh
ifconfig eth0 down
ifconfig eth1 down
ifconfig eth2 down
/etc/init.d/networking stop
/etc/init.d/networking start
ifconfig eth2 up
<end code>

Shah, with the above script syntax Knoppix v-3.6 will (so far anyway) set my wireless to use a STATIC IP address. Ten reboots, ten with eth2 set to use a STATIC IP. Your last scrip syntax didn't set eth2 to STATIC IP all of the time, even tho' I set the numerical value of the script to '22'. The above syntax DOES seem to work but I will always check the IP upon logon. Thanks for your input.

FYI - after talking things over with a friiend, there possibly very relevant info I failed to convey - I have updated the system to a Debian Unstable (Sid) configuration. Also, I did a Debian HDD install.

Now for an off topic comment - I d/l'd Kanotix BH4 and as a live install it too has a problem with my Lucent wireless - a topic for a different time and place. But it does look interesting... ;-)

Ciao...