Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ifplugd, ath0 and eth0 problem[SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
nadi
Apprentice
Apprentice


Joined: 06 Aug 2004
Posts: 280
Location: Norway

PostPosted: Sat Aug 27, 2005 8:16 pm    Post subject: ifplugd, ath0 and eth0 problem[SOLVED] Reply with quote

hei all

I followed the thread https://forums.gentoo.org/viewtopic-t-298712.html in order to get a 'normal' operating network system, where the cable network, eth0, is always working IF the cable is plugged, and when I disconnect the cable, the wireless takes over and tries to connect (no scanning for now, only to a known essid with a known WEP key).

they both work well seperatly, but I cannot manage to do it automatically, though I followed everything in the thread https://forums.gentoo.org/viewtopic-t-298712.html

Does anyone have a operative ifplugd ?

Thanks,
Nadi


Last edited by nadi on Thu Sep 01, 2005 3:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
PRC
Apprentice
Apprentice


Joined: 15 Aug 2005
Posts: 191

PostPosted: Sun Aug 28, 2005 3:20 am    Post subject: Reply with quote

The script on that post requires you to have module removing compiled into the kernel. Here is my ifplugd.action contents:


Code:
case "$2" in
        up)
                state=start
                otherstate=stop
                ;;
        down)
                state=stop
                otherstate=start
                ;;
        *)
                echo "$0: wrong arguments"
                echo "Call with <interface> <up|down>"
                exit 1
                ;;
esac

if [ -x /etc/init.d/net.$1 ]
then
        /etc/init.d/net.$1 --quiet $state
        if [ $1 = eth0 ]; then
                /etc/init.d/net.eth1 --quiet $otherstate
               
        else
                /etc/init.d/net.eth0 --quiet $otherstate
                fi
        fi
        exit 0
else
        logger -t ifplugd.action "Error: Couldn't configure $1, no /etc/init.d/net.$1 script!"
        exit 1
fi


You might have to edit it a bit to get your th0 and eth0, but I believe that was the only thing that I tweaked of the directions.
Back to top
View user's profile Send private message
nadi
Apprentice
Apprentice


Joined: 06 Aug 2004
Posts: 280
Location: Norway

PostPosted: Mon Aug 29, 2005 4:49 pm    Post subject: Reply with quote

I did exactly what the instructions said, and changed wherever I saw eth0 to ath0 (since I am using athrons) and changed the modules to ath_pci instead of ipw2200.
Still does not working: I have ath0 always on!
Nadi
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Tue Aug 30, 2005 7:22 am    Post subject: Reply with quote

Foo! That ifplugd script is nasty!

use the Gentoo ifplugd.action script and baselayout-1.12.0
Works especially good with wpa_supplicant-0.4.x as well :)

With that, you have both interfaces active at the same time and we'll use the wire if we can. When the wire goes down, wireless "takes over" as it's already up. When the wire comes back up again, we use that.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
nadi
Apprentice
Apprentice


Joined: 06 Aug 2004
Posts: 280
Location: Norway

PostPosted: Wed Aug 31, 2005 12:23 am    Post subject: Reply with quote

Fancy that one! I like it, and when I first saw it, I thought it was strange that my wireless signal in on all the time, eventhough the cable was pluged, Now I understand.

To reverse the process of the script given above, originally taken from https://forums.gentoo.org/viewtopic-t-298712.html , I need to
1. re-link /etc/init.d/net.eth0 and net.ath0 to net.lo,
2. and put them both (net.etho and net.ath0) in default level.
3. then I have to re-emerge ifplugd to put the correct scripts.
4. I have to remove the script I put in /etc/init.d/ifstartup.
5. uncomment back the lines which start/stop interface in /etc/hotplug/net.agent

WHAT a mess. I hope I wont loose the wireless. But I will go back to the original gentoo ifplugd.

Thanks again, Uberlord.
Back to top
View user's profile Send private message
nadi
Apprentice
Apprentice


Joined: 06 Aug 2004
Posts: 280
Location: Norway

PostPosted: Thu Sep 01, 2005 7:57 am    Post subject: Reply with quote

so now that I have done everything I said above, boot does not takes ath0 up nor eth0. I have to manually take them up. I reemerged dhcpcd and ifplugd, as well as hotplug.

hm.. ? any Idea where the problem lies?
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu Sep 01, 2005 9:09 am    Post subject: Reply with quote

You configure ifplugd to monitor your wired devices only and then start ifplugd.
You need to configure net.ath0 to use wpa_supplicant and then add net.ath0 to the default runlevel (trust me on this).
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
nadi
Apprentice
Apprentice


Joined: 06 Aug 2004
Posts: 280
Location: Norway

PostPosted: Thu Sep 01, 2005 11:21 am    Post subject: Reply with quote

you mean to uncomment
Code:
# MONITOR_wlan0="yes"
from /etc/conf.d/ifplugd ?

what about the variable INTERFACE?
Code:
#INTERFACES="eth0"
INTERFACES="auto"

should it be on "eth0" instead of "auto"?

Thanks
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu Sep 01, 2005 11:39 am    Post subject: Reply with quote

ifplugd should not monitor wireless
ifplugd should monitor wired

conf.d/ifplugd
Code:
INTERFACES="eth0"

leave everything else at default settings
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
nadi
Apprentice
Apprentice


Joined: 06 Aug 2004
Posts: 280
Location: Norway

PostPosted: Thu Sep 01, 2005 12:16 pm    Post subject: Reply with quote

from the wiki wireless: http://gentoo-wiki.com/HOWTO_Wireless_Configuration_and_Startup

Quote:
Once installed, you can edit the /etc/wpa_supplicant.conf file by checking out the examples in /etc/wpa_supplicant.conf.example. This file contains many options, and is well documented, and is a little easier to setup for multiple APs than by using /etc/conf.d/wireless.


I strongly disagree that this file wpa_supplicant.conf.example is easy to understand. On the contrary: I, which know something about the OS and gentoo, but is weak in network, did not even manage to set a simple network it ssid="my_ssid" and a know simple ascii WEP key. The document is overwhelming for a beginner. One way to improve it (in my opinion) is to seperate it, for example with a horisontal line, for simple settings and advance settings, there, the simple settings include 2-3 examples for setting the ath0 (or wlan0) with ssid, WEP key (both ascii and hex) etc.

My opinion!

Nadi
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu Sep 01, 2005 1:32 pm    Post subject: Reply with quote

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=4

Gentoo wireless documentation
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
nadi
Apprentice
Apprentice


Joined: 06 Aug 2004
Posts: 280
Location: Norway

PostPosted: Thu Sep 01, 2005 1:47 pm    Post subject: Reply with quote

It's true, its true. I should have looked better. The gentoo hadbook is really helpfull.

Thanks, it is working now with wpa_supplicant.

you are great, Uberlord...
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu Sep 01, 2005 2:29 pm    Post subject: Reply with quote

nadi wrote:
you are great, Uberlord...


Yes, I really am 8)
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum