From owner-freebsd-net@FreeBSD.ORG Sun May 8 22:47:44 2005 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7678016A4E6 for ; Sun, 8 May 2005 22:47:44 +0000 (GMT) Received: from nic.ach.sch.gr (nic.sch.gr [194.63.238.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id BDDC143D8A for ; Sun, 8 May 2005 22:47:42 +0000 (GMT) (envelope-from keramida@linux.gr) Received: (qmail 26676 invoked by uid 207); 8 May 2005 22:47:41 -0000 Received: from keramida@linux.gr by nic by uid 201 with qmail-scanner-1.21 (sophie: 3.04/2.19/3.81. Clear:RC:1(81.186.70.51):. Processed in 0.979893 secs); 08 May 2005 22:47:41 -0000 Received: from dialup51.ach.sch.gr (HELO gothmog.gr) ([81.186.70.51]) (envelope-sender ) by nic.sch.gr (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 8 May 2005 22:47:39 -0000 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.3/8.13.3) with ESMTP id j48Lgq2m002348; Mon, 9 May 2005 00:42:52 +0300 (EEST) (envelope-from keramida@linux.gr) Received: (from giorgos@localhost) by gothmog.gr (8.13.3/8.13.3/Submit) id j48LgqUq002347; Mon, 9 May 2005 00:42:52 +0300 (EEST) (envelope-from keramida@linux.gr) Date: Mon, 9 May 2005 00:42:51 +0300 From: Giorgos Keramidas To: Michael Bretterklieber Message-ID: <20050508214251.GC2150@gothmog.gr> References: <427E443B.9070301@inode.at> <200505081903.09631.max@love2party.net> <427E4ADD.70104@inode.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <427E4ADD.70104@inode.at> cc: Max Laier cc: freebsd-net@freebsd.org Subject: Re: Multiple Interfaces with the same IP X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 May 2005 22:47:44 -0000 On 2005-05-08 19:22, Michael Bretterklieber wrote: >Max Laier wrote: >>On Sunday 08 May 2005 18:54, Michael Bretterklieber wrote: >>> it looks like that under 5-stable it's allowed to have different >>> interfaces with the same IP, bug or feature? >> >> Feature and required for CARP to function. You need to change your >> routeing > > ok, this make sense. > >> table to make sure the right one is used for outgoing traffic (or you >> just don't set the same IP on more than one interface). > > sure, but in my case the Iface is configured with Mpd. I'm trying to > catch that case, where a user with a static-IP (provided by the RADIUS > server) was logged in twice. I tried to catch the return value from > ifconfig, but since it's allowed to have multiple ifaces with the same > ip, ifconfig succeeds. > > ... so, it looks like I have to find another way :-( Does the following help? gothmog:/home/giorgos$ ifconfig -a | grep -q 127.0.0.1 ; echo $? 0 gothmog:/home/giorgos$ ifconfig -a | grep -q 127.0.0.2 ; echo $? 1