Re: Fundamental "howto" question
Ed W
Wed Aug 19 15:39:10 2009
Anyone?
Note, could be an openrc issue, but for reference I notice if I add
rc_hotplug="net.wlan"
Then all my ethN ports are also hotplugged. is this intended?
Ed W
Ed W wrote:
Assuming Openrc 0.4.3, and dhcpcd-0.50, I'm a bit baffled about how to
actually configure all the bits to fit together...
Here's my scenario:
- eth0 - outbound broadband link, dhcp client. Will become the default
route when connected (may be only intermittently connected)
- eth1/2 - in a bridge with wlan0. fixed IP, offers dhcp to client on
local net
- wlan0 - in a bridge with eth1/2. fixed IP, offers dhcp to clients on
local net. hostapd
- wlan1 - user may plug in extra wifi card. will act as default
outbound route when connected, dhcp client (intermittently connected,
either card can be missing, or may not be in range of network)
- ppp connection - user may use a backup dialout route
- given multiple possible outbound routes I want to prefer the default
gateway via wireless, then the wired, then the backup ppp connection
(so to summarise, we have a router. clients connect via 2 wired ports
and one wireless port, all in a bridge. Outbound is via either wired
link, additional wifi card or ppp dialup)
Now, I'm mainly baffled by how openrc/dhcpcd wants me to work with
- hotplugged interfaces (wlan1)
- dhcpcd'd interfaces which may not have anything connected (eth0)
- static interfaces (my bridge)
What I observe is:
- If I *don't* start /etc/init.d/dhcpcd then when I try and start
/etc/init.d/net.eth0 with nothing connected, then it hangs for what I
guess is a 30 second timeout looking for a dhcp server. It would
appear that the link state check isn't being checked?
- If I do start dhcpcd then if the cable is plugged, it configures
eth0 without even starting net.eth0 (which is presumably expected).
If I manually start net.eth0 then it mutters about connecting to the
master dhcpcd process, then carries on straight away regardless of
whether the cable is plugged or not (ie no delay even if cable not
connected)
- If I set hotplugging on any net interface (eg net.wlan), then it
seems that all the manually started interfaces start before dhcpcd
starts (dependency bug?). This leads to the unplugged interfaces
hanging for about 30 secs. Then later dhcpcd starts, then for
whatever reason something else tries to start the interfaces again,
but this time they run through quickly (dhcpcd obviously started
now). Looking at the dependencies I see no reason why dhcpcd should
start before any interfaces?
- It would appear if I don't start net.ethX for something configured
as a static ip, then dhcpcd grabs it and gives it a dynamic address.
I suspect that the boot process therefore first gives all my
interfaces dhcp addresses, then later in the process these are
replaced with static ips (or whatever /etc/conf.d/net specifies)
So how should I be configuring all this! Lets also assume that the
above isn't set in stone and I will be adding a GUI so that the user
can reconfigure all the interfaces, dhcp/static, etc. So I need to
get something scalable and flexible and easy to reconfigure
I'm mainly confused on how dhcpcd should be leveraged in all this. It
seems that dhcpcd is doing a bit too much and it's not clear how to
dovetail it with the openrc net scripts?
Also how does this all change with openrc 0.50... ?
It's possible I missed a bunch of documentation - pointers
appreciated. However, grateful for some suggestions on how to
implement such a setup and in particular how to make best use of
dhcpcd? Please don't overthink the scenario above, it's the big
picture I'm after, the above just illustrates a reasonably
comprehensive configuration
Thanks
Ed W
Archive administrator: postmaster@marples.name