From owner-freebsd-questions Mon Dec 8 17:06:44 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id RAA07428 for questions-outgoing; Mon, 8 Dec 1997 17:06:44 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from emu.sourcee.com (emu.sourcee.com [199.201.159.173]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id RAA07414 for ; Mon, 8 Dec 1997 17:06:39 -0800 (PST) (envelope-from nrice@emu.sourcee.com) Received: (from nrice@localhost) by emu.sourcee.com (8.8.7/8.8.3) id UAA22923; Mon, 8 Dec 1997 20:06:04 -0500 (EST) Message-ID: <19971208200604.07183@emu.sourcee.com> Date: Mon, 8 Dec 1997 20:06:04 -0500 From: Norman C Rice To: Dean Hollister Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Setting up routing to a router References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Description: email message X-Mailer: Mutt 0.88 In-Reply-To: ; from Dean Hollister on Mon, Dec 08, 1997 at 06:10:34PM +0800 Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Mon, Dec 08, 1997 at 06:10:34PM +0800, Dean Hollister wrote: > > Hiyall, > > We have a router, its ip is 203.11.114.5, which is connected to > 203.11.114.1 via /dev/ed1. What is the exact syntax of the ifconfig > command to setup its routing, I assume I have to add a default route for > it in rc.local? > > Regards, > > d. > > +-------------------------------------------------------+ > | Dean Hollister, | dean@odyssey.apana.org.au | > | Perth, Western Australia. | deanh@iinet.net.au | > +-------------------------------------------------------+ > I assume you mean "ed1" not /dev/ed1 (there's no such thing). The file that you want to edit is /etc/rc.conf (/etc/sysconfig on pre 2.2.2). The following assumes that you have a class C address; if not, change the netmask entry. network_interfaces="lo0 ed1" # List of network interfaces. ifconfig_lo0="inet 127.0.0.1" # default loopback device configuration. ifconfig_ed1="inet 203.11.114.1 netmask 255.255.255.0" ### Network routing options: ### defaultrouter="203.11.114.5" # Set to default gateway (or NO). Reboot and a netstat "-rn" should show something similar to Destination Gateway Flags Refs Use Netif Expire default 203.11.114.1 UGSc 33 33147 ed1 127.0.0.1 127.0.0.1 UH 0 1490 lo0 -- Regards, Norman C. Rice, Jr.