From owner-freebsd-questions Mon Jan 13 3:50: 4 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 6DC0037B401 for ; Mon, 13 Jan 2003 03:50:03 -0800 (PST) Received: from anand.org (ip503c1252.speed.planet.nl [80.60.18.82]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3A6C743E4A for ; Mon, 13 Jan 2003 03:49:55 -0800 (PST) (envelope-from arb@anand.org) Received: from arb by mobile.anand.org with local (Exim 4.12) id 18Y36I-0002fD-00 for questions@freebsd.org; Mon, 13 Jan 2003 12:49:54 +0100 Date: Mon, 13 Jan 2003 12:49:54 +0100 From: Anand Buddhdev To: questions@freebsd.org Subject: Multiple network cards with IP addresses in the same network Message-ID: <20030113114954.GQ1330@anand.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i 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 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 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. -- Anand Buddhdev http://anand.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message