From owner-freebsd-questions Mon Dec 16 4:55:45 2002 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 45C8237B401 for ; Mon, 16 Dec 2002 04:55:43 -0800 (PST) Received: from mail.prosyst.com (ns.prosyst.com [195.14.248.50]) by mx1.FreeBSD.org (Postfix) with SMTP id 6705C43EC5 for ; Mon, 16 Dec 2002 04:55:41 -0800 (PST) (envelope-from test@prosyst.com) Received: (qmail 7383 invoked from network); 16 Dec 2002 12:56:14 -0000 Received: from wizard.prosyst.com (HELO prosyst.com) (195.14.248.49) by ns.prosyst.com with SMTP; 16 Dec 2002 12:56:14 -0000 Message-ID: <3DFDCC1D.4030205@prosyst.com> Date: Mon, 16 Dec 2002 13:50:37 +0100 From: Boryan Yotov User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.0.1) Gecko/20021118 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Justin Burke Cc: questions@FreeBSD.ORG Subject: Re: Adding defaultroute References: <20021216110512.GZ59952@alt255.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 Hello, if you take a look at /etc/rc.network you should be able to see how to setup through which device your default route will go. Otherwise simply change the following entry from /etc/rc,conf: defaultrouter="xxx.xxx.xxx.xxx" to defaultrouter="xxx.xxx.xxx.xxx rl0" Concerning the "File exists" error - it is issued when you try to setup once a route to host, network (or in your case default route) when an entry already exists into the routing table. In your case this means tah somehow you've already had a default route specified and some of the network script try to specify a default route once again. I suppose this is because of the dDHCP client which you use. When you assign a network characteristic for a device using a DHCP client then if not explicitly forbiden you'll have a default route assigned through that device. Thus way it's possible both of your device to have default route assigned through each of them. Through which of them the default route will actually proceed depends on which should be initialized first. So I think the clearest way (without error messages) is to deny default route assigning from your DHCP client (and to use the /etc/rc.conf entry which I wrote above). And finally, I hope this'll help :) Justin Burke wrote: > I'm having trouble getting a dual-homed system to setup the default > route correctly on bootup. Here are the relevant lines from my rc.conf: > > ifconfig_rl0="inet xx.xx.xx.xxx netmask 255.255.255.0" > ifconfig_xl0="DHCP" > defaultrouter="xx.xx.xx.x" > > During bootup, the system enables the default route to go through the xl0 > card, which I don't want; I'd like to enable to default route to go > through the rl0 card. > > After the network cards are setup, here is what is printed to the > console: > > route: writing to routing socket: File exists > add net default: gateway xx.xx.xx.xx: File exists > > Any suggestions? > > Justin > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message