From owner-freebsd-hackers Tue Jan 14 23: 9:12 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D03B737B401 for <freebsd-hackers@FreeBSD.ORG>; Tue, 14 Jan 2003 23:09:10 -0800 (PST) Received: from cain.gsoft.com.au (genesi.lnk.telstra.net [139.130.136.161]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0A93C43ED8 for <freebsd-hackers@FreeBSD.ORG>; Tue, 14 Jan 2003 23:09:08 -0800 (PST) (envelope-from doconnor@gsoft.com.au) Received: from [127.0.0.1] (localhost [127.0.0.1]) by cain.gsoft.com.au (8.12.4/8.12.6) with ESMTP id h0F793iX007601; Wed, 15 Jan 2003 17:39:03 +1030 (CST) (envelope-from doconnor@gsoft.com.au) X-Authentication-Warning: cain.gsoft.com.au: Host localhost [127.0.0.1] claimed to be [127.0.0.1] Subject: Re: adding some new IPs from a different subnet - errors From: "Daniel O'Connor" <doconnor@gsoft.com.au> To: Josh Brooks <user@mail.econolodgetulsa.com> Cc: freebsd-hackers@FreeBSD.ORG In-Reply-To: <20030114224329.Y39623-100000@mail.econolodgetulsa.com> References: <20030114224329.Y39623-100000@mail.econolodgetulsa.com> Content-Type: text/plain Organization: Message-Id: <1042614542.13691.113.camel@chowder.gsoft.com.au> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.0 Date: 15 Jan 2003 17:39:03 +1030 Content-Transfer-Encoding: 7bit X-Spam-Score: -1 () CARRIAGE_RETURNS,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01 X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: <freebsd-hackers.FreeBSD.ORG> List-Archive: <http://docs.freebsd.org/mail/> (Web Archive) List-Help: <mailto:majordomo@FreeBSD.ORG?subject=help> (List Instructions) List-Subscribe: <mailto:majordomo@FreeBSD.ORG?subject=subscribe%20freebsd-hackers> List-Unsubscribe: <mailto:majordomo@FreeBSD.ORG?subject=unsubscribe%20freebsd-hackers> X-Loop: FreeBSD.ORG On Wed, 2003-01-15 at 17:15, Josh Brooks wrote: > defaultrouter="10.10.10.1" > ifconfig_fxp0="inet 10.10.10.2 netmask 255.255.255.0" > ifconfig_fxp0_alias0="inet 10.10.10.3 netmask 255.255.255.255" > > Ok, easy enough - one interface, one default router, and two IPs on that > subnet. > > BUT - as it happens, 10.10.10.1 is _also_ the default router for > 192.168.0.0/24 ... it has the IP 192.168.0.1, but it also has the IP of > 10.10.10.1 - it is the same default router, but with a few different > subnets on it. > > So, I went and added one of the 192 addresses to my system: > > defaultrouter="10.10.10.1" > ifconfig_fxp0="inet 10.10.10.2 netmask 255.255.255.0" > ifconfig_fxp0_alias0="inet 10.10.10.3 netmask 255.255.255.255" > ifconfig_fxp0_alias1="inet 192.168.0.2 netmask 255.255.255.255" Change the netmask for alias0 to be 255.255.255.0. You only need a 'point to point' (255.255.255.255) netmask if the alias would conflict with an existing subnet (as in how you have alias0) -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 9A8C 569F 685A D928 5140 AE4B 319B 41F4 5D17 FDD5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message