Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 May 2005 00:42:51 +0300
From:      Giorgos Keramidas <keramida@linux.gr>
To:        Michael Bretterklieber <mbretter@inode.at>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Multiple Interfaces with the same IP
Message-ID:  <20050508214251.GC2150@gothmog.gr>
In-Reply-To: <427E4ADD.70104@inode.at>
References:  <427E443B.9070301@inode.at> <200505081903.09631.max@love2party.net> <427E4ADD.70104@inode.at>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2005-05-08 19:22, Michael Bretterklieber <mbretter@inode.at> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050508214251.GC2150>