Date: Mon, 08 Oct 2001 21:53:06 -0500 From: David Kelly <dkelly@hiwaay.net> To: freebsd-questions@FreeBSD.ORG Cc: Louis LeBlanc <leblanc+freebsd@smtp.ne.mediaone.net> Subject: Re: dhclient/ifconfig questions. Message-ID: <200110090253.f992r6w62557@grumpy.dyndns.org> In-Reply-To: Message from Louis LeBlanc <leblanc%2Bfreebsd@smtp.ne.mediaone.net> of "Mon, 08 Oct 2001 15:03:51 EDT." <20011008150351.A1543@acadia.ne.mediaone.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110090253.f992r6w62557>