Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Nov 2004 16:20:19 -0600 (CST)
From:      "David Kelly" <dkelly@hiwaay.net>
To:        <yannick_bre@yahoo.fr>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Multiple NICs
Message-ID:  <1713.207.111.173.106.1101766819.squirrel@webmail.dogbark.com>
In-Reply-To: <41AB94C9.7040901@yahoo.fr>
References:  <41AB94C9.7040901@yahoo.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
[...]
> None of the above work  (ie: they both make the default route go through
>  an0 - wifi - and i suspect this is because the wifi dhcp is slower to
> answer than the ethernet one), so i ended up commenting out the wifi
> line (an0) and activating it by hand when needed... However this is
> quite troublesome as it means killing the dhclient running, before
> running another dhclient an0... If anybody has a better suggestion for
> me I would be quite grateful!

A good place to start surfing in looking for solutions to this sort of
thing is /etc/defaults/rc.conf.

As you have discovered, the order of items listed in /etc/rc.conf doesn't
matter. That is because one literally is setting values of variables
there. Its some time later before those variables are actually used. If
you wish to continue this direction you might kill your dhclient process
which is running on fxp0 then manually start it again "dhclient fxp0". If
that results in the route you wish then you might be able to control the
start order with this in /etc/rc.conf:

network_interfaces="lo0 an0 fxp0"

Another thought from /etc/defaults/rc.conf is to set
defaultrotuer="1.2.3.4" (change to the real address your ISP provides. But
reading "man dhclient.conf" I think dhclient will clobber any static route
on lease renewal no matter if you set it by hand or with crafted interface
start order. So go read that man page and edit your /etc/dhclient.conf

The solution may lie in "man dhcp-options"







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1713.207.111.173.106.1101766819.squirrel>