From owner-freebsd-questions@FreeBSD.ORG Sat Sep 4 15:40:01 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 61CCB16A4CE for ; Sat, 4 Sep 2004 15:40:01 +0000 (GMT) Received: from shockwave.systems.pipex.net (shockwave.systems.pipex.net [62.241.160.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7BFB643D1D for ; Sat, 4 Sep 2004 15:40:00 +0000 (GMT) (envelope-from mark.cullen@dsl.pipex.com) Received: from laptop (81-178-106-90.dsl.pipex.com [81.178.106.90]) by shockwave.systems.pipex.net (Postfix) with SMTP id 5F7C11C00150 for ; Sat, 4 Sep 2004 16:39:56 +0100 (BST) Message-ID: <000b01c49295$15ed6b80$f800000a@laptop> From: "Markie" To: Date: Sat, 4 Sep 2004 16:37:21 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Subject: Better way to get interface assigned to default route? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2004 15:40:01 -0000 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? So, simple question really... does anyone else know a better way this can be done, or is this the only way? If it's the only way i'll just change dhclient-script so it's fixed as fxp1 and doesn't do the whole netstat -rn thing to try and get that... Thanks.