From owner-freebsd-questions Mon Jan 13 6: 4:28 2003 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 9E93437B401 for ; Mon, 13 Jan 2003 06:04:26 -0800 (PST) Received: from sccrmhc01.attbi.com (sccrmhc01.attbi.com [204.127.202.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id C43E443F1E for ; Mon, 13 Jan 2003 06:04:25 -0800 (PST) (envelope-from freebsd-questions-local@be-well.no-ip.com) Received: from be-well.ilk.org (lowellg.ne.client2.attbi.com[24.147.188.198]) by sccrmhc01.attbi.com (sccrmhc01) with ESMTP id <2003011314041900100h0upke>; Mon, 13 Jan 2003 14:04:19 +0000 Received: from be-well.ilk.org (lowellg.ne.client2.attbi.com [24.147.188.198] (may be forged)) by be-well.ilk.org (8.12.6/8.12.6) with ESMTP id h0DE4J8O018038 for ; Mon, 13 Jan 2003 09:04:19 -0500 (EST) (envelope-from freebsd-questions-local@be-well.no-ip.com) Received: (from lowell@localhost) by be-well.ilk.org (8.12.6/8.12.6/Submit) id h0DE4Jhi018035; Mon, 13 Jan 2003 09:04:19 -0500 (EST) X-Authentication-Warning: be-well.ilk.org: lowell set sender to freebsd-questions-local@be-well.ilk.org using -f To: freebsd-questions@freebsd.org Subject: Re: Multiple network cards with IP addresses in the same network References: <20030113114954.GQ1330@anand.org> From: Lowell Gilbert Date: 13 Jan 2003 09:04:18 -0500 In-Reply-To: <20030113114954.GQ1330@anand.org> Message-ID: <44ptr16t99.fsf@be-well.ilk.org> Lines: 32 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 Anand Buddhdev writes: > I have a FreeBSD 4.7 system, with 3 ethernet cards. The first two > are recognised as fxp0 and fxp1 and the second as em0 (intel gigabit > card). I configured the em0 with address 192.168.0.1/24. I then wanted > to configure fxp0 with the address 192.168.0.2/24, and also connect it > to the switch so that I can connect to the server via both addresses. > However, FreeBSD's ifconfig command fails, and won't let me add the second > address to the fxp0 interface. I read the manual page about ifconfig, > and read about aliases, where it said that for aliases, I must use the > netmask /32. When I do try to add the second address with a netmask of > /32, it works, but it doesn't make sense to me. How is that interface > going to to know that it is part of a /24 network if I use a /32 netmask? > > Would anyone be kind enough to explain why: > > 1. For aliases, I need the /32 mask You don't, *unless* the address is inside of a subnet for which you already have a route. In that case, you obviously need to avoid ambiguity. > 2. Adding a second IP to a *different* network card in the same server > does not work if the second IP is within the network of the first one. Because when a packet comes in for that network, there's no way to tell which card it should go to. I think you need to rethink your network design a bit. If you have different Ethernet links, you should either bridge or route between them. If you want to route between them, they almost always should have distinct subnet ranges. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message