From owner-freebsd-questions Mon Oct 8 19:53:25 2001 Delivered-To: freebsd-questions@freebsd.org Received: from grumpy.dyndns.org (user-24-214-57-209.knology.net [24.214.57.209]) by hub.freebsd.org (Postfix) with ESMTP id A261637B406 for ; Mon, 8 Oct 2001 19:53:18 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by grumpy.dyndns.org (8.11.6/8.11.6) with ESMTP id f992r6w62557; Mon, 8 Oct 2001 21:53:11 -0500 (CDT) (envelope-from dkelly@grumpy.dyndns.org) Message-Id: <200110090253.f992r6w62557@grumpy.dyndns.org> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: freebsd-questions@FreeBSD.ORG Cc: Louis LeBlanc From: David Kelly Subject: Re: dhclient/ifconfig questions. In-reply-to: Message from Louis LeBlanc of "Mon, 08 Oct 2001 15:03:51 EDT." <20011008150351.A1543@acadia.ne.mediaone.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Date: Mon, 08 Oct 2001 21:53:06 -0500 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Louis LeBlanc writes: > Hey folks. A little rc.conf/ifconfig/dhcp trouble here. > = > Here is what I have: > = > fxp0 - internal interface > xl0 - external interface > = > fxp0 is easy. No problems configuring that. > = > xl0 is giving me a headache. Here is what I need to do: > Set ether to 00:A0:CC:33:55:25 and configure with dhclient. > Sounds easy, but . . . > = > Here is what I'm doing in rc.conf: > = > defaultrouter=3D"NO" > dhcp_program=3D/sbin/dhclient > dhcp_flags=3D"" > gateway_enable=3D"YES" > hostname=3D"acadia.ne.mediaone.net" > ifconfig_fxp0=3D"inet 10.8.20.5 netmask 255.255.255.0" > ifconfig_xl0=3D"DHCP ether 00:A0:CC:33:55:25" > . . . [...] > I looked thru the rc.conf manpage and could not find any details on > passing the ether setting to a dhcp configured interface. Is it > possible to do so? I know putting an ifconfig xl0 ether . . . command > in dhclient-enter-hooks won't work, since the address has to be right > before dhclient even requests an IP. > = > I won't really need it to work this way for long, > as I will be calling my ISP to set up the new hardware address once I > am fairly sure everything else works well. Typed a lot of great ideas and kept scratching my head, "How did I sub the new ethernet card for old late one night after the ISP's help line went to bed? Then thought to "grep lladdr /etc/*" and turned up some left over cruft: /etc/start_if.fxp0.old:ifconfig fxp0 lladdr 00:90:27:0d:e3:94 and remembered. Not sure its documented anywhere other than in /etc/rc.network but here it is: dhcp_interfaces=3D"" for ifn in ${network_interfaces}; do if [ -r /etc/start_if.${ifn} ]; then . /etc/start_if.${ifn} eval showstat_$ifn=3D1 fi Before dhclient is launched on dhpc interfaces, /etc/start_if.${ifn} is = executed if it exists. So make an /etc/start_if.xl0 containing ifconfig xl0 ether 00:A0:CC:33:55:25 and that's all there is to it. -- = David Kelly N4HHE, dkelly@hiwaay.net =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The human mind ordinarily operates at only ten percent of its capacity -- the rest is overhead for the operating system. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message