Better way to get interface assigned to default route?
Remko Lodder
remko at elvandar.org
Sat Sep 4 09:23:52 PDT 2004
Hi Markie,
Markie wrote:
> Hi all,
>
> I just now replaced my 350MHz PII home server back to the old 133MHz PI to
> see if my crashing problems went away. I have noticed that dhclient-script
> does a `netstat -rn | grep "^default" | awk {'print $6'}` to get the
> interface that the default route is on, in my case my dsl modem is on fxp1.
> Since this is a slow machine however, this takes a very long time for it to
> do that command as I seem to have quite alot of...routing entries I guess
> they are?
Okay it seems to me that you want to use DHCP in order to get your ass
(machine) in the internet. That seems rather logically, only i use the
dhclient <interface> command (dhclient rl0 for example). To me it sounds
rather silly to do a netstat -rn command, checkup the default route
interface and then add dhcp stuff into it.. since dhcp sets these
default route for me..
Perhaps you can try and see if that works quicker :)
Cheers
--
Kind regards,
Remko Lodder |remko at elvandar.org
Reporter DSINet |remko at dsinet.org
Projectleader Mostly-Harmless |remko at mostly-harmless.nl
More information about the freebsd-questions
mailing list