Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ifplugd
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
c707176
Apprentice
Apprentice


Joined: 01 Mar 2005
Posts: 215

PostPosted: Sat Mar 24, 2007 5:38 pm    Post subject: ifplugd Reply with quote

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
View user's profile Send private message
barran
Tux's lil' helper
Tux's lil' helper


Joined: 14 Jan 2003
Posts: 142
Location: Århus, DK

PostPosted: Sat Mar 24, 2007 5:47 pm    Post subject: Reply with quote

Well man ifplugd, man ifplugd.conf and /etc/conf.d/ifplugd should get you started.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Sun Mar 25, 2007 3:40 pm    Post subject: Reply with quote

/etc/conf.d/ifplugd is no longer used as it's been merged into baselayout

Instead you should be setting
ifplugd_eth0=".."
in /etc/conf.d/net if you really need to set anything, which by default you shouldn't have to.
_________________
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
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2588
Location: Near Toronto

PostPosted: Sun Mar 25, 2007 6:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Mon Mar 26, 2007 10:50 am    Post subject: Reply with quote

With that config, ifplugd should start automatically so there's no need for it in local.start
_________________
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
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2588
Location: Near Toronto

PostPosted: Mon Mar 26, 2007 11:48 am    Post subject: Reply with quote

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
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Mon Mar 26, 2007 2:14 pm    Post subject: Reply with quote

Right :)

Let net.eth0 auto start and it will use ifplugd if installed :)
_________________
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
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2588
Location: Near Toronto

PostPosted: Mon Mar 26, 2007 2:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Mon Mar 26, 2007 3:46 pm    Post subject: Reply with quote

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
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