Date: Mon, 29 Jun 2009 12:41:55 -0800 From: Mel Flynn <mel.flynn+fbsd.current@mailing.thruhere.net> To: freebsd-current@freebsd.org Cc: Brooks Davis <brooks@freebsd.org> Subject: Re: Interface dependencies Message-ID: <200906291241.56414.mel.flynn%2Bfbsd.current@mailing.thruhere.net> In-Reply-To: <20090629144205.GA83592@lor.one-eyed-alien.net> References: <200906271948.54745.mel.flynn%2Bfbsd.current@mailing.thruhere.net> <20090629144205.GA83592@lor.one-eyed-alien.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 29 June 2009 06:42:06 Brooks Davis wrote: > On Sat, Jun 27, 2009 at 07:48:54PM -0800, Mel Flynn wrote: > > Hi, > > > > maybe I'm overlooking something, so I thought I'd ask. > > As far as I can tell, there is no way to specify interface dependencies, > > so I have an issue I cannot seem to solve: > > - Create a lagg0 that has em and wlan0 at boot time, because wlan0 takes > > too long to be configured - and the default network_interfaces=AUTO sorts > > alphabetically which is not making matters easier. > > The interfaces should be in the order they are probed/created. No > sorting should be performed beyond moving lo0 to the front in the > default case. Then my probing is probably alphabetical as a coincedence. > > I've been trying to use hacks, but I think interfaces really need > > dependencies. Like ifconfig_lagg0_require="wlan0 em0", which would first > > configure wlan0, wait for it to be availabe, then em0 and finally lagg0. > > > > Is there something available, is it a known issue and ENOTIME to fix or > > am I missing something else? > > There isn't a feature to add dependencies, but there probably should be. I'll see what I can come up, cause on 7-STABLE box I've got similar issues with a bridge if I use WPA (i.e. hostapd). It seems like the proper solution even if there is no problem ;). > I'm not sure that's really what the problem is there though. > > > At present, my rc.conf entries are: > > # Need to do this manually to prevent alphabetical sorting. > > network_interfaces="wpi0 lo0 em0" > > cloned_interfaces="lagg0" > > wlans_wpi0="wlan0" > > ifconfig_wpi0="ether 00:16:36:f2:3b:84" > > ifconfig_wlan0="WPA" > > ifconfig_em0="up" > > ifconfig_lagg0="laggproto failover laggport em0" > > ifconfig_lagg0_alias0="laggport wlan0" > > ifconfig_lagg0_alias1="inet 192.168.2.50 netmask 255.255.255.0" > > > > And this gives me a lagg0 at boottime without wlan0, since the interface > > don't exist. I also cannot add inet commands to laggport commands, thus > > the alias trick is already needed, yet the delay caused by running > > separate commands does not seem to be enough to have wlan0 available. > > wlan0 should exist by the time lagg0 is created because it's created and > configured synchronously when wpi0 is configured. I know other people > are using lagg this way so I'm a bit confused as to what's wrong. > Enabling verbose start up and examining the output might be telling. I'll revert to what it "should really be" and keep rc_debug. Meanwhile I discovered create_args and made it a bit less hacky: /etc/start_if.wpi0 sets ether to em0 ether network_interfaces="wpi0 lo0 em0" cloned_interfaces="wlan0 lagg0" create_args_wlan0="wlandev wpi0 wlanmode sta" ifconfig_wlan0="WPA" ifconfig_em0="up" ifconfig_lagg0="laggproto failover laggport em0 laggport wlan0" ifconfig_lagg0_alias0="inet 192.168.2.50 netmask 255.255.255.0" I tried using wlanaddr in create_args_wlan0 but then ended up with a wpi0 with it's own MAC and wlan0 with the right one, which of course didn't associate. -- Mel
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906291241.56414.mel.flynn%2Bfbsd.current>