View previous topic :: View next topic |
Author |
Message |
c707176 Apprentice
Joined: 01 Mar 2005 Posts: 215
|
Posted: Sat Mar 24, 2007 5:38 pm Post subject: ifplugd |
|
|
Hi,
Is there a howto available for ifplud? I basically have a net.eth0 and a net.eth1 and I want ifplugd to automatically choose eth1 in case that no network cable is connected. All should be done at startup...
Would be nice if you can give me a link or an idea how to configure that... |
|
Back to top |
|
|
barran Tux's lil' helper
Joined: 14 Jan 2003 Posts: 142 Location: Århus, DK
|
Posted: Sat Mar 24, 2007 5:47 pm Post subject: |
|
|
Well man ifplugd, man ifplugd.conf and /etc/conf.d/ifplugd should get you started. |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
albright Advocate
Joined: 16 Nov 2003 Posts: 2588 Location: Near Toronto
|
Posted: Sun Mar 25, 2007 6:24 pm Post subject: |
|
|
Code: | /etc/conf.d/ifplugd is no longer used as it's been merged into baselayout |
that's interesting - is there a howto about using the integrated ifplugd
with arping anywhere? My /etc/conf./net starts like this:
Code: | # Enable arping mode
config_eth0=( "arping" )
# Define the gateways you want to configure
# You can consider each gateway as a profile
gateways_eth0="192.168.0.14 128.100.187.224 142.150.165.1"
# Define the IP and netmask when using gateway 192.168.0.14
config_192168000014=( "192.168.0.10 netmask 255.255.255.0" )
# Define the default route for gateway 192.168.0.14
routes_192168000014=( "default via 192.168.0.14" )
# Define the DNS servers to use with gateway 192.168.0.14
dns_servers_192168000014=( "192.168.0.14" )
|
Right now, I start ifplugd in local.start. Sounds like that is unnecessary.
Can I just add some kind of ifplugd_eth0 line at the beginning
of /etc/conf.d/net ? |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
albright Advocate
Joined: 16 Nov 2003 Posts: 2588 Location: Near Toronto
|
Posted: Mon Mar 26, 2007 11:48 am Post subject: |
|
|
Quote: | With that config, ifplugd should start automatically so there's no need for it in local.start |
maybe it should but it does not start automatically. Unless I start ifplugd, plugging
in my cable does nothing at all. Perhaps this is because I do not have net.eth0
auto start at boot time (I don't want it to come up unless a cable is plugged in).
Any enlightenment would be welcome... |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
albright Advocate
Joined: 16 Nov 2003 Posts: 2588 Location: Near Toronto
|
Posted: Mon Mar 26, 2007 2:54 pm Post subject: |
|
|
Quote: | Let net.eth0 auto start and it will use ifplugd if installed |
Good to know. But I think I prefer to auto start ifplugd and not have
eth0 up when there is no connection available ... 6 of one, half dozen
of the other I guess |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Mon Mar 26, 2007 3:46 pm Post subject: |
|
|
Eh, it's not UP as such.
net.eth0 starts
IN_BACKGROUND is not set, so we allow ifplugd to start
net.eth0 is now marked "inactive" and we exit gracefully
ifplugd spots the cable is plugged in, so sets IN_BACKGROUND and starts net.eth0 again.
This time, as IN_BACKGROUND is set we know we've been called from a controlling daemon, so we just continue and configure the interface.
If the interface is configured fine then we start any dependent services.
How this makes thing a little more clear _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
|
|